Sébastien Gendre <s...@k-7.ch> writes: > 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 is a wrong format. Please check the docstring. Should be '(:html-doc-name-template "HTML_DOC_NAME_TEMPLATE" nil my/org-html-doc-name-template nil) > 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` ? Publish plist is transferred to INFO plist, taking priority. However, parsing the in-file keywords and export options should be configured via export backend (or globally, all backends, as you did by modifying `org-export-options-alist') - you can create a custom derived backend programatically within you publishing function via `org-export-create-backend'. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>