[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Set Python shell in Org edit buffer
From: |
Liu Hui |
Subject: |
Re: [PATCH] Set Python shell in Org edit buffer |
Date: |
Sat, 9 Dec 2023 10:33:57 +0800 |
Ihor Radchenko <yantar92@posteo.net> 于2023年12月8日周五 21:06写道:
>
> 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
> org-babel-<lang>-associate-session.
> 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.
I think it makes sense. Currently, org-babel-edit-prep:R/julia always
start the session when editing src blocks with a valid session header,
and other backends don't. It would allow users to change the behavior.
> 2. Check the new variable and attempt to run
> `org-babel-<lang>-associate-session' in org-src-mode definition.
I think associating the edit buffer with some session doesn't require
starting the session, which is at least feasible for ob-python. When
editing python src block, users can use C-c C-p to start the session
themselves for evaluating code. So it would be nice to allow a value
of 'associate in the customization, which means just running
`org-babel-<lang>-associate-session'.
- [PATCH] Set Python shell in Org edit buffer, Liu Hui, 2023/12/05
- Re: [PATCH] Set Python shell in Org edit buffer, Ihor Radchenko, 2023/12/05
- Re: [PATCH] Set Python shell in Org edit buffer, Liu Hui, 2023/12/05
- Re: [PATCH] Set Python shell in Org edit buffer, Ihor Radchenko, 2023/12/06
- Re: [PATCH] Set Python shell in Org edit buffer, Liu Hui, 2023/12/06
- Re: [PATCH] Set Python shell in Org edit buffer, Ihor Radchenko, 2023/12/07
- Re: [PATCH] Set Python shell in Org edit buffer, Liu Hui, 2023/12/07
- Re: [PATCH] Set Python shell in Org edit buffer, Ihor Radchenko, 2023/12/07
- Re: [PATCH] Set Python shell in Org edit buffer, Liu Hui, 2023/12/08
- Re: [PATCH] Set Python shell in Org edit buffer, Ihor Radchenko, 2023/12/08
- Re: [PATCH] Set Python shell in Org edit buffer,
Liu Hui <=
- Re: [PATCH] Set Python shell in Org edit buffer, Ihor Radchenko, 2023/12/09
- Re: [PATCH] Set Python shell in Org edit buffer, Liu Hui, 2023/12/09
- Re: [PATCH] Set Python shell in Org edit buffer, Jack Kamm, 2023/12/27
- Re: [PATCH] Set Python shell in Org edit buffer, Ihor Radchenko, 2023/12/28
- Re: [PATCH] Set Python shell in Org edit buffer, Jack Kamm, 2023/12/31
- Re: [PATCH] Set Python shell in Org edit buffer, Jack Kamm, 2023/12/27
- Re: [PATCH] Set Python shell in Org edit buffer, Ihor Radchenko, 2023/12/28
- Re: [PATCH] Set Python shell in Org edit buffer, Jack Kamm, 2023/12/29
- Re: [PATCH] Set Python shell in Org edit buffer, Ihor Radchenko, 2023/12/31
- Re: [PATCH] Set Python shell in Org edit buffer, Jack Kamm, 2023/12/31