bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#31692: Emacs sometimes drops key events


From: Eli Zaretskii
Subject: bug#31692: Emacs sometimes drops key events
Date: Thu, 07 Jun 2018 18:20:38 +0300

> From: Michael Heerdegen <michael_heerdegen@web.de>
> Cc: radon.neon@gmail.com,  31692@debbugs.gnu.org
> Date: Thu, 07 Jun 2018 01:12:54 +0200
> 
> An automatic indent mode is a good example: you potentially want
> re-indenting after any editing operation, but it is potentially slow and
> would cause delays.  Using `while-no-input' let's you interrupt the
> indentation operation and continue typing.  If you later make a long
> enough typing pause, indentation will finish.  The `sit-for' is there to
> avoid that indenting fires immediately after hitting a key, so that
> interrupts are less common.

If this is the problem to solve, then why not something like below?

  (if (sit-for 3)
      (while-no-input
        (do-something-longish)))

IOW, what I don't understand is why put sit-for, which returns as soon
as there's input, inside while-no-input, which does something similar,
but using a radically different method?





reply via email to

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