GNU bug report logs - #18157
24.4.50; battery-pmset fails to report critical battery state

Previous Next

Package: emacs;

Reported by: Sebastian Wiesner <swiesner <at> lunaryorn.com>

Date: Thu, 31 Jul 2014 13:18:02 UTC

Severity: normal

Tags: fixed

Found in version 24.4.50

Fixed in version 25.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Sebastian Wiesner <swiesner <at> lunaryorn.com>
To: 18157 <at> debbugs.gnu.org
Subject: bug#18157: 24.4.50; battery-pmset fails to report critical battery state
Date: Thu, 31 Jul 2014 15:16:44 +0200
`battery-pmset' fails to correctly report critical battery state:  Even
if the battery charge level is below `battery-load-critical', it reports
"low" battery state only.

The culprit is the `cond' expression in the body of `battery-pmset'
which compares the reported `load-percentage' against `battery-load-low'
first, and then against `battery-load-critical'.

Since the latter is typically lower, it will never be reached, because
`cond' already returns after the former succeeded.

To fix this issue, `batter-pmset' needs to check `battery-load-critical'
*first*, and then `battery-load-low'.




This bug report was last modified 9 years and 89 days ago.

Previous Next


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