GNU bug report logs - #41808
28.0.50; Various battery.el improvements

Previous Next

Package: emacs;

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

Date: Thu, 11 Jun 2020 15:48: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 41808 in the body.
You can then email your comments to 41808 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to mattiase <at> acm.org, bug-gnu-emacs <at> gnu.org:
bug#41808; Package emacs. (Thu, 11 Jun 2020 15:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Basil L. Contovounesios" <contovob <at> tcd.ie>:
New bug report received and forwarded. Copy sent to mattiase <at> acm.org, bug-gnu-emacs <at> gnu.org. (Thu, 11 Jun 2020 15:48:02 GMT) Full text and rfc822 format available.

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

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; Various battery.el improvements
Date: Thu, 11 Jun 2020 16:47:40 +0100
[Message part 1 (text/plain, inline)]
X-Debbugs-Cc: Mattias Engdegård <mattiase <at> acm.org>
Tags: patch

While working on bug#39491, I came across various opportunities for
improvement in battery.el.

The attached patch reorders battery-status-function checks based on
obsolescence, adds two new faces for use in battery-mode-line-format,
makes battery-update more robust, fixes documentation, indentation, and
various regexps used, and simplifies file searches and logic.

CCing Mattias to comment on the rx changes.

WDYT?  Thanks,

-- 
Basil

[0001-Various-battery.el-improvements.patch (text/x-diff, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41808; Package emacs. (Thu, 11 Jun 2020 16:28:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: 41808 <at> debbugs.gnu.org, mattiase <at> acm.org
Subject: Re: bug#41808: 28.0.50; Various battery.el improvements
Date: Thu, 11 Jun 2020 19:26:43 +0300
> From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
> Date: Thu, 11 Jun 2020 16:47:40 +0100
> Cc: mattias engdegård <mattiase <at> acm.org>
> 
> -	((fboundp 'w32-battery-status)
> +        ((functionp 'w32-battery-status)
>  	 #'w32-battery-status))

Is something wrong with fboundp?  I think we have dozens if not
hundreds of such uses of fboundp, so if something's wrong with it, we
had better fixed them all.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41808; Package emacs. (Thu, 11 Jun 2020 16:31:01 GMT) Full text and rfc822 format available.

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

From: Mattias Engdegård <mattiase <at> acm.org>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: 41808 <at> debbugs.gnu.org
Subject: Re: bug#41808: 28.0.50; Various battery.el improvements
Date: Thu, 11 Jun 2020 18:29:55 +0200
11 juni 2020 kl. 17.47 skrev Basil L. Contovounesios <contovob <at> tcd.ie>:
> 
> CCing Mattias to comment on the rx changes.

That's fine, thank you!





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41808; Package emacs. (Thu, 11 Jun 2020 17:23:01 GMT) Full text and rfc822 format available.

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

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 41808 <at> debbugs.gnu.org
Subject: Re: bug#41808: 28.0.50; Various battery.el improvements
Date: Thu, 11 Jun 2020 18:22:22 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
>> Date: Thu, 11 Jun 2020 16:47:40 +0100
>> Cc: mattias engdegård <mattiase <at> acm.org>
>> 
>> -	((fboundp 'w32-battery-status)
>> +        ((functionp 'w32-battery-status)
>>  	 #'w32-battery-status))
>
> Is something wrong with fboundp?  I think we have dozens if not
> hundreds of such uses of fboundp, so if something's wrong with it, we
> had better fixed them all.

The only reason I switched to functionp is because
battery-status-function is passed to funcall, but now that I think about
it again we're only checking whether the definition exists at all here,
so I reverted to fboundp.

Thanks,

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41808; Package emacs. (Thu, 11 Jun 2020 17:24:02 GMT) Full text and rfc822 format available.

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

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: 41808 <at> debbugs.gnu.org
Subject: Re: bug#41808: 28.0.50; Various battery.el improvements
Date: Thu, 11 Jun 2020 18:22:59 +0100
Mattias Engdegård <mattiase <at> acm.org> writes:

> 11 juni 2020 kl. 17.47 skrev Basil L. Contovounesios <contovob <at> tcd.ie>:
>> 
>> CCing Mattias to comment on the rx changes.
>
> That's fine, thank you!

Thanks.

-- 
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:46:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 41808 <at> debbugs.gnu.org and "Basil L. Contovounesios" <contovob <at> tcd.ie> Request was from "Basil L. Contovounesios" <contovob <at> tcd.ie> to control <at> debbugs.gnu.org. (Thu, 18 Jun 2020 15:46:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41808; Package emacs. (Thu, 18 Jun 2020 15:46:03 GMT) Full text and rfc822 format available.

Message #24 received at 41808-done <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 41808-done <at> debbugs.gnu.org
Subject: Re: bug#41808: 28.0.50; Various battery.el improvements
Date: Thu, 18 Jun 2020 16:45:23 +0100
tags 41808 fixed
close 41808 28.1
quit

Pushed to master and closing.

Various battery.el improvements (bug#41808)
23a148c950 2020-06-18 12:58:28 +0100
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=23a148c9506f2a5bce71bd5c8822bb7cde6697e8

-- 
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:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 337 days ago.

Previous Next


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