From: Michael Albinus <michael.albinus@gmx.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: "Peter Münster" <pmlists@free.fr>, 11447-done@debbugs.gnu.org
Subject: bug#11447: 24.1.50; notifications-notify eats keystrokes
Date: Sun, 13 May 2012 11:11:43 +0200 [thread overview]
Message-ID: <87ehqoqwc0.fsf@gmx.de> (raw)
In-Reply-To: <jwvpqaawsej.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Fri, 11 May 2012 13:28:49 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> I think I understand what you mean: you mean that while you do `sit-for'
> you actually want to run the code associated with the incoming events,
> since that code might be the one which changes dbus-return-values-table.
Yes.
> So, indeed sit-for and input-pending-p won't cut it. Your code looks
> OK, then, though you don't need to use a 0.1 timeout, AFAICT.
OK, I remove the timeout.
> And in order to avoid the (let (unread-command-events) ...), I'd do
> something like:
>
> (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. This happens after the first time a character
has been read in the loop, before the awaited D-Bus event did arrive.
I've committed my original patch (minus the read-event timeout). Bug is
closed.
> -- Stefan
Best regards, Michael.
next prev parent reply other threads:[~2012-05-13 9:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-10 20:45 bug#11447: 24.1.50; notifications-notify eats keystrokes Peter Münster
2012-05-11 8:07 ` Michael Albinus
2012-05-11 11:22 ` Peter Münster
2012-05-11 13:24 ` Stefan Monnier
2012-05-11 14:10 ` Michael Albinus
2012-05-11 15:20 ` Stefan Monnier
2012-05-11 15:27 ` Michael Albinus
2012-05-11 17:28 ` Stefan Monnier
2012-05-13 9:11 ` Michael Albinus [this message]
[not found] ` <jwv1umo2pjf.fsf-monnier+emacs@gnu.org>
2012-05-13 14:19 ` Michael Albinus
2012-05-13 14:46 ` Stefan Monnier
2012-05-13 15:15 ` Michael Albinus
2012-05-13 15:44 ` Stefan Monnier
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=87ehqoqwc0.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=11447-done@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=pmlists@free.fr \
/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).