[vimpulse] Bug: TAB doesn't autocomplete in minibuffer.

Alessandro Piras laynor at gmail.com
Fri Jul 2 18:28:29 CEST 2010


What does that hook do exactly? I may be interested :-)


On 2 July 2010 16:57, Štěpán Němec <stepnem at gmail.com> wrote:

> On Fri, Jul 02, 2010 at 04:55:04PM +0200, Vegard Øye wrote:
> > On 2010-07-02 14:17, Alessandro Piras wrote:
> >
> > > vimpulse-misc-keybindings:564
> > > ---
> > > (global-set-key [tab] (or (key-binding [tab]) (key-binding "\C-i")))
> > > ---
> > > I guess this doesn't take into account mode changes, i.e., it sets
> > > the tab key and when the binding changes (when changing to a minor
> > > or major mode that sets the tab key) the tab key still does what it
> > > was set to with the global set key.
> >
> > It depends. If the mode does indeed bind the Tab /key/ (i.e., [tab],
> > as in (define-key map [tab] 'cmd), it will work as expected. But if
> > the mode binds the Tab /character/ (i.e., C-i, also known as "\t"),
> > only the C-i key is bound, because the code above breaks the bond
> > between [tab] and C-i.
> >
> > In the words of the Emacs manual (my emphasis):
> >
> >     <TAB>, <RET>, <BS>, <LFD>, <ESC> and <DEL> started out as names
> >     for certain ASCII control characters, used so often that they have
> >     special keys of their own. For instance, <TAB> was another name
> >     for C-i. [...] If you do not want to distinguish between (for
> >     example) <TAB> and C-i, make just one binding, for the ASCII
> >     character <TAB> (octal code 011). IF YOU DO WANT TO DISTINGUISH,
> >     MAKE ONE BINDING FOR THIS ASCII CHARACTER, AND ANOTHER FOR THE
> >     "FUNCTION KEY" TAB.
>
> ... with the the caveat that in the terminal (emacs -nw) there is no
> such distinction (as the section you quote also mentions).
>
> In any case, we should IMO most definitely NOT mess with global map at
> all. Currently the only exception seems to be
>
> vimpulse-misc-keybindings.el:580:
> (global-set-key "\C-c\C-o" 'open-line)) ; some may miss this command
>
> IIUC, it can be safely removed, as C-o is only rebound in
> `viper-vi-basic-map'.
>
> >
> >
> http://www.gnu.org/software/emacs/manual/html_node/emacs/Named-ASCII-Chars.html
> >
> > Before the distinction is made, one can bind Tab by binding C-i.
> > After the distinction is made, one can bind Tab only by binding [tab].
> >
> > Minibuffer completion breaks because it binds Tab the first way.
> > Commit [ee2d1f9527] fixes this.
>
> Somewhat off-topic, I've found Viper's messing with minibuffer
> intolerable, have put the following in my init file:
>
> (remove-hook 'minibuffer-setup-hook 'viper-minibuffer-setup-sentinel)
>
> ... and live happily ever since ;-)
>
> (I also set viper-vi-style-in-minibuffer to nil before, don't remember
> if it still matters after removing the hook.)
>
> Štěpán
>
> _______________________________________________
> implementations-list mailing list
> implementations-list at lists.ourproject.org
> https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
>


More information about the implementations-list mailing list