Subject: Re: bug#21313: 25.0.50; Strange errors from dbus-handle-event

From: Eli Zaretskii <[email-masked]>
Date: Thu, 15 Oct 2015 19:56:28 +0300

> From: Tassilo Horn <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Thu, 15 Oct 2015 13:37:05 +0200
> 
> Concretely, normally C-g in the minibuffer will exit the minibuffer or
> exit the recursive minibuffer popping to the previous one.  But with my
> change, I need to hit C-g twice in quick succession.  A single C-g does
> nothing (record_char isn't called at all), and pressing it many times
> with reasonably long pauses in between does nothing, too (no
> record_char).
> 
> Oh, wait.  Now I can tell you exactly how quickly I have to type the
> second C-g.  When I type C-g, the echo area shows Quit and then switches
> back to the prompt I had before.  The second C-g must come within the
> time the echo area still shows Quit.
> 
> That's the output I get when doing M-x C-g C-g quickly.  The second
> record_char output appears just after the second C-g in the sequence.
> 
> --8<---------------cut here---------------start------------->8---
> record_char: 134217848 ;; M-x
>   -> NOT storing as part of macro
>   -2> set to recent_keys at index 15
> record_char: 7 ;; issued after C-g twice in quick succession
>   -> NOT storing as part of macro
>   -2> set to recent_keys at index 17
> --8<---------------cut here---------------end--------------->8---
> 
> And these are my changes.  Do you see anything stupid in there, or is
> this some sort of a timing issue (which would at least partially explain
> why I seem to be the only one seeing these "strange problems")?

Do you see something in *Messages* that isn't there without your
changes?  You call Fformat, which conses a string, which can cause GC
or call some Lisp (depending on your customizations).  If that causes
some echo-area message, it could maybe cause something like this.

Does this happen in "emacs -Q"?

Or it could be that some code that runs as result of this throws to
higher level and resets the quit flag.