From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Giovanni Biscuolo Newsgroups: gmane.emacs.help Subject: org-publish: can I use a function in :html-preamble-format? Date: Mon, 22 Mar 2021 16:26:01 +0100 Organization: Biscuolo Worldwide Network Message-ID: <87im5jw6pi.fsf@biscuolo.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36254"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 22 18:36:09 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lOOTI-0009JG-Ta for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 22 Mar 2021 18:36:08 +0100 Original-Received: from localhost ([::1]:46356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lOOTH-0000sn-UZ for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 22 Mar 2021 13:36:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32860) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOMRb-0001nS-6S for help-gnu-emacs@gnu.org; Mon, 22 Mar 2021 11:26:15 -0400 Original-Received: from relay13.mail.gandi.net ([217.70.178.233]:7887) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOMRY-00045W-PO for help-gnu-emacs@gnu.org; Mon, 22 Mar 2021 11:26:14 -0400 Original-Received: from bourrache.mug.xelera.it (unknown [93.56.171.5]) (Authenticated sender: giovanni@biscuolo.net) by relay13.mail.gandi.net (Postfix) with ESMTPSA id 78D5180007 for ; Mon, 22 Mar 2021 15:26:07 +0000 (UTC) Original-Received: from roquette.mug.biscuolo.net (roquette [10.38.2.14]) by bourrache.mug.xelera.it (Postfix) with SMTP id C491FD2B1EE for ; Mon, 22 Mar 2021 16:26:05 +0100 (CET) Original-Received: (nullmailer pid 20170 invoked by uid 1000); Mon, 22 Mar 2021 15:26:03 -0000 Received-SPF: pass client-ip=217.70.178.233; envelope-from=giovanni@biscuolo.net; helo=relay13.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 22 Mar 2021 13:32:33 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:128501 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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; =2D-8<---------------cut here---------------start------------->8--- ("Pagine in italiano" :language it [...] :html-preamble t :html-preamble-format (("en" "
Home|<= a href=3D\"/colophon.html\">Colophon

<= /div>") ("it" ""))) =2D-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: =2D-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")))))) =2D-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 "/" "Hom= e") (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. =2D-=20 Giovanni Biscuolo --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJKBAEBCgA0FiEERcxjuFJYydVfNLI5030Op87MORIFAmBYtwoWHGdpb3Zhbm5p QGJpc2N1b2xvLm5ldAAKCRDTfQ6nzsw5EpmOD/9lOwzbbfjOVVz/Drdfn0Q55aaL zYBbEyx4tMLSG+eJLFnA5o3885piUvOPgzO0yNJq0u88hwzOTQXP4xdY9e6Cr0Wq cO7wv+8hQYO2Oz26nR8vPmZmedZUrBNPbmo2al+F5uMZ133aDQW0p+vvBwVtyIH0 dTFYzs2e5fY3cetAp4uJeHq8dN7YuGSmwm4hhQqjMJmFl4ryNcFvC0gvivKu1rgF 84z2YLuB2ldr9kc1Lu0+zB7toHmT57EjwyZcXdQEod1frAUB4xI82Xky0QS81RoR mfXh1ieEwGg2ffJBIN4ctvHuNZ+KDwzZdm/BQHF7KWTpfrBz61p73OqxPLBsvt9u V8wyCrLntOuDR1nLc9MJa0yg6bM4jkbbG+rHXYe6a29u+/gex7O6ihbSqz5d1wZL dvIl1/L1IgEUACFpmuXRqhnI78KpY3WHG8hhH6jck7352+yAx7LryAPRyN21dJIo bV1Wn4OYcGipw3Vme2O0nf2kjYMhSv4zz6nIXtc86HWy6FzH62r4D1/2C720BAzF Vz6sJQVZHE1y0r4FE4DM4d2Vta59aQRcXOAOf/XkYlo5GOmaFfcRy4hP8i9j7NPY ayyxHuPNPqt+E4qhhxKGDD26lpPrNwb7Ze9P4v5GczlF8Rb+6ZtumvhqrTnOJuDh yhhdOUgo2Dryu+sVeA== =vJjj -----END PGP SIGNATURE----- --=-=-=--