From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Jean-Christophe Helary Newsgroups: gmane.emacs.help Subject: Re: Ctrl-[ ? Date: Fri, 7 Jun 2019 23:23:54 +0900 Message-ID: <1B9DC34D-12C1-45E3-9009-18759C1F6488@traduction-libre.org> References: <08AC8151-5911-40FA-8B20-818B839D00AB@traduction-libre.org> <86h892nk2g.fsf@zoho.eu> <9379C01B-80E3-49DD-B830-46CED773DC2C@traduction-libre.org> <83lfydrkde.fsf@gnu.org> <874l51q0s4.fsf@telefonica.net> <83ef45rdij.fsf@gnu.org> <7792DA18-B5EF-48A1-879C-7B2B94A0E1F2@traduction-libre.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="176754"; mail-complaints-to="usenet@blaine.gmane.org" To: Help Gnu Emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 07 17:11:32 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hZGWh-000jpQ-9l for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Jun 2019 17:11:31 +0200 Original-Received: from localhost ([::1]:48608 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZGWb-00038y-3r for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Jun 2019 11:11:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55425) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZFms-0007Iu-GN for help-gnu-emacs@gnu.org; Fri, 07 Jun 2019 10:24:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hZFmr-0003ng-7i for help-gnu-emacs@gnu.org; Fri, 07 Jun 2019 10:24:10 -0400 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]:49007) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hZFmn-0003as-5E for help-gnu-emacs@gnu.org; Fri, 07 Jun 2019 10:24:05 -0400 X-Originating-IP: 111.89.228.40 Original-Received: from [192.168.1.3] (pl32040.ag0304.nttpc.ne.jp [111.89.228.40]) (Authenticated sender: jean.christophe.helary@traduction-libre.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 717E4C0018 for ; Fri, 7 Jun 2019 14:24:00 +0000 (UTC) In-Reply-To: X-Mailer: Apple Mail (2.3445.104.11) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.70.183.198 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:120805 Archived-At: > On Jun 7, 2019, at 22:54, Noam Postavsky wrote: >=20 > On Fri, 7 Jun 2019 at 09:23, Jean-Christophe Helary > wrote: >=20 >> (define-key input-decode-map "\C-[" [C-left-bracket]) >=20 >> I still don't understand where that "left-bracket" comes from so if = you could explain that would be extra nice. >=20 > It's just an arbitrary symbol choice, you can choose a different one > if you like. >=20 > (define-key input-decode-map "\C-[" [C-open-square]) > (define-key global-map [C-open-square] 'forward-char) Ok, but the key here (no pun intended) is to use input-decode-map before = binding the thing, right ? I just checked the manual and that's a bit arcade to say the least, but = at least I know where the info is hidden now... > So if I understand correctly, what happens is that Emacs gets Ctrl+[ > from the windowing system, translates that into the ASCII ESC > character (aka 27, aka #x1B, aka ^[, aka \C-[). Then runs it through > input-decode-map which translates it to C-open-square like we told it > to. And then we can use C-open-square in keybindings as normal. Thank you again for your explanations. Jean-Christophe Helary ----------------------------------------------- http://mac4translators.blogspot.com @brandelune