[ Adding Org mailing list back to CC to keep the conversation public ] Sam Crawford <s...@crawf.uk> writes:
>> May you please create a reproducer? > > Sure: evaluating the following code cell > > #+begin_src R :session R :async yes :results file graphics :file test.png > plot(iris$Sepal.Length, iris$Sepal.Width) > #+end_src > > will call run-ess-r, which gives a prompt asking for the "R starting > directory". Selecting any directory other than the directory the org file is > located in will cause the issue. I can reproduce, but I am not sure if this is something we are supposed to fix. The Org mode manual says the following about :dir header argument in code blocks: The ‘dir’ header argument specifies the default directory during code block execution. If it is absent, then the directory associated with the current buffer is used. ... When ‘dir’ is used with ‘session’, Org sets the starting directory for a new session. But Org does not alter the directory of an already existing session. ob-R currently does not obey what the manual says, and, when :dir is omitted, allows the session directory to be set via prompt rather than keeping the Org buffer's directory. I'd like to hear from ob-R/ob-julia users whether the current behavior is something they rely on. If not, I'd prefer to follow the conventions we introduce in the manual and suppress the ESS's directory prompt. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>