unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: Round-tripping key definitions
Date: Sun, 14 Nov 2021 01:39:31 +0100	[thread overview]
Message-ID: <87r1bjh8os.fsf@gnus.org> (raw)
In-Reply-To: <jwvwnlc5bia.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sat, 13 Nov 2021 10:23:46 -0500")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> I thought I remembered somebody saying that that wasn't really feasible
>> (at least not on terminals)?  If it is, that'd be fantastic.
>
> And you believed that somebody?

I'm very gullible.

>>> Maybe one way to do that is to have a `function-key-map` fallback from
>>> `[?\C-i]`
>>> to `[TAB]` (so `?\C-i` and `tab` would be "equal partners" both of
>>> which default to falling back to the new `TAB` key).
>
> BTW, I haven't thought very hard about the impact in terms of
> compatibility with existing code.

Could you?

>> But are those the only ones?  Hm...  I guess?
>
> That's the question: for those four, the solution you propose is an
> incomplete solution to their problem, so if there aren't any others I'm
> not very favorable to the idea (at least not before we investigate more
> direct solutions (like the one I outlined) and conclude that we have to
> live with the current problem).

It's true that (key-description (kbd "C-m")) => "RET" is unsatisfactory,
but the hacky solution would basically fix this whenever we know which
keymap the "C-m" appears in (like in `C-h b' and the like).  So, yes,
it's incomplete, but it won't be very noticeable.

After poking around some more, I think those four keys are the indeed
the only ones that are problematic here.  SPC is OK, NUL and LFD aren't
used.

By the way, I found this:

(key-description (kbd "C-i")) => "TAB"
(key-description (kbd "C-M-i")) => "C-M-i"

That's probably a bug?  The last one should probably be "M-TAB"?

(equal (kbd "C-M-i") (kbd "M-TAB")) => t

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



  parent reply	other threads:[~2021-11-14  0:39 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
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 [this message]
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=87r1bjh8os.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).