emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Adam Sneller <adam@earth2adam.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Persisting the current working directory in an org-babel session
Date: Tue, 09 Apr 2024 13:23:52 +0000	[thread overview]
Message-ID: <87r0fer7o7.fsf@localhost> (raw)
In-Reply-To: <871qoe8k9e.fsf@localhost>

Ihor Radchenko <yantar92@posteo.net> writes:

>> For example, consider the following:
>> 	* Literate programming in a single session
>> 	: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

Handled, on main.

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	other threads:[~2024-04-09 13:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-01 12:34 Persisting the current working directory in an org-babel session Adam Sneller
2023-01-01 13:19 ` Ihor Radchenko
2024-04-09 13:23   ` Ihor Radchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r0fer7o7.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=adam@earth2adam.com \
    --cc=emacs-orgmode@gnu.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).