branch: externals/denote
commit dda6c5a9f7ceeab39b133e1c99eef9c5a29ceb3c
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>
Show directory in denote-file-prompt only when denote-directory has many
The idea is that if the user has configured denote-directory to a list
of directories, then we want to inform them where the file prompt is
at. For a single directory, this is superfluous.
---
denote.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/denote.el b/denote.el
index fe8ead72b5..1af90e03a5 100644
--- a/denote.el
+++ b/denote.el
@@ -1560,10 +1560,10 @@ Return the absolute path to the matching file."
(mapcar
#'denote-get-file-name-relative-to-denote-directory files)
files))
(prompt (if single-dir-p
- (format "%s in %s: "
+ (format "%s: " (or prompt-text "Select FILE"))
+ (format "%s in %s: "
(or prompt-text "Select FILE")
- (propertize default-directory 'face
'denote-faces-prompt-current-name))
- (format "%s: " (or prompt-text "Select FILE"))))
+ (propertize default-directory 'face
'denote-faces-prompt-current-name))))
(input (completing-read
prompt
(denote--completion-table 'file relative-files)