quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.87k stars 317 forks source link

Don't fail running chunk interactively in IDE or VSCODE when `ojs_define()` is present in chunk #4314

Open cderv opened 1 year ago

cderv commented 1 year ago

ojs_define() is a function that can be used in Quarto cells for R Julia and Python. When used in such chunk, one can't execute the cell interactively because the function only works when rendering the whole document.

However, maybe it would be easier for our integrated tool (IDE, VSCODE, ...) to "ignore" the ojs_define() when running the cell interactively. OJS can't work interactively, but other chunks could.

Do you think this is something feasible and valuable ? Not sure how interactive run of cells works in RStudio IDE or VSCODE, and asking here before opening issue in different repo to track idea.

(I got bitten by that once, and some users too that is why I thought about that)

cderv commented 1 year ago

From discussion with @cscheid , this should be solved at some point with new feature coming about exchanging information between computation language (R, Python, ...) and Quarto. This means a ojs_define() function can be available in R directly for example, and works in R then.

cscheid commented 1 year ago

The API will be there in 1.3, but the changes to the runtime will come in 1.4.