doomemacs/modules/lang/org/+export.el

29 lines
911 B
EmacsLisp
Raw Normal View History

2017-03-01 01:12:09 +08:00
;;; lang/org/+export.el
2017-02-20 08:01:47 +08:00
;; My own, centralized exporting system as well.
(add-hook '+org-init-hook '+org|init-export t)
(defun +org|init-export ()
(setq org-export-directory (expand-file-name ".export" +org-dir)
org-export-backends '(ascii html latex md)
org-export-with-toc t
org-export-with-author t)
;; Export to a central directory (why isn't this easier?)
(unless (file-directory-p org-export-directory)
(make-directory org-export-directory t))
(defun +org*export-output-file-name (args)
(unless (nth 2 args)
(setq args (append args (list org-export-directory))))
args)
(advice-add #'org-export-output-file-name :filter-args #'+org*export-output-file-name)
2017-02-20 08:01:47 +08:00
;; (require 'ox-pandoc)
;; (setq org-pandoc-options '((standalone . t) (mathjax . t) (parse-raw . t)))
;; keybinds
;; (map! :leader :n "oe" (find-file-in! org-export-directory))
2017-02-20 08:01:47 +08:00
)