all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* org-publish: can I use a function in :html-preamble-format?
@ 2021-03-22 15:26 Giovanni Biscuolo
  2021-03-23 10:36 ` Giovanni Biscuolo
  0 siblings, 1 reply; 2+ messages in thread
From: Giovanni Biscuolo @ 2021-03-22 15:26 UTC (permalink / raw
  To: help-gnu-emacs

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

Hello,

I'm a newbie with Elisp and Lisp in general; what I'm trying to do is to
customize the preamble format for a publishing-project I'm using.

I'm able to configure the HTML preamble for each project using this
configuration;

--8<---------------cut here---------------start------------->8---

("Pagine in italiano"
 :language it

[...]

 :html-preamble t
 :html-preamble-format (("en"
  			"<div><div><a href=\"/\">Home</a><span class=\"pre-sep\">|</span><a href=\"/colophon.html\">Colophon</a></div> <hr style='height:0.5px'></div>")
  		       ("it"
  			"<div><div><a href=\"/it/\">Home</a><span class=\"pre-sep\">|</span><a href=\"/it/colophon.html\">Colophon</a></div> <hr style='height:0.5px'></div>")))

--8<---------------cut here---------------end--------------->8---

This works well but I'd like to use xmlgen to format the html parts of
:html-preamble-format

If I use this:

--8<---------------cut here---------------start------------->8---

:html-preamble-format (("en"
			(xmlgen
			 '(div
			   (div
			    (a :href "/" "Home")
			    (span :class "pre-sep" "|")
			    (a :href "/colophon.html" "Colophon")))))
		       ("it"
			(xmlgen
			 '(div
			   (div
			    (a :href "/" "Home")
			    (span :class "pre-sep" "|")
			    (a :href "/colophon.html" "Colophon"))))))

--8<---------------cut here---------------end--------------->8---

(yes I know, the HTML results of xmgen does not match with the ones above
but that's not the issue)

I get this error:

Wrong type argument: char-or-string-p, (xmlgen '(div (div (a :href "/" "Home") (span :class "pre-sep" "|") (a :href "/colophon.html" "Colophon"))))

If I try to evaluate the (xmlgen ...) part in a separate buffer I get
correct sting representation in HTML but in ":html-preamble-format" it
does not work.

Please what I'm doing wrong?

Thanks! Giovanni.

-- 
Giovanni Biscuolo

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-23 10:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-22 15:26 org-publish: can I use a function in :html-preamble-format? Giovanni Biscuolo
2021-03-23 10:36 ` Giovanni Biscuolo

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.