[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: |
Mon, 08 Jan 2024 20:09:15 -0800 |
Ihor Radchenko <yantar92@posteo.net> writes:
> Note that I proposed to remove auto-starting session completely, which
> is in odds to what you propose below.
Sure, I'm fine with that -- it seems like a reasonable change.
> IMHO, it might be enough to adjust org-babel-R-associate-session as the
> following
>
> (defun org-babel-R-associate-session (session)
> "Associate R code buffer with an R session.
> Make SESSION be the inferior ESS process associated with the
> current code buffer."
> (setq ess-local-process-name
> (process-name (get-buffer-process session)))
> (when ess-local-process-name (ess-make-buffer-current))
> (setq-local ess-gen-proc-buffer-name-function (lambda (_) session)))
I think you need to check that (get-buffer-process session) is non-nil
before calling process-name, otherwise you'll get (wrong-type-argument
processp nil).
Also it seems unnecessary to call `ess-make-buffer-current', as it's
already called by `ess-force-buffer-current' (which is called by
`ess-eval-region'). Though it doesn't hurt to call it, either.
Otherwise, this looks good to me.
- 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, 2024/01/07
- 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 <=
- 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
- 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
- Re: [External] [FR] Add buffer-local setting to request specific ESS process/session name (was: [PATCH] Set Python shell in Org edit buffer), Richard M. Heiberger, 2024/01/12