emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Uwe Brauer <oub@mat.ucm.es>
To: "Juan Manuel Macías" <maciaschain@posteo.net>
Cc: Uwe Brauer <oub@mat.ucm.es>, orgmode <emacs-orgmode@gnu.org>
Subject: Re: how to export an org file, to 2 different locations (in to different formats)
Date: Sat, 28 May 2022 08:36:07 +0200	[thread overview]
Message-ID: <87h75a5fl4.fsf@mat.ucm.es> (raw)
In-Reply-To: 87y1ymqzlh.fsf@posteo.net

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

>>> "JMM" == Juan Manuel Macías <maciaschain@posteo.net> writes:

> Juan Manuel Macías writes:
>> One (pedestrian) way to achieve it, with this function:

> I think it can be done better this way, defining an advice around
> 'org-export-output-file-name'.

> In your org file you should add these two local variables:

> # my-latex-export-path: "~/path/to/myfile.tex"
> # my-html-export-path "~/path/to/myfile.html"

> And this is the define-advice code. It should export to one or another path/file every
> time you export your document to LaTeX or html. I haven't tried it much:

Thanks, that looks even more convenient!
I tried to test it with 

# my-latex-export-path: "./myfile2.tex"
# my-html-export-path "~/Desktop/myfile2.html"

,#+begin_src emacs-lisp :exports none :eval never-export :results silent
  (my-org/export-to-path 'html "~/Desktop/" "html")

,#+begin_src emacs-lisp :exports none :eval never-export :results silent
  (my-org/export-to-path 'latex "./" "tex")

,* Excuses

Jim: Which was? Sir Humphrey: 


When I run it I obtain 
if: Symbol’s value as variable is void: my-latex-export-path

Another point is if I decide to export it to ods, I need to modify that
advice, but I agree the new function is more convenient.


[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

  reply	other threads:[~2022-05-28  6:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-27 16:23 how to export an org file, to 2 different locations (in to different formats) Uwe Brauer
2022-05-27 18:42 ` Juan Manuel Macías
2022-05-28  0:18   ` Juan Manuel Macías
2022-05-28  6:36     ` Uwe Brauer [this message]
2022-05-28  7:23       ` Juan Manuel Macías
2022-05-28  8:40         ` Uwe Brauer
2022-05-28  9:06           ` Juan Manuel Macías
2022-05-29 11:44           ` Ihor Radchenko
2022-05-28  6:21   ` Uwe Brauer
2022-05-28  6:47   ` [ODT?] (was: how to export an org file, to 2 different locations (in to different formats)) Uwe Brauer
2022-05-31 15:10 ` how to export an org file, to 2 different locations (in to different formats) Nick Dokos

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=87h75a5fl4.fsf@mat.ucm.es \
    --to=oub@mat.ucm.es \
    --cc=emacs-orgmode@gnu.org \
    --cc=maciaschain@posteo.net \


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