emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#19895: closed (24.4; battery.el does not support /


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#19895: closed (24.4; battery.el does not support /sys/class/power_supply/BATX)
Date: Fri, 20 Sep 2019 23:46:01 +0000

Your message dated Sat, 21 Sep 2019 01:44:58 +0200
with message-id <CADwFkmmc=address@hidden>
and subject line Re: bug#19895: 24.4; battery.el does not support 
/sys/class/power_supply/BATX
has caused the debbugs.gnu.org bug report #19895,
regarding 24.4; battery.el does not support /sys/class/power_supply/BATX
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden.)


-- 
19895: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19895
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 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

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



--- End Message ---
--- Begin Message --- Subject: Re: bug#19895: 24.4; battery.el does not support /sys/class/power_supply/BATX Date: Sat, 21 Sep 2019 01:44:58 +0200
Greg Farough <address@hidden> writes:

> 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)

This has been fixed by the following commit on current master branch,
which makes 'M-x battery' list all batteries no matter what they're
named:

commit 6b38e34a11a85d50fa384b90ed21ea60d6d646d5
Author: Lars Ingebrigtsen <address@hidden>
Date:   Fri Aug 23 02:40:26 2019 +0200
    Have `M-x battery' list all batteries under GNU/Linux

I'm therefore closing this bug report.  If you could please verify that
the fix works for you and report back, that would be even better.

Best regards,
Stefan Kangas


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]