diff options
author | Guangxiong Lin <[email protected]> | 2022-03-13 15:08:49 +0800 |
---|---|---|
committer | Guangxiong Lin <[email protected]> | 2022-03-13 15:08:49 +0800 |
commit | 88e3fdfdcf6a8a11ee592f2aa191bd44dc7cad1d (patch) | |
tree | bdd4eddba2b186adc6ef13030349370370b87410 | |
parent | 908a8fc2958ef7a1d7fe7342892511be9357a4b9 (diff) | |
download | dotfiles-88e3fdfdcf6a8a11ee592f2aa191bd44dc7cad1d.tar.gz dotfiles-88e3fdfdcf6a8a11ee592f2aa191bd44dc7cad1d.tar.bz2 dotfiles-88e3fdfdcf6a8a11ee592f2aa191bd44dc7cad1d.zip |
Save all buffers after org-refile (emacs)
Implement it as overriding instead of hook
-rw-r--r-- | .emacs.d/lisp/init-org.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/.emacs.d/lisp/init-org.el b/.emacs.d/lisp/init-org.el index 9d4cea2..1f8e017 100644 --- a/.emacs.d/lisp/init-org.el +++ b/.emacs.d/lisp/init-org.el @@ -26,8 +26,12 @@ (funcall fn)) (advice-add 'org-agenda-quit :around 'gx/org-agenda-quit) +(defun gx/org-refile (fn &optional arg default-buffer rfloc msg) + (funcall-interactively fn arg default-buffer rfloc msg) + (org-save-all-org-buffers)) +(advice-add 'org-refile :around 'gx/org-refile) + (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode)) -(add-hook 'org-after-refile-insert-hook 'org-save-all-org-buffers) ;; keybinds (with-eval-after-load 'evil |