branch: externals/denote-sequence
commit c41c3dea4d02811ab285abd139451b5850b4320c
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>
Make denote-sequence--get-files work with 'denote-use-directory'
Thanks to Mirko Hernandez for reporting the problem in issue 2:
<https://github.com/protesilaos/denote-sequence/issues/2>.
---
denote-sequence.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/denote-sequence.el b/denote-sequence.el
index ffcccab842..4679fc6986 100644
--- a/denote-sequence.el
+++ b/denote-sequence.el
@@ -353,7 +353,10 @@ depth given SEQUENCE."
(defun denote-sequence--get-files (&optional files)
"Return list of files or buffers in the variable `denote-directory'.
With optional FILES only consider those, otherwise use
`denote-directory-files'."
- (delete-dups (append (denote--buffer-file-names) (or files
(denote-directory-files)))))
+ (let* ((denote-directory (or denote-use-directory (denote-directory)))
+ (files (denote-directory-files))
+ (buffers (denote--buffer-file-names)))
+ (delete-dups (append buffers files))))
(defun denote-sequence-get-all-files (&optional files)
"Return all files in variable `denote-directory' with a sequence.