diff --git a/.emacs.d/init.el b/.emacs.d/init.el index e324d6f..8266e45 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -161,7 +161,8 @@ (use-package org :defer - :bind (:map org-mode-map ("C-z" . org-latex-export-to-pdf)) + :bind ((:map org-mode-map ("C-z" . org-latex-export-to-pdf)) + (:map org-src-mode-map ("C-z" . org-src-export-to-pdf))) :config ;; Make windmove work in org-mode: (add-hook 'org-shiftup-final-hook 'windmove-up) @@ -174,6 +175,9 @@ (visual-line-mode) (setq word-wrap t))) + (defun org-src-export-to-pdf () + (interactive) + (org-src-in-org-buffer (org-latex-export-to-pdf))) (setq org-confirm-babel-evaluate nil) (add-to-list 'org-babel-load-languages '(dot . t)) (add-to-list 'org-src-lang-modes '("dot" . graphviz-dot))