emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Richard Lawrence <richard.lawrence@berkeley.edu>
To: emacs-orgmode@gnu.org
Subject: Re: Export LaTeX file to different directory?
Date: Mon, 13 Dec 2010 10:34:29 -0800	[thread overview]
Message-ID: <87aak9h68a.fsf@berkeley.edu> (raw)
In-Reply-To: 20101213104732.GA283@pc201.uni-germanistik.gwdg.de

Hi Joost,

> If I export (part of) an org-mode file to LaTeX, the LaTeX file is created in
> the same directory as the org-mode file. Is there a way to specify the file
> should go somewhere else? Googling and looking through the manual didn't give me
> anything concrete. There is apparently a property EXPORT_FILE_NAME, but setting
> this doesn't seem to have any effect. (Though I may be using it wrong, there
> wasn't any description or example of it in the manual... Plus, I'd like to be
> able to specify just the export directory, not necessarily the file name as well.)

As far as I know (though others may know better) this isn't possible
using per-file configuration with the simple export functions (C-c C-e l
and friends).  It *is* possible through the publishing framework,
though.

When you define a publishing target in org-publish-project-alist, you
can specify both the :base-directory and :publishing-directory options.
For example:

(setq org-publish-project-alist
      '(("orgfiles"
	 :base-directory "~/org"
	 :publishing-directory "~/tmp"
	 :publishing-function org-publish-org-to-html
	 :base-extension "org$")))

See the documentation for "Publishing."

This approach, however, requires you to do some Elisp customization, and
it requires you to statically define your source and destination
directories.  You may need something more flexible or configurable on a
per-file (or per-export, even) basis.  The only solution I know of there
is to export to a temporary buffer, then save that buffer in the
location you want -- though of course this requires interaction from
you.

If others know of a middle road between using the publishing framework
and just doing C-c C-e L C-x C-s every time, I would be interested in
hearing about it too.  (If there isn't a middle road, consider this my +1
on adding this feature.)

Best,
Richard

  parent reply	other threads:[~2010-12-13 18:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-13 10:47 Export LaTeX file to different directory? Joost Kremers
2010-12-13 11:07 ` suvayu ali
2010-12-13 11:34   ` Joost Kremers
2010-12-13 11:52     ` suvayu ali
2010-12-13 15:43       ` Joost Kremers
2010-12-13 17:20         ` suvayu ali
     [not found] ` <15397.1292255865@gamaville.dokosmarshall.org>
2010-12-13 17:15   ` Joost Kremers
2010-12-13 18:13     ` Jeff Horn
2010-12-13 18:34 ` Richard Lawrence [this message]
2010-12-13 18:36   ` Jeff Horn
2010-12-14  4:14     ` Richard Lawrence
2010-12-14  9:11       ` Joost Kremers

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=87aak9h68a.fsf@berkeley.edu \
    --to=richard.lawrence@berkeley.edu \
    --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).