unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Manipulating unread-command-events
@ 2015-07-15 13:24 David Kastrup
  0 siblings, 0 replies; only message in thread
From: David Kastrup @ 2015-07-15 13:24 UTC (permalink / raw)
  To: emacs-devel


Hi,

I have a package creating events for Midi input and it works by pushing
the created events into unread-command-events, sometimes several events
in one go.  This works only so-so, and particularly badly when recording
in keyboard macros (not only there, but the lossage there is much worse
than elsewhere).

If you do

git grep '(setq unread-command-events'

in the Emacs sources, it's rather obvious that _lots_ of Emacs internals
do not bother retaining any pending input in unread-command-events and
just plaster over whatever might have been stored there before.  When
looking closer at all of the resulting lines, it is rather the majority
of uses which overwrite any pending input there (the situation looks
slightly worse than it is because some good uses employ `push' rather
than `setq', but not all that many).

Any idea how to salvage that situation?  As it is, keyboard macro
recording is unusable when input is delivered from non-keyboard sources.
It probably loses about 10% of input for simultaneously delivered
events.

-- 
David Kastrup



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-07-15 13:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-15 13:24 Manipulating unread-command-events David Kastrup

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