GNU bug report logs - #19895
24.4; battery.el does not support /sys/class/power_supply/BATX

Previous Next

Package: emacs;

Reported by: Greg Farough <gregf <at> riseup.net>

Date: Wed, 18 Feb 2015 16:54:01 UTC

Severity: normal

Found in version 24.4

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Greg Farough <gregf <at> riseup.net>
To: 19895 <at> debbugs.gnu.org
Subject: bug#19895: 24.4; battery.el does not support /sys/class/power_supply/BATX
Date: Wed, 18 Feb 2015 09:53:59 -0600
It seems that battery-linux-sysfs does not support certain laptop
batteries which are not classified as BAT0, but by BATX instead. I had
to add this to my .emacs to get display-battery-mode working properly:

(eval-after-load 'battery
  '(progn
     (setq battery--linux-sysfs-regexp "[bB][aA][tT][xX]$")
     (setq battery-status-function 'battery-linux-sysfs
      battery-echo-area-format "Power %L, battery %B (%p%% charged, remaining time %t)"
      battery-mode-line-format " [%p%%] ")))
(display-battery-mode 1)

Hope this helps, and thanks for all your hard work.
-g

-- 
Ξυνὸν δέ μοί ἐστιν, ὁππόθεν ἄρξωμαι· τόθι γὰρ πάλιν ἵξομαι αὖθις.




This bug report was last modified 5 years and 246 days ago.

Previous Next


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