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


Message #50 received at 50514 <at> debbugs.gnu.org (full text, mbox):

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: Re: bug#50514: 28.0.50; org inline call to python src block req C-g
 to break
Date: Tue, 14 Sep 2021 22:20:48 +0000
[Message part 1 (text/plain, inline)]

On Sep 14, 2021, at 12:31 PM, Augusto Stoffel <arstoffel <at> gmail.com<mailto:arstoffel <at> gmail.com>> wrote:

Great.  Then we'll fix the spurious line break problem, which is indeed
on the Emacs side.  But the other is due to ob-python, which may send
code to the interpreter before the first prompt is printed (this can be
checked through the variable 'python-shell--first-prompt-received').

Since I don't use org-babel, I'm afraid I can't help with that part…

So I found if I extend the sleep-for in ob-python from 10 ms to 90 ms, my initialization problem is “fixed”. I’m not sure why it would take longer than it did before the changes. Possibly an interaction with the antivirus software??? I have not tried other values, but may be there is a better method for ob-python to determine it is safe than using a sleep-for.

diff -u --label /Users/bartm002/.emacs.d/elpa/org-plus-contrib-20210913/ob-python.el --label \#\<buffer\ ob-python.el\> /Users/bartm002/.emacs.d/elpa/org-plus-contrib-20210913/ob-python.el /var/folders/kf/zdpzgs9d30b3jj4bdkdjf1vw0000gn/T/buffer-content-Kqgm3d
--- /Users/bartm002/.emacs.d/elpa/org-plus-contrib-20210913/ob-python.el
+++ #<buffer ob-python.el>
@@ -193,7 +193,7 @@
  (let ((python-shell-buffer-name
        (org-babel-python-without-earmuffs py-buffer)))
   (run-python cmd)
-  (sleep-for 0 10)))
+  (sleep-for 0 90)))
        ((and (eq 'python-mode org-babel-python-mode)
      (fboundp 'py-shell)) ; python-mode.el
  (require 'python-mode)

Diff finished.  Tue Sep 14 15:14:59 2021


[Message part 2 (text/html, inline)]

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.