From cdfffbaeaa040aeaece97496cdaebe42018de129 Mon Sep 17 00:00:00 2001 From: Protesilaos Stavrou Date: Tue, 16 Dec 2025 08:45:10 +0200 Subject: [PATCH] Account for subdirs in denote-file-prompt-group function --- denote.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/denote.el b/denote.el index 308a604..5e5bd1f 100644 --- a/denote.el +++ b/denote.el @@ -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)