posit-dev / posit-dev/positron

Support `rstudioapi::documentOpen()` + open file at line

Open
#6,995 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement lang: r support
Dominant language
TypeScript
Stars
4.3k
Forks
184
Avg merge
1d 9h
Merged PRs (30d)
195

Description

System details:

Positron Version: 2025.04.0 (user setup) build 173
Code - OSS Version: 1.97.0
Commit: a66eb310f218298f263a98c9f06268d93bab6b2c
Date: 2025-03-24T02:55:38.897Z
Electron: 32.2.7
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.22631

Positron and OS details:
Interpreter details:

R 4.4.1

Describe the issue:

I just noticed that Positron supports rstudioapi::navigateToFile(), but not rstudioapi::documentOpen().

rstudioapi::hasFun("navigateToFile")
#> [1] TRUE
rstudioapi::hasFun("documentOpen")
#> [1] FALSE

I wonder if documentOpen() could be supported as well.

Some discussion about the difference https://github.com/rstudio/rstudioapi/issues/262

Expected or desired behavior:

Both work

Were there any error messages in the UI, Output panel, or Developer Tools console?

N/A

Edit: related to #8374

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the existing support for rstudioapi::navigateToFile() with the requested rstudioapi::documentOpen(), and read the related issue #8374 and linked rstudioapi discussion. Done means hasFun("documentOpen") reports TRUE and documentOpen() opens the requested file, including at the requested line.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, typescript
Domain
api, developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.