From b51d41e1cfbbaea38d251bb41ebf02e9cfe3b6a9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 16 Apr 2025 19:07:27 -0400 Subject: [PATCH] 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`). --- modules/lang/org/config.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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.