From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter =?UTF-8?Q?M=C3=BCnster?= Newsgroups: gmane.emacs.bugs Subject: bug#17349: 24.3.50; display-battery-mode stops updating after closing and reopening lid Date: Thu, 22 Jan 2015 10:43:31 +0100 Message-ID: <87sif3kv5o.fsf@roche-blanche.net> References: <87d2g3lth0.fsf@yahoo.fr> <874n1f4xzq.fsf@micropit.couberia.selfip.net> <8738gzkxte.fsf@yahoo.fr> <87tx991u2m.fsf@micropit.roche-blanche.homenet.org> <877g65bfen.fsf@micropit.roche-blanche.homenet.org> <87eh0cwidr.fsf@geodiff-mac3.ulb.ac.be> <83zjj0js3r.fsf@gnu.org> <87mwcybqah.fsf@micropit.roche-blanche.homenet.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1421919858 19461 80.91.229.3 (22 Jan 2015 09:44:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 22 Jan 2015 09:44:18 +0000 (UTC) Cc: Nicolas Richard , gundaetiapo@gmail.com, 17349@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 22 10:44:17 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YEEJF-0007sE-Em for geb-bug-gnu-emacs@m.gmane.org; Thu, 22 Jan 2015 10:44:17 +0100 Original-Received: from localhost ([::1]:52015 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEEJ9-0002L9-Fp for geb-bug-gnu-emacs@m.gmane.org; Thu, 22 Jan 2015 04:44:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43130) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEEJ5-0002KV-AF for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2015 04:44:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YEEJ1-0008Ku-7D for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2015 04:44:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33600) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEEJ1-0008Ko-2k for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2015 04:44:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YEEJ0-0006co-Kt for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2015 04:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Peter =?UTF-8?Q?M=C3=BCnster?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Jan 2015 09:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17349 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17349-submit@debbugs.gnu.org id=B17349.142191982325432 (code B ref 17349); Thu, 22 Jan 2015 09:44:02 +0000 Original-Received: (at 17349) by debbugs.gnu.org; 22 Jan 2015 09:43:43 +0000 Original-Received: from localhost ([127.0.0.1]:52292 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YEEIg-0006c8-MK for submit@debbugs.gnu.org; Thu, 22 Jan 2015 04:43:42 -0500 Original-Received: from smtp08.smtpout.orange.fr ([80.12.242.130]:25151 helo=smtp.smtpout.orange.fr) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YEEIe-0006bt-15 for 17349@debbugs.gnu.org; Thu, 22 Jan 2015 04:43:41 -0500 Original-Received: from micropit.roche-blanche.homenet.org ([86.214.174.139]) by mwinf5d43 with ME id ixjX1p01n30pVly03xjXKw; Thu, 22 Jan 2015 10:43:33 +0100 X-ME-Helo: micropit.roche-blanche.homenet.org X-ME-Auth: ZHJwbUB3YW5hZG9vLmZy X-ME-Date: Thu, 22 Jan 2015 10:43:33 +0100 X-ME-IP: 86.214.174.139 Original-Received: by micropit.roche-blanche.homenet.org (Postfix, from userid 1000) id 16C782F6F; Thu, 22 Jan 2015 10:43:31 +0100 (CET) In-Reply-To: <87mwcybqah.fsf@micropit.roche-blanche.homenet.org> ("Peter =?UTF-8?Q?M=C3=BCnster?="'s message of "Fri, 27 Jun 2014 12:27:50 +0200") User-Agent: Gnus/5.130012 (=?UTF-8?Q?=E7=9C=9F?= Gnus v0.12) Emacs/25.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:98578 Archived-At: On Fri, Jun 27 2014, Peter Münster wrote: > Do you think, that this will be fixed soon? If not, I'll install a > workaround with crond and emacsclient. Works quite nicely since some months: --8<---------------cut here---------------start------------->8--- (defun pm/start-timer (sym func &rest args) (cl-pushnew (list sym func args) pm/timer-list) (apply func args)) (defun pm/gnus-demon-add-handler (sym period idle) (pm/start-timer sym 'gnus-demon-add-handler sym period idle)) (defun pm/timer-running-p (func) (dolist (timer (append timer-list timer-idle-list)) (if (or (eq (timer--function timer) func) (and (eq (timer--function timer) 'gnus-demon-run-callback) (eq (car (timer--args timer)) func))) (return (not (timer--triggered timer)))))) (defun pm/check-timers () (dolist (e pm/timer-list) (lexical-let ((entry e) (timer (first e))) (unless (pm/timer-running-p timer) (if (display-graphic-p) (notifications-notify :title "Timer is dead!" :body (symbol-name timer) :timeout (* 55 60 1000) :actions '("delete" "delete entry" "restart" "restart timer") :on-action (lambda (id key) (pm/timer-action entry key))) (message "Timer is dead: %s" timer)))))) --8<---------------cut here---------------end--------------->8--- And once per hour, crond executes "emacsclient -e '(pm/check-timers)'" When a timer is dead, I just need to restart it with a mouse-click. -- Peter