From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Max Nikulin Newsgroups: gmane.emacs.orgmode,gmane.emacs.devel Subject: Re: master 4a1f69ebca 2/2: Use (TICKS . HZ) for current-time etc. Date: Fri, 29 Apr 2022 21:22:03 +0700 Message-ID: <106f5128-680b-f25e-1316-f7308c49b625@gmail.com> 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="14238"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Cc: emacs-orgmode , emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Fri Apr 29 16:26:17 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 1nkRZY-0003U4-7m for geo-emacs-orgmode@m.gmane-mx.org; Fri, 29 Apr 2022 16:26:16 +0200 Original-Received: from localhost ([::1]:42436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkRZW-0002gP-Ty for geo-emacs-orgmode@m.gmane-mx.org; Fri, 29 Apr 2022 10:26:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59058) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkRVg-0005Zy-RR; Fri, 29 Apr 2022 10:22:16 -0400 Original-Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]:34681) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkRVf-0005I2-A9; Fri, 29 Apr 2022 10:22:16 -0400 Original-Received: by mail-lf1-x12b.google.com with SMTP id x33so14384744lfu.1; Fri, 29 Apr 2022 07:22:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=C188Tm4xJRmWLZJNHficMObNqARb0UkD2tyHMeGVHOE=; b=cWEeei2kfpeK0eC285TRx/Mtf8KQRMXl8r7vjyK5JDX8VnJ++Od+TW9M7W70qUwy9V zdxOctWmZPJzWI+Dl0MLkbXqVGMjzl6/yIyb66YParl+3blJBrf2NinyF9jne1HQeiCk TEemL6dFHmzKIb9+0yf6sfyEFZuI/vpzdcTnWiuyTuke5eCE9BpdTkO/3nBlVJ9tcaW0 XWPibt4ke2/dT51HLWMXjIYQS8gajY4XjH8uHkI6+VaM5zaV8joFzL1n7aLNJgQlFBqg eYZxdcFSNsQpyip72U10ty64SZXMI/T1mwny5q9Kj/Oov8fBw5fGfV0Gy5mL1vqJkJ6+ OVTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=C188Tm4xJRmWLZJNHficMObNqARb0UkD2tyHMeGVHOE=; b=PgYcQYTkc6zYYRbPVaZRoeh8V2IaU8KatH6QWBZwrwZ5TQVdL4QCx+7r3GL2aH5MLm 0+m2YSewLtaAKPfEkfux8haseqY5RfQPmC1JeZm3ntmRFLBKu8qFFkTYVO+2K6RiL3VW ZZAJNTrV60YQlU0lzlTxbwAvNKVbWoqo8q5nVLONTe0D8+zcjPcLiIOX05bfxc5+rQIy Z+4bzZmW/NlbSENuLV8z/XOnr2BypxcwhmeAMuFX2r47qEwhIB+mreyFlaQVXxizgy00 RdPs1QyzInf5E72Jw1ivET0uLhhpCfAoNBI84PpzQlmbxHIuUOW+vEeKdhfX9QSsKC89 wuGw== X-Gm-Message-State: AOAM532NNA9UtaTulPgBXrmaGMlhvmS3TNN1U2fywjyoO+KdzzZefjf7 VlmWHSGly4pfeVGhIxDCfoRoGpIIIbw= X-Google-Smtp-Source: ABdhPJw1xu2HFA4ZNjQzMzRRKeB1fZ/YTOey79lqU/IHUQ6YyhPlv6Hasiw4aNn1d8V5pxnU6/OeIA== X-Received: by 2002:a05:6512:2303:b0:471:b4e8:6a5b with SMTP id o3-20020a056512230300b00471b4e86a5bmr28920021lfu.285.1651242132115; Fri, 29 Apr 2022 07:22:12 -0700 (PDT) Original-Received: from [192.168.0.101] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id z12-20020a19650c000000b004699179dec6sm252246lfb.23.2022.04.29.07.22.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 29 Apr 2022 07:22:11 -0700 (PDT) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::12b; envelope-from=manikulin@gmail.com; helo=mail-lf1-x12b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:144832 gmane.emacs.devel:288994 Archived-At: 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.