Subject: Re: bug#17349: 24.3.50; display-battery-mode stops updating after closing and reopening lid

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 17 Apr 2022 13:06:19 +0200

Nicolas Richard <[email-masked]> writes:

> I use display-battery-mode to display remaining battery percentage in
> the modeline. It sometimes happens that the percentage never changes (I
> usually notice this when I re-open the lid).
>
> It seems that the timer doesn't get triggered anymore :
>
> timer-list is a variable defined in `C source code'.
> Its value is
> ([t 21337 29946 782082 60 battery-update-handler nil nil 770389]
>  [nil 21339 22389 552723 3600 url-cookie-write-file nil nil 255341])
>
> I guess it doesn't run because (timer--triggered (car timer-list)) => t
> ; and indeed, (setf (timer--triggered (car timer-list)) nil) made it
> work again.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

I think I recall these timer issues being fixed recentlyish (or at least
some other problem with timers not being triggered after a sleep).  Are
you still seeing this issue with recent Emacs versions?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no