all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#18157: 24.4.50; battery-pmset fails to report critical battery state
@ 2014-07-31 13:16 Sebastian Wiesner
  2016-02-16 14:56 ` Marcin Borkowski
  0 siblings, 1 reply; 8+ messages in thread
From: Sebastian Wiesner @ 2014-07-31 13:16 UTC (permalink / raw
  To: 18157


`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'.





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-02-20  7:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-31 13:16 bug#18157: 24.4.50; battery-pmset fails to report critical battery state Sebastian Wiesner
2016-02-16 14:56 ` Marcin Borkowski
2016-02-16 18:41   ` Sebastian Wiesner
2016-02-16 19:04     ` Eli Zaretskii
2016-02-20  5:51       ` John Wiegley
2016-02-16 23:43     ` Marcin Borkowski
2016-02-20  7:36       ` Lars Ingebrigtsen
2016-02-20  7:35   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.