From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Remove unecesssary invocations of org-mode in ox-publish Date: Wed, 30 Jul 2014 22:59:31 +0200 Message-ID: <87oaw6r2a4.fsf@nicolasgoaziou.fr> References: <87mwbsn40z.fsf@fastmail.fm> <871tt4fggm.fsf@bzg.ath.cx> <87zjfsnsyf.fsf@fastmail.fm> <87fvhk9p0m.fsf@bzg.ath.cx> <87k36wnp7x.fsf@fastmail.fm> <877g2wyoyo.fsf@fastmail.fm> <87egx2ss5l.fsf@nicolasgoaziou.fr> <87bns663qp.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCaxj-0000lR-0l for emacs-orgmode@gnu.org; Wed, 30 Jul 2014 16:59:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCaxc-0003kH-UY for emacs-orgmode@gnu.org; Wed, 30 Jul 2014 16:59:02 -0400 In-Reply-To: <87bns663qp.fsf@fastmail.fm> (Matt Lundin's message of "Wed, 30 Jul 2014 14:33:34 -0500") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Matt Lundin Cc: Bastien , Org Mode Matt Lundin writes: > Thanks for the helpful information. I think the cache would be a nice > way to go, especially if it were combined a timestamp check. E.g., only > files that have been updated since the last publishing should be queried > for titles; otherwise, use the cached file. Unfortunately, in the following (unexpected) setup == a.org == #+SETUPFILE: b.org == b.org == #+TITLE: Something modifying "b.org" changes title for "a.org", even though the latter is not modified. A dag would be needed to handle this case. The same goes for #+INCLUDE keywords. Overkill, IMO. > I notice that org-publish-find-title does cache the title, but AFAICT > this is never used, since org-publish-format-file-entry calls > org-publish-find-title with the reset argument. Perhaps we could add a > variable to make this optional in org-publish-format-file-entry. E.g., > > (defun org-publish-format-file-entry (fmt file project-plist) > (format-spec > fmt > `((?t . ,(org-publish-find-title file org-publish-find-title-use-cache)) > [...] > > A similar option could be added to the date function date function. > > Would it be O.K. if I went ahead and implemented this? Fine by me. I suggest to mention previous caveat in the docstring. Regards, -- Nicolas Goaziou