emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Seeing all the steps when I run an R code block


From: Jeremie Juste
Subject: Re: Seeing all the steps when I run an R code block
Date: Sun, 27 Nov 2022 17:02:36 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)

Hello Ihor,

On Sunday, 27 Nov 2022 at 11:52, Ihor Radchenko wrote:>

> So, if R has some way to override the working directory, we should
> enforce what we promise in the above section of our manual anyway.
>
> Otherwise, the will lose on Org document reproducibility.

This is a fair point, many thanks the insights.

ESS indeed overrides the working directory when ess-startup-directory is
set to nil. It only happens when :sessions are used though. Here I
created created a git repository in /tmp/test, and when a process is
initiated with session (the last code chunk) the process is started in
at the root of the git repository. 

#+BEGIN_SRC elisp
  (setq ess-startup-directory nil)
#+END_SRC

#+BEGIN_SRC elisp
  default-directory
#+END_SRC

#+RESULTS:
: /tmp/test/books/reading/


#+BEGIN_SRC R
    getwd()
#+END_SRC

#+RESULTS:
: /tmp/test/books/reading


#+begin_src R :session R:testing :results value
getwd()
#+end_src

#+RESULTS:
: /tmp/test

Thanks again, I'll improve this.

Best regards,
Jeremie



reply via email to

[Prev in Thread] Current Thread [Next in Thread]