From e1509b0f3cfb5f439c18e2ff53b6e976edb22fd1 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sat, 20 Jan 2018 16:37:40 -0500 Subject: [PATCH] Add function & binding to export pdf from org-src buffers --- .emacs.d/init.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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))