From a9e48df67caf61e1daaed32c560573ddcff23071 Mon Sep 17 00:00:00 2001 From: bth Date: Fri, 5 Jun 2026 13:51:30 -0700 Subject: [PATCH] um-tag-do save-excursion --- um.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/um.el b/um.el index 34c3386..a147d04 100644 --- a/um.el +++ b/um.el @@ -317,9 +317,10 @@ Emits message if TAG is already present, but does not error." "Insert or delete TAG from the journal header in current buffer. insert when INSERT > 0, delete otherwise." - (if (> insert 0) - (um-tag-insert tag) - (um-tag-delete tag))) + (save-excursion + (if (> insert 0) + (um-tag-insert tag) + (um-tag-delete tag)))) ;;;###autoload (defun um-tag-dwim (ARG) @@ -358,9 +359,8 @@ Negative prefix arg is handled by `um-tag-do', which see. (with-current-buffer ;; TODO: this should use the fallback logic: (find-file-noselect (expand-file-name f (um-root-path)) t) - (save-excursion - (um-tag-do tag ARG) - (save-buffer)))) + (um-tag-do tag ARG) + (save-buffer))) )) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;