* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-07 22:05 PROPOSAL: Repurpose one key and reserve it for third-party packages Gregory Heytings
@ 2021-02-08 0:13 ` Ergus
2021-02-08 2:57 ` Jorge Javier Araya Navarro
` (7 subsequent siblings)
8 siblings, 0 replies; 93+ messages in thread
From: Ergus @ 2021-02-08 0:13 UTC (permalink / raw)
To: Gregory Heytings; +Cc: emacs-devel
Hi Gregory:
IMO We shouldn't try to change C-o if we want an agreement. But all the
changes sound reasonable due to the current situation. In other editors
C-o is open file... just to say.
On Sun, Feb 07, 2021 at 10:05:50PM +0000, Gregory Heytings wrote:
>
>=Proposal=
>
>It is proposed to repurpose one key, and to reserve it in the key
>binding conventions for third-party packages. The keys that could be
>reserved for that purpose are:
>
>Option 1. C-z, with a single exception: "C-z C-z" would be bound to
>"suspend-frame"
>
>Option 2. C-z and M-z, with two exceptions: "C-z C-z" would be bound
>to "suspend-frame", and "M-z M-z" to "zap-to-char"
>
>Option 3. C-o, with a single exception: "C-o C-o" would be bound to
>"open-line"
>
>Option 4. C-o and M-o, with two exceptions: "C-o C-o" would be bound
>to "open-line", and "M-o M-o" to "facemenu-keymap"
>
>=Rationale=
>
>The current key binding conventions (see `(elisp) Key Binding
>Conventions') reserve keys for users, for major modes and for minor
>modes, but not for third-party packages [1].
>
>When such packages need to bind a command to a key, they can (1)
>either suggest users to bind it to a key reserved for users (for
>example, org-mode suggests to globally bind "C-c c" to org-capture),
>or (2) bind it to a key currently unused by Emacs (for example, Magit
>binds "C-x g" to magit-status in buffers visiting a file in a Git
>repository).
>
>Neither of these solutions are optimal: (1) requires an explicit
>configuration by the user, something which might confuse newcomers,
>and which other users might not want to do because they already use
>the keys reserved for users for other purposes, and (2) might conflict
>with the evolution of Emacs when one or more commands are bound to a
>yet unused key.
>
>Reserving one key for third-party packages solves the above problems:
>third-party packages can automatically bind a few keys in that
>reserved area, without conflicting with keys reserved for users and
>without conflicting with future Emacs evolutions.
>
>=Limit=
>
>Conflicts are still possible, when two or more packages bind the same
>keys. These are, however, conflicts between packages, not between a
>package and Emacs, or between a package and users' personal
>configurations.
>
>Such conflicts are also less likely for typical users, who install a
>few packages each binding a few keys.
>
>Finally, such conflicts can be dealt with without confusing users too
>much: a package could automatically choose fallback key bindings when
>the preferred ones are already used by another package, and/or issue a
>warning to the user that they need to bind its commands manually.
>
>=Note=
>
>[1] These conventions were written 25 years ago, at a time when there
>were far fewer third-party packages, and have not changed
>substantially since them.
>
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-07 22:05 PROPOSAL: Repurpose one key and reserve it for third-party packages Gregory Heytings
2021-02-08 0:13 ` Ergus
@ 2021-02-08 2:57 ` Jorge Javier Araya Navarro
2021-02-08 3:46 ` Richard Stallman
` (6 subsequent siblings)
8 siblings, 0 replies; 93+ messages in thread
From: Jorge Javier Araya Navarro @ 2021-02-08 2:57 UTC (permalink / raw)
To: emacs-devel
I unbound C-z in my config and use it for undo-fu (C-S-z for redo)
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
El domingo, 7 de febrero de 2021 a las 16:05, Gregory Heytings <gregory@heytings.org> escribió:
> =Proposal=
>
> It is proposed to repurpose one key, and to reserve it in the key binding
>
> conventions for third-party packages. The keys that could be reserved for
>
> that purpose are:
>
> Option 1. C-z, with a single exception: "C-z C-z" would be bound to
>
> "suspend-frame"
>
> Option 2. C-z and M-z, with two exceptions: "C-z C-z" would be bound to
>
> "suspend-frame", and "M-z M-z" to "zap-to-char"
>
> Option 3. C-o, with a single exception: "C-o C-o" would be bound to
>
> "open-line"
>
> Option 4. C-o and M-o, with two exceptions: "C-o C-o" would be bound to
>
> "open-line", and "M-o M-o" to "facemenu-keymap"
>
> =Rationale=
>
> The current key binding conventions (see `(elisp) Key Binding
>
> Conventions') reserve keys for users, for major modes and for minor modes,
>
> but not for third-party packages [1].
>
> When such packages need to bind a command to a key, they can (1) either
>
> suggest users to bind it to a key reserved for users (for example,
>
> org-mode suggests to globally bind "C-c c" to org-capture), or (2) bind it
>
> to a key currently unused by Emacs (for example, Magit binds "C-x g" to
>
> magit-status in buffers visiting a file in a Git repository).
>
> Neither of these solutions are optimal: (1) requires an explicit
>
> configuration by the user, something which might confuse newcomers, and
>
> which other users might not want to do because they already use the keys
>
> reserved for users for other purposes, and (2) might conflict with the
>
> evolution of Emacs when one or more commands are bound to a yet unused
>
> key.
>
> Reserving one key for third-party packages solves the above problems:
>
> third-party packages can automatically bind a few keys in that reserved
>
> area, without conflicting with keys reserved for users and without
>
> conflicting with future Emacs evolutions.
>
> =Limit=
>
> Conflicts are still possible, when two or more packages bind the same
>
> keys. These are, however, conflicts between packages, not between a
>
> package and Emacs, or between a package and users' personal
>
> configurations.
>
> Such conflicts are also less likely for typical users, who install a few
>
> packages each binding a few keys.
>
> Finally, such conflicts can be dealt with without confusing users too
>
> much: a package could automatically choose fallback key bindings when the
>
> preferred ones are already used by another package, and/or issue a warning
>
> to the user that they need to bind its commands manually.
>
> =Note=
>
> [1] These conventions were written 25 years ago, at a time when there were
>
> far fewer third-party packages, and have not changed substantially since
>
> them.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-07 22:05 PROPOSAL: Repurpose one key and reserve it for third-party packages Gregory Heytings
2021-02-08 0:13 ` Ergus
2021-02-08 2:57 ` Jorge Javier Araya Navarro
@ 2021-02-08 3:46 ` Richard Stallman
2021-02-08 7:20 ` Stefan Kangas
` (2 more replies)
2021-02-08 4:52 ` Robin Tarsiger
` (5 subsequent siblings)
8 siblings, 3 replies; 93+ messages in thread
From: Richard Stallman @ 2021-02-08 3:46 UTC (permalink / raw)
To: Gregory Heytings; +Cc: emacs-devel
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> Option 1. C-z, with a single exception: "C-z C-z" would be bound to
> "suspend-frame"
I think that these changes for C-z, M-z and C-o would be a big pain in
the neck.
However, it would be possible to make M-z M-ANYTHING available for
other bindings and reserve them for whatever we wish. That would not
conflict with the current meaning of M-z, because meta characters
can't be in the buffer.
The binding of M-m is less useful than many other keys.
Perhaps it could be given to some other use.
--
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 3:46 ` Richard Stallman
@ 2021-02-08 7:20 ` Stefan Kangas
2021-02-08 14:58 ` Lars Ingebrigtsen
` (3 more replies)
2021-02-08 12:36 ` Alan Mackenzie
2021-02-08 21:00 ` Gregory Heytings
2 siblings, 4 replies; 93+ messages in thread
From: Stefan Kangas @ 2021-02-08 7:20 UTC (permalink / raw)
To: rms, Gregory Heytings; +Cc: emacs-devel
Richard Stallman <rms@gnu.org> writes:
> > Option 1. C-z, with a single exception: "C-z C-z" would be bound to
> > "suspend-frame"
>
> I think that these changes for C-z, M-z and C-o would be a big pain in
> the neck.
Indeed.
(But I personally still maintain that `C-z' should just be changed to
`undo'.)
> However, it would be possible to make M-z M-ANYTHING available for
> other bindings and reserve them for whatever we wish. That would not
> conflict with the current meaning of M-z, because meta characters
> can't be in the buffer.
Wouldn't it be strange to first be queried for "Zap up to char: " and
then be expected to type another key to run some command from a
third-party package?
> The binding of M-m is less useful than many other keys.
> Perhaps it could be given to some other use.
Your mileage may vary, but I use `M-m' tens or hundreds of time per day.
Of the global M-bindings, `M-o' seems least useful to me.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 7:20 ` Stefan Kangas
@ 2021-02-08 14:58 ` Lars Ingebrigtsen
2021-02-08 21:00 ` Gregory Heytings
` (2 more replies)
2021-02-08 15:45 ` Thibaut Verron
` (2 subsequent siblings)
3 siblings, 3 replies; 93+ messages in thread
From: Lars Ingebrigtsen @ 2021-02-08 14:58 UTC (permalink / raw)
To: Stefan Kangas; +Cc: Gregory Heytings, rms, emacs-devel
Stefan Kangas <stefankangas@gmail.com> writes:
> (But I personally still maintain that `C-z' should just be changed to
> `undo'.)
The problem is that `C-z' is really useful in a terminal, and having the
keystrokes diverge to a great degree between GUI Emacs and terminal
Emacs would be unfortunate.
> Of the global M-bindings, `M-o' seems least useful to me.
Indeed.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 14:58 ` Lars Ingebrigtsen
@ 2021-02-08 21:00 ` Gregory Heytings
2021-02-08 21:33 ` Stefan Monnier
2021-02-08 22:45 ` Stefan Kangas
2 siblings, 0 replies; 93+ messages in thread
From: Gregory Heytings @ 2021-02-08 21:00 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: emacs-devel
>> (But I personally still maintain that `C-z' should just be changed to
>> `undo'.)
>
> The problem is that `C-z' is really useful in a terminal, and having the
> keystrokes diverge to a great degree between GUI Emacs and terminal
> Emacs would be unfortunate.
>
Indeed, C-z is useful in terminals, even though suspend-frame is also
available on C-x C-z. Terminals are the reason why the proposal mentions
that C-z C-z would be (the only) reserved binding in that keymap.
Repeating a key until it produces the expected effect is something
terminal users are habituated to do (for example repeating C-c until the
program aborts).
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 14:58 ` Lars Ingebrigtsen
2021-02-08 21:00 ` Gregory Heytings
@ 2021-02-08 21:33 ` Stefan Monnier
2021-02-09 8:13 ` Lars Ingebrigtsen
2021-02-08 22:45 ` Stefan Kangas
2 siblings, 1 reply; 93+ messages in thread
From: Stefan Monnier @ 2021-02-08 21:33 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Gregory Heytings, emacs-devel, Stefan Kangas, rms
> The problem is that `C-z' is really useful in a terminal, and having the
> keystrokes diverge to a great degree between GUI Emacs and terminal
> Emacs would be unfortunate.
>> Of the global M-bindings, `M-o' seems least useful to me.
> Indeed.
And yet the corresponding feature is *preloaded* :-(
Stefan "whose M-o is unbound because his local Emacs patches
include removing that part of loadup.el"
PS: It took me a bit if digging to figure out why my M-o was unbound.
That's a change I made a very long time ago.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 21:33 ` Stefan Monnier
@ 2021-02-09 8:13 ` Lars Ingebrigtsen
2021-02-09 16:54 ` Sean Whitton
0 siblings, 1 reply; 93+ messages in thread
From: Lars Ingebrigtsen @ 2021-02-09 8:13 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Gregory Heytings, emacs-devel, Stefan Kangas, rms
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> The problem is that `C-z' is really useful in a terminal, and having the
>> keystrokes diverge to a great degree between GUI Emacs and terminal
>> Emacs would be unfortunate.
>>> Of the global M-bindings, `M-o' seems least useful to me.
>> Indeed.
>
> And yet the corresponding feature is *preloaded* :-(
>
> Stefan "whose M-o is unbound because his local Emacs patches
> include removing that part of loadup.el"
>
> PS: It took me a bit if digging to figure out why my M-o was unbound.
> That's a change I made a very long time ago.
We've previously discussed doing time-limited experiments -- perhaps
this is a good test case for that.
That is, I propose that we remove the `M-o' binding on the trunk for one
month, and see how many (if any) complaints we get.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-09 8:13 ` Lars Ingebrigtsen
@ 2021-02-09 16:54 ` Sean Whitton
2021-02-09 17:13 ` Lars Ingebrigtsen
` (2 more replies)
0 siblings, 3 replies; 93+ messages in thread
From: Sean Whitton @ 2021-02-09 16:54 UTC (permalink / raw)
To: Lars Ingebrigtsen, Stefan Monnier
Cc: Gregory Heytings, Stefan Kangas, rms, emacs-devel
Hello,
On Tue 09 Feb 2021 at 09:13AM +01, Lars Ingebrigtsen wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>>> The problem is that `C-z' is really useful in a terminal, and having the
>>> keystrokes diverge to a great degree between GUI Emacs and terminal
>>> Emacs would be unfortunate.
>>>> Of the global M-bindings, `M-o' seems least useful to me.
>>> Indeed.
>>
>> And yet the corresponding feature is *preloaded* :-(
>>
>> Stefan "whose M-o is unbound because his local Emacs patches
>> include removing that part of loadup.el"
>>
>> PS: It took me a bit if digging to figure out why my M-o was unbound.
>> That's a change I made a very long time ago.
>
> We've previously discussed doing time-limited experiments -- perhaps
> this is a good test case for that.
>
> That is, I propose that we remove the `M-o' binding on the trunk for one
> month, and see how many (if any) complaints we get.
Aren't the current bindings under M-o intended for that halcyon future
in which we can use Emacs as a word processor, not just a text editor?
Like enriched-mode, but for file formats like .odt, where buffer faces
set with M-o get translated into something in the file format upon save.
I assume that most of the bindings under M-o were made with that sort of
usage of Emacs in mind. It strikes me as a bit sad to unbind M-o as it
would sort of be saying that we no longer think Emacs is ever going to
be much use for editing non-plain text.
--
Sean Whitton
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-09 16:54 ` Sean Whitton
@ 2021-02-09 17:13 ` Lars Ingebrigtsen
2021-02-09 17:43 ` Eli Zaretskii
2021-02-09 18:37 ` PROPOSAL: Repurpose one key and reserve it for third-party packages Stefan Monnier
2 siblings, 0 replies; 93+ messages in thread
From: Lars Ingebrigtsen @ 2021-02-09 17:13 UTC (permalink / raw)
To: Sean Whitton
Cc: Gregory Heytings, Stefan Kangas, Stefan Monnier, rms, emacs-devel
Sean Whitton <spwhitton@spwhitton.name> writes:
> Aren't the current bindings under M-o intended for that halcyon future
> in which we can use Emacs as a word processor, not just a text editor?
> Like enriched-mode, but for file formats like .odt, where buffer faces
> set with M-o get translated into something in the file format upon save.
That's my guess, but they make little sense as global bindings.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-09 16:54 ` Sean Whitton
2021-02-09 17:13 ` Lars Ingebrigtsen
@ 2021-02-09 17:43 ` Eli Zaretskii
2021-02-09 21:21 ` Sean Whitton
2021-02-09 18:37 ` PROPOSAL: Repurpose one key and reserve it for third-party packages Stefan Monnier
2 siblings, 1 reply; 93+ messages in thread
From: Eli Zaretskii @ 2021-02-09 17:43 UTC (permalink / raw)
To: Sean Whitton; +Cc: rms, emacs-devel, gregory, monnier, larsi, stefankangas
> From: Sean Whitton <spwhitton@spwhitton.name>
> Date: Tue, 09 Feb 2021 09:54:59 -0700
> Cc: Gregory Heytings <gregory@heytings.org>,
> Stefan Kangas <stefankangas@gmail.com>, rms@gnu.org, emacs-devel@gnu.org
>
> Aren't the current bindings under M-o intended for that halcyon future
> in which we can use Emacs as a word processor, not just a text editor?
> Like enriched-mode, but for file formats like .odt, where buffer faces
> set with M-o get translated into something in the file format upon save.
>
> I assume that most of the bindings under M-o were made with that sort of
> usage of Emacs in mind. It strikes me as a bit sad to unbind M-o as it
> would sort of be saying that we no longer think Emacs is ever going to
> be much use for editing non-plain text.
We could make these bindings local to the modes where they are
relevant, for example Text mode and its descendants. There's no need
for a global binding, at least not necessarily.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-09 17:43 ` Eli Zaretskii
@ 2021-02-09 21:21 ` Sean Whitton
2021-02-10 21:43 ` Bindings for setting faces (was: PROPOSAL: Repurpose one key and reserve it for third-party packages) Kévin Le Gouguec
0 siblings, 1 reply; 93+ messages in thread
From: Sean Whitton @ 2021-02-09 21:21 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: rms, emacs-devel, gregory, stefankangas, larsi, monnier
Hello,
On Tue 09 Feb 2021 at 07:43PM +02, Eli Zaretskii wrote:
>> From: Sean Whitton <spwhitton@spwhitton.name>
>> Date: Tue, 09 Feb 2021 09:54:59 -0700
>> Cc: Gregory Heytings <gregory@heytings.org>,
>> Stefan Kangas <stefankangas@gmail.com>, rms@gnu.org, emacs-devel@gnu.org
>>
>> Aren't the current bindings under M-o intended for that halcyon future
>> in which we can use Emacs as a word processor, not just a text editor?
>> Like enriched-mode, but for file formats like .odt, where buffer faces
>> set with M-o get translated into something in the file format upon save.
>>
>> I assume that most of the bindings under M-o were made with that sort of
>> usage of Emacs in mind. It strikes me as a bit sad to unbind M-o as it
>> would sort of be saying that we no longer think Emacs is ever going to
>> be much use for editing non-plain text.
>
> We could make these bindings local to the modes where they are
> relevant, for example Text mode and its descendants. There's no need
> for a global binding, at least not necessarily.
I agree that it would be good to find a non-global way to do this.
Perhaps we could set up a major mode to be inherited by modes like
enriched-mode, which sets up a binding which is at least as convenient
to use as M-o is right now?
That way we can ensure that the bindings to set faces are consistent
between major modes, which is what we would be at risk of losing if we
drop the global binding.
For the sake of ease of use I'd suggest replacing M-o b with C-c C-c b.
Does this sound sensible? It would be a shame if we ended up with each
possible WYSIWYG mode defining its own face-setting bindings.
Also, new non-WYSIWYG modes could re-use the same bindings to, e.g.,
insert asterisks around text meant to be bold.
--
Sean Whitton
^ permalink raw reply [flat|nested] 93+ messages in thread
* Bindings for setting faces (was: PROPOSAL: Repurpose one key and reserve it for third-party packages)
2021-02-09 21:21 ` Sean Whitton
@ 2021-02-10 21:43 ` Kévin Le Gouguec
0 siblings, 0 replies; 93+ messages in thread
From: Kévin Le Gouguec @ 2021-02-10 21:43 UTC (permalink / raw)
To: emacs-devel
Sean Whitton <spwhitton@spwhitton.name> writes:
> For the sake of ease of use I'd suggest replacing M-o b with C-c C-c b.
FWIW (inspiration? avoiding conflicts? 🤷), here's a non-exhaustive
survey of some bindings from major modes derived from text-mode, some of
which propose a WYSIWYG-ish experience:
- AUCTeX: C-c C-f C-[X]
examples of [X]:
b → \textbf{bold}
e → \emph{emphasized}
i → \textit{italic}
- org-mode: C-c C-x C-f [X]
examples of [X]:
* → *bold*
/ → /italic/
_ → _underlined_
= → =verbatim=
- markdown-mode: C-c C-s [X]
examples of [X]:
b → **bold**
e → *emphasized*
q → > quote
c → `code`
1 → # Title 1
2 → ## Title 2
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-09 16:54 ` Sean Whitton
2021-02-09 17:13 ` Lars Ingebrigtsen
2021-02-09 17:43 ` Eli Zaretskii
@ 2021-02-09 18:37 ` Stefan Monnier
2 siblings, 0 replies; 93+ messages in thread
From: Stefan Monnier @ 2021-02-09 18:37 UTC (permalink / raw)
To: Sean Whitton
Cc: Lars Ingebrigtsen, Stefan Kangas, Gregory Heytings, rms,
emacs-devel
> I assume that most of the bindings under M-o were made with that sort of
> usage of Emacs in mind.
That's my impression as well.
> It strikes me as a bit sad to unbind M-o as it would sort of be saying
> that we no longer think Emacs is ever going to be much use for editing
> non-plain text.
No, I think it's just normal: if/when you want to use Emacs as a WYSISYG
editor, it'll have to be in a dedicated (set of) modes. Those can then
provide bindings like the ones we currently have under M-o. But having
those bindings in the global map just doesn't make much sense.
Stefan
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 14:58 ` Lars Ingebrigtsen
2021-02-08 21:00 ` Gregory Heytings
2021-02-08 21:33 ` Stefan Monnier
@ 2021-02-08 22:45 ` Stefan Kangas
2 siblings, 0 replies; 93+ messages in thread
From: Stefan Kangas @ 2021-02-08 22:45 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Gregory Heytings, rms, emacs-devel
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Stefan Kangas <stefankangas@gmail.com> writes:
>
>> (But I personally still maintain that `C-z' should just be changed to
>> `undo'.)
>
> The problem is that `C-z' is really useful in a terminal, and having the
> keystrokes diverge to a great degree between GUI Emacs and terminal
> Emacs would be unfortunate.
Yes, those are valid concerns.
OTOH, we also provide `C-x C-z'. My personal preference would be for
Emacs to be weird in having suspend [in terminal] on a non-conventional
key, rather than undo [in terminal and GUI]. But that's me.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 7:20 ` Stefan Kangas
2021-02-08 14:58 ` Lars Ingebrigtsen
@ 2021-02-08 15:45 ` Thibaut Verron
2021-02-08 23:01 ` Stefan Kangas
2021-02-08 21:00 ` Gregory Heytings
2021-02-09 6:03 ` Richard Stallman
3 siblings, 1 reply; 93+ messages in thread
From: Thibaut Verron @ 2021-02-08 15:45 UTC (permalink / raw)
To: Stefan Kangas; +Cc: Gregory Heytings, rms, emacs-devel
>> The binding of M-m is less useful than many other keys.
>> Perhaps it could be given to some other use.
>
> Your mileage may vary, but I use `M-m' tens or hundreds of time per day.
I'm also using it a lot, so much actually that I rebound it to C-a
(with a test so that C-a C-a does beginning-of-line). So I would not
miss M-m at all.
Do you also use plain C-a (in scenarios where it disagrees with M-m)
hundreds of times per day?
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 15:45 ` Thibaut Verron
@ 2021-02-08 23:01 ` Stefan Kangas
2021-02-09 3:20 ` [External] : " Drew Adams
` (2 more replies)
0 siblings, 3 replies; 93+ messages in thread
From: Stefan Kangas @ 2021-02-08 23:01 UTC (permalink / raw)
To: thibaut.verron; +Cc: Gregory Heytings, rms, emacs-devel
Thibaut Verron <thibaut.verron@gmail.com> writes:
>> Your mileage may vary, but I use `M-m' tens or hundreds of time per day.
>
> I'm also using it a lot, so much actually that I rebound it to C-a
> (with a test so that C-a C-a does beginning-of-line).
I never considered making such a binding globally. It's a good idea.
(I don't want to fan the flames, but this makes me wonder why `C-a' does
not already default to this behavior...)
> Do you also use plain C-a (in scenarios where it disagrees with M-m)
> hundreds of times per day?
Yes, I use `C-a' more frequently than `M-m'.
^ permalink raw reply [flat|nested] 93+ messages in thread
* RE: [External] : Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 23:01 ` Stefan Kangas
@ 2021-02-09 3:20 ` Drew Adams
2021-02-09 9:13 ` Simen Heggestøyl
2021-02-09 9:30 ` Juri Linkov
2 siblings, 0 replies; 93+ messages in thread
From: Drew Adams @ 2021-02-09 3:20 UTC (permalink / raw)
To: Stefan Kangas, thibaut.verron@gmail.com
Cc: Gregory Heytings, rms@gnu.org, emacs-devel@gnu.org
> >> I use `M-m' tens or hundreds of time per day.
> >
> > I'm also using it a lot, so much actually that I rebound it to C-a
> > (with a test so that C-a C-a does beginning-of-line).
>
> I never considered making such a binding globally. It's a good idea.
>
> (I don't want to fan the flames, but this makes me wonder why `C-a'
> does not already default to this behavior...)
To me, it's far more useful for a repeating
`C-a' (likewise `C-e') to move to the previous
(next) line beginning (end).
Just hold them down to zip along, just like
you do with `C-M-a' (and `C-M-e'). And nearly
every other backward or forward motion command.
In `misc-cmds.el' I define repeatable commands
`beginning-of-line+' and `end-of-line+' that do
that. (And for my own use I bind them to `C-a'
and `C-e').
> > Do you also use plain C-a (in scenarios where
> > it disagrees with M-m) hundreds of times per day?
>
> Yes, I use `C-a' more frequently than `M-m'.
`M-m' is another that should be repeatable,
doing the same thing on the previous line.
In `misc-cmds.el' I define repeatable command
`back-to-indentation+'. (Likewise, `forward'.)
(defun back-to-indentation+ ()
"Move to the first non-whitespace char on this line, or eol if none.
If already there then do the same on the previous line.
This is a repeatable version of `back-to-indentation'."
(interactive "^")
(let ((opt (point)))
(back-to-indentation)
(when (= opt (point))
(forward-line -1)
(back-to-indentation))))
(If someone uses both backward and forward,
`M-p' and `M-n' make more sense than `M-m'.)
___
https://www.emacswiki.org/emacs/download/misc-cmds.el
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 23:01 ` Stefan Kangas
2021-02-09 3:20 ` [External] : " Drew Adams
@ 2021-02-09 9:13 ` Simen Heggestøyl
2021-02-09 9:30 ` Juri Linkov
2 siblings, 0 replies; 93+ messages in thread
From: Simen Heggestøyl @ 2021-02-09 9:13 UTC (permalink / raw)
To: Stefan Kangas; +Cc: Gregory Heytings, rms, thibaut.verron, emacs-devel
Stefan Kangas <stefankangas@gmail.com> writes:
> Thibaut Verron <thibaut.verron@gmail.com> writes:
>
>>> Your mileage may vary, but I use `M-m' tens or hundreds of time per day.
>>
>> I'm also using it a lot, so much actually that I rebound it to C-a
>> (with a test so that C-a C-a does beginning-of-line).
>
> I never considered making such a binding globally. It's a good idea.
>
> (I don't want to fan the flames, but this makes me wonder why `C-a' does
> not already default to this behavior...)
I also like this behavior. I made the same binding as Thibaut many years
ago, and have never missed the old behavior.
-- Simen
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 23:01 ` Stefan Kangas
2021-02-09 3:20 ` [External] : " Drew Adams
2021-02-09 9:13 ` Simen Heggestøyl
@ 2021-02-09 9:30 ` Juri Linkov
2021-02-09 13:01 ` Gregory Heytings
2 siblings, 1 reply; 93+ messages in thread
From: Juri Linkov @ 2021-02-09 9:30 UTC (permalink / raw)
To: Stefan Kangas; +Cc: Gregory Heytings, rms, thibaut.verron, emacs-devel
>>> Your mileage may vary, but I use `M-m' tens or hundreds of time per day.
>>
>> I'm also using it a lot, so much actually that I rebound it to C-a
>> (with a test so that C-a C-a does beginning-of-line).
>
> I never considered making such a binding globally. It's a good idea.
>
> (I don't want to fan the flames, but this makes me wonder why `C-a' does
> not already default to this behavior...)
For a long time I have been using such logic bound to `C-a':
(if (bolp)
(beginning-of-line-text arg) ;; or (back-to-indentation)
(if (fboundp 'move-beginning-of-line)
(move-beginning-of-line arg)
(beginning-of-line arg)))
But I don't remember the difference between beginning-of-line-text and
back-to-indentation and which one is better, neither the difference
between beginning-of-line and move-beginning-of-line.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-09 9:30 ` Juri Linkov
@ 2021-02-09 13:01 ` Gregory Heytings
0 siblings, 0 replies; 93+ messages in thread
From: Gregory Heytings @ 2021-02-09 13:01 UTC (permalink / raw)
To: Juri Linkov; +Cc: emacs-devel
>
> For a long time I have been using such logic bound to `C-a':
>
> (if (bolp)
> (beginning-of-line-text arg) ;; or (back-to-indentation)
> (if (fboundp 'move-beginning-of-line)
> (move-beginning-of-line arg)
> (beginning-of-line arg)))
>
> But I don't remember the difference between beginning-of-line-text and
> back-to-indentation and which one is better, neither the difference
> between beginning-of-line and move-beginning-of-line.
>
The main difference between back-to-indentation and beginning-of-line-text
is that back-to-indentation ignores the fill-prefix. With a buffer with
the following two lines:
1234
>>>> 5678
with point on "4:
- move-beginning-of-line moves point to the beginning of the line
- back-to-indentation moves point to "1"
- beginning-of-line-text moves point to "1"
with point on "8":
- move-beginning-of-line moves point to the beginning of the line
- back-to-indentation moves point to the beginning of the line
- beginning-of-line-text moves point to "5"
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 7:20 ` Stefan Kangas
2021-02-08 14:58 ` Lars Ingebrigtsen
2021-02-08 15:45 ` Thibaut Verron
@ 2021-02-08 21:00 ` Gregory Heytings
2021-02-09 6:03 ` Richard Stallman
3 siblings, 0 replies; 93+ messages in thread
From: Gregory Heytings @ 2021-02-08 21:00 UTC (permalink / raw)
To: Stefan Kangas; +Cc: emacs-devel
>
> (But I personally still maintain that `C-z' should just be changed to
> `undo'.)
>
IMO that would be the worst possible binding for C-z. "Undo" is already
bound to no less than three different keys. Binding it to yet another key
just to make Emacs feel closer to other editors, when all other bindings
are so different from other editors anyway, would (IMO again) be a serious
mistake.
>
> Of the global M-bindings, `M-o' seems least useful to me.
>
Leaving just one meta key (in this case M-o) for third-party packages
would IMO not be enough to motivate their developers to put their default
bindings there; third-party packages should not be considered as
second-class citizens. It must either be a control key alone, or a
control key and its corresponding meta key.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 7:20 ` Stefan Kangas
` (2 preceding siblings ...)
2021-02-08 21:00 ` Gregory Heytings
@ 2021-02-09 6:03 ` Richard Stallman
3 siblings, 0 replies; 93+ messages in thread
From: Richard Stallman @ 2021-02-09 6:03 UTC (permalink / raw)
To: Stefan Kangas; +Cc: gregory, emacs-devel
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> > However, it would be possible to make M-z M-ANYTHING available for
> > other bindings and reserve them for whatever we wish. That would not
> > conflict with the current meaning of M-z, because meta characters
> > can't be in the buffer.
> Wouldn't it be strange to first be queried for "Zap up to char: " and
> then be expected to type another key to run some command from a
> third-party package?
Yes, it would be -- but we can deal with that.
The promp could say "Next Meta-character, or zap up to char:".
It could wait a second before prompting, so that experienced users
normally would not wait so long before typing the next key.
--
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 3:46 ` Richard Stallman
2021-02-08 7:20 ` Stefan Kangas
@ 2021-02-08 12:36 ` Alan Mackenzie
2021-02-08 21:00 ` Gregory Heytings
2 siblings, 0 replies; 93+ messages in thread
From: Alan Mackenzie @ 2021-02-08 12:36 UTC (permalink / raw)
To: Richard Stallman; +Cc: Gregory Heytings, emacs-devel
Hello, Richard.
On Sun, Feb 07, 2021 at 22:46:37 -0500, Richard Stallman wrote:
> [[[ To any NSA and FBI agents reading my email: please consider ]]]
> [[[ whether defending the US Constitution against all enemies, ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> > Option 1. C-z, with a single exception: "C-z C-z" would be bound to
> > "suspend-frame"
> I think that these changes for C-z, M-z and C-o would be a big pain in
> the neck.
> However, it would be possible to make M-z M-ANYTHING available for
> other bindings and reserve them for whatever we wish. That would not
> conflict with the current meaning of M-z, because meta characters
> can't be in the buffer.
> The binding of M-m is less useful than many other keys. Perhaps it
> could be given to some other use.
Please not. I use M-m frequently. If that binding were to be removed,
there would be no good way of doing what it does. C-a M-f M-b is not
good. I think the existence of bindings like C-o and M-m is one of the
differences between Emacs and lesser editors that makes Emacs so good.
I don't use C-z or M-z myself, but that's no reason for me to advocate
reassigning those keys to something else.
> --
> Dr Richard Stallman
> Chief GNUisance of the GNU Project (https://gnu.org)
> Founder, Free Software Foundation (https://fsf.org)
> Internet Hall-of-Famer (https://internethalloffame.org)
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 3:46 ` Richard Stallman
2021-02-08 7:20 ` Stefan Kangas
2021-02-08 12:36 ` Alan Mackenzie
@ 2021-02-08 21:00 ` Gregory Heytings
2 siblings, 0 replies; 93+ messages in thread
From: Gregory Heytings @ 2021-02-08 21:00 UTC (permalink / raw)
To: Richard Stallman; +Cc: emacs-devel
>
> I think that these changes for C-z, M-z and C-o would be a big pain in
> the neck.
>
Could you perhaps elaborate a bit what you mean by this? For example, why
would typing "C-z C-z" instead of "C-z" to suspend, something you
presumably don't do once a minute, be "a big pain in the neck"?
There is a problem in need for a solution. If nobody agrees to make small
concessions it will forever remain a problem, with on the one hand
repeated conflicts and animosity between Emacs and package developers, and
on the other hand unnecessary complexity to install packages for Emacs
users.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-07 22:05 PROPOSAL: Repurpose one key and reserve it for third-party packages Gregory Heytings
` (2 preceding siblings ...)
2021-02-08 3:46 ` Richard Stallman
@ 2021-02-08 4:52 ` Robin Tarsiger
2021-02-08 8:41 ` Thibaut Verron
` (2 more replies)
2021-02-08 12:42 ` Augusto Stoffel
` (4 subsequent siblings)
8 siblings, 3 replies; 93+ messages in thread
From: Robin Tarsiger @ 2021-02-08 4:52 UTC (permalink / raw)
To: emacs-devel
Gregory Heytings wrote:
> Option 1. C-z, with a single exception: "C-z C-z" would be bound to "suspend-frame"
>
> Option 2. C-z and M-z, with two exceptions: "C-z C-z" would be bound to "suspend-frame", and "M-z M-z" to
> "zap-to-char"
>
> Option 3. C-o, with a single exception: "C-o C-o" would be bound to "open-line"
>
> Option 4. C-o and M-o, with two exceptions: "C-o C-o" would be bound to "open-line", and "M-o M-o" to
> "facemenu-keymap"
In my own init code, I use f8 as a prefix key for a bunch of custom bindings,
including for global Calc, SLIME, and Org commands. This seems similar in general
nature to the desired use for third-party packages, and I notice that f5--f8 are
all available in vanilla Emacs. That would obviously be less disruptive than
repurposing an existing key, but I don't know how reachable those keys are in
everyone's configurations.
For those who use them, M-z and C-o are frequent in normal editing. C-z potentially
less so, but I don't really know that---I would expect it to be more redundant in
GUI Emacs where there is usually a window manager gesture for iconify/deiconify,
but in TTY Emacs it's a necessity; but C-x C-z also exists and indeed parallels
C-x C-c better than C-z currently does. ("Preserve the normal behavior of control
keys" is already out the window from C-c being a prefix, though of course that
doesn't obviate the "users may need to retrain" difficulty with any of these.)
I don't find M-o very useful currently because most modes don't preserve faces
meaningfully, and it's already a prefix key, but that idea feels really weird for
some reason.
I _kind of_ like this general idea because the current situation is getting kind of
hazardous. _But_ if any of these do happen, make sure the symbol for the sub-keymap
is exposed so the user can move the whole thing somewhere else from init code.
-RTT
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 4:52 ` Robin Tarsiger
@ 2021-02-08 8:41 ` Thibaut Verron
2021-02-08 17:07 ` Robin Tarsiger
2021-02-11 12:59 ` Arthur Miller
2021-02-08 21:00 ` Gregory Heytings
2021-02-08 23:14 ` Stefan Monnier
2 siblings, 2 replies; 93+ messages in thread
From: Thibaut Verron @ 2021-02-08 8:41 UTC (permalink / raw)
To: Robin Tarsiger; +Cc: emacs-devel
2021-02-08 5:52 UTC+01:00, Robin Tarsiger <rtt@dasyatidae.com>:
> Gregory Heytings wrote:
>> Option 1. C-z, with a single exception: "C-z C-z" would be bound to
>> "suspend-frame"
>>
>> Option 2. C-z and M-z, with two exceptions: "C-z C-z" would be bound to
>> "suspend-frame", and "M-z M-z" to
>> "zap-to-char"
>>
>> Option 3. C-o, with a single exception: "C-o C-o" would be bound to
>> "open-line"
>>
>> Option 4. C-o and M-o, with two exceptions: "C-o C-o" would be bound to
>> "open-line", and "M-o M-o" to
>> "facemenu-keymap"
>
> In my own init code, I use f8 as a prefix key for a bunch of custom
> bindings,
> including for global Calc, SLIME, and Org commands. This seems similar in
> general
> nature to the desired use for third-party packages, and I notice that f5--f8
> are
> all available in vanilla Emacs. That would obviously be less disruptive
> than
> repurposing an existing key, but I don't know how reachable those keys are
> in
> everyone's configurations.
https://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Binding-Conventions.html
Those keys are explicitly left for the user to define.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 8:41 ` Thibaut Verron
@ 2021-02-08 17:07 ` Robin Tarsiger
2021-02-11 12:59 ` Arthur Miller
1 sibling, 0 replies; 93+ messages in thread
From: Robin Tarsiger @ 2021-02-08 17:07 UTC (permalink / raw)
To: emacs-devel
Thibaut Verron wrote:
[re f5--f8]
> https://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Binding-Conventions.html
>
> Those keys are explicitly left for the user to define.
D'oh, I thought I checked that. My mistake; never mind.
-RTT "if sleepy, wait until morning before hitting Send"
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 8:41 ` Thibaut Verron
2021-02-08 17:07 ` Robin Tarsiger
@ 2021-02-11 12:59 ` Arthur Miller
1 sibling, 0 replies; 93+ messages in thread
From: Arthur Miller @ 2021-02-11 12:59 UTC (permalink / raw)
To: Thibaut Verron; +Cc: Robin Tarsiger, emacs-devel
Thibaut Verron <thibaut.verron@gmail.com> writes:
> 2021-02-08 5:52 UTC+01:00, Robin Tarsiger <rtt@dasyatidae.com>:
>> Gregory Heytings wrote:
>>> Option 1. C-z, with a single exception: "C-z C-z" would be bound to
>>> "suspend-frame"
>>>
>>> Option 2. C-z and M-z, with two exceptions: "C-z C-z" would be bound to
>>> "suspend-frame", and "M-z M-z" to
>>> "zap-to-char"
>>>
>>> Option 3. C-o, with a single exception: "C-o C-o" would be bound to
>>> "open-line"
>>>
>>> Option 4. C-o and M-o, with two exceptions: "C-o C-o" would be bound to
>>> "open-line", and "M-o M-o" to
>>> "facemenu-keymap"
>>
>> In my own init code, I use f8 as a prefix key for a bunch of custom
>> bindings,
>> including for global Calc, SLIME, and Org commands. This seems similar in
>> general
>> nature to the desired use for third-party packages, and I notice that f5--f8
>> are
>> all available in vanilla Emacs. That would obviously be less disruptive
>> than
>> repurposing an existing key, but I don't know how reachable those keys are
>> in
>> everyone's configurations.
>
> https://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Binding-Conventions.html
>
> Those keys are explicitly left for the user to define.
What I see is missing here, is the most important option: to hire a
secretary to Mr. Eli so he can actually get some work done amongst this
flood of emails going on for days now on this über-important topic of
which key to use or not use ... :-)
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 4:52 ` Robin Tarsiger
2021-02-08 8:41 ` Thibaut Verron
@ 2021-02-08 21:00 ` Gregory Heytings
2021-02-09 7:42 ` Yuri Khan
2021-02-08 23:14 ` Stefan Monnier
2 siblings, 1 reply; 93+ messages in thread
From: Gregory Heytings @ 2021-02-08 21:00 UTC (permalink / raw)
To: Robin Tarsiger; +Cc: emacs-devel
>
> I _kind of_ like this general idea because the current situation is
> getting kind of hazardous. _But_ if any of these do happen, make sure
> the symbol for the sub-keymap is exposed so the user can move the whole
> thing somewhere else from init code.
>
That would be the case, by design. One or two keymaps would be created,
which you could assign to any other key. For example you can move all C-x
bindings to F7 with (progn (define-key global-map (kbd "<f7>") ctl-x-map)
(define-key global-map (kbd "C-x") nil)).
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 21:00 ` Gregory Heytings
@ 2021-02-09 7:42 ` Yuri Khan
2021-02-09 8:23 ` Gregory Heytings
0 siblings, 1 reply; 93+ messages in thread
From: Yuri Khan @ 2021-02-09 7:42 UTC (permalink / raw)
To: Gregory Heytings; +Cc: Robin Tarsiger, Emacs developers
On Tue, 9 Feb 2021 at 07:37, Gregory Heytings <gregory@heytings.org> wrote:
> For example you can move all C-x
> bindings to F7 with (progn (define-key global-map (kbd "<f7>") ctl-x-map)
> (define-key global-map (kbd "C-x") nil)).
Does it work that easily though? I might like to do that to C-x and
C-c so that I could bind those to Cut and Copy[^1]. But no:
$ emacs -Q
(define-key global-map (kbd "<f7>") ctl-x-map) ;; C-x C-e
(define-key global-map (kbd "C-x") #'kill-region) ;; f7 C-e
(+ 2 2) ;; C-x C-e ⇒ no effect; f7 C-e ⇒ 4
C-r buffer RET C-S-right C-x
Expected: the word is killed.
Observed: I get a “C-x-” prompt in the minibuffer, indicating C-x is
still acting as a prefix key. Indeed, pressing C-h reveals a number of
C-x 8 … bindings in key translations, and a bunch of C-x @ … bindings
in function key map translations.
M-x hl-lock-mode RET
C-s define-key M-C-B C-x w .
Expected: “define-key” is killed and replaced with “w.”.
Observed: ‘highlight-symbol-at-point’ picks up “define-key” and
highlights its all occurrences.
[^1]: Yes, I know of and use cua-mode. No, it’s not satisfying.
Because with all this pandemic work-from-home, my Emacs is over there
at my office, and it’s displaying its frames on my X server here at my
home[^2], and network lag interferes with the timeout-based heuristic
that causes cua-mode to cut where I intended to do a prefix C-x, or
vice versa, to switch buffers when I intended to cut and then move
point left or right.
[^2]: Yes, I know about Tramp, but have not made it part of my
workflow, partially because I’m unsure if eglot will work over tramp.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-09 7:42 ` Yuri Khan
@ 2021-02-09 8:23 ` Gregory Heytings
0 siblings, 0 replies; 93+ messages in thread
From: Gregory Heytings @ 2021-02-09 8:23 UTC (permalink / raw)
To: Yuri Khan; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 692 bytes --]
>> For example you can move all C-x bindings to F7 with (progn (define-key
>> global-map (kbd "<f7>") ctl-x-map) (define-key global-map (kbd "C-x")
>> nil)).
>
> Does it work that easily though?
>
No it doesn't, it was just a short proof of concept, which works mostly.
>
> Observed: I get a “C-x-” prompt in the minibuffer, indicating C-x is
> still acting as a prefix key. Indeed, pressing C-h reveals a number of
> C-x 8 … bindings in key translations, and a bunch of C-x @ … bindings in
> function key map translations.
>
Yes, as Andreas Schwab explained a few days ago in another thread, this is
because C-x is a prefix key on the key-translation-map.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 4:52 ` Robin Tarsiger
2021-02-08 8:41 ` Thibaut Verron
2021-02-08 21:00 ` Gregory Heytings
@ 2021-02-08 23:14 ` Stefan Monnier
2021-02-09 8:23 ` Gregory Heytings
2 siblings, 1 reply; 93+ messages in thread
From: Stefan Monnier @ 2021-02-08 23:14 UTC (permalink / raw)
To: Robin Tarsiger; +Cc: emacs-devel
> I _kind of_ like this general idea because the current situation is getting kind of
> hazardous. _But_ if any of these do happen, make sure the symbol for the sub-keymap
> is exposed so the user can move the whole thing somewhere else from init code.
Yes, focusing on the keymap first and presuming that its actual binding
may change seems important. Tho in practice, when a keymap is bound
changes which bindings inside the map are convenient to type:
E.g. `C-z C-z` is much easier to type than `M-o C-z`.
Stefan
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 23:14 ` Stefan Monnier
@ 2021-02-09 8:23 ` Gregory Heytings
0 siblings, 0 replies; 93+ messages in thread
From: Gregory Heytings @ 2021-02-09 8:23 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
>> I _kind of_ like this general idea because the current situation is
>> getting kind of hazardous. _But_ if any of these do happen, make sure
>> the symbol for the sub-keymap is exposed so the user can move the whole
>> thing somewhere else from init code.
>
> Yes, focusing on the keymap first and presuming that its actual binding
> may change seems important. Tho in practice, when a keymap is bound
> changes which bindings inside the map are convenient to type: E.g. `C-z
> C-z` is much easier to type than `M-o C-z`.
>
And in practice, too, there is no chance third-party library developers
would agree to use that keymap if it is not bound by default to a sensible
key. It must be an appealing solution.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-07 22:05 PROPOSAL: Repurpose one key and reserve it for third-party packages Gregory Heytings
` (3 preceding siblings ...)
2021-02-08 4:52 ` Robin Tarsiger
@ 2021-02-08 12:42 ` Augusto Stoffel
2021-02-08 21:00 ` Gregory Heytings
2021-02-08 14:54 ` Dmitry Gutov
` (3 subsequent siblings)
8 siblings, 1 reply; 93+ messages in thread
From: Augusto Stoffel @ 2021-02-08 12:42 UTC (permalink / raw)
To: Gregory Heytings; +Cc: emacs-devel
Surely lots of people rebind some non-prefix keys of dubious usefulness
like ‘C-z’ and ‘M-o’ (I bet I'm not alone in using those for
‘switch-to-buffer’ and ‘other-window’ respectively).
Now, as long as there is a _keymap_ for third-party packages, which
users can move wherever they see fit, I wouldn't care about the default
bindings. But it's important not to leave room for the interpretation
that the third-party keymap will always be bound to its default key.
Best,
Augusto
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 12:42 ` Augusto Stoffel
@ 2021-02-08 21:00 ` Gregory Heytings
0 siblings, 0 replies; 93+ messages in thread
From: Gregory Heytings @ 2021-02-08 21:00 UTC (permalink / raw)
To: Augusto Stoffel; +Cc: emacs-devel
>
> Now, as long as there is a _keymap_ for third-party packages, which
> users can move wherever they see fit, I wouldn't care about the default
> bindings. But it's important not to leave room for the interpretation
> that the third-party keymap will always be bound to its default key.
>
Yes, that would be the case, by design. One or two keymaps would be
created, which anyone could move to another key if need be. The point of
the proposal is to discuss the default bindings of that keymap/these
keymaps. Without sensible default bindings, there's no point in creating
such keymaps.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-07 22:05 PROPOSAL: Repurpose one key and reserve it for third-party packages Gregory Heytings
` (4 preceding siblings ...)
2021-02-08 12:42 ` Augusto Stoffel
@ 2021-02-08 14:54 ` Dmitry Gutov
2021-02-08 21:00 ` Gregory Heytings
2021-02-08 17:59 ` Sean Whitton
` (2 subsequent siblings)
8 siblings, 1 reply; 93+ messages in thread
From: Dmitry Gutov @ 2021-02-08 14:54 UTC (permalink / raw)
To: Gregory Heytings, emacs-devel
On 08.02.2021 00:05, Gregory Heytings wrote:
>
> =Proposal=
>
> It is proposed to repurpose one key, and to reserve it in the key
> binding conventions for third-party packages. The keys that could be
> reserved for that purpose are:
>
> Option 1. C-z, with a single exception: "C-z C-z" would be bound to
> "suspend-frame"
>
> Option 2. C-z and M-z, with two exceptions: "C-z C-z" would be bound to
> "suspend-frame", and "M-z M-z" to "zap-to-char"
This won't fly because a lot of us bind 'C-z' to 'undo' (or a similar
command), and special-casing 'C-z C-z' would break that usage (calling
'undo' several times in a row is common).
Finally, like Stefan K said in another thread, if we even end up
changing the 'C-z' binding, let's finally make it compatible with most
other editors out there, which is putting 'undo' on it. Or 'undo-only'.
And as a maintainer of multiple packages, I have lost track of how many
times I switch to 'emacs -Q' to reproduce some bug report, and then end
up suspending the frame by accident.
> Option 3. C-o, with a single exception: "C-o C-o" would be bound to
> "open-line"
>
> Option 4. C-o and M-o, with two exceptions: "C-o C-o" would be bound to
> "open-line", and "M-o M-o" to "facemenu-keymap"
I'd prefer to keep 'C-o' as-is, but admittedly it's a less important
binding.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 14:54 ` Dmitry Gutov
@ 2021-02-08 21:00 ` Gregory Heytings
0 siblings, 0 replies; 93+ messages in thread
From: Gregory Heytings @ 2021-02-08 21:00 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: emacs-devel
>
> This won't fly because a lot of us bind 'C-z' to 'undo' (or a similar
> command), and special-casing 'C-z C-z' would break that usage (calling
> 'undo' several times in a row is common).
>
You would (of course) still be free to do this, what is proposed is only a
default keybinding for a new keymap reserved for third-party packages.
As I said to Stefan K, undo is already on three keys, using (I'm tempted
to say "wasting") yet another key for this by default would be most
regrettable.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-07 22:05 PROPOSAL: Repurpose one key and reserve it for third-party packages Gregory Heytings
` (5 preceding siblings ...)
2021-02-08 14:54 ` Dmitry Gutov
@ 2021-02-08 17:59 ` Sean Whitton
2021-02-08 22:40 ` Eric Abrahamsen
2021-02-08 20:32 ` Ulrich Mueller
[not found] ` <8735y56naf.fsf@posteo.net>
8 siblings, 1 reply; 93+ messages in thread
From: Sean Whitton @ 2021-02-08 17:59 UTC (permalink / raw)
To: Gregory Heytings, emacs-devel
Hello Gregory,
On Sun 07 Feb 2021 at 10:05PM GMT, Gregory Heytings wrote:
> It is proposed to repurpose one key, and to reserve it in the key binding
> conventions for third-party packages. The keys that could be reserved for
> that purpose are:
>
> Option 1. C-z, with a single exception: "C-z C-z" would be bound to
> "suspend-frame"
>
> Option 2. C-z and M-z, with two exceptions: "C-z C-z" would be bound to
> "suspend-frame", and "M-z M-z" to "zap-to-char"
>
> Option 3. C-o, with a single exception: "C-o C-o" would be bound to
> "open-line"
>
> Option 4. C-o and M-o, with two exceptions: "C-o C-o" would be bound to
> "open-line", and "M-o M-o" to "facemenu-keymap"
C-z seems like the obvious choice out of these -- it's a duplicate
binding, there was a lot of support for repurposing it in that recent
thread, and those who were a bit reticent about repurposing were okay
with the idea of C-z C-z suspending the frame with something in the
message area after a single C-z.
Thanks for the proposal.
--
Sean Whitton
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 17:59 ` Sean Whitton
@ 2021-02-08 22:40 ` Eric Abrahamsen
2021-02-09 16:45 ` Sean Whitton
0 siblings, 1 reply; 93+ messages in thread
From: Eric Abrahamsen @ 2021-02-08 22:40 UTC (permalink / raw)
To: emacs-devel
Sean Whitton <spwhitton@spwhitton.name> writes:
> Hello Gregory,
>
> On Sun 07 Feb 2021 at 10:05PM GMT, Gregory Heytings wrote:
>
>> It is proposed to repurpose one key, and to reserve it in the key binding
>> conventions for third-party packages. The keys that could be reserved for
>> that purpose are:
>>
>> Option 1. C-z, with a single exception: "C-z C-z" would be bound to
>> "suspend-frame"
>>
>> Option 2. C-z and M-z, with two exceptions: "C-z C-z" would be bound to
>> "suspend-frame", and "M-z M-z" to "zap-to-char"
>>
>> Option 3. C-o, with a single exception: "C-o C-o" would be bound to
>> "open-line"
>>
>> Option 4. C-o and M-o, with two exceptions: "C-o C-o" would be bound to
>> "open-line", and "M-o M-o" to "facemenu-keymap"
>
> C-z seems like the obvious choice out of these -- it's a duplicate
> binding, there was a lot of support for repurposing it in that recent
> thread, and those who were a bit reticent about repurposing were okay
> with the idea of C-z C-z suspending the frame with something in the
> message area after a single C-z.
If C-x C-z is already `suspend-frame', do we really need C-z C-z, too?
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 22:40 ` Eric Abrahamsen
@ 2021-02-09 16:45 ` Sean Whitton
2021-02-10 5:28 ` Richard Stallman
2021-02-12 9:40 ` Jean Louis
0 siblings, 2 replies; 93+ messages in thread
From: Sean Whitton @ 2021-02-09 16:45 UTC (permalink / raw)
To: Eric Abrahamsen, emacs-devel
Hello,
On Mon 08 Feb 2021 at 02:40PM -08, Eric Abrahamsen wrote:
> If C-x C-z is already `suspend-frame', do we really need C-z C-z, too?
As has been mentioned, the thought is that a terminal user who doesn't
know much about Emacs will probably just hit it a second time if it
doesn't do what they expect.
--
Sean Whitton
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-09 16:45 ` Sean Whitton
@ 2021-02-10 5:28 ` Richard Stallman
2021-02-10 9:29 ` Thibaut Verron
` (2 more replies)
2021-02-12 9:40 ` Jean Louis
1 sibling, 3 replies; 93+ messages in thread
From: Richard Stallman @ 2021-02-10 5:28 UTC (permalink / raw)
To: Sean Whitton; +Cc: eric, emacs-devel
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
Suppose we reserve one key for third-party packages. Let's refer to
that key as C-α, to avoid specifying which key is chosen.
Various packages will set up their own bindings for it. If you load
more than one such package, which package's bindings will you get?
How do you get the ones you want?
Here's an idea.
Have one command you can use to specify which package's bindings C-α
will run. It could be C-α C-α; then individual packages will not give
their own bindings for C-α C-α.
So you can type C-α C-α Foopkg RET, then C-α gives you the Foopkg bindings.
--
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-10 5:28 ` Richard Stallman
@ 2021-02-10 9:29 ` Thibaut Verron
2021-02-11 13:37 ` Richard Stallman
2021-02-10 10:42 ` Alfred M. Szmidt
2021-02-10 11:07 ` Gregory Heytings
2 siblings, 1 reply; 93+ messages in thread
From: Thibaut Verron @ 2021-02-10 9:29 UTC (permalink / raw)
To: rms; +Cc: eric, emacs-devel, Sean Whitton
2021-02-10 6:28 UTC+01:00, Richard Stallman <rms@gnu.org>:
> [[[ To any NSA and FBI agents reading my email: please consider ]]]
> [[[ whether defending the US Constitution against all enemies, ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
> Suppose we reserve one key for third-party packages. Let's refer to
> that key as C-α, to avoid specifying which key is chosen.
>
> Various packages will set up their own bindings for it. If you load
> more than one such package, which package's bindings will you get?
> How do you get the ones you want?
>
> Here's an idea.
>
> Have one command you can use to specify which package's bindings C-α
> will run. It could be C-α C-α; then individual packages will not give
> their own bindings for C-α C-α.
>
> So you can type C-α C-α Foopkg RET, then C-α gives you the Foopkg bindings.
That seems like an extremely valuable binding to sacrifice for a
command which will most likely be only run once.
But maybe we could agree on a specific key, identical on all keymaps,
for that purpose. That would be similar to how C-\alpha ? is currently
reserved for describe-keymap.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-10 9:29 ` Thibaut Verron
@ 2021-02-11 13:37 ` Richard Stallman
2021-02-11 13:52 ` Thibaut Verron
0 siblings, 1 reply; 93+ messages in thread
From: Richard Stallman @ 2021-02-11 13:37 UTC (permalink / raw)
To: thibaut.verron; +Cc: eric, emacs-devel, spwhitton
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> > So you can type C-α C-α Foopkg RET, then C-α gives you the Foopkg bindings.
> That seems like an extremely valuable binding to sacrifice for a
> command which will most likely be only run once.
Why do you think C-α C-α would be so valuable? I don't get it.
(This is supposing we have made C-α a prefix for use by external packages.)
> But maybe we could agree on a specific key, identical on all keymaps,
> for that purpose. That would be similar to how C-\alpha ? is currently
> reserved for describe-keymap.
How is that different from what I said?
--
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-11 13:37 ` Richard Stallman
@ 2021-02-11 13:52 ` Thibaut Verron
0 siblings, 0 replies; 93+ messages in thread
From: Thibaut Verron @ 2021-02-11 13:52 UTC (permalink / raw)
To: rms; +Cc: eric, emacs-devel, spwhitton
2021-02-11 14:37 UTC+01:00, Richard Stallman <rms@gnu.org>:
> [[[ To any NSA and FBI agents reading my email: please consider ]]]
> [[[ whether defending the US Constitution against all enemies, ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
> > > So you can type C-α C-α Foopkg RET, then C-α gives you the Foopkg
> bindings.
>
> > That seems like an extremely valuable binding to sacrifice for a
> > command which will most likely be only run once.
>
> Why do you think C-α C-α would be so valuable? I don't get it.
Because it is easier to press the same key twice than another key.
See for example how many people support freeing C-z while keeping its
current behavior on C-z C-z.
> (This is supposing we have made C-α a prefix for use by external packages.)
I don't understand the suggestion anymore then. What would the
C-\alpha keymap look like? One package on C-\alpha a, one on C-\alpha
b, etc? Or just one on C-\alpha?
> > But maybe we could agree on a specific key, identical on all keymaps,
> > for that purpose. That would be similar to how C-\alpha ? is currently
> > reserved for describe-keymap.
>
> How is that different from what I said?
The choice of a different second key than the prefix C-\alpha. Besides
keeping the valuable repeated binding free, it also allows to have the
same key across keymaps.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-10 5:28 ` Richard Stallman
2021-02-10 9:29 ` Thibaut Verron
@ 2021-02-10 10:42 ` Alfred M. Szmidt
2021-02-10 11:35 ` Thibaut Verron
2021-02-11 13:37 ` PROPOSAL: Repurpose one key and reserve it for third-party packages Richard Stallman
2021-02-10 11:07 ` Gregory Heytings
2 siblings, 2 replies; 93+ messages in thread
From: Alfred M. Szmidt @ 2021-02-10 10:42 UTC (permalink / raw)
To: rms; +Cc: eric, emacs-devel, spwhitton
Since Magit is a VC like mode, wouldn't it make more sense to put it
under C-x v? E.g., why cannot Magit rebind C-x v l -- which I guess
is similar to magit-status or possibly C-x v d.
From a users perspective, making it seemingly a part of VC-mode makes
more sense than trying to make it a special citizen that needs to take
C-x g (or whatever) since it would make it hard to use MaGit,
MaFossil, MaSubersion (last two are fictious) .... together. Magit
only makes sense for a git repository, you might want to have C-x v l
(or some other status command) invoke the different "viewer". If
Magit (e.g.) has other global bindings that make sense for version
control, those also make more sense to put under C-x v.
We already sorta do it with M-., M-, etc where a package can set up
the right variables to get the right tag jumping functions invoked.
Similarly, for e.g. Bookmark+ (Drew, not suggesting that you rebind
anything :), wouldn't it make better usage if those keybindings are
put under C-x r like the rest of the bookmark bindings?
I am just thinking as a user, where I could expect things to be; and
realise that this might not follow the current Emacs keybinding
policies. It is strange to reserve a third party key, globally, for
usage where you cannot ever really know what that key does --
shouldn't such a key be up to the user?
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-10 10:42 ` Alfred M. Szmidt
@ 2021-02-10 11:35 ` Thibaut Verron
2021-02-10 12:59 ` Alfred M. Szmidt
2021-02-10 13:09 ` vc-magit mode (was: Re: PROPOSAL: Repurpose one key and reserve it for third-party packages) Alfred M. Szmidt
2021-02-11 13:37 ` PROPOSAL: Repurpose one key and reserve it for third-party packages Richard Stallman
1 sibling, 2 replies; 93+ messages in thread
From: Thibaut Verron @ 2021-02-10 11:35 UTC (permalink / raw)
To: Alfred M. Szmidt; +Cc: eric, spwhitton, rms, emacs-devel
2021-02-10 11:42 UTC+01:00, Alfred M. Szmidt <ams@gnu.org>:
> Since Magit is a VC like mode, wouldn't it make more sense to put it
> under C-x v? E.g., why cannot Magit rebind C-x v l -- which I guess
> is similar to magit-status or possibly C-x v d.
>
> From a users perspective, making it seemingly a part of VC-mode makes
> more sense than trying to make it a special citizen that needs to take
> C-x g (or whatever) since it would make it hard to use MaGit,
> MaFossil, MaSubersion (last two are fictious) .... together. Magit
> only makes sense for a git repository, you might want to have C-x v l
> (or some other status command) invoke the different "viewer". If
> Magit (e.g.) has other global bindings that make sense for version
> control, those also make more sense to put under C-x v.
The problem is that magit-status is both a "visualization" mode,
similar to C-x v d or C-x v l, and a "dispatcher" mode, similar to C-x
v.
An example of usage includes, for example, C-x g c - a c <enter a
commit message> C-c C-c.
This is the equivalent of git commit -a <enter commit message> C-x C-s
C-x k RET.
I can't see a 'vc-commit' function in C-x v, but if there was one, C-x
g c would essentially replace it.
Similarly C-x g P is a vc-push, C-x g F is a (hypothetical) vc-fetch,
C-x g d is a vc-diff, etc.
As such, magit would be better seen as a replacement of the whole vc
keymap than as a part of it. And I don't know if anybody uses both
magit and vc-mode for git version control.
(I occasionally use vc-merge-conflict, but this is not on C-x v.)
But I'm not claiming that rebinding C-x v to magit whenever we are in
a git repository would be a good idea. :)
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-10 11:35 ` Thibaut Verron
@ 2021-02-10 12:59 ` Alfred M. Szmidt
2021-02-10 13:09 ` vc-magit mode (was: Re: PROPOSAL: Repurpose one key and reserve it for third-party packages) Alfred M. Szmidt
1 sibling, 0 replies; 93+ messages in thread
From: Alfred M. Szmidt @ 2021-02-10 12:59 UTC (permalink / raw)
To: thibaut.verron; +Cc: eric, spwhitton, rms, emacs-devel
An example of usage includes, for example, C-x g c - a c <enter a
commit message> C-c C-c.
This is the equivalent of git commit -a <enter commit message> C-x C-s
C-x k RET.
I can't see a 'vc-commit' function in C-x v, but if there was one, C-x
g c would essentially replace it.
vc-next-action (C-x v v) does exactly that.
Similarly C-x g P is a vc-push, C-x g F is a (hypothetical) vc-fetch,
C-x g d is a vc-diff, etc.
C-x v P vc-push
C-x v + vc-update
C-x v = vc-diff
So in the case of Magit, why should there be two bindings for two
version control modes?
But I'm not claiming that rebinding C-x v to magit whenever we are in
a git repository would be a good idea. :)
Maybe it is? If magit is supposed to be a git-only replacement for
vc-mode, maybe that is exactly what it should do. Or better yet,
integrate better with vc-mode proper.
^ permalink raw reply [flat|nested] 93+ messages in thread
* vc-magit mode (was: Re: PROPOSAL: Repurpose one key and reserve it for third-party packages)
2021-02-10 11:35 ` Thibaut Verron
2021-02-10 12:59 ` Alfred M. Szmidt
@ 2021-02-10 13:09 ` Alfred M. Szmidt
2021-02-10 13:25 ` Thibaut Verron
` (2 more replies)
1 sibling, 3 replies; 93+ messages in thread
From: Alfred M. Szmidt @ 2021-02-10 13:09 UTC (permalink / raw)
To: thibaut.verron; +Cc: eric, spwhitton, rms, emacs-devel
Here is an idea, a new backend -- vc-magit. This calls the right
Magit functions. The user can then set the prefered backends using
vc-handled-backends. This solves the (specific) conundrum of taking
e.g., C-x g, and also provides the user with a consitent interface to
VC mode when using magit.
When in a buffer that has a git repository associated and your backend
is vc-magit, vc-prefix-map, can be used by vc-magit / magit to bind
specific magit keybindings that are not VC agonstic.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: vc-magit mode (was: Re: PROPOSAL: Repurpose one key and reserve it for third-party packages)
2021-02-10 13:09 ` vc-magit mode (was: Re: PROPOSAL: Repurpose one key and reserve it for third-party packages) Alfred M. Szmidt
@ 2021-02-10 13:25 ` Thibaut Verron
2021-02-10 13:34 ` vc-magit mode Dmitry Gutov
2021-02-10 15:33 ` vc-magit mode (was: Re: PROPOSAL: Repurpose one key and reserve it for third-party packages) Eli Zaretskii
2 siblings, 0 replies; 93+ messages in thread
From: Thibaut Verron @ 2021-02-10 13:25 UTC (permalink / raw)
To: Alfred M. Szmidt; +Cc: eric, Sean Whitton, Richard Stallman, emacs-devel
Le mer. 10 févr. 2021 à 14:09, Alfred M. Szmidt <ams@gnu.org> a écrit :
>
> Here is an idea, a new backend -- vc-magit. This calls the right
> Magit functions. The user can then set the prefered backends using
> vc-handled-backends. This solves the (specific) conundrum of taking
> e.g., C-x g, and also provides the user with a consitent interface to
> VC mode when using magit.
>
> When in a buffer that has a git repository associated and your backend
> is vc-magit, vc-prefix-map, can be used by vc-magit / magit to bind
> specific magit keybindings that are not VC agonstic.
>
Would it be technically possible to have C-x v behave as a prefix for
vc-mode and spawn a buffer with its own minor mode for vc-magit?
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: vc-magit mode
2021-02-10 13:09 ` vc-magit mode (was: Re: PROPOSAL: Repurpose one key and reserve it for third-party packages) Alfred M. Szmidt
2021-02-10 13:25 ` Thibaut Verron
@ 2021-02-10 13:34 ` Dmitry Gutov
2021-02-10 15:33 ` vc-magit mode (was: Re: PROPOSAL: Repurpose one key and reserve it for third-party packages) Eli Zaretskii
2 siblings, 0 replies; 93+ messages in thread
From: Dmitry Gutov @ 2021-02-10 13:34 UTC (permalink / raw)
To: Alfred M. Szmidt, thibaut.verron; +Cc: eric, emacs-devel, rms, spwhitton
On 10.02.2021 15:09, Alfred M. Szmidt wrote:
> Here is an idea, a new backend -- vc-magit. This calls the right
> Magit functions. The user can then set the prefered backends using
> vc-handled-backends. This solves the (specific) conundrum of taking
> e.g., C-x g, and also provides the user with a consitent interface to
> VC mode when using magit.
You've never used Magit, have you?
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: vc-magit mode (was: Re: PROPOSAL: Repurpose one key and reserve it for third-party packages)
2021-02-10 13:09 ` vc-magit mode (was: Re: PROPOSAL: Repurpose one key and reserve it for third-party packages) Alfred M. Szmidt
2021-02-10 13:25 ` Thibaut Verron
2021-02-10 13:34 ` vc-magit mode Dmitry Gutov
@ 2021-02-10 15:33 ` Eli Zaretskii
2021-02-10 16:47 ` Alfred M. Szmidt
2 siblings, 1 reply; 93+ messages in thread
From: Eli Zaretskii @ 2021-02-10 15:33 UTC (permalink / raw)
To: Alfred M. Szmidt; +Cc: eric, emacs-devel, rms, thibaut.verron, spwhitton
> From: "Alfred M. Szmidt" <ams@gnu.org>
> Date: Wed, 10 Feb 2021 08:09:45 -0500
> Cc: eric@ericabrahamsen.net, spwhitton@spwhitton.name, rms@gnu.org,
> emacs-devel@gnu.org
>
> Here is an idea, a new backend -- vc-magit. This calls the right
> Magit functions. The user can then set the prefered backends using
> vc-handled-backends.
Dmitry will tell for sure, but I think adapting Magit to the VC
architecture won't be easy, since Magit is not exactly a backend like
the other ones. The VC framework might be a kind of Procrustean bed
for Magit.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: vc-magit mode (was: Re: PROPOSAL: Repurpose one key and reserve it for third-party packages)
2021-02-10 15:33 ` vc-magit mode (was: Re: PROPOSAL: Repurpose one key and reserve it for third-party packages) Eli Zaretskii
@ 2021-02-10 16:47 ` Alfred M. Szmidt
2021-02-10 17:22 ` Eli Zaretskii
0 siblings, 1 reply; 93+ messages in thread
From: Alfred M. Szmidt @ 2021-02-10 16:47 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: eric, emacs-devel, rms, thibaut.verron, spwhitton
> Here is an idea, a new backend -- vc-magit. This calls the right
> Magit functions. The user can then set the prefered backends using
> vc-handled-backends.
Dmitry will tell for sure, but I think adapting Magit to the VC
architecture won't be easy, since Magit is not exactly a backend like
the other ones. The VC framework might be a kind of Procrustean bed
for Magit.
Even if the architecture makes it complciated to do it using a vc
backend, magit could still take over the C-x v binding for its own
purpose with similar semantics to what is in vc-mode. It wouldn't
need to be entierly compatible -- but C-x v v could still work as
"commit this file", etc.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: vc-magit mode (was: Re: PROPOSAL: Repurpose one key and reserve it for third-party packages)
2021-02-10 16:47 ` Alfred M. Szmidt
@ 2021-02-10 17:22 ` Eli Zaretskii
0 siblings, 0 replies; 93+ messages in thread
From: Eli Zaretskii @ 2021-02-10 17:22 UTC (permalink / raw)
To: Alfred M. Szmidt; +Cc: eric, emacs-devel, rms, thibaut.verron, spwhitton
> From: "Alfred M. Szmidt" <ams@gnu.org>
> Cc: thibaut.verron@gmail.com, eric@ericabrahamsen.net,
> spwhitton@spwhitton.name, rms@gnu.org, emacs-devel@gnu.org
> Date: Wed, 10 Feb 2021 11:47:05 -0500
>
> > Here is an idea, a new backend -- vc-magit. This calls the right
> > Magit functions. The user can then set the prefered backends using
> > vc-handled-backends.
>
> Dmitry will tell for sure, but I think adapting Magit to the VC
> architecture won't be easy, since Magit is not exactly a backend like
> the other ones. The VC framework might be a kind of Procrustean bed
> for Magit.
>
> Even if the architecture makes it complciated to do it using a vc
> backend, magit could still take over the C-x v binding for its own
> purpose with similar semantics to what is in vc-mode.
I said nothing about keybindings, only about your suggestion to make
Magit another VC backend.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-10 10:42 ` Alfred M. Szmidt
2021-02-10 11:35 ` Thibaut Verron
@ 2021-02-11 13:37 ` Richard Stallman
2021-02-11 14:38 ` Stefan Kangas
1 sibling, 1 reply; 93+ messages in thread
From: Richard Stallman @ 2021-02-11 13:37 UTC (permalink / raw)
To: Alfred M. Szmidt; +Cc: eric, spwhitton, emacs-devel
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> Since Magit is a VC like mode, wouldn't it make more sense to put it
> under C-x v? E.g., why cannot Magit rebind C-x v l -- which I guess
> is similar to magit-status or possibly C-x v d.
I think you are suggesting that the key C-x v could be used both by VC
and by Magit. That could make sense, if users generally use one or
the other. There could be a command to switch C-x v to the VC
bindings and a command to switch it to the Magit bindings.
Or perhaps it can be selected by whether the current buffer uses
a vcs other than git. The options of the global switch could be
* Always use VC
* Always use Magit
* Use VC when the current buffer is stored in a vcs other than git,
otherwise use Magit.
The third one might need some new low-level keymap facility.
--
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-11 13:37 ` PROPOSAL: Repurpose one key and reserve it for third-party packages Richard Stallman
@ 2021-02-11 14:38 ` Stefan Kangas
2021-02-11 15:13 ` Robert Pluim
0 siblings, 1 reply; 93+ messages in thread
From: Stefan Kangas @ 2021-02-11 14:38 UTC (permalink / raw)
To: rms, Alfred M. Szmidt; +Cc: eric, emacs-devel, spwhitton
Richard Stallman <rms@gnu.org> writes:
> > Since Magit is a VC like mode, wouldn't it make more sense to put it
> > under C-x v? E.g., why cannot Magit rebind C-x v l -- which I guess
> > is similar to magit-status or possibly C-x v d.
>
> I think you are suggesting that the key C-x v could be used both by VC
> and by Magit. That could make sense, if users generally use one or
> the other.
I use both, as they are good for different things.
I'd prefer to have `C-x v' be vc only to avoid any confusion.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-11 14:38 ` Stefan Kangas
@ 2021-02-11 15:13 ` Robert Pluim
2021-02-11 16:08 ` Stefan Monnier
0 siblings, 1 reply; 93+ messages in thread
From: Robert Pluim @ 2021-02-11 15:13 UTC (permalink / raw)
To: Stefan Kangas; +Cc: eric, Alfred M. Szmidt, spwhitton, rms, emacs-devel
>>>>> On Thu, 11 Feb 2021 08:38:21 -0600, Stefan Kangas <stefankangas@gmail.com> said:
Stefan> Richard Stallman <rms@gnu.org> writes:
>> > Since Magit is a VC like mode, wouldn't it make more sense to put it
>> > under C-x v? E.g., why cannot Magit rebind C-x v l -- which I guess
>> > is similar to magit-status or possibly C-x v d.
>>
>> I think you are suggesting that the key C-x v could be used both by VC
>> and by Magit. That could make sense, if users generally use one or
>> the other.
Stefan> I use both, as they are good for different things.
Stefan> I'd prefer to have `C-x v' be vc only to avoid any confusion.
+1
vc and Magit are two completely separate things to me (even though I
do use vc to do git stuff as well).
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-11 15:13 ` Robert Pluim
@ 2021-02-11 16:08 ` Stefan Monnier
2021-02-12 8:21 ` Alfred M. Szmidt
0 siblings, 1 reply; 93+ messages in thread
From: Stefan Monnier @ 2021-02-11 16:08 UTC (permalink / raw)
To: Robert Pluim
Cc: rms, eric, emacs-devel, Alfred M. Szmidt, Stefan Kangas,
spwhitton
> vc and Magit are two completely separate things to me (even though I
> do use vc to do git stuff as well).
Most of Magit's commands don't need to be bound globally anyway.
But I think it's best to think of `C-x v` in the same way as for
`lisp/vc`: it's not about the VC package but about the wider notion of
version control.
Stefan
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-11 16:08 ` Stefan Monnier
@ 2021-02-12 8:21 ` Alfred M. Szmidt
2021-02-12 8:36 ` Robert Pluim
0 siblings, 1 reply; 93+ messages in thread
From: Alfred M. Szmidt @ 2021-02-12 8:21 UTC (permalink / raw)
To: Stefan Monnier; +Cc: rms, eric, rpluim, emacs-devel, stefankangas, spwhitton
> vc and Magit are two completely separate things to me (even though I
> do use vc to do git stuff as well).
Most of Magit's commands don't need to be bound globally anyway.
Then it makes even more sense to just pick a key under C-x v.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-12 8:21 ` Alfred M. Szmidt
@ 2021-02-12 8:36 ` Robert Pluim
2021-02-12 15:11 ` Alfred M. Szmidt
2021-02-13 3:26 ` Richard Stallman
0 siblings, 2 replies; 93+ messages in thread
From: Robert Pluim @ 2021-02-12 8:36 UTC (permalink / raw)
To: Alfred M. Szmidt
Cc: rms, eric, stefankangas, emacs-devel, Stefan Monnier, spwhitton
>>>>> On Fri, 12 Feb 2021 03:21:49 -0500, "Alfred M. Szmidt" <ams@gnu.org> said:
>> vc and Magit are two completely separate things to me (even though I
>> do use vc to do git stuff as well).
Alfred> Most of Magit's commands don't need to be bound globally anyway.
Alfred> Then it makes even more sense to just pick a key under C-x v.
I donʼt follow. Magit is used for magit stuff, from the magit-status
window. If people want to use magit commands from other places, they
can choose their own binding or use the magit recommended ones.
vc is for abstracting away the differences between different version
control systems, why would magit commands need to share a prefix with
it?
Robert
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-12 8:36 ` Robert Pluim
@ 2021-02-12 15:11 ` Alfred M. Szmidt
2021-02-13 3:26 ` Richard Stallman
1 sibling, 0 replies; 93+ messages in thread
From: Alfred M. Szmidt @ 2021-02-12 15:11 UTC (permalink / raw)
To: Robert Pluim; +Cc: rms, eric, stefankangas, emacs-devel, monnier, spwhitton
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1140 bytes --]
>> vc and Magit are two completely separate things to me (even though I
>> do use vc to do git stuff as well).
Alfred> Most of Magit's commands don't need to be bound globally anyway.
Alfred> Then it makes even more sense to just pick a key under C-x v.
I donʼt follow. Magit is used for magit stuff, from the magit-status
window. If people want to use magit commands from other places, they
can choose their own binding or use the magit recommended ones.
"magit stuff" is version control.
vc is for abstracting away the differences between different
version control systems, why would magit commands need to share a
prefix with it?
'C-x v .' (e.g.) could be bound to an alternative viewer function that
would work depending on the repository, e.g., gitk for those who wish
to use that, kick of a URL action for viewing a fossil repository
using "fossil ui", or whatever.
See how this is a much more general solution to work with _any_
"viewer" (whatever you wanna call magit) than having it take up
keybindings that could be put to a much more general use than a
specialzied one.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-12 8:36 ` Robert Pluim
2021-02-12 15:11 ` Alfred M. Szmidt
@ 2021-02-13 3:26 ` Richard Stallman
1 sibling, 0 replies; 93+ messages in thread
From: Richard Stallman @ 2021-02-13 3:26 UTC (permalink / raw)
To: Robert Pluim; +Cc: eric, stefankangas, emacs-devel, ams, monnier, spwhitton
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> vc is for abstracting away the differences between different version
> control systems, why would magit commands need to share a prefix with
> it?
I did not say they "need" to. But if we are short of places to put
things, putting two things both related to version control, which
people don't use together, on a single key sequence could work well.
--
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-10 5:28 ` Richard Stallman
2021-02-10 9:29 ` Thibaut Verron
2021-02-10 10:42 ` Alfred M. Szmidt
@ 2021-02-10 11:07 ` Gregory Heytings
2021-02-10 13:00 ` Alfred M. Szmidt
2021-02-11 13:37 ` Richard Stallman
2 siblings, 2 replies; 93+ messages in thread
From: Gregory Heytings @ 2021-02-10 11:07 UTC (permalink / raw)
To: Richard Stallman; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 1228 bytes --]
>
> Suppose we reserve one key for third-party packages. Let's refer to
> that key as C-α, to avoid specifying which key is chosen.
>
> Various packages will set up their own bindings for it. If you load
> more than one such package, which package's bindings will you get? How
> do you get the ones you want?
>
This is something that should be left to packages. Org-mode would bind,
say, C-α a, C-α c and C-α l, or perhaps C-α o a, C-α o c and C-α o l;
Magit would bind C-α g and C-α M-g, or perhaps C-α g g and C-α g f; and so
forth. There will be conflicts, of course, but only occasionally, and in
those cases users would have to do something to resolve the conflict.
>
> Here's an idea.
>
> Have one command you can use to specify which package's bindings C-α
> will run. It could be C-α C-α; then individual packages will not give
> their own bindings for C-α C-α.
>
> So you can type C-α C-α Foopkg RET, then C-α gives you the Foopkg
> bindings.
>
I'm not sure I understand what you mean. Would this mean that each time
you want to use, say, Org-mode you would have to C-α C-α org-mode RET
before typing C-α c? If so, I don't think this would work.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-10 11:07 ` Gregory Heytings
@ 2021-02-10 13:00 ` Alfred M. Szmidt
2021-02-10 13:59 ` Gregory Heytings
2021-02-10 16:35 ` Drew Adams
2021-02-11 13:37 ` Richard Stallman
1 sibling, 2 replies; 93+ messages in thread
From: Alfred M. Szmidt @ 2021-02-10 13:00 UTC (permalink / raw)
To: Gregory Heytings; +Cc: rms, emacs-devel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1117 bytes --]
> Suppose we reserve one key for third-party packages. Let's refer to
> that key as C-α, to avoid specifying which key is chosen.
>
> Various packages will set up their own bindings for it. If you load
> more than one such package, which package's bindings will you get? How
> do you get the ones you want?
This is something that should be left to packages. Org-mode would bind,
say, C-α a, C-α c and C-α l, or perhaps C-α o a, C-α o c and C-α o l;
Magit would bind C-α g and C-α M-g, or perhaps C-α g g and C-α g f; and so
forth. There will be conflicts, of course, but only occasionally, and in
those cases users would have to do something to resolve the conflict.
Wasn't C-? supposed to be a global keybinding? org-mode speciic
bindings don't make sense outside of org-mode and mode specific
keybindings already have a set that is already reserved for them. The
issue as I understood it was that there are some modes that have
bindings that make sense in a global context -- e.g., Magit
vs. vc-mode where the specific mode of the buffer doesn't matter.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-10 13:00 ` Alfred M. Szmidt
@ 2021-02-10 13:59 ` Gregory Heytings
2021-02-10 14:10 ` Alfred M. Szmidt
2021-02-10 16:35 ` [External] : " Drew Adams
2021-02-10 16:35 ` Drew Adams
1 sibling, 2 replies; 93+ messages in thread
From: Gregory Heytings @ 2021-02-10 13:59 UTC (permalink / raw)
To: Alfred M. Szmidt; +Cc: emacs-devel
>>> Suppose we reserve one key for third-party packages. Let's refer to
>>> that key as C-\alpha, to avoid specifying which key is chosen.
>>>
>>> Various packages will set up their own bindings for it. If you load
>>> more than one such package, which package's bindings will you get? How
>>> do you get the ones you want?
>>
>> This is something that should be left to packages. Org-mode would
>> bind, say, C-\alpha a, C-\alpha c and C-\alpha l, or perhaps C-\alpha o
>> a, C-\alpha o c and C-\alpha o l; Magit would bind C-\alpha g and
>> C-\alpha M-g, or perhaps C-\alpha g g and C-\alpha g f; and so forth.
>> There will be conflicts, of course, but only occasionally, and in those
>> cases users would have to do something to resolve the conflict.
>
> Wasn't C-\alpha supposed to be a global keybinding? org-mode speciic
> bindings don't make sense outside of org-mode and mode specific
> keybindings already have a set that is already reserved for them.
>
Org-mode has indeed its own bindings when you are in an org-mode buffer,
but three of its commands make sense / are designed to be used outside of
org-mode buffers: org-agenda, org-capture and org-store-link.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-10 13:59 ` Gregory Heytings
@ 2021-02-10 14:10 ` Alfred M. Szmidt
2021-02-10 14:51 ` Gregory Heytings
2021-02-10 16:35 ` [External] : " Drew Adams
1 sibling, 1 reply; 93+ messages in thread
From: Alfred M. Szmidt @ 2021-02-10 14:10 UTC (permalink / raw)
To: Gregory Heytings; +Cc: emacs-devel
> Wasn't C-\alpha supposed to be a global keybinding? org-mode speciic
> bindings don't make sense outside of org-mode and mode specific
> keybindings already have a set that is already reserved for them.
Org-mode has indeed its own bindings when you are in an org-mode buffer,
but three of its commands make sense / are designed to be used outside of
org-mode buffers: org-agenda, org-capture and org-store-link.
So just random thinking, since we have calendar mode, and diary mode.
And those do not have a global binding, why should
org-agenda/org-capture/org-store-link get one?
Or why not put org-store-link under C-x r ? This seems similar enough
to "bookmarks", capture might even also fit there. Agenda, too if you
squint I suppose -- or an alias M-x agenda.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-10 14:10 ` Alfred M. Szmidt
@ 2021-02-10 14:51 ` Gregory Heytings
2021-02-10 15:12 ` Alfred M. Szmidt
0 siblings, 1 reply; 93+ messages in thread
From: Gregory Heytings @ 2021-02-10 14:51 UTC (permalink / raw)
To: Alfred M. Szmidt; +Cc: emacs-devel
>>> Wasn't C-\alpha supposed to be a global keybinding? org-mode speciic
>>> bindings don't make sense outside of org-mode and mode specific
>>> keybindings already have a set that is already reserved for them.
>>
>> Org-mode has indeed its own bindings when you are in an org-mode
>> buffer, but three of its commands make sense / are designed to be used
>> outside of org-mode buffers: org-agenda, org-capture and
>> org-store-link.
>
> So just random thinking, since we have calendar mode, and diary mode.
> And those do not have a global binding, why should
> org-agenda/org-capture/org-store-link get one?
>
Because someone who installs Emacs does not (in general) do that with the
specific intention of using calendar mode or diary mode, whereas someone
who installs org-mode does it with the specific intention of using
org-mode?
That being said, I would not object if Emacs decided to give a global
binding to some of the built-in apps (calendar, calc, gnus, diary, ...).
>
> Or why not put org-store-link under C-x r ?
>
That would be possible, but there are not many free letters there, and if
org-mode did this it would take the risk to have the chosen key reclaimed
by Emacs for another purpose at any time.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-10 14:51 ` Gregory Heytings
@ 2021-02-10 15:12 ` Alfred M. Szmidt
2021-02-10 15:23 ` Gregory Heytings
0 siblings, 1 reply; 93+ messages in thread
From: Alfred M. Szmidt @ 2021-02-10 15:12 UTC (permalink / raw)
To: Gregory Heytings; +Cc: emacs-devel
> Or why not put org-store-link under C-x r ?
That would be possible, but there are not many free letters there, and if
org-mode did this it would take the risk to have the chosen key reclaimed
by Emacs for another purpose at any time.
But org-mode is part of Emacs...
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-10 15:12 ` Alfred M. Szmidt
@ 2021-02-10 15:23 ` Gregory Heytings
0 siblings, 0 replies; 93+ messages in thread
From: Gregory Heytings @ 2021-02-10 15:23 UTC (permalink / raw)
To: Alfred M. Szmidt; +Cc: emacs-devel
>>> Or why not put org-store-link under C-x r ?
>>
>> That would be possible, but there are not many free letters there, and
>> if org-mode did this it would take the risk to have the chosen key
>> reclaimed by Emacs for another purpose at any time.
>
> But org-mode is part of Emacs...
>
Org-mode is an exception indeed, it is both part of Emacs and an external
package on Elpa. As you may have seen, the proposal is not only for
org-mode, it is for third-party libraries in general.
^ permalink raw reply [flat|nested] 93+ messages in thread
* RE: [External] : Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-10 13:59 ` Gregory Heytings
2021-02-10 14:10 ` Alfred M. Szmidt
@ 2021-02-10 16:35 ` Drew Adams
1 sibling, 0 replies; 93+ messages in thread
From: Drew Adams @ 2021-02-10 16:35 UTC (permalink / raw)
To: Gregory Heytings, Alfred M. Szmidt; +Cc: emacs-devel@gnu.org
> Org-mode has indeed its own bindings when you are in an org-mode
> buffer, but three of its commands make sense / are designed
> to be used outside of org-mode buffers: org-agenda, org-capture
> and org-store-link.
Org-mode also binds keys (at least one) globally
that (AFAIK) cannot possibly have a use outside
of an org-mode buffer.
Bug #46087:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=46087
^ permalink raw reply [flat|nested] 93+ messages in thread
* RE: [External] : Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-10 13:00 ` Alfred M. Szmidt
2021-02-10 13:59 ` Gregory Heytings
@ 2021-02-10 16:35 ` Drew Adams
2021-02-10 17:05 ` Stefan Monnier
1 sibling, 1 reply; 93+ messages in thread
From: Drew Adams @ 2021-02-10 16:35 UTC (permalink / raw)
To: Alfred M. Szmidt, Gregory Heytings; +Cc: rms@gnu.org, emacs-devel@gnu.org
> org-mode specific bindings don't make sense
> outside of org-mode and mode specific keybindings
> already have a set that is already reserved for them.
See bug #46087 (which has so far had no response).
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=46087
> The issue as I understood it was that there are
> some modes that have bindings that make sense
> in a global context.
Yes, that is indeed one of the points.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-10 11:07 ` Gregory Heytings
2021-02-10 13:00 ` Alfred M. Szmidt
@ 2021-02-11 13:37 ` Richard Stallman
2021-02-11 13:55 ` Gregory Heytings
1 sibling, 1 reply; 93+ messages in thread
From: Richard Stallman @ 2021-02-11 13:37 UTC (permalink / raw)
To: Gregory Heytings; +Cc: emacs-devel
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> > So you can type C-α C-α Foopkg RET, then C-α gives you the Foopkg
> > bindings.
> >
> I'm not sure I understand what you mean. Would this mean that each time
> you want to use, say, Org-mode you would have to C-α C-α org-mode RET
> before typing C-α c? If so, I don't think this would work.
Org is a collection of major modes, so I don't think it should need to
use the C-α mechanism. That mechanism would be meant for packages
that need to define a binding for a global prefix key. Major modes
can simply define local bindings.
> Org-mode also binds keys (at least one) globally
> that (AFAIK) cannot possibly have a use outside
> of an org-mode buffer.
Perhaps they should be changed into local (major mode) bindings.
--
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-11 13:37 ` Richard Stallman
@ 2021-02-11 13:55 ` Gregory Heytings
0 siblings, 0 replies; 93+ messages in thread
From: Gregory Heytings @ 2021-02-11 13:55 UTC (permalink / raw)
To: Richard Stallman; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 1200 bytes --]
>>> So you can type C-α C-α Foopkg RET, then C-α gives you the Foopkg
>>> bindings.
>>
>> I'm not sure I understand what you mean. Would this mean that each
>> time you want to use, say, Org-mode you would have to C-α C-α org-mode
>> RET before typing C-α c? If so, I don't think this would work.
>
> Org is a collection of major modes, so I don't think it should need to
> use the C-α mechanism. That mechanism would be meant for packages that
> need to define a binding for a global prefix key. Major modes can
> simply define local bindings.
>
Org is indeed a collection of major modes, but three of its commands are
meant to be bound to global bindings: org-capture, org-agenda, and
org-store-link. These commands are intended to be called from anywhere
else, say from Rmail. For example, org-capture is similar to (and derived
from) M-x remember, it lets you store notes without interrupting your work
flow: while reading a mail in Rmail you can select a part of its text and
call org-capture, the text you selected will be copied to a new note, you
can add other information to the note, and the result will be stored in
your "notes.org" file.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-09 16:45 ` Sean Whitton
2021-02-10 5:28 ` Richard Stallman
@ 2021-02-12 9:40 ` Jean Louis
1 sibling, 0 replies; 93+ messages in thread
From: Jean Louis @ 2021-02-12 9:40 UTC (permalink / raw)
To: Sean Whitton; +Cc: Eric Abrahamsen, emacs-devel
* Sean Whitton <spwhitton@spwhitton.name> [2021-02-09 19:45]:
> Hello,
>
> On Mon 08 Feb 2021 at 02:40PM -08, Eric Abrahamsen wrote:
>
> > If C-x C-z is already `suspend-frame', do we really need C-z C-z, too?
>
> As has been mentioned, the thought is that a terminal user who doesn't
> know much about Emacs will probably just hit it a second time if it
> doesn't do what they expect.
I use C-z in shell to stop the job and those jobs usually on my side
impact performance of the computer or performance of the other
job. Imagine the surprise when C-z does not work as expected, will the
user make conclusion to press C-z again after 1 second or after 20 or
30 seconds, and will the data on computer be preserved until that
conclusion arrives? I don't think so.
Removing C-z on console is dangerous for data of computer users IMHO.
Removing C-z on X has less impact on the computer users' data, but
helps user to switch from one frame (iconified) to something else.
Jean
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-07 22:05 PROPOSAL: Repurpose one key and reserve it for third-party packages Gregory Heytings
` (6 preceding siblings ...)
2021-02-08 17:59 ` Sean Whitton
@ 2021-02-08 20:32 ` Ulrich Mueller
2021-02-08 21:00 ` Gregory Heytings
[not found] ` <8735y56naf.fsf@posteo.net>
8 siblings, 1 reply; 93+ messages in thread
From: Ulrich Mueller @ 2021-02-08 20:32 UTC (permalink / raw)
To: Gregory Heytings; +Cc: emacs-devel
>>>>> On Sun, 07 Feb 2021, Gregory Heytings wrote:
> =Proposal=
> It is proposed to repurpose one key, and to reserve it in the key
> binding conventions for third-party packages. The keys that could be
> reserved for that purpose are:
> Option 1. C-z, with a single exception: "C-z C-z" would be bound to
> "suspend-frame"
Please don't. C-z is bound to "suspend" since a very long time (it's
even mentioned in Craig Finseth's book), and it is one of the few keys
that has an universal meaning on the tty in Unix like systems, across
applications.
Also, it would be a large pain to use anything other than a single key
for this function.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 20:32 ` Ulrich Mueller
@ 2021-02-08 21:00 ` Gregory Heytings
2021-02-08 21:37 ` Ulrich Mueller
0 siblings, 1 reply; 93+ messages in thread
From: Gregory Heytings @ 2021-02-08 21:00 UTC (permalink / raw)
To: Ulrich Mueller; +Cc: emacs-devel
>> It is proposed to repurpose one key, and to reserve it in the key
>> binding conventions for third-party packages. The keys that could be
>> reserved for that purpose are:
>>
>> Option 1. C-z, with a single exception: "C-z C-z" would be bound to
>> "suspend-frame"
>
> Please don't. C-z is bound to "suspend" since a very long time (it's
> even mentioned in Craig Finseth's book), and it is one of the few keys
> that has an universal meaning on the tty in Unix like systems, across
> applications.
>
> Also, it would be a large pain to use anything other than a single key
> for this function.
>
Do you really mean that it is "a large pain" to type "C-z C-z" (three
keypresses) instead of "C-z" (two keypresses)? For something you don't do
frequently?
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 21:00 ` Gregory Heytings
@ 2021-02-08 21:37 ` Ulrich Mueller
2021-02-08 22:00 ` Gregory Heytings
2021-02-09 16:57 ` Sean Whitton
0 siblings, 2 replies; 93+ messages in thread
From: Ulrich Mueller @ 2021-02-08 21:37 UTC (permalink / raw)
To: Gregory Heytings; +Cc: emacs-devel
>>>>> On Mon, 08 Feb 2021, Gregory Heytings wrote:
>>> It is proposed to repurpose one key, and to reserve it in the key
>>> binding conventions for third-party packages. The keys that could
>>> be reserved for that purpose are:
>>>
>>> Option 1. C-z, with a single exception: "C-z C-z" would be bound to
>>> "suspend-frame"
>>
>> Please don't. C-z is bound to "suspend" since a very long time (it's
>> even mentioned in Craig Finseth's book), and it is one of the few
>> keys that has an universal meaning on the tty in Unix like systems,
>> across applications.
>>
>> Also, it would be a large pain to use anything other than a single
>> key for this function.
> Do you really mean that it is "a large pain" to type "C-z C-z" (three
> keypresses) instead of "C-z" (two keypresses)? For something you don't
> do frequently?
I'd say that at least on a tty I use C-z more frequently than several
other control keys.
How about C-\ or C-^? Historically these were used as substitutes for
C-s and C-q when editing via serial lines (and there's still a function
enable-flow-control that activates it). Certainly that's no longer a
frequent use case?
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 21:37 ` Ulrich Mueller
@ 2021-02-08 22:00 ` Gregory Heytings
2021-02-09 16:57 ` Sean Whitton
1 sibling, 0 replies; 93+ messages in thread
From: Gregory Heytings @ 2021-02-08 22:00 UTC (permalink / raw)
To: Ulrich Mueller; +Cc: emacs-devel
>> Do you really mean that it is "a large pain" to type "C-z C-z" (three
>> keypresses) instead of "C-z" (two keypresses)? For something you don't
>> do frequently?
>
> I'd say that at least on a tty I use C-z more frequently than several
> other control keys.
>
So do I, but that still doesn't make it "a large pain" to type "C-z C-z"
instead of "C-z", I guess.
>
> How about C-\ or C-^?
>
I did consider to include C-\ in the options, but \ is hard to type on
most keyboards: C and \ are the two most distant keys on the most
widespread keyboard layout (QWERTY), on other keyboards \ requires
pressing Shift or AltGr, ... A letter would be much better.
C-^ is clearly not an option, it is way too hard to type even with the
QWERTY layout (C-S-6).
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-08 21:37 ` Ulrich Mueller
2021-02-08 22:00 ` Gregory Heytings
@ 2021-02-09 16:57 ` Sean Whitton
2021-02-09 17:19 ` Gregory Heytings
1 sibling, 1 reply; 93+ messages in thread
From: Sean Whitton @ 2021-02-09 16:57 UTC (permalink / raw)
To: Ulrich Mueller, Gregory Heytings; +Cc: emacs-devel
Hello,
On Mon 08 Feb 2021 at 10:37PM +01, Ulrich Mueller wrote:
> How about C-\ or C-^? Historically these were used as substitutes for
> C-s and C-q when editing via serial lines (and there's still a function
> enable-flow-control that activates it). Certainly that's no longer a
> frequent use case?
C-\ is used to set the input method. But we could move that
functionality to C-^, and then give up C-\ to third party packages.
--
Sean Whitton
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-09 16:57 ` Sean Whitton
@ 2021-02-09 17:19 ` Gregory Heytings
2021-02-09 17:59 ` Ulrich Mueller
` (2 more replies)
0 siblings, 3 replies; 93+ messages in thread
From: Gregory Heytings @ 2021-02-09 17:19 UTC (permalink / raw)
To: Sean Whitton; +Cc: emacs-devel
>> How about C-\ or C-^? Historically these were used as substitutes for
>> C-s and C-q when editing via serial lines (and there's still a function
>> enable-flow-control that activates it). Certainly that's no longer a
>> frequent use case?
>
> C-\ is used to set the input method. But we could move that
> functionality to C-^, and then give up C-\ to third party packages.
>
Except that \ is hard to type on most keyboards: C and \ are the two most
distant keys on the most widespread keyboard layout (QWERTY), and on other
keyboards \ requires pressing Shift or AltGr. Not exactly an appealing
prefix.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-09 17:19 ` Gregory Heytings
@ 2021-02-09 17:59 ` Ulrich Mueller
2021-02-09 18:24 ` Gregory Heytings
2021-02-09 18:19 ` Thibaut Verron
2021-02-09 21:34 ` Sean Whitton
2 siblings, 1 reply; 93+ messages in thread
From: Ulrich Mueller @ 2021-02-09 17:59 UTC (permalink / raw)
To: Gregory Heytings; +Cc: emacs-devel, Sean Whitton
>>>>> On Tue, 09 Feb 2021, Gregory Heytings wrote:
>>> How about C-\ or C-^? Historically these were used as substitutes
>>> for C-s and C-q when editing via serial lines (and there's still a
>>> function enable-flow-control that activates it). Certainly that's
>>> no longer a frequent use case?
>>
>> C-\ is used to set the input method. But we could move that
>> functionality to C-^, and then give up C-\ to third party packages.
> Except that \ is hard to type on most keyboards: C and \ are the two
> most distant keys on the most widespread keyboard layout (QWERTY), and
> on other keyboards \ requires pressing Shift or AltGr. Not exactly an
> appealing prefix.
The same could be said for C-o or M-o. And if you care about non-QWERTY
layouts, C-z on a German QWERTZ keyboard isn't much better.
(Also I wonder, aren't Shift, Ctrl, and Alt keys meant to be used
crosswise, i.e., left key for the right half of the keyboard, and vice
versa? For example, how do you type C-b or C-t?)
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-09 17:59 ` Ulrich Mueller
@ 2021-02-09 18:24 ` Gregory Heytings
0 siblings, 0 replies; 93+ messages in thread
From: Gregory Heytings @ 2021-02-09 18:24 UTC (permalink / raw)
To: Ulrich Mueller; +Cc: emacs-devel
>>> C-\ is used to set the input method. But we could move that
>>> functionality to C-^, and then give up C-\ to third party packages.
>>
>> Except that \ is hard to type on most keyboards: C and \ are the two
>> most distant keys on the most widespread keyboard layout (QWERTY), and
>> on other keyboards \ requires pressing Shift or AltGr. Not exactly an
>> appealing prefix.
>
> The same could be said for C-o or M-o. And if you care about non-QWERTY
> layouts, C-z on a German QWERTZ keyboard isn't much better.
>
At least these are letters, which do not require pressing Shift or AltGr
anywhere. Nothing is perfect, it's a practical problem, and "o" and "z"
are the only letters that have a non-zero chance to be repurposed.
>
> (Also I wonder, aren't Shift, Ctrl, and Alt keys meant to be used
> crosswise, i.e., left key for the right half of the keyboard, and vice
> versa? For example, how do you type C-b or C-t?)
>
That depends on your keyboard, not all keyboards have two Ctrl keys and
two Meta/Alt keys. I remapped Caps Lock to Ctrl, and have my left pinkie
almost always resting on it.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-09 17:19 ` Gregory Heytings
2021-02-09 17:59 ` Ulrich Mueller
@ 2021-02-09 18:19 ` Thibaut Verron
2021-02-09 19:16 ` Gregory Heytings
2021-02-09 22:19 ` Gregory Heytings
2021-02-09 21:34 ` Sean Whitton
2 siblings, 2 replies; 93+ messages in thread
From: Thibaut Verron @ 2021-02-09 18:19 UTC (permalink / raw)
To: Gregory Heytings; +Cc: emacs-devel, Sean Whitton
2021-02-09 18:19 UTC+01:00, Gregory Heytings <gregory@heytings.org>:
>
>>> How about C-\ or C-^? Historically these were used as substitutes for
>>> C-s and C-q when editing via serial lines (and there's still a function
>>> enable-flow-control that activates it). Certainly that's no longer a
>>> frequent use case?
>>
>> C-\ is used to set the input method. But we could move that
>> functionality to C-^, and then give up C-\ to third party packages.
>>
>
> Except that \ is hard to type on most keyboards: C and \ are the two most
> distant keys on the most widespread keyboard layout (QWERTY), and on other
> keyboards \ requires pressing Shift or AltGr.
I don't quite get how you reach that conclusion about the qwerty keyboard.
On my ISO102 qwerty keyboard, \ is diagonally adjacent to left control
(regardless of whether it's at its original position or on capslock),
and there is another \ left of RET, so two keys above, one left of
right control.
With an ANSI keyboard, it's only available on one key, which is 3 keys
above right control.
So in both cases, I don't think it qualifies as "the most distant key"
from control. To the contrary, I'd say that it is too close to it to
be comfortable to type if you don't use different hands for modifier
and key.
And while \ indeed is a pain to type on non-qwerty layouts, on an
azerty keyboard, the corresponding keys are < and *, both of which are
free with a C- modifier.
On a qwertz it's < and $, which again are free with a C- modifier.
(Those are the keyboards I can look at here, I don't know how it generalizes.)
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-09 18:19 ` Thibaut Verron
@ 2021-02-09 19:16 ` Gregory Heytings
2021-02-09 19:28 ` Thibaut Verron
2021-02-09 19:47 ` Stefan Monnier
2021-02-09 22:19 ` Gregory Heytings
1 sibling, 2 replies; 93+ messages in thread
From: Gregory Heytings @ 2021-02-09 19:16 UTC (permalink / raw)
To: Thibaut Verron; +Cc: emacs-devel
>> Except that \ is hard to type on most keyboards: C and \ are the two
>> most distant keys on the most widespread keyboard layout (QWERTY), and
>> on other keyboards \ requires pressing Shift or AltGr.
>
> I don't quite get how you reach that conclusion about the qwerty
> keyboard.
>
> On my ISO102 qwerty keyboard, \ is diagonally adjacent to left control
> (regardless of whether it's at its original position or on capslock),
> and there is another \ left of RET, so two keys above, one left of right
> control.
>
> With an ANSI keyboard, it's only available on one key, which is 3 keys
> above right control.
>
This is diverging more and more from the proposal, but: on smaller
keyboards (laptops) there is typically only one control key (on the bottom
left) and only \ key (near the right top).
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-09 19:16 ` Gregory Heytings
@ 2021-02-09 19:28 ` Thibaut Verron
2021-02-09 20:15 ` Gregory Heytings
2021-02-09 19:47 ` Stefan Monnier
1 sibling, 1 reply; 93+ messages in thread
From: Thibaut Verron @ 2021-02-09 19:28 UTC (permalink / raw)
To: Gregory Heytings; +Cc: emacs-devel
2021-02-09 20:16 UTC+01:00, Gregory Heytings <gregory@heytings.org>:
>
>>> Except that \ is hard to type on most keyboards: C and \ are the two
>>> most distant keys on the most widespread keyboard layout (QWERTY), and
>>> on other keyboards \ requires pressing Shift or AltGr.
>>
>> I don't quite get how you reach that conclusion about the qwerty
>> keyboard.
>>
>> On my ISO102 qwerty keyboard, \ is diagonally adjacent to left control
>> (regardless of whether it's at its original position or on capslock),
>> and there is another \ left of RET, so two keys above, one left of right
>> control.
>>
>> With an ANSI keyboard, it's only available on one key, which is 3 keys
>> above right control.
>>
>
> This is diverging more and more from the proposal, but: on smaller
> keyboards (laptops) there is typically only one control key (on the bottom
> left) and only \ key (near the right top).
>
I cannot remember ever laying my hands on a laptop with only one
control key, but that may be one more of those ISO vs ANSI things.
At any rate, it's far easier to type C-\ with the left hand on control
and right hand on \ than both with the right hand. The fact that your
left control is on capslock (mine is, too) shouldn't make a
difference: left pinky on control/capslock, right pinky on \.
Do you also find C-ret or C-backspace hard to type?
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-09 19:28 ` Thibaut Verron
@ 2021-02-09 20:15 ` Gregory Heytings
0 siblings, 0 replies; 93+ messages in thread
From: Gregory Heytings @ 2021-02-09 20:15 UTC (permalink / raw)
To: Thibaut Verron; +Cc: emacs-devel
>
> Do you also find C-ret or C-backspace hard to type?
>
C-\ or M-\, or C-RET or M-RET, are perhaps not "hard to type" by
themselves on keyboards that do not require pressing another modifier, but
as a prefix, followed by another letter, or C-letter, or M-letter, they
would. You have to move your hands too much. It can't be an appealing
solution for third-party libraries.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-09 19:16 ` Gregory Heytings
2021-02-09 19:28 ` Thibaut Verron
@ 2021-02-09 19:47 ` Stefan Monnier
1 sibling, 0 replies; 93+ messages in thread
From: Stefan Monnier @ 2021-02-09 19:47 UTC (permalink / raw)
To: Gregory Heytings; +Cc: Thibaut Verron, emacs-devel
> This is diverging more and more from the proposal, but: on smaller keyboards
> (laptops) there is typically only one control key (on the bottom left) and
> only \ key (near the right top).
And I don't own a "non-small keyboard" any more, and judging from
people around me, I'm far from the only one.
Stefan
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-09 18:19 ` Thibaut Verron
2021-02-09 19:16 ` Gregory Heytings
@ 2021-02-09 22:19 ` Gregory Heytings
1 sibling, 0 replies; 93+ messages in thread
From: Gregory Heytings @ 2021-02-09 22:19 UTC (permalink / raw)
To: Thibaut Verron; +Cc: emacs-devel
>
> And while \ indeed is a pain to type on non-qwerty layouts, on an azerty
> keyboard, the corresponding keys are < and *, both of which are free
> with a C- modifier. On a qwertz it's < and $, which again are free with
> a C- modifier.
>
I forgot to mention that these keys are indeed free, but do not work in a
terminal.
^ permalink raw reply [flat|nested] 93+ messages in thread
* Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
2021-02-09 17:19 ` Gregory Heytings
2021-02-09 17:59 ` Ulrich Mueller
2021-02-09 18:19 ` Thibaut Verron
@ 2021-02-09 21:34 ` Sean Whitton
2 siblings, 0 replies; 93+ messages in thread
From: Sean Whitton @ 2021-02-09 21:34 UTC (permalink / raw)
To: Gregory Heytings; +Cc: emacs-devel
Hello,
On Tue 09 Feb 2021 at 05:19PM GMT, Gregory Heytings wrote:
>>> How about C-\ or C-^? Historically these were used as substitutes for
>>> C-s and C-q when editing via serial lines (and there's still a function
>>> enable-flow-control that activates it). Certainly that's no longer a
>>> frequent use case?
>>
>> C-\ is used to set the input method. But we could move that
>> functionality to C-^, and then give up C-\ to third party packages.
>>
>
> Except that \ is hard to type on most keyboards: C and \ are the two most
> distant keys on the most widespread keyboard layout (QWERTY), and on other
> keyboards \ requires pressing Shift or AltGr. Not exactly an appealing
> prefix.
Hmm, if you're using two hands for the C and the \ and you're on QWERTY
then it's not too bad.
Should we be trying to take into account other layouts, given that most
of Emacs' default bindings are designed for a keyboard which doesn't
even exist anymore (Space Cadet)?
ISTM that we are only rarely going to find options which are optimum for
all layouts at once, so maybe we should expect users of those layouts to
move hard things around (and that moving around could be included in
Emacs).
--
Sean Whitton
^ permalink raw reply [flat|nested] 93+ messages in thread
[parent not found: <8735y56naf.fsf@posteo.net>]