From: Drew Adams <drew.adams@oracle.com>
To: "rms@gnu.org" <rms@gnu.org>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: RE: [External] : New key binding syntax
Date: Wed, 10 Nov 2021 17:24:34 +0000 [thread overview]
Message-ID: <SJ0PR10MB5488D01FA311A801D0C9DDA3F3939@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <E1mkfKk-0006cm-Ne@fencepost.gnu.org>
(Thanks for considering this.)
> I agree with your points 1, 2, 4, 5 and 6.
>
> > 7. I'm in favor of letting `kbd' and Help descriptions
> > drop the use of angle brackets altogether.
>
> I agree that that would be good -- provided no ambiguity results.
> Does anyone see a concrete problem with this?
That's my question too. As I say, I haven't
run into any problem. And I've asked for
counter-examples.
The place where we treat things specially is
for the ASCII control keys that have names
(aka abbreviations): NUL, RET, LFD, ESC, SPC,
and DEL. And, IMO, TAB (see bug #12535).
Other that handling of those names specially
(which we already do in `edmacro-parse-keys',
and which is carried over into the no-angles
case by naked.el), I think there is nothing
special. `foobar' is handled just as is
`<foobar>', and there can't be any problem.
[We could even look into the possibility of
"function" key names that include more chars
than what we accept now. That might require
some finessing (dunno). E.g., if we allowed
`<' and `>' then things get interesting (not
in a good way): `<<foo>>', `foo', `<foo>',
`foo>',...]
> > 3. Personally, I don't feel a need to allow the
> > argument to `kbd' to be used on its own (e.g., passed
> > to `define-key" or its replacement), in place of using
> > (kbd ARG) - let alone feel a need to prescribe that.
>
> To allow the new syntax in arguments to old functions such as
> `define-key' would be desirable if it doesn't cause problems.
> But I think it would lead to incompatibilities or conflicts,
> where an argument has one meaning as a key sequence (old style)
> and another as an argument to `kbd', so I think we can't do it.
I agree. And I don't think anything is gained
by being able to write (define-key "C-f" ...)
instead of (define-key (kbd "C-f") ...). And
likewise for any replacement/alternative for
`define-key'. I think it makes a lot of sense
to continue to use an envelope such as (kbd...).
That was my point #3. It counters suggestions
that we drop `kbd' (or another such name) as an
envelope, and we just use its (string) argument
directly in `define-key' (or whatever replaces
`define-key').
> I suggest defining new functions to replace
> `define-key' and friends, that will take a
> new-style key sequence as argument and will
> NOT accept an old-style key sequence.
What do you mean by new-style and old-style?
Are you talking, as I was above, about the
proposal to get rid of using `kbd' (or other
name), and just using strings: "C-f" instead
of (kbd "C-f")? Or are you talking about
something else?
> > \"S o m\" is _not_ a key sequence. It's not a
> > "sequence of the keys 'S', 'o' and 'm'".
>
> I can't make head or tail of that. Why the
> backslashes before those doublequotes?
Ask Lars. He's the one who wrote that, in
the doc-string text you cited. Presumably
those backslashes were just escaping the `"'
chars in the doc string. But since you kept
them in the doc-string text that you quoted
and asked us to look at, I kept them also.
But my point there was not about that, at
all. My point was that a key sequence is a
sequence of keys, whereas a notation "S o m"
is a key-sequence _description_.
That's all. We should be clear about that
distinction, whether (1) talking among
ourselves about what syntax to use/allow or
(2) talking to users in doc strings.
(Please read again what I said about this.)
> With the default Emacs key bindings, S o m is not a valid
> key sequence, because S is not a prefix key.
> But it COULD be a valid key sequence if you defined S
> as a prefix key, then defined S o as a prefix key.
Yes, of course. Presumably in the case cited
(in Lars's doc string), "S o m" would be a
(description of) a valid key sequence, with
both `S' and `o' being defined as prefix keys.
next prev parent reply other threads:[~2021-11-10 17:24 UTC|newest]
Thread overview: 320+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20211004081724.6281.11798@vcs0.savannah.gnu.org>
[not found] ` <20211004081726.AB24621048@vcs0.savannah.gnu.org>
2021-10-04 8:56 ` master 192f935 1/3: Add 'define-keymap' and 'defvar-keymap' Lars Ingebrigtsen
2021-10-04 9:42 ` Adam Porter
2021-10-04 10:13 ` Lars Ingebrigtsen
2021-10-10 7:40 ` Madhu
2021-10-19 18:02 ` Jonas Bernoulli
2021-10-19 18:18 ` Change indentation of keyword lists/arrays Lars Ingebrigtsen
2021-10-20 16:39 ` Juri Linkov
2021-10-20 19:02 ` Tassilo Horn
2021-10-21 3:02 ` Lars Ingebrigtsen
2021-10-21 3:59 ` [External] : " Drew Adams
2021-10-04 13:06 ` master 192f935 1/3: Add 'define-keymap' and 'defvar-keymap' Stefan Monnier
2021-10-04 13:09 ` Lars Ingebrigtsen
2021-10-04 13:14 ` Stefan Monnier
2021-10-04 13:44 ` Lars Ingebrigtsen
2021-10-04 14:34 ` Lars Ingebrigtsen
2021-10-04 16:17 ` Stefan Monnier
2021-10-05 6:31 ` Lars Ingebrigtsen
[not found] ` <20211004081727.4F24921048@vcs0.savannah.gnu.org>
2021-10-12 12:47 ` master 859190f 2/3: Convert some keymaps to defvar-keymap Stefan Kangas
2021-10-12 13:00 ` Lars Ingebrigtsen
2021-10-12 13:18 ` Stefan Kangas
2021-10-12 13:22 ` Lars Ingebrigtsen
2021-10-12 14:24 ` Stefan Kangas
2021-10-12 20:22 ` Lars Ingebrigtsen
2021-10-12 20:32 ` Lars Ingebrigtsen
2021-10-12 21:34 ` Stefan Kangas
2021-10-12 23:23 ` Lars Ingebrigtsen
2021-10-12 23:40 ` Lars Ingebrigtsen
2021-10-13 3:18 ` Moving kbd to subr.el Stefan Kangas
2021-10-13 11:10 ` Lars Ingebrigtsen
2021-10-13 12:31 ` Eli Zaretskii
2021-10-13 12:42 ` Stefan Monnier
2021-10-13 14:26 ` T.V Raman
2021-10-13 15:01 ` Stefan Kangas
2021-10-13 15:03 ` Stefan Kangas
2021-10-13 16:01 ` T.V Raman
2021-10-13 15:11 ` T.V Raman
2021-10-13 12:50 ` Stefan Kangas
2021-10-13 13:28 ` Eli Zaretskii
2021-10-13 13:33 ` Stefan Kangas
2021-10-13 22:28 ` Stefan Kangas
2021-10-13 22:45 ` Lars Ingebrigtsen
2021-10-13 22:54 ` Lars Ingebrigtsen
2021-10-14 7:23 ` Eli Zaretskii
2021-10-14 11:50 ` Stefan Kangas
2021-10-14 11:56 ` Eli Zaretskii
2021-10-14 12:06 ` Lars Ingebrigtsen
2021-10-14 20:28 ` Stefan Kangas
2021-10-14 20:55 ` Lars Ingebrigtsen
2021-10-14 21:04 ` Stefan Kangas
2021-10-14 21:13 ` Lars Ingebrigtsen
2021-10-15 2:07 ` Stefan Kangas
2021-10-15 10:28 ` Lars Ingebrigtsen
2021-10-15 11:05 ` Eli Zaretskii
2021-10-15 11:10 ` Eli Zaretskii
2021-10-15 11:34 ` Andreas Schwab
2021-10-15 12:31 ` Lars Ingebrigtsen
2021-10-15 12:39 ` Lars Ingebrigtsen
2021-10-15 13:32 ` Stefan Monnier
2021-10-15 14:04 ` Lars Ingebrigtsen
2021-10-15 14:44 ` Stefan Kangas
2021-10-15 16:05 ` Stefan Monnier
2021-10-15 16:31 ` T.V Raman
2021-10-15 11:26 ` Lars Ingebrigtsen
2021-10-16 13:48 ` Lars Ingebrigtsen
2021-10-16 14:33 ` Stefan Kangas
2021-10-16 15:55 ` Lars Ingebrigtsen
2021-10-17 18:54 ` Lars Ingebrigtsen
2021-10-17 19:32 ` Gregory Heytings
2021-10-17 19:39 ` Eli Zaretskii
2021-10-17 19:42 ` Gregory Heytings
2021-10-17 19:58 ` Lars Ingebrigtsen
2021-10-18 11:41 ` Eli Zaretskii
2021-10-18 11:52 ` Gregory Heytings
2021-10-18 13:01 ` Eli Zaretskii
2021-10-18 13:07 ` Gregory Heytings
2021-10-18 12:40 ` Stefan Monnier
2021-10-20 6:47 ` Richard Stallman
2021-10-20 7:48 ` Lars Ingebrigtsen
2021-10-20 13:18 ` Stefan Kangas
2021-10-21 2:52 ` Lars Ingebrigtsen
2021-10-21 3:36 ` Stefan Kangas
2021-10-21 3:39 ` Lars Ingebrigtsen
2021-10-21 4:07 ` Stefan Kangas
2021-10-21 4:37 ` Lars Ingebrigtsen
2021-10-21 4:58 ` [External] : " Drew Adams
2021-10-20 14:21 ` T.V Raman
2021-10-21 2:53 ` Lars Ingebrigtsen
2021-10-21 14:19 ` T.V Raman
2021-10-20 18:51 ` Philip Kaludercic
2021-10-21 2:53 ` Lars Ingebrigtsen
2021-10-21 13:40 ` Philip Kaludercic
2021-10-22 14:20 ` Lars Ingebrigtsen
2021-10-22 14:57 ` Philip Kaludercic
2021-10-22 15:02 ` Lars Ingebrigtsen
2021-10-22 15:06 ` Philip Kaludercic
2021-10-22 15:10 ` Lars Ingebrigtsen
2021-10-22 18:16 ` Philip Kaludercic
2021-10-22 18:18 ` Lars Ingebrigtsen
2021-10-23 23:29 ` Richard Stallman
2021-10-24 6:10 ` Eli Zaretskii
2021-10-26 3:01 ` Richard Stallman
2021-10-24 13:24 ` Lars Ingebrigtsen
2021-10-24 18:10 ` Corwin Brust
2021-10-24 18:42 ` Lars Ingebrigtsen
2021-10-25 16:06 ` Corwin Brust
2021-10-25 16:10 ` Philip Kaludercic
2021-10-27 14:41 ` Richard Stallman
2021-10-28 12:19 ` Richard Stallman
2021-10-28 12:25 ` Lars Ingebrigtsen
2021-10-30 6:53 ` Richard Stallman
2021-10-30 12:36 ` Lars Ingebrigtsen
2021-10-31 2:39 ` Richard Stallman
2021-10-31 14:57 ` Lars Ingebrigtsen
2021-11-02 3:54 ` New key binding syntax Richard Stallman
2021-11-02 11:08 ` John Yates
2021-11-04 2:36 ` Richard Stallman
2021-11-04 9:37 ` Robert Pluim
2021-11-04 17:09 ` Lars Ingebrigtsen
2021-11-04 22:46 ` John Yates
2021-11-04 22:48 ` Lars Ingebrigtsen
2021-11-04 22:53 ` John Yates
2021-11-05 2:25 ` Lars Ingebrigtsen
2021-11-05 12:21 ` John Yates
2021-11-05 13:45 ` Lars Ingebrigtsen
2021-11-06 13:52 ` John Yates
2021-11-05 3:57 ` Richard Stallman
2021-11-05 5:41 ` Alexandre Garreau
2021-11-06 3:20 ` Richard Stallman
2021-11-02 12:10 ` Dmitry Gutov
2021-11-04 2:36 ` Richard Stallman
2021-11-02 16:22 ` Alexandre Garreau
2021-11-04 2:33 ` Richard Stallman
2021-11-04 8:53 ` Yuri Khan
2021-11-05 6:08 ` Alexandre Garreau
2021-11-05 8:56 ` Yuri Khan
2021-11-05 9:13 ` Alexandre Garreau
2021-11-05 10:03 ` Yuri Khan
2021-11-05 11:04 ` Alexandre Garreau
2021-11-05 12:02 ` Yuri Khan
2021-11-06 3:20 ` Richard Stallman
2021-11-05 5:32 ` Alexandre Garreau
2021-11-07 4:25 ` Richard Stallman
2021-11-07 4:48 ` Emanuel Berg via Emacs development discussions.
2021-11-08 23:50 ` [External] : " Drew Adams
2021-11-10 4:35 ` Richard Stallman
2021-11-10 14:53 ` Stefan Kangas
2021-11-10 17:24 ` Drew Adams
2021-11-13 4:10 ` Richard Stallman
2021-11-13 18:47 ` Drew Adams
2021-11-16 4:05 ` Richard Stallman
2021-11-16 6:21 ` Alexandre Garreau
2021-11-18 3:52 ` Richard Stallman
2021-11-18 5:01 ` Yuri Khan
2021-11-18 14:10 ` Alexandre Garreau
2021-11-18 14:59 ` Yuri Khan
2021-11-18 15:22 ` Eli Zaretskii
2021-11-18 15:39 ` Yuri Khan
2021-11-18 16:50 ` Eli Zaretskii
2021-11-18 15:32 ` Alexandre Garreau
2021-11-18 16:20 ` Yuri Khan
2021-11-18 16:53 ` Eli Zaretskii
2021-11-18 21:13 ` Alexandre Garreau
2021-11-18 11:05 ` Alexandre Garreau
2021-11-18 11:31 ` Stefan Kangas
2021-11-19 4:44 ` Richard Stallman
2021-11-19 6:05 ` Alexandre Garreau
2021-11-19 6:53 ` Po Lu
2021-11-19 7:40 ` Eli Zaretskii
2021-11-19 11:33 ` Alexandre Garreau
2021-11-19 12:43 ` Eli Zaretskii
2021-11-19 12:48 ` Alexandre Garreau
2021-11-16 16:25 ` Drew Adams
2021-11-10 17:24 ` Drew Adams [this message]
2021-10-17 19:55 ` Moving kbd to subr.el Lars Ingebrigtsen
2021-10-17 21:20 ` Gregory Heytings
2021-10-18 6:02 ` Lars Ingebrigtsen
2021-10-18 12:46 ` Gregory Heytings
2021-10-18 13:15 ` Lars Ingebrigtsen
2021-10-18 13:50 ` Gregory Heytings
2021-10-18 15:50 ` Stefan Monnier
2021-10-18 16:03 ` Gregory Heytings
2021-10-18 13:53 ` Stefan Kangas
2021-10-18 13:59 ` Lars Ingebrigtsen
2021-10-18 14:44 ` [External] : " Drew Adams
2021-10-18 15:34 ` Stefan Kangas
2021-10-18 15:53 ` Drew Adams
2021-10-18 15:53 ` Stefan Monnier
2021-10-18 15:58 ` Lars Ingebrigtsen
2021-10-18 16:33 ` Stefan Monnier
2021-10-18 20:40 ` Stefan Kangas
2021-10-18 22:26 ` Stefan Monnier
2021-10-19 2:31 ` Eli Zaretskii
2021-10-19 2:30 ` Lars Ingebrigtsen
2021-10-19 7:02 ` Juri Linkov
2021-10-19 7:48 ` Gregory Heytings
2021-10-19 10:46 ` Philip Kaludercic
2021-10-19 13:08 ` Gregory Heytings
2021-10-19 14:48 ` [External] : " Drew Adams
2021-10-19 17:10 ` Stefan Kangas
2021-10-19 17:51 ` Drew Adams
2021-10-19 18:06 ` Drew Adams
2021-10-20 22:34 ` Richard Stallman
2021-10-20 22:34 ` Richard Stallman
2021-10-22 3:29 ` Po Lu
2021-10-19 12:34 ` Stefan Monnier
2021-10-19 13:38 ` Lars Ingebrigtsen
2021-10-19 13:57 ` Stefan Kangas
2021-10-19 14:07 ` Lars Ingebrigtsen
2021-10-19 14:13 ` Stefan Kangas
2021-10-19 14:16 ` Lars Ingebrigtsen
2021-10-19 14:25 ` Stefan Kangas
2021-10-19 14:31 ` Lars Ingebrigtsen
2021-10-19 15:03 ` Robert Pluim
2021-10-19 14:56 ` Andreas Schwab
2021-10-19 14:45 ` Stefan Monnier
2021-10-19 15:09 ` Lars Ingebrigtsen
2021-10-19 19:07 ` Lars Ingebrigtsen
2021-10-19 19:00 ` Howard Melman
2021-10-19 20:53 ` T.V Raman
2021-10-19 20:59 ` Lars Ingebrigtsen
2021-10-19 21:50 ` Dmitry Gutov
2021-10-20 22:37 ` Richard Stallman
2021-10-21 2:54 ` Lars Ingebrigtsen
2021-10-20 1:54 ` T.V Raman
2021-10-19 14:00 ` Dmitry Gutov
2021-10-19 14:03 ` Gregory Heytings
2021-10-19 16:05 ` Gregory Heytings
2021-10-19 17:43 ` Stefan Kangas
2021-10-19 18:54 ` Juri Linkov
2021-10-25 14:22 ` Making a key undefined again Jonas Bernoulli
2021-10-25 14:30 ` [External] : " Drew Adams
2021-10-25 14:37 ` Lars Ingebrigtsen
2021-10-25 17:31 ` Stefan Monnier
2021-10-25 17:48 ` Gregory Heytings
2021-10-25 22:49 ` Jonas Bernoulli
2021-10-25 22:59 ` Jonas Bernoulli
2021-10-25 23:10 ` Stefan Monnier
2021-10-25 23:27 ` Gregory Heytings
2021-10-26 16:11 ` Jonas Bernoulli
2021-10-26 19:33 ` Stefan Monnier
2021-10-18 16:01 ` Moving kbd to subr.el Juri Linkov
2021-10-18 16:27 ` Gregory Heytings
2021-10-19 3:08 ` Lars Ingebrigtsen
2021-10-18 1:41 ` T.V Raman
2021-10-18 11:40 ` Eli Zaretskii
2021-10-14 7:27 ` Andreas Schwab
2021-10-14 11:33 ` Stefan Kangas
2021-10-14 11:53 ` Andreas Schwab
2021-10-14 12:08 ` Lars Ingebrigtsen
2021-10-14 12:24 ` Andreas Schwab
2021-10-14 13:10 ` Stefan Kangas
2021-10-14 13:55 ` Dmitry Gutov
2021-10-14 14:05 ` dick
2021-10-14 14:15 ` Dmitry Gutov
2021-10-14 14:31 ` dick
2021-10-14 14:33 ` Lars Ingebrigtsen
2021-10-14 14:36 ` Gregory Heytings
2021-10-13 12:36 ` Representing key sequences (was: master 859190f 2/3: Convert some keymaps to defvar-keymap) Stefan Monnier
2021-10-13 13:17 ` Stefan Kangas
2021-10-13 16:28 ` Representing key sequences Stefan Monnier
2021-10-13 23:48 ` Lars Ingebrigtsen
2021-10-13 14:12 ` Lars Ingebrigtsen
2021-10-13 14:40 ` Andreas Schwab
2021-10-13 8:54 ` master 859190f 2/3: Convert some keymaps to defvar-keymap Gregory Heytings
2021-10-13 11:15 ` Lars Ingebrigtsen
2021-10-13 12:25 ` Gregory Heytings
2021-10-13 12:59 ` Lars Ingebrigtsen
2021-10-13 12:55 ` Eli Zaretskii
2021-10-13 13:05 ` Gregory Heytings
2021-10-13 13:34 ` Eli Zaretskii
2021-10-13 14:28 ` Gregory Heytings
2021-10-13 14:30 ` Lars Ingebrigtsen
2021-10-13 14:52 ` Stefan Kangas
2021-10-13 15:32 ` Gregory Heytings
2021-10-13 15:45 ` Eli Zaretskii
2021-10-13 16:07 ` Gregory Heytings
2021-10-13 19:01 ` Eli Zaretskii
2021-10-13 21:53 ` Gregory Heytings
2021-10-13 22:55 ` Gregory Heytings
2021-10-14 7:29 ` Eli Zaretskii
2021-10-14 6:48 ` Eli Zaretskii
2021-10-14 7:41 ` Gregory Heytings
2021-10-14 12:07 ` Stefan Kangas
2021-10-14 12:09 ` Lars Ingebrigtsen
2021-10-14 12:27 ` Gregory Heytings
2021-10-14 12:30 ` Lars Ingebrigtsen
2021-10-14 12:58 ` Gregory Heytings
2021-10-14 13:28 ` Lars Ingebrigtsen
2021-10-14 13:31 ` Gregory Heytings
2021-10-14 13:36 ` Lars Ingebrigtsen
2021-10-14 13:41 ` Gregory Heytings
2021-10-14 13:42 ` Lars Ingebrigtsen
2021-10-14 13:53 ` Gregory Heytings
2021-10-14 13:59 ` Lars Ingebrigtsen
2021-10-14 14:14 ` Gregory Heytings
2021-10-14 19:07 ` Stefan Kangas
2021-10-14 19:13 ` Lars Ingebrigtsen
2021-10-14 19:32 ` Gregory Heytings
2021-10-14 20:01 ` Lars Ingebrigtsen
2021-10-14 20:04 ` Stefan Monnier
2021-10-14 20:17 ` Stefan Kangas
2021-10-14 20:35 ` Lars Ingebrigtsen
2021-10-14 20:43 ` Lars Ingebrigtsen
2021-10-14 20:58 ` Stefan Kangas
2021-10-14 21:02 ` Lars Ingebrigtsen
2021-10-14 21:10 ` Andreas Schwab
2021-10-14 21:58 ` Lars Ingebrigtsen
2021-10-16 17:07 ` Gregory Heytings
2021-10-14 20:59 ` Stefan Monnier
2021-10-14 21:11 ` Lars Ingebrigtsen
2021-10-14 19:31 ` Gregory Heytings
2021-10-14 19:54 ` Andreas Schwab
2021-10-14 19:59 ` Gregory Heytings
2021-10-14 22:22 ` Richard Stallman
2021-10-13 22:37 ` Richard Stallman
2021-10-12 19:28 ` Juri Linkov
2021-10-12 20:10 ` Lars Ingebrigtsen
2021-10-12 14:22 ` Eli Zaretskii
2021-10-13 22:36 ` Richard Stallman
2021-10-14 7:25 ` Eli Zaretskii
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=SJ0PR10MB5488D01FA311A801D0C9DDA3F3939@SJ0PR10MB5488.namprd10.prod.outlook.com \
--to=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
--cc=rms@gnu.org \
/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).