diff options
author | Spencer Williams <spnw@plexwave.org> | 2025-03-19 11:52:54 -0400 |
---|---|---|
committer | Spencer Williams <spnw@plexwave.org> | 2025-03-19 11:52:54 -0400 |
commit | 094f9f657fd8d8c25e61cac00cc46d2b54edcc69 (patch) | |
tree | 7d50c632ea5ea49fad0e692aefc3d909e5aa0f33 | |
parent | c94e0afbbee4ce9282ad4b09af8cc9c56fbdea0a (diff) |
Rename seam-visited-files -> seam-visited-notes and fix its behavior
-rw-r--r-- | seam.el | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -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 |