emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Arun Isaac <theroarofthedragon@gmail.com>
To: Emacs orgmode <emacs-orgmode@gnu.org>
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	[thread overview]
Message-ID: <87y4d6pij6.fsf@gmail.com> (raw)
In-Reply-To: <8737vfo41w.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Sun, 06 Dec 2015 18:55:07 +0100")

[-- Attachment #1: Type: text/plain, Size: 1169 bytes --]

Nicolas Goaziou <mail@nicolasgoaziou.fr> 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

[-- Attachment #2.1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

      reply	other threads:[~2015-12-07 12:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-02 15:41 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/)] Arun Isaac
2015-12-06 17:55 ` Nicolas Goaziou
2015-12-07 12:09   ` Arun Isaac [this message]

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=87y4d6pij6.fsf@gmail.com \
    --to=theroarofthedragon@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).