posit-dev / posit-dev/positron
Support `rstudioapi::documentOpen()` + open file at line
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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