unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Barton, Mark" <Mark.Barton@disney.com>
To: Augusto Stoffel <arstoffel@gmail.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: Tue, 14 Sep 2021 22:20:48 +0000	[thread overview]
Message-ID: <F54BDD3A-C63C-42EA-A07E-3A12EC3CA913@disney.com> (raw)
In-Reply-To: <87o88vq7ia.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1562 bytes --]



On Sep 14, 2021, at 12:31 PM, Augusto Stoffel <arstoffel@gmail.com<mailto:arstoffel@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



[-- Attachment #2: Type: text/html, Size: 3679 bytes --]

  reply	other threads:[~2021-09-14 22:20 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
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 [this message]
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=F54BDD3A-C63C-42EA-A07E-3A12EC3CA913@disney.com \
    --to=mark.barton@disney.com \
    --cc=50514@debbugs.gnu.org \
    --cc=arstoffel@gmail.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).