From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.orgmode,gmane.emacs.devel Subject: Re: master 4a1f69ebca 2/2: Use (TICKS . HZ) for current-time etc. Date: Thu, 28 Apr 2022 15:27:52 -0700 Organization: UCLA Computer Science Department Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15922"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Cc: Mark Barton , emacs-orgmode , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Fri Apr 29 00:28:47 2022 Return-path: Envelope-to: geo-emacs-orgmode@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 1nkCcx-0003xc-JG for geo-emacs-orgmode@m.gmane-mx.org; Fri, 29 Apr 2022 00:28:47 +0200 Original-Received: from localhost ([::1]:35058 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkCcv-00019Y-UE for geo-emacs-orgmode@m.gmane-mx.org; Thu, 28 Apr 2022 18:28:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkCcC-00017m-3F; Thu, 28 Apr 2022 18:28:00 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:36682) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkCc8-00009s-TS; Thu, 28 Apr 2022 18:27:58 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 7F2D61600BE; Thu, 28 Apr 2022 15:27:53 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id x-VYnUUMEDdy; Thu, 28 Apr 2022 15:27:52 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id C82841600C0; Thu, 28 Apr 2022 15:27:52 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 3P7mlwjKhCdh; Thu, 28 Apr 2022 15:27:52 -0700 (PDT) Original-Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 9E9741600BE; Thu, 28 Apr 2022 15:27:52 -0700 (PDT) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=131.179.128.68; envelope-from=eggert@cs.ucla.edu; helo=zimbra.cs.ucla.edu X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-orgmode" Xref: news.gmane.io gmane.emacs.orgmode:144816 gmane.emacs.devel:288951 Archived-At: On 4/27/22 09:55, Stefan Monnier wrote: > Instead of rounding the times to whole seconds, wouldn't it make more > sense to check that the difference is larger than 1s? org-file-newer-than-p is intended to work on filesystems like HFS+ that store just the seconds part of the last-modified time. Since these filesystems take the floor of the system time, taking the floor should be the most-accurate way to work around timestamp truncation issues, where comparing one timestamp that comes from an HFS+ filesystem to another timestamp coming from some other source (which is how org-file-newer-than-p is used). The code won't work as desired on filesystems like FAT where the last-modified time has only 2-second resolution. Ideally Emacs Lisp code would have access to file timestamp resolution but that's not something it has now, so I merely preserved org-file-newer-than-p's assumption that taking the floor is good enough.