[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] emacs-25 d7084f2: Fix todo-mode use of minibuffer comp
From: |
Stephen Berman |
Subject: |
Re: [Emacs-diffs] emacs-25 d7084f2: Fix todo-mode use of minibuffer completion keymap (bug#23695). |
Date: |
Wed, 15 Jun 2016 17:09:53 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
On Wed, 15 Jun 2016 09:16:22 -0400 Stefan Monnier <address@hidden> wrote:
>>>> - (let ((map minibuffer-local-completion-map))
>>>> - (define-key map " " nil)
>>>> + (let ((minibuffer-local-completion-map
>>>> + (copy-keymap minibuffer-local-completion-map)))
>>>> + (define-key minibuffer-local-completion-map " " 'self-insert-command)
>>> Why bind it to `self-insert-command` rather than to nil?
>> Is that a general recommendation,
>> e.g. to make the `?' key insert `?' in the minibuffer also bind it to
>> nil?
>
> The question is: do you want to hide the "SPC is completion" binding, or
> do you want to force SPC to insert a space.
>
>> I guess that answers the question.)
>
> Right, IMO what we want here is to hide the "SPC is completion" binding.
> Also, the old code used nil (as can be seen in the chunk of patch still
> quoted above).
Ok. I suppose that's also the case for most or all of the other
packages that bind SPC to self-insert-command in the minibuffer, so they
should probably also be changed in due course.
>> Are you saying it is generally better to use the latter?
>
> Yes, it's more efficient.
>
>> If so, when is it better to use the former?
>
> Never. Copying is a bad idea.
Then shouldn't copy-keymap be obsoleted (or at least deprecated, also in
the documentation) and existing uses in Emacs changed?
I'll revert the key binding to nil. I assume it's also all right to
replace the use of copy-keymap by set-keymap-parent in emacs-25, since
copy-keymap was just introduced as a fix there by this commit, but I'll
wait for explicit approval (Eli, John W?).
Thanks.
Steve Berman
- Re: [Emacs-diffs] emacs-25 d7084f2: Fix todo-mode use of minibuffer completion keymap (bug#23695)., Stefan Monnier, 2016/06/14
- Re: [Emacs-diffs] emacs-25 d7084f2: Fix todo-mode use of minibuffer completion keymap (bug#23695)., Stephen Berman, 2016/06/15
- Re: [Emacs-diffs] emacs-25 d7084f2: Fix todo-mode use of minibuffer completion keymap (bug#23695)., Stefan Monnier, 2016/06/15
- Re: [Emacs-diffs] emacs-25 d7084f2: Fix todo-mode use of minibuffer completion keymap (bug#23695).,
Stephen Berman <=
- Re: [Emacs-diffs] emacs-25 d7084f2: Fix todo-mode use of minibuffer completion keymap (bug#23695)., Eli Zaretskii, 2016/06/15
- Re: [Emacs-diffs] emacs-25 d7084f2: Fix todo-mode use of minibuffer completion keymap (bug#23695)., John Wiegley, 2016/06/15
- Re: [Emacs-diffs] emacs-25 d7084f2: Fix todo-mode use of minibuffer completion keymap (bug#23695)., Stephen Berman, 2016/06/15
- Re: [Emacs-diffs] emacs-25 d7084f2: Fix todo-mode use of minibuffer completion keymap (bug#23695)., Noam Postavsky, 2016/06/15
- Re: [Emacs-diffs] emacs-25 d7084f2: Fix todo-mode use of minibuffer completion keymap (bug#23695)., Stephen Berman, 2016/06/16
- Generalizing make-composed-keymap (was: [Emacs-diffs] emacs-25 d7084f2: Fix todo-mode use of minibuffer completion keymap (bug#23695).), Stefan Monnier, 2016/06/15
- Re: Generalizing make-composed-keymap, Clément Pit--Claudel, 2016/06/15
- Re: Generalizing make-composed-keymap, Stefan Monnier, 2016/06/15
- Re: [Emacs-diffs] emacs-25 d7084f2: Fix todo-mode use of minibuffer completion keymap (bug#23695)., Stefan Monnier, 2016/06/15