From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Conditionally formatting org-html-postamble-format Date: Wed, 27 Jan 2016 14:51:16 -0500 Message-ID: <87y4baiyx7.fsf@alphaville.usersys.redhat.com> References: <20160127192600.08cdad14@lt70.mpip-mainz.mpg.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOW80-0006RA-3b for emacs-orgmode@gnu.org; Wed, 27 Jan 2016 14:51:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOW7u-00051f-Vc for emacs-orgmode@gnu.org; Wed, 27 Jan 2016 14:51:44 -0500 Received: from plane.gmane.org ([80.91.229.3]:54861) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOW7u-00051b-OP for emacs-orgmode@gnu.org; Wed, 27 Jan 2016 14:51:38 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aOW7n-0005Rw-3H for emacs-orgmode@gnu.org; Wed, 27 Jan 2016 20:51:31 +0100 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 27 Jan 2016 20:51:31 +0100 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 27 Jan 2016 20:51:31 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Kaushal Modi writes: > Hi Robert, > > Thanks for the reply. > >> how about using a postamble function instead of html-postamble-format > > Does it mean that I need to look into modifying the org-html--build-pre/postamble function? > No, Robert is talking about the variable org-html-postamble, which you can set to a function. No need to muck around with the internals of org. C-h v org-html-postamble says ,---- | org-html-postamble is a variable defined in ‘ox-html.el’. | Its value is auto | | Documentation: | Non-nil means insert a postamble in HTML export. | | When set to ‘auto’, check against the | ‘org-export-with-author/email/creator/date’ variables to set the | content of the postamble. When set to a string, use this string | as the postamble. When t, insert a string as defined by the | formatting string in ‘org-html-postamble-format’. | | When set to a function, apply this function and insert the | returned string. The function takes the property list of export | options as its only argument. | | Setting :html-postamble in publishing projects will take | precedence over this variable. `---- Try --8<---------------cut here---------------start------------->8--- (defun foo (info) "This is my postamble") (setq org-html-postamble (function foo)) --8<---------------cut here---------------end--------------->8--- and complicate the function as necessary to produce what you want. Of course, you can use an anonymous function too: --8<---------------cut here---------------start------------->8--- (setq org-html-postamble (function (lambda (info) "This is my postamble"))) --8<---------------cut here---------------end--------------->8--- -- Nick