From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Francis Belliveau Newsgroups: gmane.emacs.help Subject: Re: Ctrl-[ ? Date: Tue, 11 Jun 2019 19:05:14 -0400 Message-ID: <8A953A06-0B89-4026-8801-602C0D8B2CA1@comcast.net> 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> <87zhmto6fa.fsf@telefonica.net> <20190607163017.GA32029@tuxteam.de> <96B116FC-8007-4C42-9AE6-585530D0C76E@comcast.net> <87muisor2h.fsf@telefonica.net> <63F9D100-CD25-445B-8184-93A25DB0FC38@comcast.net> <874l4zoiz6.fsf@telefonica.net> 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="46101"; mail-complaints-to="usenet@blaine.gmane.org" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 12 01:06:12 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 1hapqF-000Bpx-P3 for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Jun 2019 01:06:11 +0200 Original-Received: from localhost ([::1]:55702 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hapqE-0004uY-8N for geh-help-gnu-emacs@m.gmane.org; Tue, 11 Jun 2019 19:06:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53356) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1happX-0004uR-Uv for help-gnu-emacs@gnu.org; Tue, 11 Jun 2019 19:05:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1happQ-0008UY-5I for help-gnu-emacs@gnu.org; Tue, 11 Jun 2019 19:05:22 -0400 Original-Received: from resqmta-ch2-10v.sys.comcast.net ([2001:558:fe21:29:69:252:207:42]:54082) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1happP-0008St-FM for help-gnu-emacs@gnu.org; Tue, 11 Jun 2019 19:05:19 -0400 Original-Received: from resomta-ch2-16v.sys.comcast.net ([69.252.207.112]) by resqmta-ch2-10v.sys.comcast.net with ESMTP id aguyh32248ekNappMhH9St; Tue, 11 Jun 2019 23:05:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1560294316; bh=keqQrPeB/6Gl8EGjOuUXJHULnRuCuTCfKhX+a7hG5V0=; h=Received:Received:From:Content-Type:Mime-Version:Subject:Date:To: Message-Id; b=heamYvnzIykhKB54qTjNkz2EFqrKhHKFLf4HTZ/lXY4ctA/KUeuyOUdUyaujR8iDm UzKmcEpal8yY3LJu+YwGS/pKZHm/D6+XjemhgEVwz+ZsYksY8rcfIb3WiCiSWxrXvV a9OE6oDtdQeE/EqnFFXzqjmLjVIXQe6QVsPpx1O7gH6LyFSRNqj+7q1qFiUFMSnta1 sxaik9byI6Ap9FqNzh2NNnUNeJiQFSM4mowLwzuSsJFLXSf2VfStoJqLlUYOzGlSIP DKch5s/NadCWbtWqQeo5l+sdxcYrIZaH2uErC3B+PMjo6LhuOGBNAQgoZz9yqxotjS z9knfr7vHNZEQ== Original-Received: from [IPv6:2601:190:580:9c44:28d3:8d1e:ef23:9c40] ([IPv6:2601:190:580:9c44:28d3:8d1e:ef23:9c40]) by resomta-ch2-16v.sys.comcast.net with ESMTPSA id appLhlavAMfixappMhhb6d; Tue, 11 Jun 2019 23:05:16 +0000 X-Xfinity-VMeta: sc=0;st=legit In-Reply-To: X-Mailer: Apple Mail (2.3445.104.11) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:558:fe21:29:69:252:207:42 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:120917 Archived-At: > On Jun 8, 2019, at 20:25, Stefan Monnier = wrote: >=20 >> You can monitor those low-level events. The OS usually provides some >> facilities to translate those events to higher level events. I don't >> know at which level Emacs works for GUIs, probably the later. But = that's >> irrelevant, because Emacs can detect equally well C-[ as C-t, because >=20 > Indeed, as my sample patch shows. >=20 > Currently, the core of the "hardcoding" happens in `make_ctrl_char` = (in > src/keyboard.c) where we compute an "event with control modifier": > rather than just set to `control` bit on integer events (Emacs > distinguishes events made of "a character plus some modifiers", which > are represented as integers where some bits are used for the = modifiers, > from non-character events like `tab`, `next`, `f1, etc which are > represented as symbols instead), we sometimes set the control bit and > sometimes change the char into an "ASCII control char". That's where > "control plus [" is turned into the "ASCII C-[" char which is also > known as ESC (aka code 27). >=20 > The core of my patch disables this special case, so instead we always > just set the "control modifier bit" (which is bit 26). >=20 > The hard work comes afterwards, because we then need to figure out = what > to do with all the parts of Emacs where we previously used code 1 (the > ASCII C-a) instead of code 97 + 2^26 (the combination of the letter = `a` > and the control modifier bit). >=20 [snip] Thank you Stefan for the enlightenment. I did say that I have never = looked into the source code. Given what you say, I am curious why C-h is not known as Backspace. = Whatever special handling is done there could be able to be applied to = C- and C-[. Another possibility is that since your patch was applied to all keys, = maybe it should only check for "special" keys, like these two. That = would certainly reduce side effects like you mention. Either way the next step would be to make people like me happy and = provide a default binding that undoes the patch. =20 Since this discussion began, I started taking notice of how often I use = these short-cuts. I actually caught myself using the sequence C-pC-i = today to fix indentation on a couple of lines. I also seem to use = C-[C-\ a lot because it eliminates the need for me to change = modifier-fingering. Whatever you decide I would hope that those of us who frequently use = these mappings will not need to add a lot of new mappings after upgrade = in order to fix back what we are used to doing. Just my opinion. Fran=