GNU bug report logs - #39956
26.2; improve display of information of M-x list-timers

Previous Next

Package: emacs;

Reported by: ndame <emacsuser <at> freemail.hu>

Date: Fri, 6 Mar 2020 16:55:02 UTC

Severity: normal

Tags: fixed

Found in version 26.2

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

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 39956 in the body.
You can then email your comments to 39956 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 bug-gnu-emacs <at> gnu.org:
bug#39956; Package emacs. (Fri, 06 Mar 2020 16:55:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to ndame <emacsuser <at> freemail.hu>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 06 Mar 2020 16:55:02 GMT) Full text and rfc822 format available.

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

From: ndame <emacsuser <at> freemail.hu>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 26.2; improve display of information of M-x list-timers
Date: Fri, 6 Mar 2020 16:50:09 +0000 (GMT)
[Message part 1 (text/plain, inline)]
I've been developing a package lately which uses several timers, and
because of that I use M-x list-timers often. I don't see in the NEWS of 27
changes related to this, so I list some problems.

The first thing which wasn't obvious first that the Next column displays
the time in seconds, but the Repeat column uses minutes, though it's
not indicated anywhere in the header that they use different units.

Generally, the best solution could be to use days, hours, minutes,
seconds format, instead of displaying floating point values.

E.g this line

             195.08     5.00 savehist-autosave

could be more readable like this

             3m 15.08s     5m  savehist-autosave


Or this one

       26479.43  1440.00 run-hooks

like this

       7h 21m 19.43s  1d run-hooks



The latter also demonstrates an other problem: if you only see
run-hooks as the function then you have no idea what will actually
run. It's not trivial to find the source. So if the function has args
then they should also be displayed, at least in some shortened form
with the too long part cut off if the args are too long.
 
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39956; Package emacs. (Sat, 07 Mar 2020 22:09:02 GMT) Full text and rfc822 format available.

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

From: ndame <emacsuser <at> freemail.hu>
To: "39956 <at> debbugs.gnu.org" <39956 <at> debbugs.gnu.org>
Subject: Re: 26.2; improve display of information of M-x list-timers
Date: Sat, 7 Mar 2020 22:03:00 +0000 (GMT)
[Message part 1 (text/plain, inline)]
 
One more thing: it's strange that a buffer displaying timers is so static.

I can keep pressing g manually to see the timers working, but it could be much better
if emacs updated the timer display automatically every second or so when the buffer is 
visible.
 
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39956; Package emacs. (Tue, 27 Oct 2020 10:06:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: ndame <emacsuser <at> freemail.hu>
Cc: 39956 <at> debbugs.gnu.org
Subject: Re: bug#39956: 26.2; improve display of information of M-x list-timers
Date: Tue, 27 Oct 2020 11:05:06 +0100
ndame <emacsuser <at> freemail.hu> writes:

> The first thing which wasn't obvious first that the Next column displays
> the time in seconds, but the Repeat column uses minutes, though it's
> not indicated anywhere in the header that they use different units.

This has been changed in Emacs 28 to be consistent (in seconds).

> Generally, the best solution could be to use days, hours, minutes,
> seconds format, instead of displaying floating point values.
>
> E.g this line
>
>              195.08     5.00 savehist-autosave
>
> could be more readable like this
>
>              3m 15.08s     5m  savehist-autosave
>
> Or this one
>
>        26479.43  1440.00 run-hooks
>
> like this
>
>        7h 21m 19.43s  1d run-hooks

Yes, that would be nicer.  Anybody else got an opinion here?  And does
Emacs have a nice format-seconds-human-readable function somewhere?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39956; Package emacs. (Tue, 27 Oct 2020 10:07:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: ndame <emacsuser <at> freemail.hu>
Cc: "39956 <at> debbugs.gnu.org" <39956 <at> debbugs.gnu.org>
Subject: Re: bug#39956: 26.2; improve display of information of M-x list-timers
Date: Tue, 27 Oct 2020 11:05:58 +0100
ndame <emacsuser <at> freemail.hu> writes:

> One more thing: it's strange that a buffer displaying timers is so static.
>
> I can keep pressing g manually to see the timers working, but it could
> be much better if emacs updated the timer display automatically every
> second or so when the buffer is visible.

It would lead to a lot of jumping around, which would make the buffer
hard to work with (when trying to cancel a timer, for instance).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39956; Package emacs. (Tue, 27 Oct 2020 10:24:02 GMT) Full text and rfc822 format available.

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

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: ndame <emacsuser <at> freemail.hu>, 39956 <at> debbugs.gnu.org
Subject: Re: bug#39956: 26.2; improve display of information of M-x list-timers
Date: Tue, 27 Oct 2020 10:23:33 +0000
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> ndame <emacsuser <at> freemail.hu> writes:
>
>> Generally, the best solution could be to use days, hours, minutes,
>> seconds format, instead of displaying floating point values.
>>
>> E.g this line
>>
>>              195.08     5.00 savehist-autosave
>>
>> could be more readable like this
>>
>>              3m 15.08s     5m  savehist-autosave
>>
>> Or this one
>>
>>        26479.43  1440.00 run-hooks
>>
>> like this
>>
>>        7h 21m 19.43s  1d run-hooks
>
> Yes, that would be nicer.  Anybody else got an opinion here?  And does
> Emacs have a nice format-seconds-human-readable function somewhere?

What about format-seconds?

  (format-seconds "%hh %mm %z%ss" 1000) ; => "16m 40s"

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39956; Package emacs. (Wed, 28 Oct 2020 09:08:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: ndame <emacsuser <at> freemail.hu>, 39956 <at> debbugs.gnu.org
Subject: Re: bug#39956: 26.2; improve display of information of M-x list-timers
Date: Wed, 28 Oct 2020 10:07:45 +0100
"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:

> What about format-seconds?
>
>   (format-seconds "%hh %mm %z%ss" 1000) ; => "16m 40s"

Nice!  I've now redone the list-timers display using this format.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 28 Oct 2020 09:09:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 39956 <at> debbugs.gnu.org and ndame <emacsuser <at> freemail.hu> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 28 Oct 2020 09:09:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39956; Package emacs. (Wed, 28 Oct 2020 13:40:01 GMT) Full text and rfc822 format available.

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

From: Mattias Engdegård <mattiase <at> acm.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>, ndame <emacsuser <at> freemail.hu>,
 39956 <at> debbugs.gnu.org
Subject: Re: bug#39956: 26.2; improve display of information of M-x
 list-timers 
Date: Wed, 28 Oct 2020 14:39:19 +0100
The fractions of a second are gone. Was that intended?
I thought it was rather nice to have those, especially when comparing timers that would otherwise seem to expire simultaneously. Besides, 0.75 and 0 s are qualitatively rather different.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39956; Package emacs. (Wed, 28 Oct 2020 15:18:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: contovob <at> tcd.ie, emacsuser <at> freemail.hu, 39956 <at> debbugs.gnu.org
Subject: Re: bug#39956: 26.2; improve display of information of M-x list-timers
Date: Wed, 28 Oct 2020 17:17:39 +0200
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Date: Wed, 28 Oct 2020 10:07:45 +0100
> Cc: ndame <emacsuser <at> freemail.hu>, 39956 <at> debbugs.gnu.org
> 
> "Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
> 
> > What about format-seconds?
> >
> >   (format-seconds "%hh %mm %z%ss" 1000) ; => "16m 40s"
> 
> Nice!  I've now redone the list-timers display using this format.

This loses information, because we only display integral seconds, the
fractional seconds are lost.  E.g., try the command in "emacs -Q".

Can we have the accuracy back, without losing human-readable format?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39956; Package emacs. (Fri, 30 Oct 2020 10:05:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>, ndame <emacsuser <at> freemail.hu>,
 39956 <at> debbugs.gnu.org
Subject: Re: bug#39956: 26.2; improve display of information of M-x list-timers
Date: Fri, 30 Oct 2020 11:03:59 +0100
Mattias Engdegård <mattiase <at> acm.org> writes:

> The fractions of a second are gone. Was that intended?
> I thought it was rather nice to have those, especially when comparing
> timers that would otherwise seem to expire simultaneously. Besides,
> 0.75 and 0 s are qualitatively rather different.

No, that was unintended.

Hm...  perhaps `format-second' should get support for fractional
seconds?  Introducing a new format spec should be easy enough, but what
should the format be?

%5s means front-padding with spaces so that it's 5 characters wide.
What about...  %5.2s to front-pad, and have two decimals?  Oh, yeah,
that's just the normal floating point spec; duh.

Should be trivial to implement.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39956; Package emacs. (Fri, 30 Oct 2020 10:07:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>, ndame <emacsuser <at> freemail.hu>,
 39956 <at> debbugs.gnu.org
Date: Fri, 30 Oct 2020 11:06:33 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> %5s means front-padding with spaces so that it's 5 characters wide.
> What about...  %5.2s to front-pad, and have two decimals?  Oh, yeah,
> that's just the normal floating point spec; duh.
>
> Should be trivial to implement.

Oops.  Ambiguous, since format-seconds unfortunately uses "." to mean
"zero-pad".  (Instead of having a leading space mean zero-pad, like in
`format'.)  

    (while (string-match "%\\.?[0-9]*\\(.\\)" string start)

OK, I'll introduce a "," thing to specify decimals.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39956; Package emacs. (Fri, 30 Oct 2020 11:12:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>, ndame <emacsuser <at> freemail.hu>,
 39956 <at> debbugs.gnu.org
Subject: Re: bug#39956: 26.2; improve display of information of M-x list-timers
Date: Fri, 30 Oct 2020 12:11:11 +0100
Mattias Engdegård <mattiase <at> acm.org> writes:

> The fractions of a second are gone. Was that intended?
> I thought it was rather nice to have those, especially when comparing
> timers that would otherwise seem to expire simultaneously. Besides,
> 0.75 and 0 s are qualitatively rather different.

Now implemented.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39956; Package emacs. (Fri, 30 Oct 2020 14:52:01 GMT) Full text and rfc822 format available.

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

From: Mattias Engdegård <mattiase <at> acm.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>, ndame <emacsuser <at> freemail.hu>,
 39956 <at> debbugs.gnu.org
Subject: Re: bug#39956: 26.2; improve display of information of M-x list-timers
Date: Fri, 30 Oct 2020 15:50:54 +0100
30 okt. 2020 kl. 12.11 skrev Lars Ingebrigtsen <larsi <at> gnus.org>:

> Now implemented.

Nice, thank you!





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 28 Nov 2020 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 147 days ago.

Previous Next


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