From ab8851af2606478bfa7c224aef72d990eab02c4d Mon Sep 17 00:00:00 2001 From: bth Date: Mon, 15 Dec 2025 13:28:32 -0800 Subject: [PATCH] um-tag-insert-dwim : (thing-at-point filename) --- elisp/um.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/elisp/um.el b/elisp/um.el index 5d7c62a..12d190f 100644 --- a/elisp/um.el +++ b/elisp/um.el @@ -199,8 +199,9 @@ Assumes the files of interest are returned by `um-journal-path'. (let* ( (tag (completing-read "tag: " um-tags-history nil nil nil 'um-tags-history)) (marks (dired-get-marked-files)) - ;; NOTE: existing-filename to avoid returning bogus strings: - (fap (thing-at-point 'existing-filename)) + ;; NOTE: 'existing-filename would be better to avoid bogus strings, but + ;; in view-mode when in another project, we can't verify it exists yet: + (fap (thing-at-point 'filename)) (files (cond ((and (region-active-p) (not (eq major-mode 'dired-mode))) (string-split (buffer-substring (region-beginning) (region-end))))