aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSpencer Williams <spnw@plexwave.org>2025-07-11 16:42:34 -0400
committerSpencer Williams <spnw@plexwave.org>2025-07-11 16:42:34 -0400
commitb28940a44e41923836fe771ba9845a3e4cdf97e7 (patch)
tree2c91c8fc659025d11149d0888ab2911361344c9a
parenteabbaa6ca9d046845c2ea3d860456863a3782869 (diff)
Fix drafts not counted for broken links
-rw-r--r--lisp/seam.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/seam.el b/lisp/seam.el
index a228f4c..2330b97 100644
--- a/lisp/seam.el
+++ b/lisp/seam.el
@@ -312,12 +312,13 @@ completion prompt is given to choose the type."
seam-note-directory type
(concat (when draft "-") slug ".org"))))
-(defun seam-get-links-to-file (file)
+(defun seam-get-links-to-file (file &optional include-drafts)
"Return filename of each note which links to 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
+ when (or include-drafts
+ seam-export--include-drafts
(not (seam-draft-p file)))
collect file))
@@ -619,7 +620,7 @@ buffer is killed after deletion."
(let ((file (buffer-file-name)))
(seam-get-note-type file) ;Error if file isn't a Seam note.
(list
- (let ((incoming (length (seam-get-links-to-file file))))
+ (let ((incoming (length (seam-get-links-to-file file t))))
(and (yes-or-no-p
(format "Really %s `%s' and kill buffer%s?"
(if delete-by-moving-to-trash