aboutsummaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'emacs')
-rw-r--r--emacs/init.org13
1 files changed, 13 insertions, 0 deletions
diff --git a/emacs/init.org b/emacs/init.org
index 704e84d..43a4379 100644
--- a/emacs/init.org
+++ b/emacs/init.org
@@ -1453,6 +1453,19 @@ perform this first:
(require 'ox-man)
#+END_SRC
+Setup a function to toggle =org-publish-current-file= on save:
+
+#+BEGIN_SRC elisp
+(defun toggle-org-publish-current-file-on-save ()
+ (interactive)
+ (if (memq 'org-publish-current-file after-save-hook)
+ (progn
+ (remove-hook 'after-save-hook 'org-publish-current-file t)
+ (message "Disabled org-publish-current-file for current buffer..."))
+ (add-hook 'after-save-hook 'org-publish-current-file nil t)
+ (message "Enabled org-publish-current-file for current buffer...")))
+#+END_SRC
+
** Agenda
Custom commands for =org-agenda=.