From: Suhail Singh <suhailsingh247@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [FR] Make notion of "modification time" configurable during publishing
Date: Sat, 23 Sep 2023 11:45:35 -0400 [thread overview]
Message-ID: <87msxcj3kw.fsf@gmail.com> (raw)
In-Reply-To: <x1-bakbPFr8WTAd8rrVoF4onXphuTM@gwene.org> (Ihor Radchenko's message of "Sat, 23 Sep 2023 12:35:49 +0200")
Ihor Radchenko writes:
> But do you actually use one but not other in practice?
As in, could users have a preference for one vs the other in practice?
Yes, since the choice isn't without consequence, it's conceivable
(generally speaking) that some would prefer one over the other. FWIW, in
my specific case, I use CommitDate, but I am not convinced it's "the
right thing" in all situations.
Not having conducted a survey, I also cannot comment on the frequency
with which users have a desired preference for one vs the other. I am
also not aware of general rules where users would necessarily prefer one
over the other, but it's possible they may exist. My point was to simply
point out that there is more than one interpretation of
"vc-modification-time".
> It should not be too hard to add buffer hash calculation there.
No disagreement there.
> It will only work for files without includes and force us to use
> exactly the same hash algorithm.
I don't follow. I was stating that the concept of a "file hash" could be
obtained in more than way. I.e., in addition to it being calculated "by
hand" it would also be possible to query an oracle (the VCS in this
case) for it. This is distinct and orthogonal from the decision of how a
"file with includes" is handled.
If I understand you correctly, the logic you have in mind, would be
something like this:
- during publish, compare the file hash of the file being published as
well as all included files
- if the values for all are the same as in the cache, don't publish (if
user has signalled such intent via the equivalent of
org-publish-use-timestamps-flag)
- if the value of any one is different, re-publish and update cache with
the updated file hashes
It doesn't matter how the specific file hash is obtained, as long as the
mechanism is being used consistently and the file hash of the included
files are also being consulted in an appropriate way.
--
Suhail
next parent reply other threads:[~2023-09-23 15:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <x1-bakbPFr8WTAd8rrVoF4onXphuTM@gwene.org>
2023-09-23 15:45 ` Suhail Singh [this message]
2023-09-26 11:02 ` [FR] Make notion of "modification time" configurable during publishing Ihor Radchenko
[not found] <x1-5i65OtI+6PjBbgoemiQBgzkPLPw@gwene.org>
2023-09-22 19:56 ` Suhail Singh
2023-09-23 10:36 ` Ihor Radchenko
[not found] <x1-6cTTUwmKWZxHNPpNVJOTVkwgKgg@gwene.org>
2023-09-20 20:55 ` Suhail Singh
2023-09-22 9:41 ` 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=87msxcj3kw.fsf@gmail.com \
--to=suhailsingh247@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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).