branch: externals/denote-sequence
commit 1de4854b6865fd54ebb2a36ef042cfa6b639acfe
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>
Use the denote.el group function
There is no need for a separate one here. I was too eager to flesh
this out, thinking I might need one, but it turns out the distinct
affixation function is all I want to be different.
---
denote-sequence.el | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/denote-sequence.el b/denote-sequence.el
index a9135ef0f1..1888effb51 100644
--- a/denote-sequence.el
+++ b/denote-sequence.el
@@ -822,19 +822,6 @@ function can remove it, such as with
`denote-file-prompt-group'."
(propertize (or (denote-retrieve-filename-keywords file) "")
'face 'completions-annotations)))))
files))
-(defun denote-sequence-file-prompt-group (file transform)
- "Retun group of FILE if TRANSFORM is non-nil, per `completion-metadata'."
- (cond
- (transform
- (denote-retrieve-filename-title file))
- ((string-match-p (regexp-opt denote-encryption-file-extensions) file)
- "Encrypted")
- ((string-match-p (regexp-opt (denote-file-type-extensions)) file)
- "Notes")
- ((string-match-p "\\.\\(pdf\\|epub\\)" file)
- "Documents")
- (t "Other files")))
-
(defvar denote-sequence-file-prompt-extra-metadata
(list
;; NOTE 2025-12-15: If we use the `file' category, then we are
@@ -842,7 +829,7 @@ function can remove it, such as with
`denote-file-prompt-group'."
;; problem because the user will want to, for example, sort
;; directories before files, but then we cannot have our sort here.
(cons 'category 'denote-file)
- (cons 'group-function #'denote-sequence-file-prompt-group)
+ (cons 'group-function #'denote-file-prompt-group)
(cons 'affixation-function #'denote-sequence-file-prompt-affixate)
(cons 'display-sort-function #'denote-sequence-sort-files))
"Extra `completion-metadata' for the `denote-file-prompt'.