GNU bug report logs - #39491
28.0.50; two bugs in battery-upower

Previous Next

Package: emacs;

Reported by: rms <at> gnu.org

Date: Fri, 7 Feb 2020 20:16:02 UTC

Severity: normal

Tags: fixed, patch

Found in version 28.0.50

Fixed in version 28.1

Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 39491 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Evgeny Zajcev <lg.zevlg <at> gmail.com>
Cc: 39491 <at> debbugs.gnu.org, rms <at> gnu.org,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#39491: 28.0.50; two bugs in battery-upower
Date: Sat, 08 Feb 2020 09:30:54 +0200
> From: Richard Stallman <rms <at> gnu.org>
> Date: Fri, 07 Feb 2020 15:14:57 -0500
> 
> 
> battery-upower crashes on my laptop because there is no BatteryLevel property.
> This code
> 
>           (cons ?b (cond ((= level 3) "-")
>                          ((= level 4) "!")
>                          (online-p "+")
>                          (t "")))
> 
> needs to handle nil.  I don't know what value it should return for that case.
> 
> However, that function has a design flaw: it reports on just the first
> battery in the list.  battery-upower-device-list correctly returns a
> list with an element for each battery, but battery-upower finds only one
> of them (the first one in the list) and ignores the others.
> 
> The old code handle all the batteries and added the energy quantities
> so as to report accurately the total power available and overall
> fraction of charge.  I wrote that code myself, around 10 years ago.
> 
> Please restore the lost functionality.

Evgeny, could you please look into fixing this?

TIA




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

Previous Next


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