unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Phil Sainty <psainty@orcon.net.nz>
Cc: Lars Ingebrigtsen <larsi@gnus.org>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: Round-tripping key definitions
Date: Sun, 14 Nov 2021 09:27:02 -0500	[thread overview]
Message-ID: <jwvfsryx1zj.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <f148ac9e8b4e9e1a19e68a9dc548dc06@webmail.orcon.net.nz> (Phil Sainty's message of "Sun, 14 Nov 2021 13:33:50 +1300")

>> And you believed that somebody?
> That somebody could have been me.  My understanding has always been that
> a terminal will send ASCII char 9 when you type either the TAB key or C-i
> (and similarly for the other special cases).

I'm not proposing to solve that problem magically.

I'm proposing to make the key names `C-i` and `TAB` distinct, such that
hitting `C-h c TAB` in a tty would/could tell the users something
like "TAB (translated from C-i) runs the command ...".

Then again, maybe we'd want to finally get rid of the conflation between
"control modifier + key" and "ASCII control char".  But that's harder
(because it affects ELisp source code, where `?\C-i` is 9 rather than
#x4000069, so either we keep `?\C-i` as 9 and introduce a new syntax
for "character i with a control modifier", or we change the value and
risk breaking some programs (tho maybe we can auto-fix the vast
majority with appropriate heuristics)).

[ BTW, I just noticed that `?\C-é` is 137, which seems like a plain bug.  ]

> In GUI environments I'm sure the combination of the Ctrl key and "i"
> can be recognised independently; but how could that work in terminals?

I'm not suggesting to solve this problem (BTW, it can be solved by
having the terminal send a different byte sequence for TAB and C-i,
which several terminals are already able to do, but that's a separate
issue from what is discussed here).


        Stefan




  reply	other threads:[~2021-11-14 14:27 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-13  4:58 Round-tripping key definitions Lars Ingebrigtsen
2021-11-13 14:43 ` Stefan Monnier
2021-11-13 14:50   ` Lars Ingebrigtsen
2021-11-13 15:23     ` Stefan Monnier
2021-11-14  0:33       ` Phil Sainty
2021-11-14 14:27         ` Stefan Monnier [this message]
2021-11-14 15:07           ` Andreas Schwab
2021-11-14 17:56             ` Stefan Monnier
2021-11-14 18:03           ` Lars Ingebrigtsen
2021-11-14 18:37             ` Stefan Monnier
2021-11-14 18:51               ` Lars Ingebrigtsen
2021-11-14 22:27                 ` Stefan Monnier
2021-11-15  5:48                   ` Lars Ingebrigtsen
2021-11-15  7:31                     ` Lars Ingebrigtsen
2021-11-15  8:21                       ` Lars Ingebrigtsen
2021-11-15 21:10                         ` Stefan Monnier
2021-11-16  7:41                           ` Lars Ingebrigtsen
2021-11-17  8:01                             ` Lars Ingebrigtsen
2021-11-16  4:06           ` Richard Stallman
2021-11-17 20:38             ` Stefan Monnier
2021-11-18  2:25               ` Po Lu
2021-11-18  2:48                 ` Stefan Monnier
2021-11-18  2:58                   ` Po Lu
2021-11-18 11:16                   ` Stefan Kangas
2021-11-18 12:31                     ` Po Lu
2021-11-19  4:44                 ` Richard Stallman
2021-11-18  9:08               ` Lars Ingebrigtsen
2021-11-14  0:39       ` Lars Ingebrigtsen
2021-11-14 14:09         ` Stefan Monnier
2021-11-15  4:53   ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvfsryx1zj.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --cc=psainty@orcon.net.nz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).