[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: Thu, 07 Dec 2023 10:36:04 +0000

Liu Hui <liuhui1610@gmail.com> writes:

>> May you also mention what this means in practice? Like that users can
>> now send region for evaluation right from the edit src buffer?
>> Otherwise, it may not be very clear for ordinary users what this feature
>> adds.
> Yes, I have updated the text and you're welcome to improve it. Thanks!

Thanks for the update!

> +(defun org-babel-edit-prep:python (info)
> +  "Set Python shell in Org edit buffer according to INFO."
> +  (let ((session (cdr (assq :session (nth 2 info)))))
> +    (when (and session (not (string= session "none")))
> +      (setq-local python-shell-buffer-name
> +                  (org-babel-python-without-earmuffs session)))))

Will this work if Python session does not exist yet?

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]