diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 2fbcbaefa..80ec954b1 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -433,7 +433,10 @@ I like: ;; Fix #462: when refiling from org-capture, Emacs prompts to kill the ;; underlying, modified buffer. This fixes that. - (add-hook 'org-after-refile-insert-hook #'save-buffer) + (add-hook! 'org-after-refile-insert-hook + (defun +org-save-buffer-after-capture-h () + (when (bound-and-true-p org-capture-is-refiling) + (save-buffer)))) ;; HACK Doom doesn't support `customize'. Best not to advertise it as an ;; option in `org-capture's menu.