I find myself pressing C-c C-e l o yes RET quite often in org-mode because I want to view the file I'm working on as a PDF.

My simplistic attempts of automating this by feeding "lo" to org-export-dispatch were foiled by this interactive function not accepting any arguments as a quick look at its source code revealed.

How can this be automated so I can assign a shorter key binding to it?


You could try binding (org-open-file (org-latex-export-to-pdf)) to a key combination of your choice?

  • Thanks! Do you also have an idea how to get rid of having to type "yes" hit return to reload the PDF?
    – UTF-8
    May 4 '19 at 13:49
  • No, sorry; I also would like to know the answer to that. I have global-auto-revert-mode set to t but that makes no difference.
    – éric
    May 11 '19 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.