diff options
| author | Miquel Sabaté Solà <msabate@suse.com> | 2018-04-09 11:42:26 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <msabate@suse.com> | 2018-04-09 11:42:26 +0200 |
| commit | a782d2eb266d14122f85222240c94b7ddc0d5ce5 (patch) | |
| tree | 166b6e0a415d3112a7af3d4c4366792ba599bfc9 | |
| parent | 7f43c0bf1961adacb2b9e4b496e148919e20fad5 (diff) | |
| download | dotfiles-a782d2eb266d14122f85222240c94b7ddc0d5ce5.tar.gz dotfiles-a782d2eb266d14122f85222240c94b7ddc0d5ce5.zip | |
emacs: added toggle for org-publish-current-file
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
| -rw-r--r-- | emacs/init.org | 13 |
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=. |
