emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: John Hendy <jw.hendy@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Including setupfile settings during subtree export (new exporter)
Date: Sat, 23 Mar 2013 23:37:32 +0100	[thread overview]
Message-ID: <87li9dzqs3.fsf@gmail.com> (raw)
In-Reply-To: <CA+M2ft81xHnY8uQ5obwR+T+vm0yz8u3tbJYcvHXMyKPCZPfYYw@mail.gmail.com> (John Hendy's message of "Sat, 23 Mar 2013 17:18:28 -0500")

John Hendy <jw.hendy@gmail.com> writes:

>> #+INCLUDE: "file" replaces keyword with "file" contents. During subtree
>> export, replacement will happen if the keyword is located within the
>> subtree being exported.
>> #+SETUPFILE: "file" just reads Org keywords within "file". All Org
>> keywords are global, this one makes no exception.
> Got it... I think :) Perhaps the Worg page should clarify this, as it
> does, then, seem like #+include is the best practice for LaTeX options
> and #+setupfile is just supposed to be for TODO settings? I say this
> as my googling for "Org keywords org-mode" yields this:
> - http://orgmode.org/manual/Per_002dfile-keywords.html
> Is that the meaning of "Org keywords" (just TODO keyword/work flow
> settings)? Or would you also include #+options in that group?

Org keywords are any keyword you can think of, excepted INCLUDE
keywords. Thus, it makes sense to have an OPTIONS keyword within

>> In a nutshell, SETUPFILE should be used for Org set-up. INCLUDE is very
>> general and can be used to build complex documents. The fact that it
>> also copies Org keywords from "file" in the current buffer is merely
>> a side-effect.
>>> What's the preferred way to customize subtrees? Just add #+latex: or
>>> #+latex_header: options inside the subtree?
>> #+LATEX_HEADER: is also global. Use :EXPORT_LATEX_HEADER: in property
>> drawer instead.
> Good to know. I was unaware of that. Is there a list of these?

For each keyword related to export (e.g. AUTHOR), there's
an :EXPORT_AUTHOR: property for subtree export. It is also true for
back-end specific keywords (like Beamer's).

> Out of curiosity, would #+include in the header of the file be
> overridden by #+include in the subtree?

Not at all. Each include will be replaced by the contents of the file it
points to. You can have as many INCLUDE keywords as you want in a file.

Though, if first INCLUDE keyword adds an Org keyword (e.g. AUTHOR) and
the second one also inserts AUTHOR keyword, the last AUTHOR keyword in
the buffer will have precedence over the first one.

The same holds for SETUPFILE keywords.

> If not, it could be as simple as having a temporary include file that
> I'd modify prior to subtree export and then just comment out the main
> buffer #+include prior to exporting.

That would probably work. But, again, I highly suggest to use SETUPFILE
for setting up the export (among other things). Use INCLUDE when you
need to add contents, not only Org meta-data.


Nicolas Goaziou

  reply	other threads:[~2013-03-23 22:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-22 15:19 Including setupfile settings during subtree export (new exporter) John Hendy
2013-03-22 15:27 ` Nicolas Goaziou
2013-03-22 17:12   ` John Hendy
2013-03-23 20:24     ` Nicolas Goaziou
2013-03-23 20:37       ` John Hendy
2013-03-23 20:49         ` Nicolas Goaziou
2013-03-23 21:10           ` John Hendy
2013-03-23 22:08             ` Nicolas Goaziou
2013-03-23 22:18               ` John Hendy
2013-03-23 22:37                 ` Nicolas Goaziou [this message]
2013-03-24 12:13         ` Mike McLean

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:

  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=87li9dzqs3.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jw.hendy@gmail.com \


* 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


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).