From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arun Isaac Subject: Re: Bug: org-publish-find-title called before cache initialization signals "no cache present" [8.3.1 (release_8.3.1-505-g6b2c38 @ /home/arunisaac/.emacs.d/org-mode/lisp/)] Date: Mon, 07 Dec 2015 17:39:17 +0530 Message-ID: <87y4d6pij6.fsf@gmail.com> References: <87mvtsuace.fsf@gmail.com> <8737vfo41w.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49438) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5ubv-0007ND-O0 for emacs-orgmode@gnu.org; Mon, 07 Dec 2015 07:09:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a5ubr-0005xQ-IT for emacs-orgmode@gnu.org; Mon, 07 Dec 2015 07:09:43 -0500 Received: from mail-pa0-x235.google.com ([2607:f8b0:400e:c03::235]:35505) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5ubr-0005xI-9T for emacs-orgmode@gnu.org; Mon, 07 Dec 2015 07:09:39 -0500 Received: by pacej9 with SMTP id ej9so124486006pac.2 for ; Mon, 07 Dec 2015 04:09:38 -0800 (PST) Received: from steel ([223.190.91.195]) by smtp.gmail.com with ESMTPSA id n16sm34347175pfa.53.2015.12.07.04.09.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Dec 2015 04:09:36 -0800 (PST) In-Reply-To: <8737vfo41w.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Sun, 06 Dec 2015 18:55:07 +0100") 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: Emacs orgmode --=-=-= Content-Type: text/plain Nicolas Goaziou writes: > IIUC, you are responsible for calling `org-publish-find-title', an > internal "ox-publish" function, before `org-publish-cache' is > initialized. In this case I tend to think that you are also responsible > for taking care of the cache. Is org-publish-find-title an internal function? If so, expecting the user to be responsible for initializing the cache is acceptable. But, is there some "external function" to find the title of an org file? I couldn't find any, and hence resorted to using org-publish-find-title. > You can suggest a patch, if you want to. > > The problem is that functions calling > `org-publish-cache-get-file-property' do not usually know about the > current project name. Calling `org-publish-get-project-from-filename' > each time is a bit expensive, IMO. How about initializing the cache before the execution of the preparation function? I am calling org-publish-find-title in the preparation function, and this would address my use case. If you think this is a good idea, I can come up with a patch. Else, we can close this issue. It's not really a major problem. Regards, Arun Isaac --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWZXbtAAoJEC4l7othgCuzFHsIALURye6wiu50uaxcEopS4/k5 AWSnSLTHVfS4kwLlwC2f4BsjgJkRRwbpGm/FQ5d2tzPVhiyL5Icq8t/29xmGb04X 378n9G3m5ayHsQJJ13WG0nDKrv2DR5acf8J23tnQU+fkdZ2cpDbDdm2uSpKGwwKl XUw4snUwjkp5dOGIs5ARC8BDEpf8zD6ER7DTd5CowJH7qIsYXvpQHorvQFrOjAaL hxm8cHb0k/Nsu9ejE1WFNmOO9UWNxkaPhpNeIny8VMSkji+PIbJUTJJc2vBbH5W5 W+crAQS9fF8bMMzb4nRSr3KP9CIxzwFWckM35YZwIPIksWTPR/1c5ZQgs/vcEaQ= =SsZQ -----END PGP SIGNATURE----- --==-=-=-- --=-=-=--