Org-mode's C-cep does export as LaTeX and process to PDF
. How can C-cep be executed on each C-xs?
Also, in all likelihood this probably isn't the optimal solution, so feel free to propose something better. As it is now, I have to do both C-cep and C-xs.
Final solution
A tiny modification of abo-abo's answer below that doesn't open the PDF, lets Skim
pick up any change, and thus keeps the focus on Emacs.
(defun org-export-as-pdf ()
(interactive)
(save-buffer)
(org-latex-export-to-pdf))
(add-hook
'org-mode-hook
(lambda()
(define-key org-mode-map
(kbd "<f5>") 'org-export-as-pdf)))
Also, one should upgrade Org to version 8 from a fresh Emacs session: that is, no Org-command should be executed prior to installing with the package-manager. Otherwise you'll hit the Invalid function: org-with-silent-modifications
bug.
Skim
which auto-refreshes the.pdf
file, so (I think)org-export-as-pdf
(without-and-open
) would suffice. Still, I tried your solution verbatim and got theSymbol's function definition is void: org-latex-export-to-pdf
error. – Veator