unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [elpa] externals/denote 9f692cbbef: Revert "Make 'denote-{title, signature}-prompt' complete from its history"
       [not found] ` <20231025165755.64291C09BE7@vcs2.savannah.gnu.org>
@ 2023-10-25 17:21   ` Stefan Monnier
  2023-10-27  5:22     ` Protesilaos Stavrou
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2023-10-25 17:21 UTC (permalink / raw)
  To: Protesilaos Stavrou; +Cc: emacs-devel

>     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'.

Yes, it's a common problem, but for historical reasons there's
a reluctance to change the SPC binding in the default completion UI.
You can work around it with something like

    (minibuffer-with-setup-hook
        (lambda ()
          (use-local-map (let ((map (make-composed-keymap
                                     nil (current-local-map))))
                           (define-key map (kbd "SPC") nil)
                           map)))
      ...)

We've had discussions around this in the past but no resolution yet.
Another bug report requesting an easier way to do that may help.


        Stefan




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [elpa] externals/denote 9f692cbbef: Revert "Make 'denote-{title, signature}-prompt' complete from its history"
  2023-10-25 17:21   ` [elpa] externals/denote 9f692cbbef: Revert "Make 'denote-{title, signature}-prompt' complete from its history" Stefan Monnier
@ 2023-10-27  5:22     ` Protesilaos Stavrou
  2023-10-27 13:04       ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Protesilaos Stavrou @ 2023-10-27  5:22 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Wed, 25 Oct 2023 13:21:44 -0400
>
>>     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'.
>
> Yes, it's a common problem, but for historical reasons there's
> a reluctance to change the SPC binding in the default completion UI.
> You can work around it with something like
>
>     (minibuffer-with-setup-hook
>         (lambda ()
>           (use-local-map (let ((map (make-composed-keymap
>                                      nil (current-local-map))))
>                            (define-key map (kbd "SPC") nil)
>                            map)))
>       ...)

Thank you, Stefan! Are there any other cases like this one? Or am I safe
to proceed that way?

> We've had discussions around this in the past but no resolution yet.
> Another bug report requesting an easier way to do that may help.

What do you think is the solution here? Perhaps a function that wraps
completing-read in what you shared above? With a name like
'read-string-completion'?

In my case, I want to have something that starts out practically the
same as read-string but then completes against the given minibuffer
history while also accepting new strings.

-- 
Protesilaos Stavrou
https://protesilaos.com



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [elpa] externals/denote 9f692cbbef: Revert "Make 'denote-{title, signature}-prompt' complete from its history"
  2023-10-27  5:22     ` Protesilaos Stavrou
@ 2023-10-27 13:04       ` Stefan Monnier
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2023-10-27 13:04 UTC (permalink / raw)
  To: Protesilaos Stavrou; +Cc: emacs-devel

>> We've had discussions around this in the past but no resolution yet.
>> Another bug report requesting an easier way to do that may help.
> What do you think is the solution here?

Not completely sure, but probably some way to tell `completing-read`
that spaces are common in the set of completions, so the UI knows not to
bind SPC to a completion command.


        Stefan




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-10-27 13:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <169825307506.11873.2953281488302419157@vcs2.savannah.gnu.org>
     [not found] ` <20231025165755.64291C09BE7@vcs2.savannah.gnu.org>
2023-10-25 17:21   ` [elpa] externals/denote 9f692cbbef: Revert "Make 'denote-{title, signature}-prompt' complete from its history" Stefan Monnier
2023-10-27  5:22     ` Protesilaos Stavrou
2023-10-27 13:04       ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).