all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: larsi@gnus.org, v.pupillo@gmail.com, 55163@debbugs.gnu.org
Subject: bug#55163: 29.0.50; master 4a1f69ebca (TICKS . HZ) for current-time broke lsp-mode
Date: Sun, 01 May 2022 08:38:39 +0300	[thread overview]
Message-ID: <83mtg17qxs.fsf@gnu.org> (raw)
In-Reply-To: <56e6d32c-7583-dbd9-85ee-e43d32a6feb1@cs.ucla.edu> (message from Paul Eggert on Sat, 30 Apr 2022 13:51:24 -0700)

> Date: Sat, 30 Apr 2022 13:51:24 -0700
> Cc: 55163@debbugs.gnu.org, v.pupillo@gmail.com,
>  Lars Ingebrigtsen <larsi@gnus.org>
> From: Paul Eggert <eggert@cs.ucla.edu>
> 
> On 4/30/22 03:00, Eli Zaretskii wrote:
> 
> > That might mean we want a primitive that returns a list of files
> > sorted by modtime
> 
> Such a primitive would not be as useful. First, it's common for Emacs to 
> look at files opportunistically: that is, Emacs doesn't know in advance 
> all the files it will eventually look at, and so it can't give a 
> primitive a list of files in advance.

In those cases, a Lisp program usually doesn't know whether it will
sort files by time or by some other attribute, so we generally need
the list of files with all their attributes anyway.

> Second, 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. A primitive that accepts a list of files can't do that.

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

> In contrast, a primitive that simply gives you a file's timestamp 
> handles these use cases, and is considerably easier to describe and support.

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

> > we
> > will risk adding gobs of new APIs that rarely if ever used in
> > practice
> 
> Yes, we don't want to do that. However the case for making improvements 
> here is strong enough here that it's worth doing.

That's your opinion, not mine.  I will object to introducing such
"simple" primitives as long as the use cases for them aren't common
enough, or are better served by dedicated primitives that address
the specific use cases we care about.

People who want a general-purpose Lisp environment for writing
system-level applications should use Guile, not Emacs Lisp.

> There are dozens of potential uses for the proposed (file-attributes 
> FILE 'mtime) etc. improvement in Emacs right now, so it's an easy call 
> that this API will get used.

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

> 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. It'd be better for this code to use 
> a monotonic clock instead. Admittedly the resulting misbehavior is rare 
> (because it's rare that people adjust their machines' clocks), but Emacs 
> shouldn't glitch out on me merely because I've corrected my laptop's 
> time-of-day.

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





  reply	other threads:[~2022-05-01  5:38 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28 10:53 bug#55163: 29.0.50; master 4a1f69ebca (TICKS . HZ) for current-time broke lsp-mode Vincenzo Pupillo
2022-04-28 12:10 ` Lars Ingebrigtsen
2022-04-28 13:38   ` Eli Zaretskii
2022-04-28 20:15   ` Paul Eggert
2022-04-28 20:42     ` Vincenzo Pupillo
2022-04-28 21:55       ` Lars Ingebrigtsen
2022-04-28 21:51     ` Lars Ingebrigtsen
2022-04-29  9:54       ` Lars Ingebrigtsen
2022-04-29 10:54         ` Eli Zaretskii
2022-04-29 10:59           ` Lars Ingebrigtsen
2022-04-29 11:10             ` Eli Zaretskii
2022-04-29 19:38               ` Paul Eggert
2022-04-29 19:53                 ` Eli Zaretskii
2022-04-29 22:45                   ` Paul Eggert
2022-04-30  5:29                     ` Eli Zaretskii
2022-04-30  9:10                   ` Lars Ingebrigtsen
2022-04-30 10:00                     ` Eli Zaretskii
2022-04-30 20:51                       ` Paul Eggert
2022-05-01  5:38                         ` Eli Zaretskii [this message]
2022-05-01 15:00                           ` Paul Eggert
2022-05-01 15:42                             ` Eli Zaretskii
2022-05-01 16:17                               ` Paul Eggert
2022-05-01 16:43                                 ` Eli Zaretskii
2022-05-02 17:27                                   ` Paul Eggert
2022-05-02 17:58                                     ` Eli Zaretskii
2022-05-02 23:17                                       ` Paul Eggert
2022-05-03  2:32                                         ` Eli Zaretskii
2022-05-03  2:52                                           ` Paul Eggert
2022-04-30  1:44         ` Paul Eggert
2022-04-30  5:40           ` Eli Zaretskii
2022-04-30 11:21             ` Vincenzo Pupillo
2022-04-30 11:25               ` Eli Zaretskii
2022-04-30 12:32                 ` Vincenzo Pupillo
2022-04-30 12:50                   ` Eli Zaretskii
2022-04-30 13:22                     ` Vincenzo Pupillo
2022-04-30  9:15           ` Lars Ingebrigtsen
2022-04-30 21:03             ` Paul Eggert
2022-05-01  5:40               ` Eli Zaretskii
2022-05-01 15:08                 ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83mtg17qxs.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=55163@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=larsi@gnus.org \
    --cc=v.pupillo@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.