unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: emacs-devel@gnu.org
Subject: DBus events processing (was: read-event and unexpected buffer changes)
Date: Fri, 24 May 2013 11:48:05 -0400	[thread overview]
Message-ID: <jwv4ndse6gm.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <8761y836v4.fsf@gmx.de> (Michael Albinus's message of "Fri, 24 May 2013 14:22:23 +0200")

>>> (let ((event (let (unread-command-events) (read-event nil nil 0.1))))
>>> (when (and event (not (ignore-errors (dbus-check-event event))))
>>> (setq unread-command-events
>>> (append unread-command-events (list event)))))))
>> Why not use sit-for?
> <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11447#26>

Ah, right!
Thinking about this problem some more, I think the problem is that dbus
events should be processed during sit-for, just like process filters are
run there.

DBus events come concurrently with keyboard&mouse events and then we
forcefully linearize them into the event queue, which is not right in
your case where you want to process the dbus events before the user's
key presses.

So we should change the C code for our dbus interface.  It could either
be shoehorned into the way process filters/sentinels are handled, or we
could add a secondary event queue for "asynchronous events".


        Stefan



  reply	other threads:[~2013-05-24 15:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-28 20:41 read-event and unexpected buffer changes Julien Danjou
2013-05-23 17:31 ` Stefan Monnier
2013-05-24 12:22   ` Michael Albinus
2013-05-24 15:48     ` Stefan Monnier [this message]
2013-05-24 22:08       ` DBus events processing Michael Albinus
2013-05-25  1:54         ` Stefan Monnier
2013-05-27 11:59 ` read-event and unexpected buffer changes Michael Albinus
2013-05-27 12:28   ` Julien Danjou
2013-05-27 12:42     ` Michael Albinus

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=jwv4ndse6gm.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=michael.albinus@gmx.de \
    /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).