> 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_NAME")
>       (let ((value (org-element-property :value k)))
>         (org-export-to-file backend
>             (format
>              "%s%s.%s"
>              export-path
>              value extension)))))))

> And then you could evaluate it inside a block in your document, with the
> chosen arguments. For example:

> #+EXPORT_FILE_NAME: myfile

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

Very nice I run a test with 

#+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

And it works nicely, thanks a lot, simplifies my workflow quite a bit.


Uwe 

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

Reply via email to