GNU bug report logs - #75361
31.0.50; run-with-idle-timer not working unless there is some activity

Previous Next

Package: emacs;

Reported by: Jean Louis <bugs <at> gnu.support>

Date: Sat, 4 Jan 2025 17:39:01 UTC

Severity: normal

Tags: notabug

Found in version 31.0.50

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 75361 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jean Louis <bugs <at> gnu.support>
Cc: 75361 <at> debbugs.gnu.org
Subject: Re: bug#75361: 31.0.50;
 run-with-idle-timer not working unless there is some activity
Date: Sat, 04 Jan 2025 20:46:22 +0200
tags 75361 notabug
thanks

> From: Jean Louis <bugs <at> gnu.support>
> Date: Sat, 04 Jan 2025 01:30:03 +0300
> 
> 
> The function is not working unless there is some activity. I remember it
> worked well in past, do not know what changed.
> 
> (defun my-message ()
>     (message (format-time-string "%T Hello")))
> 
> (run-with-idle-timer 10 t 'my-message)
> 
> >From that point I will see one hello message but if I do not touch
> anything it will not repeat.

That's expected.  From the ELisp manual:

     Emacs becomes “idle” when it starts waiting for user input (unless it
  waits for input with a timeout, *note Reading One Event::), and it
  remains idle until the user provides some input.  If a timer is set for
  five seconds of idleness, it runs approximately five seconds after Emacs
  first becomes idle.  Even if REPEAT is non-‘nil’, this timer will not
  run again as long as Emacs remains idle, because the duration of
  idleness will continue to increase and will not go down to five seconds
  again.

> That is bug.
> 
> It should be repeating the message each 10 seconds.

See above: your expectations are incorrect.

This is not a bug.




This bug report was last modified 211 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.