* Re: [elpa] externals/corfu 6572247 3/4: Bind [tab] and [return]
[not found] ` <20210626095707.B514720D0A@vcs0.savannah.gnu.org>
@ 2021-06-26 14:02 ` Stefan Monnier
2021-06-27 9:11 ` Daniel Mendler
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2021-06-26 14:02 UTC (permalink / raw)
To: emacs-devel; +Cc: Daniel Mendler
> + (define-key map [tab] #'corfu-complete)
Please avoid binding `tab`: the `tab` event (only generated under GUIs)
is supposed to be remapped to the TAB char-event (aka `C-i`) and this is
what you should bind to if you want your binding to work both under ttys
and GUIs.
More importantly, if you bind to `tab` than this binding will take
precedence over all other bindings to TAB, even those in keymaps that
have higher precedence.
The same holds for `return` vs RET, and `escape` vs ESC.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [elpa] externals/corfu 6572247 3/4: Bind [tab] and [return]
2021-06-26 14:02 ` [elpa] externals/corfu 6572247 3/4: Bind [tab] and [return] Stefan Monnier
@ 2021-06-27 9:11 ` Daniel Mendler
2021-06-27 14:15 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Mendler @ 2021-06-27 9:11 UTC (permalink / raw)
To: Stefan Monnier, emacs-devel
On 6/26/21 4:02 PM, Stefan Monnier wrote:
>> + (define-key map [tab] #'corfu-complete)
>
> Please avoid binding `tab`: the `tab` event (only generated under GUIs)
> is supposed to be remapped to the TAB char-event (aka `C-i`) and this is
> what you should bind to if you want your binding to work both under ttys
> and GUIs.
>
> More importantly, if you bind to `tab` than this binding will take
> precedence over all other bindings to TAB, even those in keymaps that
> have higher precedence.
>
> The same holds for `return` vs RET, and `escape` vs ESC.
Hello Stefan,
I am aware of the unfortunate implications of these bindings.
Originally I avoided these bindings for the exact reasons you mention
and I hoped I could do without those (only binding RET/TAB and
remappings). However I have to use these keys since Org-mode seems to
override these keys too. Otherwise my keymap will not take precedence
over the Org-mode keymap.
Daniel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [elpa] externals/corfu 6572247 3/4: Bind [tab] and [return]
2021-06-27 9:11 ` Daniel Mendler
@ 2021-06-27 14:15 ` Stefan Monnier
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2021-06-27 14:15 UTC (permalink / raw)
To: Daniel Mendler; +Cc: emacs-devel
> remappings). However I have to use these keys since Org-mode seems to
> override these keys too.
Please report this as a bug.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-27 14:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20210626095705.11804.96621@vcs0.savannah.gnu.org>
[not found] ` <20210626095707.B514720D0A@vcs0.savannah.gnu.org>
2021-06-26 14:02 ` [elpa] externals/corfu 6572247 3/4: Bind [tab] and [return] Stefan Monnier
2021-06-27 9:11 ` Daniel Mendler
2021-06-27 14:15 ` 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).