[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote c7851f6130 1/5: Refactor denote--buffer-file-nam
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote c7851f6130 1/5: Refactor denote--buffer-file-names |
Date: |
Fri, 14 Jul 2023 06:58:10 -0400 (EDT) |
branch: externals/denote
commit c7851f6130356071a70defca90dbd30834f0e6b9
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Refactor denote--buffer-file-names
---
denote.el | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/denote.el b/denote.el
index 44261c397f..e84cfa7e60 100644
--- a/denote.el
+++ b/denote.el
@@ -1604,13 +1604,14 @@ where the former does not read dates without a time
component."
(date-to-time datetime)))
(defun denote--buffer-file-names ()
- "Return file names of active buffers."
- (seq-filter
- #'denote-file-is-note-p
- (delq nil
- (mapcar
- #'buffer-file-name
- (buffer-list)))))
+ "Return file names of Denote buffers."
+ (seq-keep
+ (lambda (buffer)
+ (when-let (((buffer-live-p buffer))
+ (file (buffer-file-name buffer))
+ ((denote-file-is-note-p file)))
+ file))
+ (buffer-list)))
;; In normal usage, this should only be relevant for `denote-date',
;; otherwise the identifier is always unique (we trust that no-one