bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#55163: 29.0.50; master 4a1f69ebca (TICKS . HZ) for current-time brok


From: Paul Eggert
Subject: bug#55163: 29.0.50; master 4a1f69ebca (TICKS . HZ) for current-time broke lsp-mode
Date: Sun, 1 May 2022 08:00:05 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1

On 4/30/22 22:38, Eli Zaretskii wrote:
it's common for Emacs to compare the timestamp of a file at
time T1 with the timestamp of another (or the same) file at a later
time T2.

Please show at least 3 examples of such "common" situations.  I think
it is rather UN-common.

auth-source-netrc-parse, semanticdb-synchronize, and dir-locals-find-file.


what's the problem to describe and support a primitive that
returns a sorted list of files?

What happens with ties in the timestamps - do we sort stably? What happens with files named but not present? What if we want to sort by ctime instead of by mtime? What if the user is involved in selecting files as we go? How do we specify the files: a list of strings, a pattern, or something else? What if we want to look at a tree of files? Etc.

Of course one could come up with answers to those questions, but this sort of thing is much better handled in Lisp code than as a C-language primitive.


I challenge you to present even half a dozen of such uses.

I listed three examples above. Here are three more, which makes six: multisession-backend-value, eshell-read-passwd, nneething-create-mapping. More examples can easily be supplied.


There are also cases where the code now uses current-time and assumes
that the resulting timestamps are issued in numeric order, an assumption
that is not always true in practice.

That's a separate issue, and again: please present the use cases for
that which are relevant to Emacs applications.

erc-server-send-ping, progress-reporter-do-update, timer-event-handler. I'm sure there are others.


Your point is well taken that if we made changes along the lines being discussed, we shouldn't merely add the new primitives: we should *use* them. And if we can't find significant use for them then we shouldn't add them.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]