From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Conditionally formatting org-html-postamble-format
Date: Wed, 27 Jan 2016 14:51:16 -0500 [thread overview]
Message-ID: <87y4baiyx7.fsf@alphaville.usersys.redhat.com> (raw)
In-Reply-To: CAFyQvY1Ndshc_50kPp9XjxXbXHNMU_sUw1+QW-tLGa3Cwe0sRQ@mail.gmail.com
Kaushal Modi <kaushal.modi@gmail.com> 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
next prev parent reply other threads:[~2016-01-27 19:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-26 21:46 Conditionally formatting org-html-postamble-format Kaushal Modi
2016-01-27 18:26 ` Robert H. Klein
2016-01-27 18:35 ` Kaushal Modi
2016-01-27 19:51 ` Nick Dokos [this message]
2016-01-27 19:55 ` Robert H. Klein
2016-01-28 4:36 ` Kaushal Modi
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=87y4baiyx7.fsf@alphaville.usersys.redhat.com \
--to=ndokos@gmail.com \
--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).