I wonder if it is possible to write a bash oneline to export org-files to pdf. Something like this
emacs -q --eval 'org-latex-export-to-pdf manual.org'
I'm aware of the pandoc project. I would like to do it with emacs, as I also want to add some style options for the export.
I have a document where I will occasionally work with others. To make it easy for them I would like to add a Makefile to generate the pdf.
EDIT
Solution from the comments
emacs --batch -q --eval '(progn (find-file "manual.org") (org-latex-export-to-pdf))'
emacs --batch -q --eval '(progn (find-file "manual.org") (org-latex-export-to-pdf))'
should do the trick. (untested). AFAIK you need to use elisp syntax for eval.latex
have to do with this??with-current-buffer
makes the intention more clear. I agree whith this. Nevertheless,find-file
makes the buffer corresponding to the argument current. So,with-current-buffer
does not change the functionality in any way.