GNU bug report logs -
#39491
28.0.50; two bugs in battery-upower
Previous Next
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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39491 in the body.
You can then email your comments to 39491 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39491
; Package
emacs
.
(Fri, 07 Feb 2020 20:16:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
rms <at> gnu.org
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 07 Feb 2020 20:16:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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.
In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.30, cairo version 1.14.6)
of 2020-02-06 built on softly
Repository revision: c4be80112556e06bd7e92138e44051cc8c62e709
Repository branch: master
System Description: Trisquel GNU/Linux Flidas (8.0)
Recent messages:
(("NativePath" . "BAT0") ("Vendor" . "SANYO") ("Model" . "42T4832") ("Serial" . "19849") ("UpdateTime" . 1581079789) ("Type" . 2) ("PowerSupply" . t) ("HasHistory" . t) ("HasStatistics" . t) ("Online") ("Energy" . 35.21) ("EnergyEmpty" . 0.0) ("EnergyFull" . 35.21) ("EnergyFullDesign" . 43.29) ("EnergyRate" . 2.237) ("Voltage" . 12.504) ("Luminosity" . 0.0) ("TimeToEmpty" . 0) ("TimeToFull" . 0) ("Percentage" . 100.0) ("Temperature" . 0.0) ("IsPresent" . t) ("State" . 4) ("IsRechargeable" . t) ("Capacity" . 81.33518133518135) ("Technology" . 1) ("WarningLevel" . 1) ("IconName" . "battery-full-charged-symbolic"))
Back to top level
battery-upower
Saving file /home/rms/emacs-git/build-feb-6/lisp/battery.el...
Wrote /home/rms/emacs-git/build-feb-6/lisp/battery.el
Quit
Power on-line, battery fully-charged (100% load, remaining time 0:00)
Mark set [2 times]
(("line_power_AC" . :line-power) ("battery_BAT0" . :battery) ("battery_BAT1" . :battery))
completing-read-default: Command attempted to use minibuffer while in minibuffer
Quit
Configured using:
'configure 'CFLAGS=-g -O0' --with-gnutls=no'
Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB
TOOLKIT_SCROLL_BARS GTK2 X11 XDBE XIM MODULES THREADS PDUMPER GMP
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Emacs-Lisp
Minor modes in effect:
bug-reference-prog-mode: t
gpm-mouse-mode: t
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
abbrev-mode: t
Load-path shadows:
None found.
Features:
(shadow mailalias emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml mml-sec epa epg epg-config gnus-util rmail
rmail-loaddefs text-property-search time-date mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils misearch
multi-isearch vc-git diff-mode easy-mmode bug-reference help-fns
radix-tree cl-print debug backtrace help-mode find-func battery dbus
xml t-mouse term/linux view derived paren cus-start cus-load advice
finder-inf package easymenu browse-url url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json subr-x map url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese
eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese composite charscript charprop case-table
epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads dbusbind inotify
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)
Memory information:
((conses 16 84673 5995)
(symbols 48 9669 1)
(strings 32 27252 1051)
(string-bytes 1 856458)
(vectors 16 15529)
(vector-slots 8 554003 72566)
(floats 8 45 242)
(intervals 56 545 268)
(buffers 1000 12)
(heap 1024 9701 932))
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
--
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39491
; Package
emacs
.
(Sat, 08 Feb 2020 07:32:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 39491 <at> debbugs.gnu.org (full text, mbox):
> 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
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39491
; Package
emacs
.
(Sat, 08 Feb 2020 08:11:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 39491 <at> debbugs.gnu.org (full text, mbox):
> 8 февр. 2020 г., в 11:31, Eli Zaretskii <eliz <at> gnu.org> написал(а):
>
>
>>
>> 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.
>>
If level is unavailable and AC is off-line/unknown, then it should be empty string I think. User could see the battery level is low/critical by percentage
>> 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?
>
OK, we should generalize multi-battery code then, so each status func won’t reimplement multi battery handling.
I’ll look at it tomorrow
> TIA
Added indication that bug 39491 blocks39202
Request was from
Noam Postavsky <npostavs <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Wed, 26 Feb 2020 20:59:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39491
; Package
emacs
.
(Sat, 21 Mar 2020 10:46:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 39491 <at> debbugs.gnu.org (full text, mbox):
(I'm sorry if this comes to you as a duplicate, I think I sent it by error
to the wrong set of people)
lg.zevlg <at> gmail.com writes:
> If level is unavailable and AC is off-line/unknown, then it should be empty string I think. User could see the battery level is low/critical by percentage
I committed a oneliner doing that, pushed as fix/bug-39491
See: https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=fix/bug-39491
It's been a long time since I didn't commit to emacs, can you check if
it's OK to merge ?
I'm aware that it is not a full fix because it doesn't address the
following :
> OK, we should generalize multi-battery code then, so each status func
> won’t reimplement multi battery handling.
but at least it stops the error.
--
Nicolas
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39491
; Package
emacs
.
(Sun, 26 Apr 2020 14:48:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 39491 <at> debbugs.gnu.org (full text, mbox):
> From: lg.zevlg <at> gmail.com
> Date: Sat, 8 Feb 2020 12:10:46 +0400
> Cc: 39491 <at> debbugs.gnu.org, rms <at> gnu.org,
> Stefan Monnier <monnier <at> iro.umontreal.ca>
>
> >> 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?
> >
>
> OK, we should generalize multi-battery code then, so each status func won’t reimplement multi battery handling.
>
> I’ll look at it tomorrow
Evgeny, any progress in fixing this?
TIA
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39491
; Package
emacs
.
(Sun, 26 Apr 2020 15:45:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 39491 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
вс, 26 апр. 2020 г. в 17:47, Eli Zaretskii <eliz <at> gnu.org>:
> > From: lg.zevlg <at> gmail.com
> > Date: Sat, 8 Feb 2020 12:10:46 +0400
> > Cc: 39491 <at> debbugs.gnu.org, rms <at> gnu.org,
> > Stefan Monnier <monnier <at> iro.umontreal.ca>
> >
> > >> 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?
> > >
> >
> > OK, we should generalize multi-battery code then, so each status func
> won’t reimplement multi battery handling.
> >
> > I’ll look at it tomorrow
>
> Evgeny, any progress in fixing this?
>
Sorry for the delay, I have some progress, but not yet ready. I'm pretty
busy these days because I'm working for large company that provides
video-streaming service and we experiencing extreme rise in number of the
active users and everybody wants to watch something all the day :)
--
lg
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39491
; Package
emacs
.
(Sun, 26 Apr 2020 16:55:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 39491 <at> debbugs.gnu.org (full text, mbox):
> From: Evgeny Zajcev <lg.zevlg <at> gmail.com>
> Date: Sun, 26 Apr 2020 18:44:09 +0300
> Cc: 39491 <at> debbugs.gnu.org, rms <at> gnu.org,
> Stefan Monnier <monnier <at> iro.umontreal.ca>
>
> Evgeny, any progress in fixing this?
>
> Sorry for the delay, I have some progress, but not yet ready. I'm pretty busy these days because I'm working
> for large company that provides video-streaming service and we experiencing extreme rise in number of the
> active users and everybody wants to watch something all the day :)
Thanks, just please don't forget this issue.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39491
; Package
emacs
.
(Tue, 26 May 2020 16:25:01 GMT)
Full text and
rfc822 format available.
Message #28 received at 39491 <at> debbugs.gnu.org (full text, mbox):
> Date: Sun, 26 Apr 2020 19:53:45 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 39491 <at> debbugs.gnu.org, rms <at> gnu.org, monnier <at> iro.umontreal.ca
>
> > From: Evgeny Zajcev <lg.zevlg <at> gmail.com>
> > Date: Sun, 26 Apr 2020 18:44:09 +0300
> > Cc: 39491 <at> debbugs.gnu.org, rms <at> gnu.org,
> > Stefan Monnier <monnier <at> iro.umontreal.ca>
> >
> > Evgeny, any progress in fixing this?
> >
> > Sorry for the delay, I have some progress, but not yet ready. I'm pretty busy these days because I'm working
> > for large company that provides video-streaming service and we experiencing extreme rise in number of the
> > active users and everybody wants to watch something all the day :)
>
> Thanks, just please don't forget this issue.
Ping! Any news on this one?
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39491
; Package
emacs
.
(Tue, 26 May 2020 16:43:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 39491 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
вт, 26 мая 2020 г. в 19:23, Eli Zaretskii <eliz <at> gnu.org>:
> > Date: Sun, 26 Apr 2020 19:53:45 +0300
> > From: Eli Zaretskii <eliz <at> gnu.org>
> > Cc: 39491 <at> debbugs.gnu.org, rms <at> gnu.org, monnier <at> iro.umontreal.ca
> >
> > > From: Evgeny Zajcev <lg.zevlg <at> gmail.com>
> > > Date: Sun, 26 Apr 2020 18:44:09 +0300
> > > Cc: 39491 <at> debbugs.gnu.org, rms <at> gnu.org,
> > > Stefan Monnier <monnier <at> iro.umontreal.ca>
> > >
> > > Evgeny, any progress in fixing this?
> > >
> > > Sorry for the delay, I have some progress, but not yet ready. I'm
> pretty busy these days because I'm working
> > > for large company that provides video-streaming service and we
> experiencing extreme rise in number of the
> > > active users and everybody wants to watch something all the day :)
> >
> > Thanks, just please don't forget this issue.
>
> Ping! Any news on this one?
>
>
I will get spare time very soon, and will come back to this. I did not
forget about it :)
--
lg
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39491
; Package
emacs
.
(Tue, 26 May 2020 16:47:02 GMT)
Full text and
rfc822 format available.
Message #34 received at 39491 <at> debbugs.gnu.org (full text, mbox):
> From: Evgeny Zajcev <lg.zevlg <at> gmail.com>
> Date: Tue, 26 May 2020 19:42:29 +0300
> Cc: 39491 <at> debbugs.gnu.org, rms <at> gnu.org,
> Stefan Monnier <monnier <at> iro.umontreal.ca>
>
> I will get spare time very soon, and will come back to this. I did not forget about it :)
Thanks!
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39491
; Package
emacs
.
(Tue, 26 May 2020 17:43:02 GMT)
Full text and
rfc822 format available.
Message #37 received at 39491 <at> debbugs.gnu.org (full text, mbox):
>> I will get spare time very soon, and will come back to this. I did not forget about it :)
> Thanks!
How 'bout we revert to the /sys backend as default, in the mean time?
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39491
; Package
emacs
.
(Tue, 26 May 2020 17:49:02 GMT)
Full text and
rfc822 format available.
Message #40 received at 39491 <at> debbugs.gnu.org (full text, mbox):
> 26 мая 2020 г., в 20:42, Stefan Monnier <monnier <at> iro.umontreal.ca> написал(а):
>
>
>>
>>> I will get spare time very soon, and will come back to this. I did not forget about it :)
>> Thanks!
>
> How 'bout we revert to the /sys backend as default, in the mean time?
Multiple batteries setup is so popular in Emacs world? We can detect multiple batteries and fallback to backend supporting them
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39491
; Package
emacs
.
(Wed, 27 May 2020 03:20:02 GMT)
Full text and
rfc822 format available.
Message #43 received at 39491 <at> debbugs.gnu.org (full text, mbox):
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
We can detect multiple batteries and fallback to backend supporting
them
1. "Backend" is a general term. What is this backend?
2. Does it support multiple batteries well?
3. How can I test that it works? What commands should I use?
--
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39491
; Package
emacs
.
(Wed, 27 May 2020 03:20:02 GMT)
Full text and
rfc822 format available.
Message #46 received at 39491 <at> debbugs.gnu.org (full text, mbox):
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> How 'bout we revert to the /sys backend as default, in the mean time?
Is that the same code in battery.el that was running last year?
If so, it did the job.
Or is it something different?
--
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39491
; Package
emacs
.
(Wed, 27 May 2020 14:00:02 GMT)
Full text and
rfc822 format available.
Message #49 received at 39491 <at> debbugs.gnu.org (full text, mbox):
> > How 'bout we revert to the /sys backend as default, in the mean time?
> Is that the same code in battery.el that was running last year?
Yes.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39491
; Package
emacs
.
(Thu, 28 May 2020 03:16:02 GMT)
Full text and
rfc822 format available.
Message #52 received at 39491 <at> debbugs.gnu.org (full text, mbox):
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> > Is that the same code in battery.el that was running last year?
> Yes.
In that case, it fixes the regression that is a problem for me.
I hope the new code will eventually work, but in the mean time,
let's move back to the code that does work.
--
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39491
; Package
emacs
.
(Thu, 11 Jun 2020 15:59:01 GMT)
Full text and
rfc822 format available.
Message #55 received at 39491 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
tags 39491 + patch
quit
Richard Stallman <rms <at> gnu.org> writes:
> [[[ To any NSA and FBI agents reading my email: please consider ]]]
> [[[ whether defending the US Constitution against all enemies, ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
> > > Is that the same code in battery.el that was running last year?
>
> > Yes.
>
> In that case, it fixes the regression that is a problem for me.
>
> I hope the new code will eventually work, but in the mean time,
> let's move back to the code that does work.
The attached patch fixes this regression and adds support for both
multiple power sources and D-Bus status change notifications in
battery-upower.
In a separate patch in bug#41808 I reorder the battery status backends
in order of increasing obsolescence on GNU/Linux: sysfs, ACPI, then APM.
WDYT? Thanks,
--
Basil
[0001-Improve-battery.el-UPower-support.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
n
Added tag(s) patch.
Request was from
"Basil L. Contovounesios" <contovob <at> tcd.ie>
to
control <at> debbugs.gnu.org
.
(Thu, 11 Jun 2020 15:59:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39491
; Package
emacs
.
(Thu, 11 Jun 2020 18:18:01 GMT)
Full text and
rfc822 format available.
Message #60 received at 39491 <at> debbugs.gnu.org (full text, mbox):
"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
> --- a/test/lisp/battery-tests.el
> +++ b/test/lisp/battery-tests.el
> @@ -48,6 +48,69 @@ battery-linux-proc-apm-regexp
> (should (equal (match-string 8 str) "1792"))
> (should (equal (match-string 9 str) "min"))))
>
> +(ert-deftest battery-upower-state ()
> +(ert-deftest battery-upower-state-unknown ()
Shouldn't theses tests be skipped, unless battery-upower is used?
Something like
(skip-unless (eq battery-status-function #'battery-upower))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39491
; Package
emacs
.
(Thu, 11 Jun 2020 19:42:02 GMT)
Full text and
rfc822 format available.
Message #63 received at 39491 <at> debbugs.gnu.org (full text, mbox):
Michael Albinus <michael.albinus <at> gmx.de> writes:
> "Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
>
>> --- a/test/lisp/battery-tests.el
>> +++ b/test/lisp/battery-tests.el
>> @@ -48,6 +48,69 @@ battery-linux-proc-apm-regexp
>> (should (equal (match-string 8 str) "1792"))
>> (should (equal (match-string 9 str) "min"))))
>>
>> +(ert-deftest battery-upower-state ()
>> +(ert-deftest battery-upower-state-unknown ()
>
> Shouldn't theses tests be skipped, unless battery-upower is used?
No, because they test a pure function that depends only on its
arguments.
--
Basil
Added tag(s) fixed.
Request was from
"Basil L. Contovounesios" <contovob <at> tcd.ie>
to
control <at> debbugs.gnu.org
.
(Thu, 18 Jun 2020 15:49:01 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 28.1, send any further explanations to
39491 <at> debbugs.gnu.org and rms <at> gnu.org
Request was from
"Basil L. Contovounesios" <contovob <at> tcd.ie>
to
control <at> debbugs.gnu.org
.
(Thu, 18 Jun 2020 15:49:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39491
; Package
emacs
.
(Thu, 18 Jun 2020 15:49:02 GMT)
Full text and
rfc822 format available.
Message #70 received at 39491-done <at> debbugs.gnu.org (full text, mbox):
tags 39491 fixed
close 39491 28.1
quit
"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
> The attached patch fixes this regression and adds support for both
> multiple power sources and D-Bus status change notifications in
> battery-upower.
Pushed to master and boldly closing.
Improve battery.el UPower support
453d30d92c 2020-06-18 13:11:17 +0100
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=453d30d92cbf940567869d4705c1fcfe57725825
--
Basil
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 17 Jul 2020 11:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 165 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.