|
| From: | Paul Eggert |
| Subject: | Re: [PATCH] org-macs.el: Do not compare wall time and file modification time |
| Date: | Thu, 12 May 2022 15:52:32 -0700 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 |
On 5/12/22 09:55, Max Nikulin wrote:
+ (unless (file-exists-p file)
+ (error "File to tangle does not exist: %s" file))
+ (when (file-newer-than-file-p file tangled-file)
(org-babel-tangle-file file ...
file-newer-than-file-p succeeds only if FILE exists, so in that case it'd be a bit more efficient to avoid testing FILE's existence again, e.g.:
(cond
((file-newer-than-file-p file tangled-file)
(org-bable-tangle-file file ...))
((not (file-exists-p file))
(error "File to tangle does not exist: %s" file)))
| [Prev in Thread] | Current Thread | [Next in Thread] |