[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 4a1f69ebca 2/2: Use (TICKS . HZ) for current-time etc.

From: Max Nikulin
Subject: Re: master 4a1f69ebca 2/2: Use (TICKS . HZ) for current-time etc.
Date: Fri, 29 Apr 2022 21:22:03 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0

On 29/04/2022 05:27, Paul Eggert wrote:
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.

I have found just 2 calls of `org-file-newer-than-p' in the Org code and in both cases the intention is to check whether particular file has been updated. I have not checked Org extensions for usage of this function. I would rather assume that the code was written without any considerations concerning filesystem timestamps precision and its difference from `current-time' representation. It was still working in most real-life cases.

From my point of view, it is better to rewrite `org-compile-time' to treat the case when there were no file prior to the call as that the file has been updated without comparison of timestamps, so `current-time' can be dropped to eliminate comparison of timestamp from different sources. With such modification it is better to compare file timestamps without truncation to whole seconds, however I have not tried to create an example where fractional seconds may change behavior.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]