mirror of
https://github.com/protesilaos/denote.git
synced 2026-09-10 07:16:20 -04:00
Account for subdirs in denote-file-prompt-group function
This commit is contained in:
parent
5f082c5a07
commit
cdfffbaeaa
|
|
@ -1474,7 +1474,13 @@ there.")
|
|||
"Retun group of FILE if TRANSFORM is non-nil, per `completion-metadata'."
|
||||
(cond
|
||||
(transform
|
||||
(or (denote-retrieve-filename-title file) file))
|
||||
(if-let* ((title (denote-retrieve-filename-title file)))
|
||||
(if-let* ((in-subdir-p (string-match-p "/" file))
|
||||
(components (split-string file "/"))
|
||||
(dir (string-join (butlast components) "/")))
|
||||
(format "%s: %s" dir title)
|
||||
title)
|
||||
file))
|
||||
((string-match-p (regexp-opt denote-encryption-file-extensions) file)
|
||||
"Encrypted")
|
||||
((string-match-p (regexp-opt (denote-file-type-extensions)) file)
|
||||
|
|
|
|||
Loading…
Reference in a new issue