[Top][All Lists]

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

Re: [PATCH] Set Python shell in Org edit buffer

From: Ihor Radchenko
Subject: Re: [PATCH] Set Python shell in Org edit buffer
Date: Fri, 08 Dec 2023 13:09:54 +0000

Liu Hui <liuhui1610@gmail.com> writes:

>> What about displaying a yes/no query about starting a new session when
>> there is none?
> I think it is OK. I can add an option to allow users to disable the
> query. WDYT?

I now have second thoughts about obsoleting
If we need a customization for the new session dialogue, I expect that
users will be willing to set it for all src blocks that support such a
feature, not just python. But then we somehow need to make this global
customization visible to babel backend authors - something we normally
do using the set of org-babel-...:<lang> functions.

What I am thinking now is
1. Introduce a global customization for users to choose whether to
   start a new session in org-src buffers with allowed values t, nil,
   'ask, or an alist of (lang . t/nil/ask) for per-language customization.
2. Check the new variable and attempt to run
   `org-babel-<lang>-associate-session' in org-src-mode definition.


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]