-2

I use org mode for my routine work. I use sequence C-c C-e lo to export and open pdf almost 30 times a day Is it possible to bind this sequence to print button. It will make my job easy

6
  • Take a look at key-translation-map's docstring.
    – user12563
    Jul 23, 2018 at 19:38
  • 1
    What is this lo you have (do you really mean the C-c C-e l o sequence, or was the lo just a typo)? And what "print" button are you thinking of? Please clarify.
    – Stefan
    Jul 23, 2018 at 21:08
  • @Vaibhav type C-h k and then click on the print button you're referring to, and Emacs should tell you the name of the command.
    – phils
    Jul 23, 2018 at 21:53
  • @Stefan as a sequence
    – Vaibhav
    Jul 24, 2018 at 2:43
  • 2
    @Stefan I guess that this question is actually about org-mode. There C-c C-e is org-export-dispatch generating a menu where the keystrokes l and o stand for Export to *L*aTeX and As PDF and *o*pen, respectively. That leads me to the assumption that this question is not really about ps-print-buffer or anything similar but about org-mode export to LaTeX and PDF. @Vaibhav: If my assumption is right please clarify that in the question.
    – Tobias
    Jul 24, 2018 at 7:33

1 Answer 1

3

Try:

(defun org-export-to-pdf-and-open ()
  (org-open-file (org-latex-export-to-pdf)))

(global-set-key (kbd "<print>") #'org-export-to-pdf-and-open)

(Your question is not very clear, let me know if I guessed incorrectly what you wanted.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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