Created
January 21, 2018 03:58
-
-
Save kkatsuyuki/69de02026945d20931897eaf67cd593b to your computer and use it in GitHub Desktop.
auto-export every time you edit and save an org-file in your project directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun org-auto-export-project () | |
(let ((project | |
(catch 'is-project-dir | |
(dolist (each-project org-publish-project-alist) | |
(if (string-match | |
(expand-file-name (plist-get (cdr each-project) :base-directory)) | |
(expand-file-name buffer-file-name)) | |
(throw 'is-project-dir (car each-project))))))) | |
(if project | |
(save-excursion (org-publish-project project))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment