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: Fri, 29 Apr 2022 13:54:03 +0300 Message-ID: <83y1zo9n3o.fsf@gnu.org> References: <87sfpxxyvb.fsf@3-191.divsi.unimi.it> <87zgk5jtm6.fsf@gnus.org> <87o80kj2q1.fsf@gnus.org> <878rroi5a8.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28608"; mail-complaints-to="usenet@ciao.gmane.io" Cc: v.pupillo@gmail.com, 55163@debbugs.gnu.org, eggert@cs.ucla.edu To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 29 13:24:28 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 1nkOjc-0007IU-BW for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Apr 2022 13:24:28 +0200 Original-Received: from localhost ([::1]:43184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkOjb-0000rF-Er for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Apr 2022 07:24:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38884) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkOH8-00064P-14 for bug-gnu-emacs@gnu.org; Fri, 29 Apr 2022 06:55:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57053) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkOH7-0001PA-Nr for bug-gnu-emacs@gnu.org; Fri, 29 Apr 2022 06:55:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nkOH7-0005Qa-KH for bug-gnu-emacs@gnu.org; Fri, 29 Apr 2022 06:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Apr 2022 10:55:01 +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.165122965120789 (code B ref 55163); Fri, 29 Apr 2022 10:55:01 +0000 Original-Received: (at 55163) by debbugs.gnu.org; 29 Apr 2022 10:54:11 +0000 Original-Received: from localhost ([127.0.0.1]:50946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nkOGI-0005PD-K3 for submit@debbugs.gnu.org; Fri, 29 Apr 2022 06:54:10 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nkOGH-0005P1-0z for 55163@debbugs.gnu.org; Fri, 29 Apr 2022 06:54:09 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:45486) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkOGA-0001HY-QP; Fri, 29 Apr 2022 06:54:02 -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=n9GiYncBBg4K1fNzGP7ERyj5QQc1ALWpAY8hL92XKZQ=; b=WI2ZK4JqzAMw tVoFlO7EYZiVasLg3VLY6pVBl+EZOrx+kmFB4nNT6xstv5BPQzFvd+iLmjcki/MjKW0EJl3U5ozWy 6n/V4me8Ngc8VDZJGJx4GjPJ46SbqIyJLTY7XSsse/QZCxLosjy6FhEUhAfF3IN+JnJrTpM/t9B6M B+gn8f/IDCUlCigZc28Lhh8Ic346IptOmqtYjXUi2j3GGohZynnWkzb3n28IZk1RBQ3J9L76nATGE nkGZ53pybaJF4oLO+rbJlE42Shg+vOU7Okqi2hm/R0Bw1nf55u3hbcoyE/LPcErn6gSIAL0A+vwnw zfZSJdkopwCK+EIE7m0aZg==; Original-Received: from [87.69.77.57] (port=1845 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 1nkOG9-0003r8-Os; Fri, 29 Apr 2022 06:54:02 -0400 In-Reply-To: <878rroi5a8.fsf@gnus.org> (message from Lars Ingebrigtsen on Fri, 29 Apr 2022 11:54:07 +0200) 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:230943 Archived-At: > From: Lars Ingebrigtsen > Cc: 55163@debbugs.gnu.org, Eli Zaretskii , Vincenzo Pupillo > > Date: Fri, 29 Apr 2022 11:54:07 +0200 > > Lars Ingebrigtsen 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?