[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

discard-input - why do I need it?

From: Michael Heerdegen
Subject: discard-input - why do I need it?
Date: Mon, 10 Jan 2022 15:12:20 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)


in "el-search" I do a lot of computations "in the background", and these
can all be interrupted by the user. This is implemented using timers and
`while-no-input' calls.  Oh, and I also use transient maps in a few

It seems that using this stuff in my case sometimes makes
`discard-input' calls necessary.  Because sometimes, a `while-no-input'
is interrupted without any apparent physical user interaction.  I once
looked at the pending input and it had been a key whose binding already
had been processed.  With other words: the command invoked by the key
was being processed, but the key was still pending.

Using these `discard-input' calls is extremely ugly and a pain: it's
more or less guessing where they should be best put to, and a downside
is that sometimes "real" user interactions are discarded and ignored.

Does anybody have an idea why I see this kind of problem (using one of
these crystal balls maybe?) or what I could do better to avoid the



reply via email to

[Prev in Thread] Current Thread [Next in Thread]