From: Paul Eggert <eggert@cs.ucla.edu>
To: Max Nikulin <manikulin@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>, Bastien <bzg@gnu.org>
Subject: Re: [PATCH] org-macs.el: Do not compare wall time and file modification time
Date: Wed, 11 May 2022 09:24:00 -0700 [thread overview]
Message-ID: <fe7e1484-07f6-627b-714b-d1d7d7049e2b@cs.ucla.edu> (raw)
In-Reply-To: <2db7387c-4cbc-a7d2-9fa0-74f4d62d8a59@gmail.com>
The comments don't seem to match the code here.
> + (let* ((tangled-file (concat (file-name-sans-extension file) ".el"))
> + (file-mtime (file-attribute-modification-time
> + (file-attributes (file-truename file))))
> + (tangled-mtime (file-attribute-modification-time
> + (file-attributes (file-truename tangled-file)))))
> + ;; Tangle only if the Elisp file is older than the Org file.
> + ;; Filesystem may have coarse timestamp resolution (HFS+, FAT)
> + ;; so no need to update if timestamps are equal and thus
> + ;; `org-file-newer-than-p' can not be used here.
> + (unless (and file-mtime
> + tangled-mtime
> + (not (time-less-p tangled-mtime file-mtime)))
Although this looks correct, there's no need to go to the work of
computing file-mtime in the common case where tangled-mtime is nil.
next prev parent reply other threads:[~2022-05-11 16:25 UTC|newest]
Thread overview: 18+ 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
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
2022-05-11 16:24 ` Paul Eggert [this message]
2022-05-12 16:55 ` Max Nikulin
2022-05-12 22:52 ` Paul Eggert
2022-05-13 12:28 ` Max Nikulin
2022-05-13 18:00 ` Paul Eggert
2022-10-02 3:49 ` Ihor Radchenko
2022-10-09 8:18 ` [PATCH v2] " Max Nikulin
2022-10-21 3:27 ` Ihor Radchenko
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.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fe7e1484-07f6-627b-714b-d1d7d7049e2b@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=bzg@gnu.org \
--cc=emacs-orgmode@gnu.org \
--cc=manikulin@gmail.com \
/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/org-mode.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).