unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Augusto Stoffel <arstoffel@gmail.com>
To: "Barton, Mark" <Mark.Barton@disney.com>
Cc: "50514@debbugs.gnu.org" <50514@debbugs.gnu.org>,
	Lars Ingebrigtsen <larsi@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 08:51:09 +0200	[thread overview]
Message-ID: <871r5u1e3m.fsf@gmail.com> (raw)
In-Reply-To: <AEC70ED1-96FB-4FC9-9971-EA0C5421BC8A@disney.com> (Mark Barton's message of "Sun, 12 Sep 2021 06:22:27 +0000")


Okay, I opened a bug in Org mode linking to this ticket and suggesting
the solution https://orgmode.org/list/875yv61ej9.fsf@gmail.com/T/#u

As to the problem still you have when starting up the shell, I can't
observe it (but I am not able to test on macos).  Does it happen when
you just call `M-x run-python' from emacs -Q?  And does it persist if you
do
  (setq python-shell-completion-native-enable nil)
?


On Sun, 12 Sep 2021 at 06:22, "Barton, Mark" <Mark.Barton@disney.com> wrote:

>> On Sep 11, 2021, at 6:26 AM, Augusto Stoffel <arstoffel@gmail.com> wrote:
>> 
>> On Fri, 10 Sep 2021 at 23:06, "Barton, Mark" <Mark.Barton@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





  reply	other threads:[~2021-09-12  6:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-10 23:06 bug#50514: 28.0.50; org inline call to python src block req C-g to break Barton, Mark
2021-09-11 13:04 ` Lars Ingebrigtsen
2021-09-11 13:26 ` Augusto Stoffel
2021-09-12  6:22   ` Barton, Mark
2021-09-12  6:51     ` Augusto Stoffel [this message]
2021-09-12  8:27       ` Barton, Mark
2021-09-12  9:15         ` Augusto Stoffel
2021-09-12 17:00           ` Barton, Mark
2021-09-12 20:04             ` Barton, Mark
2021-09-14  6:42               ` Augusto Stoffel
2021-09-14 17:54                 ` Barton, Mark
2021-09-14 18:29                   ` Augusto Stoffel
2021-09-14 19:25                     ` Barton, Mark
2021-09-14 19:31                       ` Augusto Stoffel
2021-09-14 22:20                         ` Barton, Mark
2021-09-15  6:28                           ` Augusto Stoffel
2021-09-14 19:36                       ` Augusto Stoffel
2021-09-15  8:02                         ` Lars Ingebrigtsen
2022-08-25 15:12                           ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871r5u1e3m.fsf@gmail.com \
    --to=arstoffel@gmail.com \
    --cc=50514@debbugs.gnu.org \
    --cc=Mark.Barton@disney.com \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).