From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arun Isaac Subject: 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: Wed, 02 Dec 2015 21:11:21 +0530 Message-ID: <87mvtsuace.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a49XY-0008PV-Tg for emacs-orgmode@gnu.org; Wed, 02 Dec 2015 10:41:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a49XV-00070v-GZ for emacs-orgmode@gnu.org; Wed, 02 Dec 2015 10:41:56 -0500 Received: from mail-pa0-x22f.google.com ([2607:f8b0:400e:c03::22f]:36693) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a49XV-00070q-AU for emacs-orgmode@gnu.org; Wed, 02 Dec 2015 10:41:53 -0500 Received: by pacdm15 with SMTP id dm15so43877515pac.3 for ; Wed, 02 Dec 2015 07:41:52 -0800 (PST) Received: from steel ([223.227.2.191]) by smtp.gmail.com with ESMTPSA id v64sm5143335pfi.50.2015.12.02.07.41.48 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Dec 2015 07:41:51 -0800 (PST) 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@gnu.org If org-publish-find-title is called before org-publish-cache is initialized (by some routine calling org-publish-initialize-cache), a "no cache present" error is signalled. This happens because org-publish-find-title does not pass a PROJECT-NAME argument to org-publish-cache-get-file-property. Only if a PROJECT-NAME argument is passed to org-publish-cache-get-file-property does it initialize the cache. Can this be considered a bug? Is org-publish-cache-get-file-property supposed to automatically initialize the cache if it is not present? Or is the user supposed to initialize the cache manually if required? In my use case, my preparation-function calls org-publish-find-title. However org-publish-projects initializes the cache only after executing the preparation function. Hence I get a "no cache present" error. I could work around this problem by simply initializing the cache on my own. But, I'm wondering if this can be fixed at a more fundamental level. Thank you, Arun Isaac. Emacs : GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.6) of 2015-09-10 on foutrelis Package: Org-mode version 8.3.1 (release_8.3.1-505-g6b2c38 @ /home/arunisaac/.emacs.d/org-mode/lisp/)