branch: externals/consult-denote
commit 5800b4d9e74b362fdca0f2986a7d34f65ed4bd41
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>

    Make prompt text of consult-denote-file-prompt be consistent with 
denote-file-prompt
    
    This is in light of commit dda6c5a in denote.git that I just made there.
    
    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.
---
 consult-denote.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/consult-denote.el b/consult-denote.el
index 13fc309416..b62888b9e9 100644
--- a/consult-denote.el
+++ b/consult-denote.el
@@ -130,7 +130,11 @@ Return the absolute path to the matching file."
                           (denote-directory-files
                            (or denote-file-prompt-use-files-matching-regexp 
files-matching-regexp)
                            :omit-current nil nil has-identifier)))
-         (prompt (format "%s in %s: " (or prompt-text "Select FILE") 
default-directory))
+         (prompt (if single-dir-p
+                     (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))))
          (input (consult--read
                  (denote--completion-table 'file relative-files)
                  :state (consult--file-preview)

Reply via email to