emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to export an org file, to 2 different locations (in to different


From: Uwe Brauer
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>>> "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 

#+begin_example
# 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")
,#+end_src


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

,* Excuses


Jim: Which was? Sir Humphrey: 

#+end_example

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.

Uwe 

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]