From caca4dce67ba849325d258caf105cc2f98873440 Mon Sep 17 00:00:00 2001 From: Spencer Williams Date: Thu, 10 Jul 2025 14:02:03 -0400 Subject: Fix draft note titles showing up in backlinks --- lisp/seam.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lisp/seam.el') diff --git a/lisp/seam.el b/lisp/seam.el index 0dcf9d7..62d7737 100644 --- a/lisp/seam.el +++ b/lisp/seam.el @@ -315,8 +315,12 @@ completion prompt is given to choose the type." (defun seam-get-links-to-file (file) "Return filename of each note which links to FILE." - (remove (expand-file-name file) - (seam-note-files-containing-string (format "[[seam:%s]" (file-name-base file))))) + (cl-loop for file in (remove (expand-file-name file) + (seam-note-files-containing-string + (format "[[seam:%s]" (file-name-base file)))) + when (or seam-export--include-drafts + (not (seam-draft-p file))) + collect file)) (cl-defun seam-get-links-from-buffer (&optional (buffer (current-buffer))) "Return filename of each existing note which is linked to from BUFFER." -- cgit v1.2.3