From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou 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 Message-ID: <87ef5dfdv9.fsf@nicolasgoaziou.fr> References: <2ef16fc3-45f7-c2a2-9804-27143db32e3b@eclecticse.com.au> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([209.51.188.92]:37268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNDT9-0002M1-Rm for emacs-orgmode@gnu.org; Sun, 05 May 2019 05:30:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNDT8-0001aF-W2 for emacs-orgmode@gnu.org; Sun, 05 May 2019 05:30:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39427) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hNDT8-0001ZF-Sd for emacs-orgmode@gnu.org; Sun, 05 May 2019 05:30:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hNDT8-0002U3-JK for emacs-orgmode@gnu.org; Sun, 05 May 2019 05:30:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <2ef16fc3-45f7-c2a2-9804-27143db32e3b@eclecticse.com.au> (David Trudgett's message of "Sun, 17 Mar 2019 16:58:16 +1100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: David Trudgett Cc: 34891@debbugs.gnu.org Hello, David Trudgett 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