unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16583: Possible bug in inhibit-quit
@ 2014-01-29  0:42 E Sabof
  2014-01-29  1:07 ` bug#16583: Possible bug in inhibit-quit/abort-recursive-edit E Sabof
  0 siblings, 1 reply; 3+ messages in thread
From: E Sabof @ 2014-01-29  0:42 UTC (permalink / raw)
  To: 16583

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

I couldn't reproduce this with emacs -Q, but this is what happends. I
insert these forms into a scratch-buffer

;; QUIT gets inserted
(condition-case error
    (sleep-for 5)
  (quit (goto-char (point-max))
        (insert "QUIT")))


;; QUIT doesn't get inserted. Quit isn't displayed in the mini-buffer
(condition-case error
    (let ((inhibit-quit t))
      (sleep-for 5))
  (quit (goto-char (point-max))
        (insert "QUIT")))


GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.6.4) of
2013-11-02 on ubuntu

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#16583: Possible bug in inhibit-quit/abort-recursive-edit
  2014-01-29  0:42 bug#16583: Possible bug in inhibit-quit E Sabof
@ 2014-01-29  1:07 ` E Sabof
  2018-02-10  3:17   ` Noam Postavsky
  0 siblings, 1 reply; 3+ messages in thread
From: E Sabof @ 2014-01-29  1:07 UTC (permalink / raw)
  To: 16583

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

The previous message was incomplete, and sent by accident. I have a complete
recipe now. Both forms are meant to be evaluated C-M-x, and followed by
abort-recursive-edit, or keyboard-quit.

;; QUIT gets inserted, and a Quit message is displayed.
(condition-case error
    (sleep-for 5)
  (quit (goto-char (point-max))
        (insert "QUIT")))


;; With abort-recursive-edit
;; QUIT doesn't get inserted. Quit isn't displayed in the mini-buffer

;; With keyboard-quit
;; QUIT doesn't get inserted. Quit is displayed in the mini-buffer

(condition-case error
    (let ((inhibit-quit t))
      (sleep-for 5))
  (quit (goto-char (point-max))
        (insert "QUIT")))

I understand why "QUIT" might not be displayed -- the signal is not
guaranteed to be sent immediately after then end of (let). But, shouldn't
abort-recursive-edit also cause Quit to be displayed in the minibuffer?

It so happens that I have abort-recursive-edit bound to C-g, and
((inhibit-quit t)) seems to discard all sent "C-g"s.

Evgeni

GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.6.4) of
2013-11-02 on ubuntu

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#16583: Possible bug in inhibit-quit/abort-recursive-edit
  2014-01-29  1:07 ` bug#16583: Possible bug in inhibit-quit/abort-recursive-edit E Sabof
@ 2018-02-10  3:17   ` Noam Postavsky
  0 siblings, 0 replies; 3+ messages in thread
From: Noam Postavsky @ 2018-02-10  3:17 UTC (permalink / raw)
  To: E Sabof; +Cc: 16583

tags 16583 notabug
close 16583
quit

E Sabof <esabof@gmail.com> writes:

> (condition-case error
>     (let ((inhibit-quit t))
>       (sleep-for 5))
>   (quit (goto-char (point-max))
>         (insert "QUIT")))
>
> I understand why "QUIT" might not be displayed -- the signal is not
> guaranteed to be sent immediately after then end of (let). But,
> shouldn't abort-recursive-edit also cause Quit to be displayed in the
> minibuffer? 

I don't see any bug here: abort-recursive-edit doesn't signal `quit', so
the condition-case is not triggered.

> It so happens that I have abort-recursive-edit bound to C-g, and
> ((inhibit-quit t)) seems to discard all sent "C-g"s.

I think it's rather that Emacs doesn't process input events during
sleep-for.  If you want to handle input use sit-for.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-10  3:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-29  0:42 bug#16583: Possible bug in inhibit-quit E Sabof
2014-01-29  1:07 ` bug#16583: Possible bug in inhibit-quit/abort-recursive-edit E Sabof
2018-02-10  3:17   ` Noam Postavsky

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).