emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: select yank via completion


From: Juri Linkov
Subject: Re: select yank via completion
Date: Sat, 21 Nov 2020 21:42:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>> So now a new patch let-binds (minibuffer-completing-file-name t)
>> around completing-read to allow inserting SPC, problem solved:
>
> Please don't, since we're not actually completing file names.
>
> I agree with Drew that we should probably just get rid of the SPC
> binding in minibuffer completions,

SPC can be an obstacle even in some completion styles
where words are separated by SPC.

> but until we do that you'll need
>
>     (minibuffer-with-setup-hook
>         (lambda ()
>           (use-local-map
>            (let ((map (make-sparse-keymap)))
>              (set-keymap-parent map (current-local-map))
>              (define-key map " " nil)
>              map)))
>       ...)

Yes, I thought so too that maybe better would be to use
minibuffer-with-setup-hook.  I tried this code, and it works well.

> or something similar.  We could/should arguably introduce some easier
> way to do that.  Maybe something like the patch below so you can just do
>
>     (minibuffer-with-setup-hook
>         (lambda () (setq-local minibuffer-SPC-completes nil))
>       ...)

The problem is that there is another self-inserting key that can be
used for text editing: '?' is bound to minibuffer-completion-help.
Maybe then the variable could be named e.g. minibuffer-self-insert?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]