From unknown Sat Jun 14 18:51:36 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#18157 <18157@debbugs.gnu.org> To: bug#18157 <18157@debbugs.gnu.org> Subject: Status: 24.4.50; battery-pmset fails to report critical battery state Reply-To: bug#18157 <18157@debbugs.gnu.org> Date: Sun, 15 Jun 2025 01:51:36 +0000 retitle 18157 24.4.50; battery-pmset fails to report critical battery state reassign 18157 emacs submitter 18157 Sebastian Wiesner severity 18157 normal tag 18157 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 31 09:17:25 2014 Received: (at submit) by debbugs.gnu.org; 31 Jul 2014 13:17:25 +0000 Received: from localhost ([127.0.0.1]:52741 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XCqEW-0004C5-1J for submit@debbugs.gnu.org; Thu, 31 Jul 2014 09:17:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52016) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XCqES-0004Bs-Ug for submit@debbugs.gnu.org; Thu, 31 Jul 2014 09:17:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCqEE-0004R6-UX for submit@debbugs.gnu.org; Thu, 31 Jul 2014 09:17:15 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:53923) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCqEE-0004Qz-SA for submit@debbugs.gnu.org; Thu, 31 Jul 2014 09:17:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCqE8-0000hU-MI for bug-gnu-emacs@gnu.org; Thu, 31 Jul 2014 09:17:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCqE2-0004NP-HU for bug-gnu-emacs@gnu.org; Thu, 31 Jul 2014 09:17:00 -0400 Received: from vega.uberspace.de ([95.143.172.245]:36758) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCqE2-0004N1-7L for bug-gnu-emacs@gnu.org; Thu, 31 Jul 2014 09:16:54 -0400 Received: (qmail 23596 invoked from network); 31 Jul 2014 13:16:51 -0000 Received: from localhost (HELO lunaryorn-air) (127.0.0.1) by vega.uberspace.de with SMTP; 31 Jul 2014 13:16:51 -0000 From: Sebastian Wiesner To: bug-gnu-emacs@gnu.org Subject: 24.4.50; battery-pmset fails to report critical battery state Date: Thu, 31 Jul 2014 15:16:44 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) `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'. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 16 09:57:08 2016 Received: (at 18157) by debbugs.gnu.org; 16 Feb 2016 14:57:09 +0000 Received: from localhost ([127.0.0.1]:42062 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aVh3s-0006kC-P0 for submit@debbugs.gnu.org; Tue, 16 Feb 2016 09:57:08 -0500 Received: from mail.mojserwer.eu ([195.110.48.8]:37794) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aVh3q-0006k3-8k for 18157@debbugs.gnu.org; Tue, 16 Feb 2016 09:57:06 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 86C189D2002; Tue, 16 Feb 2016 15:57:05 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pgvrG6cEw5TG; Tue, 16 Feb 2016 15:56:59 +0100 (CET) Received: from localhost (unknown [IPv6:2001:808:114:6:a288:b4ff:fe90:5e24]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 74ED29D2001; Tue, 16 Feb 2016 15:56:59 +0100 (CET) From: Marcin Borkowski To: Sebastian Wiesner Subject: Re: bug#18157: 24.4.50; battery-pmset fails to report critical battery state References: Date: Tue, 16 Feb 2016 15:56:56 +0100 In-Reply-To: (Sebastian Wiesner's message of "Thu, 31 Jul 2014 15:16:44 +0200") Message-ID: <874md81z5z.fsf@amu.edu.pl> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 18157 Cc: mbork@mbork.pl, 18157@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) On 2014-07-31, at 16:16, Sebastian Wiesner wrote: > `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'. Does this patch help? --8<---------------cut here---------------start------------->8--- diff -u --label /usr/local/share/emacs/25.1.50/lisp/battery.el.gz --label \#\ /tmp/jka-com1889YvM /tmp/buffer-content-1889yDZ --- /usr/local/share/emacs/25.1.50/lisp/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 ""))) Diff finished. Tue Feb 16 15:56:03 2016 --8<---------------cut here---------------end--------------->8--- Best, -- mb From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 16 13:41:34 2016 Received: (at 18157) by debbugs.gnu.org; 16 Feb 2016 18:41:34 +0000 Received: from localhost ([127.0.0.1]:38366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aVkZ4-0000Cr-3B for submit@debbugs.gnu.org; Tue, 16 Feb 2016 13:41:34 -0500 Received: from mx2.mailbox.org ([80.241.60.215]:49703) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aVkZ2-0000Cf-KP for 18157@debbugs.gnu.org; Tue, 16 Feb 2016 13:41:33 -0500 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 922A4434D0; Tue, 16 Feb 2016 19:41:26 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id ZTC8LGB4zTG1; Tue, 16 Feb 2016 19:41:25 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Subject: Re: bug#18157: 24.4.50; battery-pmset fails to report critical battery state From: Sebastian Wiesner In-Reply-To: <874md81z5z.fsf@amu.edu.pl> Date: Tue, 16 Feb 2016 19:41:25 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <874md81z5z.fsf@amu.edu.pl> To: Marcin Borkowski X-Mailer: Apple Mail (2.3112) X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 18157 Cc: 18157@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > Am 16.02.2016 um 15:56 schrieb Marcin Borkowski : >=20 > On 2014-07-31, at 16:16, Sebastian Wiesner = wrote: >=20 >> `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. >>=20 >> 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'. >>=20 >> Since the latter is typically lower, it will never be reached, = because >> `cond' already returns after the former succeeded. >>=20 >> To fix this issue, `batter-pmset' needs to check = `battery-load-critical' >> *first*, and then `battery-load-low'. >=20 > Does this patch help? I'm sorry, are you asking me? It would be bold to believe that I still = cared for this issue now, almost *two years* after I reported it. =20 At a cursory look the fix surely looks correct, but I hope you = understand that Emacs taking two years for what seems to be a trivial = issue to fix does not particularly contribute to my enthusiasm, nor does = it motivate me to test this patch. > --8<---------------cut here---------------start------------->8--- > diff -u --label /usr/local/share/emacs/25.1.50/lisp/battery.el.gz = --label \#\ /tmp/jka-com1889YvM = /tmp/buffer-content-1889yDZ > --- /usr/local/share/emacs/25.1.50/lisp/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 ""))) >=20 > Diff finished. Tue Feb 16 15:56:03 2016 > --8<---------------cut here---------------end--------------->8--- >=20 > Best, >=20 > -- > mb From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 16 14:04:10 2016 Received: (at 18157) by debbugs.gnu.org; 16 Feb 2016 19:04:11 +0000 Received: from localhost ([127.0.0.1]:38379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aVkuw-0000jS-Ni for submit@debbugs.gnu.org; Tue, 16 Feb 2016 14:04:10 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39031) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aVkuv-0000jG-9c for 18157@debbugs.gnu.org; Tue, 16 Feb 2016 14:04:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aVkul-0000sf-Eq for 18157@debbugs.gnu.org; Tue, 16 Feb 2016 14:04:04 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60808) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVkul-0000sY-Bu; Tue, 16 Feb 2016 14:03:59 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3342 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aVkuk-0004pB-D8; Tue, 16 Feb 2016 14:03:58 -0500 Date: Tue, 16 Feb 2016 21:04:08 +0200 Message-Id: <837fi4wk7r.fsf@gnu.org> From: Eli Zaretskii To: Sebastian Wiesner In-reply-to: (message from Sebastian Wiesner on Tue, 16 Feb 2016 19:41:25 +0100) Subject: Re: bug#18157: 24.4.50; battery-pmset fails to report critical battery state References: <874md81z5z.fsf@amu.edu.pl> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 18157 Cc: mbork@mbork.pl, 18157@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Sebastian Wiesner > Date: Tue, 16 Feb 2016 19:41:25 +0100 > Cc: 18157@debbugs.gnu.org > > I hope you understand that Emacs taking two years for what seems to be a trivial issue to fix does not particularly contribute to my enthusiasm, nor does it motivate me to test this patch. FWIW, I'm very grateful to Marcin and a few people like him for investing their time into working on this and other bug reports, and hope that more contributors like them will come on board and help in this effort. Thanks a lot, guys! From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 16 18:44:02 2016 Received: (at 18157) by debbugs.gnu.org; 16 Feb 2016 23:44:02 +0000 Received: from localhost ([127.0.0.1]:38627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aVpHm-0005XG-2Z for submit@debbugs.gnu.org; Tue, 16 Feb 2016 18:44:02 -0500 Received: from mail.mojserwer.eu ([195.110.48.8]:51360) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aVpHk-0005Wk-Dv for 18157@debbugs.gnu.org; Tue, 16 Feb 2016 18:44:01 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 5E3FE9D2003; Wed, 17 Feb 2016 00:43:57 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0vY1wj+niKMh; Wed, 17 Feb 2016 00:43:50 +0100 (CET) Received: from localhost (unknown [109.232.24.28]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 9F7849D2002; Wed, 17 Feb 2016 00:43:50 +0100 (CET) References: <874md81z5z.fsf@amu.edu.pl> User-agent: mu4e 0.9.13; emacs 25.1.50.2 From: Marcin Borkowski To: Sebastian Wiesner Subject: Re: bug#18157: 24.4.50; battery-pmset fails to report critical battery state In-reply-to: Date: Wed, 17 Feb 2016 00:43:46 +0100 Message-ID: <8737ss1arx.fsf@mbork.pl> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18157 Cc: 18157@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 2016-02-16, at 19:41, Sebastian Wiesner wrote: >> Does this patch help? > > I'm sorry, are you asking me? It would be bold to believe that I still cared for this issue now, almost *two years* after I reported it. > > At a cursory look the fix surely looks correct, but I hope you understand that Emacs taking two years for what seems to be a trivial issue to fix does not particularly contribute to my enthusiasm, nor does it motivate me to test this patch. I am also sorry if I sounded rude. The question was directed to people reading the bug-gnu-emacs mailing list as well as to you. I am also sorry that this was not fixed earlier, but I am bold enough to believe that it is better to try to investigate it now than to leave it forever. I am also sorry that I didn't test this myself. However, I do not own a Mac, so I could only transcribe your report into a (trivial, admittedly) patch for others to test. I do not consider my input here too valuable (everyone could write this patch, even without any deeper knowledge about Elisp, thanks to your detailed report and suggestion as to were the correct fix was - thank you for that!), but I hoped that what I may have /really/ fixed was the problem of your report not gaining enough attention when it was sent. Also, even if you don't care for this issue anymore, there may be other people who do. And you were the author of the report, so it was a natural thing to send this message to you. (In fact, this is what the debbugs tool did, as it does by default when responding to bug reports.) Also, if I should have behaved differently, please tell me what I could have done better (apart from the not-so-optimal wording of my message). Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 20 00:56:14 2016 Received: (at 18157) by debbugs.gnu.org; 20 Feb 2016 05:56:14 +0000 Received: from localhost ([127.0.0.1]:34445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aX0Wc-0006dy-8p for submit@debbugs.gnu.org; Sat, 20 Feb 2016 00:56:14 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:33759) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aX0Wa-0006df-GQ for 18157@debbugs.gnu.org; Sat, 20 Feb 2016 00:56:12 -0500 Received: by mail-pa0-f45.google.com with SMTP id fl4so61749553pad.0 for <18157@debbugs.gnu.org>; Fri, 19 Feb 2016 21:56:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:reply-to:mime-version:content-type; bh=TzMxMYxQDNsBuS+Inxp6FSHBDmt9XxLHTSI6BL6kPE8=; b=gEFmzv94ZpDTJ8agS7+yqGUR14Si/d0hJ7weVGkkB5jJL5Dra/YVwLhyH+eSkOZZfv TRst5EYTHgdnPbxRgx5EfKjEz+jhAjGyBoQrJ6R+tpEekSv7c5bgkZRqM9yVASiY1ZXl zi0QStX7TBPwOxrjhxDTmaRCsemkYCmbmcks+LpeBKC2mGaNyydQTbiHUpD4P31uNQtn 06SonkP2Gjgko3dFiWOjuSvU7Xn2q71eTYwoj2jeRtvToRUZVmYuO45FFjtINcs9XKQv h9O7HAiOLnDDdFV5ieENMn+CdYBlas1yl7JY+dIqOxS2x4wtZrc4VSA+QkoYcf2kS01b 6ICQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:in-reply-to:date:message-id :references:user-agent:reply-to:mime-version:content-type; bh=TzMxMYxQDNsBuS+Inxp6FSHBDmt9XxLHTSI6BL6kPE8=; b=jKFuVHowbV+5WIZQvhGTtCUNC0bIOvfm3IOyKZGFuhI5Nrfv5SsM8VCuo7bIfWrk9z kGmI0Pcn4QfoP/Zil0JZNbdP8BgZSy5AkcDKlxx09MjcQTlwo3DTinAopXTPXG4AO3e5 BZLNqCWTl0hflLUQFgjzUbFJ5RARRhDs5Vl3pWYKmsi6jISQYEuJqNL1r9B9ARO+X0E9 X+puKVHRO1ARmqkVGUAL6WomZMh8KsNZ5vguaHLxwqKz6ZkmB/FQecaJXwcTV0WPn2Bp DGnh2h3diyTuC2RyAprKTKQYrv3v1FURD3zUrJUSmwxIJRN+kJwzRKajgAO7g8+7Ajxg /yMw== X-Gm-Message-State: AG10YORXNSqw7Kh+83u0k2DJkP1C19K7S+0k0sjqcOU6GknDDIGE7fDLwAYTCq7uFtfauQ== X-Received: by 10.67.8.100 with SMTP id dj4mr23528584pad.88.1455947766686; Fri, 19 Feb 2016 21:56:06 -0800 (PST) Received: from Vulcan.local (76-234-68-79.lightspeed.frokca.sbcglobal.net. [76.234.68.79]) by smtp.gmail.com with ESMTPSA id n68sm21604692pfj.46.2016.02.19.21.56.04 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 19 Feb 2016 21:56:04 -0800 (PST) From: John Wiegley X-Google-Original-From: "John Wiegley" Received: by Vulcan.local (Postfix, from userid 501) id DFCEF130DAD63; Fri, 19 Feb 2016 21:56:03 -0800 (PST) To: Eli Zaretskii Subject: Re: bug#18157: 24.4.50; battery-pmset fails to report critical battery state In-Reply-To: <837fi4wk7r.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 16 Feb 2016 21:04:08 +0200") Date: Fri, 19 Feb 2016 21:51:52 -0800 Message-ID: References: <874md81z5z.fsf@amu.edu.pl> <837fi4wk7r.fsf@gnu.org> User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (darwin) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18157 Cc: mbork@mbork.pl, Sebastian Wiesner , 18157@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: John Wiegley Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable >>>>> Eli Zaretskii writes: > FWIW, I'm very grateful to Marcin and a few people like him for investing > their time into working on this and other bug reports, and hope that more > contributors like them will come on board and help in this effort. >=20 > Thanks a lot, guys! I would like to second that thanks. We move at the speed of our volunteers. =2D-=20 John Wiegley GPG fingerprint =3D 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGbBAEBCgAGBQJWx/74AAoJEMFE2PTxn+YwC2wL+K1SeI+PgCtMUow/Oxo8xKBj 2Gyl+27n9EMlJnwczaBn7J0owFirR0ZTKQtH9roH/7KuIko+lyZbCwuuxP0Q2nYM 5t6GulsaB0xAM9UMdmJoGWcMBPPyzWez1R9NQileHTgraQemmz0mycxD7pztqOzW UtLSgbCxDR4WkpVo5URIGFhYMLM3P5Tq9DUf8xul+w3dM7GkUbnJK7eb9KVJ5kN7 qGcWY8l1X97wSaMvX4sw+Ag6tQXTgJGZX8ZT3DrldYZIsUbI79WOtY9C7GnpzYlS 8aABW3+djPmNyuFS7rfsxoQerZ5CJvQ+x52hLlT5LZisZQCyzQGtdInoA8T2EPuR N/QWWBe8+WnXHOyTGLPdopFEdQfFAwChXm8Ud8v49dgCoHefm9lSQGCqRxRKBus8 abnhG/om1RYk4LK7GRZWdJgDqogyeR/obWumlS3kxmJhRHm8k1PSBaUvyrJYQfcN tZK26EkRaYEcBVgc/wv5pMizddA0Np1q7McC7kIP =eWrK -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 20 02:35:45 2016 Received: (at 18157) by debbugs.gnu.org; 20 Feb 2016 07:35:45 +0000 Received: from localhost ([127.0.0.1]:34486 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aX24v-0000yd-MB for submit@debbugs.gnu.org; Sat, 20 Feb 2016 02:35:45 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:50878) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aX24t-0000yT-9O for 18157@debbugs.gnu.org; Sat, 20 Feb 2016 02:35:44 -0500 Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aX24U-0000Pj-Pu; Sat, 20 Feb 2016 08:35:19 +0100 From: Lars Ingebrigtsen To: Marcin Borkowski Subject: Re: bug#18157: 24.4.50; battery-pmset fails to report critical battery state References: <874md81z5z.fsf@amu.edu.pl> Date: Sat, 20 Feb 2016 18:35:14 +1100 In-Reply-To: <874md81z5z.fsf@amu.edu.pl> (Marcin Borkowski's message of "Tue, 16 Feb 2016 15:56:56 +0100") Message-ID: <87bn7bdebx.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1aX24U-0000Pj-Pu X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1456558520.10749@4pMSZHVgru2wACD9uDFrjw X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18157 Cc: 18157@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Marcin Borkowski writes: > Does this patch help? > > diff -u --label /usr/local/share/emacs/25.1.50/lisp/battery.el.gz --label \#\ /tmp/jka-com1889YvM /tmp/buffer-content-1889yDZ > --- /usr/local/share/emacs/25.1.50/lisp/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 From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 20 02:37:16 2016 Received: (at 18157) by debbugs.gnu.org; 20 Feb 2016 07:37:16 +0000 Received: from localhost ([127.0.0.1]:34490 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aX26N-00011B-W8 for submit@debbugs.gnu.org; Sat, 20 Feb 2016 02:37:16 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:56832) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aX26M-000114-RK for 18157@debbugs.gnu.org; Sat, 20 Feb 2016 02:37:15 -0500 Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aX25z-0000RT-OQ; Sat, 20 Feb 2016 08:36:52 +0100 From: Lars Ingebrigtsen To: Marcin Borkowski Subject: Re: bug#18157: 24.4.50; battery-pmset fails to report critical battery state References: <874md81z5z.fsf@amu.edu.pl> <8737ss1arx.fsf@mbork.pl> Date: Sat, 20 Feb 2016 18:36:47 +1100 In-Reply-To: <8737ss1arx.fsf@mbork.pl> (Marcin Borkowski's message of "Wed, 17 Feb 2016 00:43:46 +0100") Message-ID: <877fhzde9c.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1aX25z-0000RT-OQ X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1456558612.54233@MndmK4N4li/D71TxMxds1w X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18157 Cc: Sebastian Wiesner , 18157@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Marcin Borkowski writes: > Also, if I should have behaved differently, please tell me what I could > have done better (apart from the not-so-optimal wording of my message). No, you've done exactly what we hope people would do. Thank you for investigating the problem and providing a patch. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 20 02:39:32 2016 Received: (at control) by debbugs.gnu.org; 20 Feb 2016 07:39:32 +0000 Received: from localhost ([127.0.0.1]:34494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aX28a-00014K-CR for submit@debbugs.gnu.org; Sat, 20 Feb 2016 02:39:32 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:56861) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aX28Y-00014D-Tx for control@debbugs.gnu.org; Sat, 20 Feb 2016 02:39:31 -0500 Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aX28A-0000Tj-UP for control@debbugs.gnu.org; Sat, 20 Feb 2016 08:39:07 +0100 Date: Sat, 20 Feb 2016 18:39:02 +1100 Message-Id: <8760xjde5l.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #18157 X-MailScanner-ID: 1aX28A-0000Tj-UP X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1456558749.34768@JmUPMulloqSAtzZc1SwbzQ X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) tags 18157 fixed close 18157 25.1 From unknown Sat Jun 14 18:51:36 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 19 Mar 2016 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator