From: Lars Ingebrigtsen <larsi@gnus.org>
To: Marcin Borkowski <mbork@mbork.pl>
Cc: 18157@debbugs.gnu.org
Subject: bug#18157: 24.4.50; battery-pmset fails to report critical battery state
Date: Sat, 20 Feb 2016 18:35:14 +1100 [thread overview]
Message-ID: <87bn7bdebx.fsf@gnus.org> (raw)
In-Reply-To: <874md81z5z.fsf@amu.edu.pl> (Marcin Borkowski's message of "Tue, 16 Feb 2016 15:56:56 +0100")
Marcin Borkowski <mbork@mbork.pl> writes:
> Does this patch help?
>
> diff -u --label /usr/local/share/emacs/25.1.50/lisp/battery.el.gz --label \#\<buffer\ battery.el.gz\> /tmp/jka-com1889YvM /tmp/buffer-content-1889yDZ
> --- /usr/local/share/emacs/25.1.50/lisp/battery.el.gz
> +++ #<buffer battery.el.gz>
> @@ -628,12 +628,12 @@
> (cond ((looking-at "; charging")
> (setq battery-status "charging"
> battery-status-symbol "+"))
> - ((< (string-to-number load-percentage) battery-load-low)
> - (setq battery-status "low"
> - battery-status-symbol "-"))
> ((< (string-to-number load-percentage) battery-load-critical)
> (setq battery-status "critical"
> battery-status-symbol "!"))
> + ((< (string-to-number load-percentage) battery-load-low)
> + (setq battery-status "low"
> + battery-status-symbol "-"))
> (t
> (setq battery-status "high"
> battery-status-symbol "")))
Looks logical to me. I've applied it to emacs-25.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
prev parent reply other threads:[~2016-02-20 7:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bn7bdebx.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=18157@debbugs.gnu.org \
--cc=mbork@mbork.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).