From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Mendler Newsgroups: gmane.emacs.devel Subject: Re: [elpa] externals/corfu 6572247 3/4: Bind [tab] and [return] Date: Sun, 27 Jun 2021 11:11:06 +0200 Message-ID: <3209a500-8654-2508-3b1a-34a73edc0053@daniel-mendler.de> References: <20210626095705.11804.96621@vcs0.savannah.gnu.org> <20210626095707.B514720D0A@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24326"; mail-complaints-to="usenet@ciao.gmane.io" To: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jun 27 11:12:22 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lxQpx-0006Bi-93 for ged-emacs-devel@m.gmane-mx.org; Sun, 27 Jun 2021 11:12:21 +0200 Original-Received: from localhost ([::1]:59926 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lxQpw-0001ua-B0 for ged-emacs-devel@m.gmane-mx.org; Sun, 27 Jun 2021 05:12:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43084) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lxQp8-00017b-H7 for emacs-devel@gnu.org; Sun, 27 Jun 2021 05:11:30 -0400 Original-Received: from server.qxqx.de ([2a01:4f8:121:346::180]:60747 helo=mail.qxqx.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lxQp6-0003Lm-Dz for emacs-devel@gnu.org; Sun, 27 Jun 2021 05:11:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de; s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:To:Subject:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=uEZ0nD45yEUqnlTzNHvldUyCrkQ1HvTh4LOappqbD10=; b=VXlGjC4508EH3TplZQ+wXJrMw2 y/ygoKBv/djGN8xqfOzqSFEai7382MsRTh0e+BrGEnznZCgGaafpmD1TmTPB/2SQ492DNOZqeXFyI +fFX5yek8UxwPFThOlJfVe2gLeyjPLR4X/p0s8tMJSNF7mL7errF5ZM7r/M3rwc87ric=; In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a01:4f8:121:346::180; envelope-from=mail@daniel-mendler.de; helo=mail.qxqx.de X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_20=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:271045 Archived-At: 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