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

From: Peter Münster <[email-masked]>
Date: Thu, 01 May 2014 15:56:17 +0200

On Sun, Apr 27 2014, Nicolas Richard wrote:

> (defun yf/checktimer-after (timer)
>   (when (eq battery-update-timer timer)
>     (message "Ran battery update timer. current time: %s triggered-p: %s"
>              (decode-time) (timer--triggered timer))))
> (defun yf/checktimer-before (timer)
>   (when (eq battery-update-timer timer)
>     (message "Running battery update timer. current time: %s triggered-p: %s"
>              (decode-time) (timer--triggered timer))))
> (advice-add 'timer-event-handler :before 'yf/checktimer-before)
> (advice-add 'timer-event-handler :after 'yf/checktimer-after)
>
> (defun yf/checktimer-warn ()
>   (when (timer--triggered battery-update-timer)
>     (warn "battery-update-timer has trigger flag to t.")))
> (add-hook 'post-command-hook 'yf/checktimer-warn)

Thanks. It happened again:

Before timer. current time: (0 46 15 1 5 2014 4 t 7200) triggered-p: t
[t 21346 20504 204460 20 org-notify-process nil nil 225188]
After timer. current time: (0 46 15 1 5 2014 4 t 7200) triggered-p: nil
[nil 21346 20524 204460 20 org-notify-process nil nil 225188]
Before timer. current time: (20 46 15 1 5 2014 4 t 7200) triggered-p: t
[t 21346 20524 204460 20 org-notify-process nil nil 225188]
After timer. current time: (20 46 15 1 5 2014 4 t 7200) triggered-p: nil
[nil 21346 20544 204460 20 org-notify-process nil nil 225188]
Before timer. current time: (40 46 15 1 5 2014 4 t 7200) triggered-p: t
[t 21346 20544 204460 20 org-notify-process nil nil 225188]

That means, that there is no "after-timer" event.

It happened exactly when I was hitting C-g repeatedly.

What should I do now please?

-- 
           Peter