emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Async Python src block behavior with :dir header property


From: Jack Kamm
Subject: Re: Async Python src block behavior with :dir header property
Date: Fri, 02 Feb 2024 17:20:25 -0800

Ihor Radchenko <yantar92@posteo.net> writes:

> The patch generally looks reasonable, although I am slightly concerned
> about interaction between :dir and session we describe in the manual:
>
>     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.

I agree it's a problem -- if there are multiple blocks with the same
session but different ":dir" arguments, then a ":file" result of the
second block will be relative to the wrong :dir.

This seems like a longstanding problem, and affects both async and
non-async session blocks.

Ideally, ":dir" should be set at session level rather than block
level. This could be done via PROPERTY if there is only one session in
the file or subtree, but there isn't a mechanism for this more
generally.

Perhaps the simplest solution is to add a check to org-lint, requiring
all blocks with the same session to have the same :dir.



reply via email to

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