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 18:42:04 +0300 Message-ID: <83pmkx5kfn.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> <83mtg17qxs.fsf@gnu.org> <3bcf4527-426a-b3ae-317a-a9a0e521fc6a@cs.ucla.edu> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32370"; 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 17:43:19 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 1nlBjC-0008FR-OA for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 May 2022 17:43:18 +0200 Original-Received: from localhost ([::1]:36090 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nlBjB-0002Uc-73 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 May 2022 11:43:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48894) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlBiw-0002US-I4 for bug-gnu-emacs@gnu.org; Sun, 01 May 2022 11:43:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40077) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlBiw-0006oj-9R for bug-gnu-emacs@gnu.org; Sun, 01 May 2022 11:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nlBiw-0005oo-51 for bug-gnu-emacs@gnu.org; Sun, 01 May 2022 11:43: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 15:43: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.165141972722294 (code B ref 55163); Sun, 01 May 2022 15:43:02 +0000 Original-Received: (at 55163) by debbugs.gnu.org; 1 May 2022 15:42:07 +0000 Original-Received: from localhost ([127.0.0.1]:33974 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlBi3-0005nW-Dr for submit@debbugs.gnu.org; Sun, 01 May 2022 11:42:07 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlBi0-0005n1-MZ for 55163@debbugs.gnu.org; Sun, 01 May 2022 11:42:05 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:39068) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlBhu-0006lP-58; Sun, 01 May 2022 11:41:58 -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=3d9Yn0gr4c6oSvK+tYvzyLRd6cApFXzkB2VwBX1GBmc=; b=B2hgAADx3t47 S9SmA3P3nKoD15Ozoa4H5fIhxJtYaMjMeEJGLR8eyzqdLGtQdQqp6BcyczgWZ5idA93tUHQ1PJo6+ V4jWLRWs8GNndRNObCX3EDS6A9eXfUKbMuAdxzbJ6ziBRkl+MxVd5JYhdhZhFTUKue2XlatXp64Uc L6Tgb74sn+uT0WQQ3A/IwgVEYDx7YZKAVXgzfUm+XiV63zJFkn3kY30jjk8fNdhXvb5p+sennLXoL 1OdpGOX3ZWd+bANbBdpgFLl2NYGwaX+KXpxl6rIIDVbSfnzWCRbbQRiKk4Ici+Wd5lBRRjahwjZ2q kYZ1Kbk0aTNNLWkM5JuDeQ==; Original-Received: from [87.69.77.57] (port=3593 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 1nlBht-0007GG-Kj; Sun, 01 May 2022 11:41:57 -0400 In-Reply-To: <3bcf4527-426a-b3ae-317a-a9a0e521fc6a@cs.ucla.edu> (message from Paul Eggert on Sun, 1 May 2022 08:00:05 -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:231162 Archived-At: > Date: Sun, 1 May 2022 08:00:05 -0700 > Cc: 55163@debbugs.gnu.org, v.pupillo@gmail.com, larsi@gnus.org > From: Paul Eggert > > 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. Out of these, only the 3rd one could qualify, because it's the only one where performance counts. > > 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. I see no problems there that are worth talking about. > 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. And then those issues will have to be handled by Lisp application programmers? who in many cases will not even know these issues exist? Is that really a good trade-off? > > 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. Only performance-critical examples count. Any function that involves user interaction by definition isn't. > >> 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. We don't need wallclock time for those, only elapsed time since some instant, right? When elapsed time is used, the monotonicity issue never arises. > 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. Yes, that's my point. So we should look at this from the POV of what will be used, not what can be provided.