fix(org): save-buffer more selectively after org-refile

Fixing interop between this hook and org-reminders (or other org
packages affected by the side-effects of `save-buffer`).
This commit is contained in:
Henrik Lissner
2025-04-16 19:07:27 -04:00
parent b4276f41f4
commit b51d41e1cf

View File

@ -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.