emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ivan Tadeu Ferreira Antunes Filho <ita@mit.edu>
To: "Liste-emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: export an org file to a latex file but in a differerent directory
Date: Fri, 4 Sep 2020 15:11:59 -0400	[thread overview]
Message-ID: <CAHPpCdCh0isyaOQ6FaN3NRrhWjaOTi5hJSrV4QAmosu-im=Pdw@mail.gmail.com> (raw)
In-Reply-To: <87363xqsvk.fsf@mat.ucm.es>

[-- Attachment #1: Type: text/plain, Size: 1257 bytes --]

I use the code in
https://github.com/itf/org-export-with-files/blob/master/org-export-with-files.el
in order to define a new function that exports the current subtree to a
different folder, as well as create hard copies of the files linked in the
new directory and fixes the links in order to keep the links inside the
file working in the new directory.
It only works with PDF currently.

But in summary, I use:
(org-set-property
"EXPORT_FILE_NAME"
file-name)

To set a new file name,

and
(let*
  ((new-file-name (concat directory-name file-name)))
  (set-visited-file-name (concat new-file-name ".org"))

before exporting, in order to set a new directory, since the directory
comes from the directory of the current file, which can be set by "
set-visited-file-name" (remember to undo this afterwards).

On Fri, Sep 4, 2020 at 2:51 PM Uwe Brauer <oub@mat.ucm.es> wrote:

> >>> "NG" == Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>
> > Hello,
> > Bastien <bzg@gnu.org> writes:
>
> >> There is none, that's indeed a backward compatibility issue.
>
> > Note that exporting to a different directory is called publishing.
>
> As you  wish, but my original question stands, how to I do this, which
> is the variable to be set, locally in the org file?
>
>

[-- Attachment #2: Type: text/html, Size: 3082 bytes --]

  reply	other threads:[~2020-09-04 19:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-14 16:02 export an org file to a latex file but in a differerent directory Uwe Brauer
2020-09-04 14:22 ` Bastien
2020-09-04 17:58   ` Nicolas Goaziou
2020-09-04 18:49     ` Uwe Brauer
2020-09-04 19:11       ` Ivan Tadeu Ferreira Antunes Filho [this message]
2020-09-04 19:51         ` Uwe Brauer

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='CAHPpCdCh0isyaOQ6FaN3NRrhWjaOTi5hJSrV4QAmosu-im=Pdw@mail.gmail.com' \
    --to=ita@mit.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).