emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-orgmode@gnu.org
Subject: templating with Org?
Date: Sat, 08 Aug 2015 12:48:01 +0800	[thread overview]
Message-ID: <8737zumlmm.fsf@ericabrahamsen.net> (raw)

Exporting org files and subtrees is awfully flexible, given all the
possible customizations, but for a long while I've occasionally felt the
need to come at the "export" process from the other direction: instead
of customizing the export appearance of a series of headings, instead
starting with a common block of export text, and interpolating values
from the headings into that text -- ie, templating.

I've felt this need off and on for a couple of years, most recently when
organizing a small literary festival. I really need to keep all the
information about the events in a single place, otherwise I know that
information will go stale right away. But I need the information in a
series of such wildly-varying formats that I can't imagine setting up
(and switching between) export filters in a way that wouldn't make me
cry. Not to mention that the different "export" use-cases all have their
own per-heading boilerplate text, and there's no way I'm going to repeat
all that different boilerplate under each heading.

Obviously there's many ways this could be done. I could somehow hijack
the export process -- in many cases it would be nice too make use of the
skeleton document structures that export provides.

Or maybe dynamic blocks? I've never used them before. Or maybe just a
plain old `org-map-entries', which reads the template text from an
external file and then steals some of the macro expansion functions to
fill out the values.

Has anyone wanted to do this before? Has anyone actually done it? Any
thoughts or suggestions would be much appreciated!

Yours,
Eric

             reply	other threads:[~2015-08-08  4:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-08  4:48 Eric Abrahamsen [this message]
2015-08-08 18:11 ` templating with Org? John Kitchin
2015-08-10  5:49   ` Eric Abrahamsen
2015-08-10 12:01     ` John Kitchin
2015-08-10 12:14       ` Rasmus
2015-08-10 12:19         ` John Kitchin

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=8737zumlmm.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --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).