seam

Personal wiki toolkit for Emacs
Log | Files | Refs | LICENSE

commit 094f9f657fd8d8c25e61cac00cc46d2b54edcc69
parent c94e0afbbee4ce9282ad4b09af8cc9c56fbdea0a
Author: Spencer Williams <spnw@plexwave.org>
Date:   Wed, 19 Mar 2025 11:52:54 -0400

Rename seam-visited-files -> seam-visited-notes and fix its behavior

Diffstat:
Mseam.el | 15+++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/seam.el b/seam.el @@ -416,17 +416,20 @@ Otherwise, it's nil." (concat "\\b" query "\\b") query)))))) -(defun seam-visited-files () - (cl-loop for buf in (buffer-list) - as file = (buffer-file-name buf) - when (and file (file-in-directory-p file seam-note-directory)) - collect file)) +(defun seam-visited-notes () + (let ((subdirs (seam-note-subdirectories))) + (cl-loop for buf in (buffer-list) + as file = (buffer-file-name buf) + when (and file + (member (file-name-directory file) subdirs) + (string-match seam-note-file-regexp file)) + collect file))) (defun seam-replace-string-in-notes (old new preserve-modtime) (let ((hash (make-hash-table :test 'equal))) (dolist (file (seam-note-files-containing-string old)) (puthash file nil hash)) - (dolist (file (seam-visited-files)) + (dolist (file (seam-visited-notes)) (puthash file t hash)) (let ((update-count 0)) (maphash