unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>,
	Noam Postavsky <npostavs@users.sourceforge.net>
Cc: 27036@debbugs.gnu.org
Subject: bug#27036: 25.1; Blocking call to accept-process-output with quit inhibited!!
Date: Fri, 26 May 2017 04:02:34 +0300	[thread overview]
Message-ID: <2b4cd4a4-3ca4-b877-a059-7edbc70e2130@yandex.ru> (raw)
In-Reply-To: <83d1awlxq8.fsf@gnu.org>

On 5/25/17 7:14 PM, Eli Zaretskii wrote:

> So I guess octave-eldoc-function-signatures should temporarily reset
> inhibit-quit?

Yes. Or more concretely, use with-local-quit like 
url-retrieve-synchronously does.

In the context of comint, though, we might consider what to do if Octave 
actually takes too long to produce the result, the user presses C-g, and 
we need to abort. Do we restore the normal process filter, and refuse to 
be bothered even though Octave will continue producing output (now 
visible to the user if they switch to the REPL buffer)?

As a first approximation, this seems to fix the bug:

diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el
index ac9ba63..ce3c27a 100644
--- a/lisp/progmodes/octave.el
+++ b/lisp/progmodes/octave.el
@@ -939,8 +939,10 @@ inferior-octave-send-list-and-digest
  	  (setq inferior-octave-output-string nil
  		inferior-octave-receive-in-progress t)
  	  (comint-send-string proc string)
-	  (while inferior-octave-receive-in-progress
-	    (accept-process-output proc))
+	  (while
+              (and inferior-octave-receive-in-progress
+                   (with-local-quit
+                     (accept-process-output proc))))
  	  (setq list (cdr list)))
        (set-process-filter proc filter))))






  reply	other threads:[~2017-05-26  1:02 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-23 12:20 bug#27036: 25.1; Blocking call to accept-process-output with quit inhibited!! Francesco Potortì
2017-05-24 12:24 ` Dmitry Gutov
2017-05-24 18:01   ` Eli Zaretskii
2017-05-24 18:17     ` Dmitry Gutov
2017-05-24 19:05       ` Eli Zaretskii
2017-05-25 12:43         ` Dmitry Gutov
2017-05-25 12:51           ` Noam Postavsky
2017-05-25 16:14             ` Eli Zaretskii
2017-05-26  1:02               ` Dmitry Gutov [this message]
2017-05-26  6:07                 ` Eli Zaretskii
2017-05-26  0:38             ` Dmitry Gutov
     [not found] ` <handler.27036.B.1495542030639.ack@debbugs.gnu.org>
2017-05-24 11:21   ` bug#27036: Acknowledgement (25.1; Blocking call to accept-process-output with quit inhibited!!) Francesco Potortì
2017-05-24 14:27   ` Francesco Potortì
2017-05-24 17:57     ` Eli Zaretskii
2017-05-25 15:58   ` Francesco Potortì
2017-05-26  0:41     ` Dmitry Gutov
2017-05-26 13:17   ` Francesco Potortì
2017-05-27  0:22     ` Dmitry Gutov
2017-05-30  7:46       ` Francesco Potortì
2017-05-30 22:39         ` Dmitry Gutov
2017-09-28 21:06           ` Dmitry Gutov
2017-09-29  7:03             ` Francesco Potortì
2022-04-23 15:24               ` bug#27036: 25.1; Blocking call to accept-process-output with quit inhibited!! 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=2b4cd4a4-3ca4-b877-a059-7edbc70e2130@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=27036@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=npostavs@users.sourceforge.net \
    /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).