Re: How to reset the idle timer?

[email protected]
Newsgroups gmane.emacs.help
Message-ID <[email protected]>
On 2026-03-01, at 22:14, Eli Zaretskii <[email protected]> wrote:

>> > When the laptop is open, call run-with-timer to set up a normal
>> > (non-idle) timer that runs 1 min after that, and in the timer function
>> > of that timer start an idle timer.
>> 
>> That's interesting.  I have a feeling that it's a bit convoluted and
>> hackish, but then maybe so is my idea of "resetting" the idle time.
>> Still, I think that a "reset" like this may be more elegant and simpler.
>> WDYT?  Is `(setq unread-command-events nil)' a good idea, then?
>
> No, I don't think so.  It might work, by sheer luck.

Ok, sorry to still bother you, but why wouldn't it work?  It seems
robust for me, since it simulates the user doing something (admittedly,
a "nil" something), and I performed a few tests (admittedly, not very
extensive), and it seemed to work every time...

TIA,

-- 
Marcin Borkowski
https://mbork.pl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.