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

2022-05-31 Thread Nick Dokos
Uwe Brauer writes: > Hi > > Currently I use > #+EXPORT_FILE_NAME: /home/oub/Desktop/some-stuff.html > > To export my org file in html format to that location. > > But I would also like to export it as a latex file to a different > location, without modifying the above line, or to be more precise

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

2022-05-29 Thread Ihor Radchenko
Uwe Brauer writes: > In any case thanks for both solution, that was very generous and helpful. > > Developers: why to include some of this code in a addon file, if Juan agrees > of course! A more canonical solution would be writing org-export-filter-options-functions that set :output-file expor

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

2022-05-28 Thread Juan Manuel Macías
Uwe Brauer writes: > I have also to confess, that I usually am I bit hesitant to use > defadvice since it changes the vanilla function, and might cause > problems, but maybe this is just me. You are absolutely right, and I confess that I would have the same precautions :-). Also, the defadvice co

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

2022-05-28 Thread Uwe Brauer
>>> "JMM" == Juan Manuel Macías writes: > Uwe Brauer writes: >> 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. > You

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

2022-05-28 Thread Juan Manuel Macías
Uwe Brauer writes: > 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. You must add the variables to the document as local va

[ODT?] (was: how to export an org file, to 2 different locations (in to different formats))

2022-05-27 Thread Uwe Brauer
> Hi Uwe, > Uwe Brauer writes: > One (pedestrian) way to achieve it, with this function: I tried the following #+begin_example #+EXPORT_FILE_NAME: myfile-office #+begin_src emacs-lisp :exports none :eval never-export :results silent (my-org/export-to-path 'html "~/Desktop/" "html") #+end_s

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

2022-05-27 Thread Uwe Brauer
>>> "JMM" == Juan Manuel Macías 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: > #

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

2022-05-27 Thread Uwe Brauer
> Hi Uwe, > Uwe Brauer writes: > One (pedestrian) way to achieve it, with this function: > (defun my-org/export-to-path (backend export-path extension) > (org-element-map (org-element-parse-buffer) 'keyword > (lambda (k) > (when (string= (org-element-property :key k) "EXPORT_FILE_NA

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

2022-05-27 Thread Juan Manuel Macías
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-ht

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

2022-05-27 Thread Juan Manuel Macías
Hi Uwe, Uwe Brauer writes: > Hi > > Currently I use > #+EXPORT_FILE_NAME: /home/oub/Desktop/some-stuff.html > > To export my org file in html format to that location. > > But I would also like to export it as a latex file to a different > location, without modifying the above line, or to be more

how to export an org file, to 2 different locations (in to different formats)

2022-05-27 Thread Uwe Brauer
Hi Currently I use #+EXPORT_FILE_NAME: /home/oub/Desktop/some-stuff.html To export my org file in html format to that location. But I would also like to export it as a latex file to a different location, without modifying the above line, or to be more precise to add a different location, lik