GNU bug report logs - #50514
28.0.50; org inline call to python src block req C-g to break

Previous Next

Package: org-mode;

Reported by: "Barton, Mark" <Mark.Barton <at> disney.com>

Date: Fri, 10 Sep 2021 23:13:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: "Barton, Mark" <Mark.Barton <at> disney.com>
To: Augusto Stoffel <arstoffel <at> gmail.com>
Cc: "50514 <at> debbugs.gnu.org" <50514 <at> debbugs.gnu.org>, Lars Ingebrigtsen <larsi <at> gnus.org>
Subject: bug#50514: 28.0.50; org inline call to python src block req C-g to break
Date: Sun, 12 Sep 2021 06:22:27 +0000

> On Sep 11, 2021, at 6:26 AM, Augusto Stoffel <arstoffel <at> gmail.com> wrote:
> 
> On Fri, 10 Sep 2021 at 23:06, "Barton, Mark" <Mark.Barton <at> disney.com> wrote:
> 
>> With the Test.org file below, if I C-c C-c on the call_file_date it will echo “Shell native completion is
>> enabled” and Emacs will not respond until I hit C-g. If I immediately C-c C-c again, it will echo
>> “Inline error: multiline result cannot be used” and Emacs responds normally to commands
>> without C-g to break out. The problem is only when I use session in the property line. If I comment
>> out the property line then it works. My original file uses dozens of python src blocks that require
>> the session
> 
> Hi Mark,
> 
> does the patch below solve the problem for you?
> 
> If it does, then I know why it happens and I can suggest the Org people
> a slightly more robust solution.
> 
> <ob-python.diff>

Augusto,

I applied the patch to both lisp/org/ob-python.el and later ~/.emacs.d/elpa/org-plus-contrib-20210906 when I realized that is where my instance of org is loading from. I saw more python.el patches, so I pulled commit 108dbed4c0 from master to recompile.

I now get “Shell native completion is disabled, using fallback” in the echo area and need to press C-g to break. But now with the patch to ob-python.el it will work the following times when I press C-c on the call_file_date.

In my original document, I can export to pdf after I hit C-g to break out of the first session, try to export again and then hit C-g to break out of my second named python session, and then with both those python session buffers opened, the third attempt to export succeeds.

I suspect that in my case the initial setup code you send only once per python session is stuck which requires me to send a C-g, but since the session buffer is established, the setup code is not send again and it proceeds as expected.

Thanks,

Mark

This bug report was last modified 2 years and 292 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.