Subject: bug#11447: 24.1.50; notifications-notify eats keystrokes

From: Michael Albinus <[email-masked]>
Date: Sun, 13 May 2012 16:19:26 +0200

Stefan Monnier <[email-masked]> writes:

>>> (let ((seen ()))
>>> (unwind-protect
>>> (let ((event (read-event)))
>>> (when (and event (not (ignore-errors (dbus-check-event event))))
>>> (push event seen)))
>>> (setq unread-command-events
>>> (append unread-command-events (nreverse seen)))))
>
>> Unfortunately, it doesn't work either. When unread-command-events is
>> non-nil, read-event takes the events from there instead of reading them
>> from the input streams.
>
> You mean, if unread-command-events is already non-nil when entering
> the loop?  Yes, I guess it's a problem.

That I don't know. Its is rather ...

>> This happens after the first time a character has been read in the
>> loop,
>
> That shouldn't be the case unless *you* put that char (well, event) on
> unread-command-events.

Yes, that happens with your proposed

(setq unread-command-events
      (append unread-command-events (nreverse seen)))))

That's why my patch lets unread-command-events be nil, when calling read-event.

>> I've committed my original patch (minus the read-event timeout). Bug is
>> closed.
>
> OK, thank you,

>         Stefan

Best regards, Michael.