mirror of
https://github.com/protesilaos/denote.git
synced 2026-09-15 09:46:24 -04:00
Revert "Make 'denote-{title,signature}-prompt' complete from its history"
This reverts commit 0d855bbf12.
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.0ac8@mx.google.com%3E>.
This commit is contained in:
parent
e200ff93af
commit
9f692cbbef
16
README.org
16
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
|
||||
|
|
|
|||
22
denote.el
22
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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue