From: Kaushal Modi <kaushal.modi@gmail.com>
To: emacs-org list <emacs-orgmode@gnu.org>
Subject: Conditionally formatting org-html-postamble-format
Date: Tue, 26 Jan 2016 21:46:38 +0000 [thread overview]
Message-ID: <CAFyQvY3Pxvz_wCOa4T8Ho7CfSqksW6tzPWoe=F_8O78DtYVEpA@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1067 bytes --]
Hi,
I have the org-html-postamble-format set to the below:
(setq org-html-postamble-format
`(("en"
,(concat "Exported using "
;; "%c" is replaced with
`org-html-creator-string'
;; Emacs <VERSION> (Org mode <VERSION>)
"<div style=\"display: inline\"
class=\"creator\">"
"%c</div> "
"by %a. — "
"<div style=\"display: inline\"
class=\"date\">"
"%d</div>"))))
It works great except for the cases where I have set a document author to
nothing using
#+AUTHOR:
What would be the best way to set the postamble so that the "by %a" portion
does not get printed if the %a value is "".
Right now, if the author is nil, the postamble gets exported as:
Exported using
Emacs <http://www.gnu.org/software/emacs/> 25.0.50.1 (Org
<http://orgmode.org/> mode 8.3.3)
by . —
Jan 26 2016, Tue
[-- Attachment #2: Type: text/html, Size: 2188 bytes --]
next reply other threads:[~2016-01-26 21:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-26 21:46 Kaushal Modi [this message]
2016-01-27 18:26 ` Conditionally formatting org-html-postamble-format Robert H. Klein
2016-01-27 18:35 ` Kaushal Modi
2016-01-27 19:51 ` Nick Dokos
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='CAFyQvY3Pxvz_wCOa4T8Ho7CfSqksW6tzPWoe=F_8O78DtYVEpA@mail.gmail.com' \
--to=kaushal.modi@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).