[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Proposal: Change publication timestamps (was: Publishing cache)
From: |
Ihor Radchenko |
Subject: |
Re: Proposal: Change publication timestamps (was: Publishing cache) |
Date: |
Thu, 15 Aug 2024 18:29:18 +0000 |
Jens Lechtenboerger <lechten@wi.uni-muenster.de> writes:
>> See "14.4 Triggering Publication" section of Org mode manual:
>>
>> Org uses timestamps to track when a file has changed. The above
>> functions normally only publish changed files. You can override this
>> [...]
>
> I propose to change caching and checking of timestamps as in the
> attached path.
>
> Currently, org-publish-cache-file-needs-publishing checks whether
> the source file was modified after the cached modification time,
> which is fine. However, for each included file B, it checks whether
> that was modified more recently than the source file A. If so, the
> source is file A is considered to need publishing. This does not
> make sense. File A will be published again and again, even if
> neither A nor B changed since the last publishing.
>
> In the patch, I store the current time in the publish cache, not the
> source file’s modification time. Also, for included files, I do not
> check their timestamp against the one of the source file but against
> the cached publish timestamp.
>
> What do you think?
The patch looks reasonable.
Applied, onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=38d1bc67b2
Ideally, it would be nice to have tests as well.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>