emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: David Trudgett <david.trudgett@eclecticse.com.au>
Cc: 34891@debbugs.gnu.org
Subject: bug#34891: 25.2; ORG-PUBLISH-FIND-DATE should not use Creation/Publish date (#+DATE:) in file as a modification timestamp.
Date: Sun, 05 May 2019 11:29:46 +0200	[thread overview]
Message-ID: <87ef5dfdv9.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <2ef16fc3-45f7-c2a2-9804-27143db32e3b@eclecticse.com.au> (David Trudgett's message of "Sun, 17 Mar 2019 16:58:16 +1100")

Hello,

David Trudgett <david.trudgett@eclecticse.com.au> writes:

> Reproduce:
>
> In an Org mode file, add a #+DATE tag as follows:
>
> #+DATE: First published: 1 February 2014
>
> Then initiate a project publish, which publishes (by default) only
> changed files. A date such as the above will not be parsed, so
> ox-publish.el will always publish it, even though it has not changed.
> Using instead a parsable date format (such as 2014-02-01), this date will be
> recognised, and will result in the file never being published, because
> it is treating the date as a modification date instead of a creation date.
>
> Desired Behaviour:
>
> ox-publish.el, in function ORG-PUBLISH-FIND-DATE should not be using
> this date to detect modifications, as it will never change, and no
> modifications will be detected for publishing.

I don't understand how you come to this conclusion. 

The function responsible for deciding if a file should be published is
`org-publish-cache-file-needs-publishing'. It doesn't call
`org-publish-find-date', but `org-publish-cache-ctime-of-src'. The
latter only uses `file-attribute-modification-time'.

IOW, I think the file is published because you modified since last
publishing.

WDYT?

Regards,

-- 
Nicolas Goaziou

       reply	other threads:[~2019-05-05  9:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2ef16fc3-45f7-c2a2-9804-27143db32e3b@eclecticse.com.au>
2019-05-05  9:29 ` Nicolas Goaziou [this message]
2020-05-24  8:22   ` bug#34891: 25.2; ORG-PUBLISH-FIND-DATE should not use Creation/Publish date (#+DATE:) in file as a modification timestamp Bastien
2020-05-24 20:46 David Trudgett
2020-05-25 10:27 ` Bastien

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=87ef5dfdv9.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=34891@debbugs.gnu.org \
    --cc=david.trudgett@eclecticse.com.au \
    /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).