GNU bug report logs -
#52235
29.0.50; Suggestion: refactor time.el into a more general 'clock' framework
Previous Next
Reported by: Arthur Miller <arthur.miller <at> live.com>
Date: Thu, 2 Dec 2021 01:35:02 UTC
Severity: normal
Found in version 29.0.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Arthur Miller <arthur.miller <at> live.com>
>> Date: Thu, 02 Dec 2021 00:08:37 +0100
>>
>> My idea to per-use it is to simply run 'update-hooks' on clock beat, so any
>> application can register a hook that will be called on a "clock beat". While it
>> is maybe not so super-synchronized with system clock, it still gives impression
>> of clocks in Emacs be synchronized.
>
> Isn't that what timers are for? Why can't you use run-with-timer for
> what you want to do?
Becaue it does not syncrhonize with clock that Emacs displays, if it displays. I
could use a timer, and I used it as mentioned in the description of suggestion.
As mentioned, not pretty, if different application will like to be notifed
at "11:30" clock time, and then one happends like half minut before the other.
Also there is no reason to create one timer per each application if all
application is want to be notified when certain clock time occur. It saves code
repetion that each application has to setup. Further, if user is displaying time
on the modeline, and those variables are all calculated, why should other
application re-define and re-calculate them.
This bug report was last modified 3 years and 263 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.