emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sébastien Gendre" <seb@k-7.ch>
To: Org mailing list <emacs-orgmode@gnu.org>
Subject: Link between org-publish project options and org-export-options-alist
Date: Tue, 13 Aug 2024 16:22:22 +0200	[thread overview]
Message-ID: <87jzgk1p0h.fsf@k-7.ch> (raw)

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

Hello,

I (continue to) develop a custom preamble function. And I try to found
if there is a link between options set in an org-publish project and
options set in variable `org-export-options-alist.

For my function, I have defined one new export option in the variable
`org-export-options-alist`:

    (add-to-list 'org-export-options-alist
                 '(:html-doc-name-template "HTML_DOC_NAME_TEMPLATE" my/org-html-doc-name-template nil))

This options have a default value defined in variable
`my/org-html-doc-name-template`:

    (setq my/org-html-doc-name-template "<div class=\"doc_name\">
        <a aria-label=\"Documentation name\" href=\"/\">
            <span>%n</span>
        </a>
    </div>")


But, when I use org-publish and try to retrieve option ":html-doc-name-template" from my
custom preamble function like this:

    …
    (plist-get info :html-doc-name-template)
    …

If I do not define the options `:html-doc-name-temple` in my publish
project options, I get the value `nil` and not the value of the variable
`my/org-html-doc-name-template`.

Are the options of org-publish independent of options defined in
`org-export-options-alist` ?


Best regards

-------
Gendre Sébastien

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

             reply	other threads:[~2024-08-13 14:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-13 14:22 Sébastien Gendre [this message]
2024-08-18 11:58 ` Link between org-publish project options and org-export-options-alist Ihor Radchenko

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=87jzgk1p0h.fsf@k-7.ch \
    --to=seb@k-7.ch \
    --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).