emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Persisting the current working directory in an org-babel session


From: Ihor Radchenko
Subject: Re: Persisting the current working directory in an org-babel session
Date: Tue, 09 Apr 2024 13:23:52 +0000

Ihor Radchenko <yantar92@posteo.net> writes:

>> For example, consider the following:
>>
>>      * Literate programming in a single session
>>      :PROPERTIES:
>>      :header-args: :var DIR="/Users/adam/Desktop/test"
>>      :END:
>>
>>      #+BEGIN_SRC emacs-lisp :session *elisp*
>>      (cd DIR)
>>      #+END_SRC
> ...
> Confirmed.

Hmm... I am looking at this again, and there is actually no bug here:

1. ob-emacs-lisp.el does not support sessions, so :session *elisp* does
   not thing in this case

2. without :session, Org babel does the following:

   16.4 Environment of a Code Block
   ...
   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.

So, if we ever add session feature to ob-emacs-lisp, what was tried in
the report should be doable - one could retain working directory across
source blocks. But since ob-emacs-lisp does not support sessions, the
only actual problem is the fact that :session argument is silently
ignored without bringing absence of session support to the user
attention.

Handled, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=d1c6f91ce

-- 
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>



reply via email to

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