[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Set Python shell in Org edit buffer
From: |
Jack Kamm |
Subject: |
Re: [PATCH] Set Python shell in Org edit buffer |
Date: |
Sun, 07 Jan 2024 11:06:29 -0800 |
Ihor Radchenko <yantar92@posteo.net> writes:
> So, a good option could be
> (1) removing (org-babel-comint-buffer-livep session) from
> `org-src-associate-babel-session'
> (2) Removing `org-babel-edit-prep:R'
>
> With the above, we can use `org-babel-python-associate-session'
Sounds good to me.
> I imagine that both #1 and #2 should happen in
> org-babel-<lang>-associate-session. #1 should probably be discouraged,
> and it looks like even for ob-R creating new session is not really
> necessary.
It looks like ob-R and ob-julia are the only languages that start
sessions on edit (based on grepping for "edit-prep" and
"associate-session").
I think their behavior is peculiar enough to have an ob-R/julia-specific
option on whether to initiate session on edit, with options nil, t, and
earmuffs. Earmuffs is the current behavior, but it's surprising enough
(IMO) that it might be worth changing the default to nil or t. But still
worth keeping the earmuffs option since this behavior seems to go back
to the original implementation (30931bfe1). If it helps, I can prepare a
patch for this after you've made the changes for
org-babel-<lang>-associate-session.
In my notebooks I generally define my ob-R sessions to have earmuffs
(like ":session *R:project-name*") so that they can easily work with
"M-x R" (which names sessions as such by default). Until now I did not
realize this was the culprit for the annoying (and undocumented) startup
behavior I was experiencing.
- Re: [PATCH] Set Python shell in Org edit buffer, Ihor Radchenko, 2024/01/05
- Re: [PATCH] Set Python shell in Org edit buffer, Jack Kamm, 2024/01/07
- Re: [PATCH] Set Python shell in Org edit buffer, Ihor Radchenko, 2024/01/07
- Re: [PATCH] Set Python shell in Org edit buffer,
Jack Kamm <=
- Re: [PATCH] Set Python shell in Org edit buffer, William Denton, 2024/01/07
- Re: [PATCH] Set Python shell in Org edit buffer, Ihor Radchenko, 2024/01/08
- Re: [PATCH] Set Python shell in Org edit buffer, Jack Kamm, 2024/01/08
- Re: [PATCH] Set Python shell in Org edit buffer, Jack Kamm, 2024/01/08
- Re: [PATCH] Set Python shell in Org edit buffer, Ihor Radchenko, 2024/01/09
- Re: [PATCH] Set Python shell in Org edit buffer, Jack Kamm, 2024/01/10
- [FR] Add buffer-local setting to request specific ESS process/session name (was: [PATCH] Set Python shell in Org edit buffer), Ihor Radchenko, 2024/01/10
- Re: [FR] Add buffer-local setting to request specific ESS process/session name (was: [PATCH] Set Python shell in Org edit buffer), Sparapani, Rodney, 2024/01/12
- Re: [FR] Add buffer-local setting to request specific ESS process/session name (was: [PATCH] Set Python shell in Org edit buffer), Sparapani, Rodney, 2024/01/12
- Re: [FR] Add buffer-local setting to request specific ESS process/session name (was: [PATCH] Set Python shell in Org edit buffer), Ihor Radchenko, 2024/01/10