From: Paul Eggert <eggert@cs.ucla.edu>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Mark Barton <mbarton98@gmail.com>,
emacs-orgmode <emacs-orgmode@gnu.org>,
emacs-devel@gnu.org
Subject: Re: master 4a1f69ebca 2/2: Use (TICKS . HZ) for current-time etc.
Date: Thu, 28 Apr 2022 15:27:52 -0700 [thread overview]
Message-ID: <d6487bef-b5bb-ca80-5746-3a5e6626cafc@cs.ucla.edu> (raw)
In-Reply-To: <jwvilqu1n7m.fsf-monnier+emacs@gnu.org>
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.
next prev parent reply other threads:[~2022-04-28 22:27 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-27 6:37 master 4a1f69ebca 2/2: Use (TICKS . HZ) for current-time etc Mark Barton
2022-04-27 7:20 ` Po Lu
2022-04-27 7:39 ` Paul Eggert
2022-04-27 16:55 ` Stefan Monnier
2022-04-28 22:27 ` Paul Eggert [this message]
2022-04-29 14:22 ` Max Nikulin
2022-04-29 18:10 ` Paul Eggert
2022-04-30 10:56 ` Max Nikulin
2022-05-06 16:56 ` [PATCH] org-macs.el: Do not compare wall time and file modification time Max Nikulin
2022-05-11 12:28 ` Max Nikulin
[not found] <165091562900.12167.2356992007535632125@vcs2.savannah.gnu.org>
[not found] ` <20220425194030.030A8C01687@vcs2.savannah.gnu.org>
2022-04-26 9:38 ` master 4a1f69ebca 2/2: Use (TICKS . HZ) for current-time etc Lars Ingebrigtsen
2022-04-26 10:20 ` Manuel Uberti
2022-04-26 10:38 ` Po Lu
2022-04-26 14:42 ` Bozhidar Batsov
2022-04-26 20:29 ` Paul Eggert
2022-04-27 0:36 ` Po Lu
2022-04-27 1:18 ` Paul Eggert
2022-04-27 1:29 ` Po Lu
2022-04-27 4:10 ` Paul Eggert
2022-04-26 20:28 ` Paul Eggert
2022-04-27 12:17 ` Lars Ingebrigtsen
2022-04-26 23:54 ` Michael Heerdegen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d6487bef-b5bb-ca80-5746-3a5e6626cafc@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
--cc=emacs-orgmode@gnu.org \
--cc=mbarton98@gmail.com \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).