From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <83mtg17qxs.fsf@gnu.org> References: <87sfpxxyvb.fsf@3-191.divsi.unimi.it> <87zgk5jtm6.fsf@gnus.org> <87o80kj2q1.fsf@gnus.org> <878rroi5a8.fsf@gnus.org> <83y1zo9n3o.fsf@gnu.org> <87y1zof944.fsf@gnus.org> <83wnf89mcj.fsf@gnu.org> <0a39a220-6298-8ed4-87bd-414702cd9b57@cs.ucla.edu> <83ee1facp0.fsf@gnu.org> <87tuab543p.fsf@gnus.org> <83pmky99hm.fsf@gnu.org> <56e6d32c-7583-dbd9-85ee-e43d32a6feb1@cs.ucla.edu> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35327"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, v.pupillo@gmail.com, 55163@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 01 07:39:44 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nl2J6-000924-2s for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 May 2022 07:39:44 +0200 Original-Received: from localhost ([::1]:37470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nl2J3-0003LD-Q7 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 May 2022 01:39:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42286) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nl2IQ-0003Ji-OI for bug-gnu-emacs@gnu.org; Sun, 01 May 2022 01:39:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37235) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nl2IQ-0008CQ-FY for bug-gnu-emacs@gnu.org; Sun, 01 May 2022 01:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nl2IQ-0001c4-AR for bug-gnu-emacs@gnu.org; Sun, 01 May 2022 01:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 May 2022 05:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55163 X-GNU-PR-Package: emacs Original-Received: via spool by 55163-submit@debbugs.gnu.org id=B55163.16513835296180 (code B ref 55163); Sun, 01 May 2022 05:39:02 +0000 Original-Received: (at 55163) by debbugs.gnu.org; 1 May 2022 05:38:49 +0000 Original-Received: from localhost ([127.0.0.1]:59365 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nl2ID-0001bc-87 for submit@debbugs.gnu.org; Sun, 01 May 2022 01:38:49 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nl2IB-0001bN-1j for 55163@debbugs.gnu.org; Sun, 01 May 2022 01:38:47 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60544) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nl2I4-0008AK-TW; Sun, 01 May 2022 01:38:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=+nXBdBM7Js4UfSBkvkZ5Si0riuNbbGb8sOucEsqMCbQ=; b=Dt2uIKMEOjjW 5yLd68Bw/Ab30xsauoID+yZVomVE0RM7pBqk12QPuomeuSVqj3BcvVfuE6MubhGhThmt5i9ajpnVC hTb3C27TAMnOIVZEzLinwGJF5Bnz3sdxnfNgILDuI7UXPeVxN2E6kYfvsBubNMG/WIpsX8O+WTHj3 o+Ejtum/eyVse2RHq6zFrPCfDCX8sTBB4gWoR2lzdQp9f2D7BBRyUvNo+4swxdLQbqHJXe7HPytPv 6m5/BwSo1DPcQWnNbiPTLPjYmlKfhQB8UeSIPq13IPdaZHgcjWDYuYfaX9tlCY+tDPYlK5xcVsB06 7wWNsMz+iaDPNHF9Bb9rpQ==; Original-Received: from [87.69.77.57] (port=1400 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nl2Hx-0007KI-Of; Sun, 01 May 2022 01:38:35 -0400 In-Reply-To: <56e6d32c-7583-dbd9-85ee-e43d32a6feb1@cs.ucla.edu> (message from Paul Eggert on Sat, 30 Apr 2022 13:51:24 -0700) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:231086 Archived-At: > Date: Sat, 30 Apr 2022 13:51:24 -0700 > Cc: 55163@debbugs.gnu.org, v.pupillo@gmail.com, > Lars Ingebrigtsen > From: Paul Eggert > > 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.