branch: externals/denote
commit 9f692cbbef5ede45dc3564060d16971d875ac9bf
Author: Protesilaos Stavrou <i...@protesilaos.com>
Commit: Protesilaos Stavrou <i...@protesilaos.com>

    Revert "Make 'denote-{title,signature}-prompt' complete from its history"
    
    This reverts commit 0d855bbf1264347a16ce54d707af3698a4ec8eb6.
    
    The idea to have completion is good, though this way it breaks with
    the default minibuffer setup because SPC tries to complete the
    inputted text. Thus the user cannot type freely. This does not happen
    with packages that enhance the minibuffer User Interface, such as
    'vertico'.
    
    Thanks to Suhail Singh for reporting this bug:
    
<https://lists.sr.ht/~protesilaos/denote/%3C652d82c0.c80a0220.e6282.dc47%40mx.google.com%3E#%3c65392fa6.050a0220.da61c.0...@mx.google.com%3E>.
---
 README.org | 16 +++++-----------
 denote.el  | 22 ++++++----------------
 2 files changed, 11 insertions(+), 27 deletions(-)

diff --git a/README.org b/README.org
index e3e27ee311..5aa72082a3 100644
--- a/README.org
+++ b/README.org
@@ -3844,13 +3844,10 @@ might change them without further notice.
   and apply ~denote-sluggify-signature~ to it. With optional
   =DEFAULT-SIGNATURE= use it as the default minibuffer value. With
   optional =PROMPT-TEXT= use it in the minibuffer instead of the
-  default prompt. Previous inputs at this prompt are available for
-  minibuffer completion. Consider ~savehist-mode~ to persist
-  minibuffer histories between sessions. [ The =DEFAULT-SIGNATURE= and
-  =PROMPT-TEXT= arguments, as well as previous input completion, are
-  added as part of {{{development-version}}}. Same for the parsing
-  application of ~denote-sluggify-signature~ to the user input (this
-  was always the intent). ]
+  default prompt. [ The =DEFAULT-SIGNATURE= and =PROMPT-TEXT=
+  arguments are added as part of {{{development-version}}}. Same for
+  the parsing application of ~denote-sluggify-signature~ to the user
+  input (this was always the intent). ]
 
 #+findex: denote-file-prompt
 + Function ~denote-file-prompt~ :: Prompt for file with identifier in
@@ -3874,10 +3871,7 @@ might change them without further notice.
 + Function ~denote-title-prompt~ :: Read file title for ~denote~. With
   optional =DEFAULT-TITLE= use it as the default value. With optional
   =PROMPT-TEXT= use it in the minibuffer instead of the generic
-  prompt. Previous inputs at this prompt are available for minibuffer
-  completion. Consider ~savehist-mode~ to persist minibuffer histories
-  between sessions. [ The =PROMPT-TEXT= and completion of previous
-  inputs are part of {{{development-version}}}. ]
+  prompt. [ The =PROMPT-TEXT= is part of {{{development-version}}}. ]
 
 #+vindex: denote-title-prompt-current-default
 + Variable ~denote-title-prompt-current-default~ :: Currently bound
diff --git a/denote.el b/denote.el
index 6c70d091cd..1debafb772 100644
--- a/denote.el
+++ b/denote.el
@@ -1763,16 +1763,11 @@ back to nil.")
   "Read file title for `denote'.
 With optional DEFAULT-TITLE use it as the default value.  With
 optional PROMPT-TEXT use it in the minibuffer instead of the
-generic prompt.
-
-Previous inputs at this prompt are available for minibuffer
-completion.  Consider `savehist-mode' to persist minibuffer
-histories between sessions."
+generic prompt."
   (let ((def (or default-title denote-title-prompt-current-default)))
-    (completing-read
+    (read-string
      (format-prompt (or prompt-text "File title") def)
-     denote--title-history
-     nil nil nil 'denote--title-history def)))
+     nil 'denote--title-history def)))
 
 (defvar denote--file-type-history nil
   "Minibuffer history of `denote-file-type-prompt'.")
@@ -1858,16 +1853,11 @@ packages such as `marginalia' and `embark')."
   "Prompt for signature string and apply `denote-sluggify-signature' to it.
 With optional DEFAULT-SIGNATURE use it as the default minibuffer
 value.  With optional PROMPT-TEXT use it in the minibuffer
-instead of the default prompt.
-
-Previous inputs at this prompt are available for minibuffer
-completion.  Consider `savehist-mode' to persist minibuffer
-histories between sessions."
+instead of the default prompt."
   (denote-sluggify-signature
-   (completing-read
+   (read-string
     (format-prompt (or prompt-text "Provide signature") nil)
-    denote--signature-history
-    nil nil nil 'denote--signature-history default-signature)))
+    nil 'denote--signature-history default-signature)))
 
 ;;;;; Convenience commands as `denote' variants
 

Reply via email to