[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Set Python shell in Org edit buffer
From: |
Christopher M. Miles |
Subject: |
Re: [PATCH] Set Python shell in Org edit buffer |
Date: |
Sat, 06 Jan 2024 07:29:44 +0800 |
User-agent: |
mu4e 1.11.6; emacs 30.0.50 |
Ihor Radchenko <yantar92@posteo.net> writes:
> Now, the question is what to do with the existing implementation of
> `org-src-associate-babel-session'. It only runs
> org-babel-<lang>-associate-session when
>
> (and session (not (string= session "none"))
> (org-babel-comint-buffer-livep session)
> (let ((f (intern (format "org-babel-%s-associate-session"
> (nth 0 info)))))
> (and (fboundp f) (funcall f session))))
>
> The questionable check here is (org-babel-comint-buffer-livep session) -
> it only triggers when session is already initiated, while ob-python and
> some other backends do not necessarily need to start a new session to
> "associate" it with Org Src buffer.
>
> I am tentatively inclined to change this check to
>
> (or (org-babel-comint-buffer-livep session)
> (eq org-src-auto-initiate-session t)
> (alist-get (nth 0 info) org-src-auto-initiate-session)
> (alist-get 'default org-src-auto-initiate-session))
>
> With `org-src-auto-initiate-session' being a customization that controls
> whether to associate session for a given babel backend.
>
> We may set the default value to something like
>
> ((default . t) ("R" . nil))
I think this customization is reasonable. Agree to make it as a
customization option, The ob-clojure CIDER session which managed by
"sesman" seems also requires buffer associate with session.
--
[ stardiviner ]
I try to make every word tell the meaning that I want to express without
misunderstanding.
Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
signature.asc
Description: PGP signature
- Re: [PATCH] Add buffer-local setting to request specific ESS process/session name (was: [PATCH] Set Python shell in Org edit buffer), (continued)
- Re: [PATCH] Add buffer-local setting to request specific ESS process/session name (was: [PATCH] Set Python shell in Org edit buffer), Sparapani, Rodney, 2024/01/25
- Re: [PATCH] Add buffer-local setting to request specific ESS process/session name (was: [PATCH] Set Python shell in Org edit buffer), Ihor Radchenko, 2024/01/25
- Re: [PATCH] Add buffer-local setting to request specific ESS process/session name (was: [PATCH] Set Python shell in Org edit buffer), Sparapani, Rodney, 2024/01/25
- Re: [PATCH] Add buffer-local setting to request specific ESS process/session name (was: [PATCH] Set Python shell in Org edit buffer), Ihor Radchenko, 2024/01/25
- Re: [PATCH] Set Python shell in Org edit buffer, Ihor Radchenko, 2024/01/10
- Re: [PATCH] Set Python shell in Org edit buffer, Jack Kamm, 2024/01/14
- Re: [PATCH] Set Python shell in Org edit buffer, Ihor Radchenko, 2024/01/16
- Re: [PATCH] Set Python shell in Org edit buffer, Jack Kamm, 2024/01/16
- Re: [PATCH] Set Python shell in Org edit buffer, Ihor Radchenko, 2024/01/28
- Re: [PATCH] Set Python shell in Org edit buffer, Jack Kamm, 2024/01/28
Re: [PATCH] Set Python shell in Org edit buffer,
Christopher M. Miles <=
Re: [PATCH] Set Python shell in Org edit buffer, Ihor Radchenko, 2024/01/05
Re: [PATCH] Set Python shell in Org edit buffer, Ihor Radchenko, 2024/01/28