GNU bug report logs -
#55163
29.0.50; master 4a1f69ebca (TICKS . HZ) for current-time broke lsp-mode
Previous Next
Reported by: Vincenzo Pupillo <v.pupillo <at> gmail.com>
Date: Thu, 28 Apr 2022 10:55:01 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
Message #31 received at 55163 <at> debbugs.gnu.org (full text, mbox):
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: 55163 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, Vincenzo Pupillo
> <v.pupillo <at> gmail.com>
> Date: Fri, 29 Apr 2022 11:54:07 +0200
>
> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>
> > Thanks; makes sense to me. And it was worth a try to modernise these
> > functions, but it doesn't seem like the world is ready yet (and it's
> > hard to see a practical way forward without deprecating all the current
> > time-related functions and creating new ones, which we probably don't
> > want to do).
>
> Thinking about this slightly more, perhaps it's worth doing? Because we
> currently have some interfaces in this area that could be more efficient
> or elegant.
>
> The time functions commonly used are don't have particularly
> discoverable names -- current-time and float-time are probably the ones
> used most. Another common source of times are
> (file-attribute-modification-time (file-attributes ...)), which is
> commonly called in loops, and generates a lot of unnecessary garbage.
>
> So perhaps we could come up with a set of new functions in this area
> that are more efficient and avoid using the old time formats.
>
> Off the top of my head, we could have
> (file-attribute file 'modification-time) (i.e., have a &rest to specify
> the attributes, and don't return a list if there's one attribute, which
> is common). And we could have `time' instead of `current-time', with
> (time 'float) instead of `float-time' and even (time 'decoded) instead
> of `decode-time'. Or `time-float', `time-decoded' with no parameters...
>
> And so on. That is, I think this might be an opportunity to overhaul
> Emacs in this area -- introduce efficient functions with consistent
> naming, and then obsolete the old ones after a while.
I don't understand how this is related to making the time rfesolution
explicit in time objects. The main problem in that area wa how we can
know the resolution of each timestamp, not how to expose that to Lisp.
In the particular example you mention, how can Emacs know what is the
resolution of a file's last modification time?
What did I miss?
This bug report was last modified 3 years and 19 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.