* bug#30530: 26.0; Emacs manual: mention (1) user-reserved keys, (2) users can bind any keys
[not found] ` <<83lgfi4qw2.fsf@gnu.org>
@ 2018-02-24 17:00 ` Drew Adams
2018-02-24 17:44 ` Eli Zaretskii
0 siblings, 1 reply; 14+ messages in thread
From: Drew Adams @ 2018-02-24 17:00 UTC (permalink / raw)
To: Eli Zaretskii, Drew Adams, Nicolas Goaziou; +Cc: 30530
> > Following up on the request by Nicolas Goaziou in bug #28263, please
> > consider adding some information about the keys that users can bind.
>
> I'm sorry, but I really don't understand the issue here, and I would
> prefer not to re-read the long discussion in that bug report (and
> expect not to be any wiser if I did). Can someone please summarize
> the issue at hand?
>
> > 1. Say that Emacs and 3rd-party Lisp libraries often bind keys, but that
> > some keys are specifically reserved, by convention, for users. Point
> > out which keys are reserved for users.
>
> Users can bind _any_ keys, as you yourself say:
But some users do not know that. Telling them that explicitly
in the Emacs manual can help make it clear.
> > 2. Make it clear that users can, in any case, bind ANY keys they want;
> > they are not limited to binding user-reserved keys. In particular,
> > users can rebind keys that Emacs or some 3rd-party library has already
> > bound.
>
> Given this, what good will it do to say something about keys reserved
> for users in the user manual? Lisp developers should know that, which
> is why it is in the ELisp manual.
Some users do not know that these are the "safest" keys to bind,
because they are reserved for users. Knowing that can help them
by focusing them on those keys, which are less likely to be in
conflict with libraries.
> > 3. State that after a user has bound a key, evaluating some Emacs code
> > (including loading a Lisp library) might rebind that key if it is not
> > reserved for users. This is the reason some keys are reserved for
> > users: to prevent the bother of some non-user code overriding user
> > key bindings.
>
> How would this help users? What would they do to avoid that?
It's not about avoiding it. It's about making users aware of
how it works. They can act with more confidence and less
confusion if they know that some keys are reserved for them
and other keys they might bind risk being overridden by
loading a library or turning on a mode. Less surprise and
pondering "WTF is going on?".
> Bottom line, I don't really understand the issue you are asking to be
> solved.
Did you check bug #28263?
> The bug report is phrased as a list of instructions to be
> executed, but that's not how bug reporting should work -- you should
> describe the problem itself as well.
The problem is that users do not necessarily have a good idea
what keys they can bind (answer: any keys) and which keys
Lisp libraries are likely to bind (answer: keys not reserved
or users). Users have been known to ask about such things.
Stating clearly in the Emacs manual what the case is in this
regard can help users - see above.
If you still do not get it, and you still do not want to look
at bug #28263, then feel free to close this bug.
This bug report doesn't ask for a lot. It would be enough to
state these two things in the Emacs manual:
1. That some keys are reserved for users, so that if you bind
those there is little chance that if you later load some
library or turn on a mode you will seem to lose those bindings
you made.
2. You can nevertheless bind any keys. Just be aware of #1,
so you are not surprised if some non-reserved key you have
bound seems to have somehow later become co-opted.
The keys that are reserved for users could be listed/described,
or the Emacs manual could just link to their description in
the Elisp manual. Users should have _some_ easy way of knowing
which keys are reserved for their use.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#30530: 26.0; Emacs manual: mention (1) user-reserved keys, (2) users can bind any keys
2018-02-24 17:00 ` bug#30530: 26.0; Emacs manual: mention (1) user-reserved keys, (2) users can bind any keys Drew Adams
@ 2018-02-24 17:44 ` Eli Zaretskii
2018-02-24 21:27 ` Nicolas Goaziou
` (3 more replies)
0 siblings, 4 replies; 14+ messages in thread
From: Eli Zaretskii @ 2018-02-24 17:44 UTC (permalink / raw)
To: Drew Adams; +Cc: 30530-done, mail
> Date: Sat, 24 Feb 2018 09:00:51 -0800 (PST)
> From: Drew Adams <drew.adams@oracle.com>
> Cc: 30530@debbugs.gnu.org
>
> The problem is that users do not necessarily have a good idea
> what keys they can bind (answer: any keys) and which keys
> Lisp libraries are likely to bind (answer: keys not reserved
> or users). Users have been known to ask about such things.
I added some text about the latter, although I seriously doubt that it
will be discoverable enough to make any difference.
As for the former, the manual is full of examples using all kinds of
keys in bindings (only one of them is from the reserved area, btw), so
it should be pretty clear that there are limitations on that.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#30530: 26.0; Emacs manual: mention (1) user-reserved keys, (2) users can bind any keys
2018-02-24 17:44 ` Eli Zaretskii
@ 2018-02-24 21:27 ` Nicolas Goaziou
2018-03-01 15:44 ` Eli Zaretskii
[not found] ` <<87zi3y13jf.fsf@nicolasgoaziou.fr>
` (2 subsequent siblings)
3 siblings, 1 reply; 14+ messages in thread
From: Nicolas Goaziou @ 2018-02-24 21:27 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 30530-done
Hello,
Eli Zaretskii <eliz@gnu.org> writes:
> I added some text about the latter, although I seriously doubt that it
> will be discoverable enough to make any difference.
Thank you.
For good measure, could you also add a @cindex about it? E.g,
@cindex user reserved key bindings
For reference, this bug report stems from the following part of the Org
manual:
For a better experience, the three Org commands ~org-store-link~,
~org-capture~ and ~org-agenda~ ought to be accessible anywhere in
Emacs, not just in Org buffers. To that effect, you need to bind them
to globally available keys, like the ones reserved for users (see
[[info:elisp::Key%20Binding%20Conventions]]). Here are suggested
bindings, please modify the keys to your own liking.
#+begin_src emacs-lisp
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cc" 'org-capture)
#+end_src
Drew pointed out that suggesting to bind user reserved keys was almost
as if we were binding them.
I can hear that argument, and would happily stop the paragraph at
"globally available keys". However, I have the feeling this deserves
a cross-reference, and an appendix in the Elisp manual doesn't sound
like an appropriate location.
Regards,
--
Nicolas Goaziou 0x80A93738
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#30530: 26.0; Emacs manual: mention (1) user-reserved keys, (2) users can bind any keys
2018-02-24 21:27 ` Nicolas Goaziou
@ 2018-03-01 15:44 ` Eli Zaretskii
0 siblings, 0 replies; 14+ messages in thread
From: Eli Zaretskii @ 2018-03-01 15:44 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: 30530
> From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
> Cc: Drew Adams <drew.adams@oracle.com>, 30530-done@debbugs.gnu.org
> Date: Sat, 24 Feb 2018 22:27:48 +0100
>
> For good measure, could you also add a @cindex about it? E.g,
>
> @cindex user reserved key bindings
Starting an index entry with "user" is not a good idea, as it's too
general a word. I added "reserved key bindings" instead.
> For a better experience, the three Org commands ~org-store-link~,
> ~org-capture~ and ~org-agenda~ ought to be accessible anywhere in
> Emacs, not just in Org buffers. To that effect, you need to bind them
> to globally available keys, like the ones reserved for users (see
> [[info:elisp::Key%20Binding%20Conventions]]). Here are suggested
> bindings, please modify the keys to your own liking.
>
> #+begin_src emacs-lisp
> (global-set-key "\C-cl" 'org-store-link)
> (global-set-key "\C-ca" 'org-agenda)
> (global-set-key "\C-cc" 'org-capture)
> #+end_src
>
> Drew pointed out that suggesting to bind user reserved keys was almost
> as if we were binding them.
I disagree with Drew. By that logic, no one can ever say anything
about binding these keys, and they must always remain unbound, which
of course would defeat the reason for reserving them.
^ permalink raw reply [flat|nested] 14+ messages in thread
[parent not found: <<87zi3y13jf.fsf@nicolasgoaziou.fr>]
[parent not found: <<<87zi3y13jf.fsf@nicolasgoaziou.fr>]
[parent not found: <<<<87zi3y13jf.fsf@nicolasgoaziou.fr>]
* bug#30530: 26.0; Emacs manual: mention (1) user-reserved keys, (2) users can bind any keys
@ 2018-02-19 16:16 Drew Adams
2018-02-24 10:35 ` Eli Zaretskii
0 siblings, 1 reply; 14+ messages in thread
From: Drew Adams @ 2018-02-19 16:16 UTC (permalink / raw)
To: 30530
Following up on the request by Nicolas Goaziou in bug #28263, please
consider adding some information about the keys that users can bind.
Please:
1. Say that Emacs and 3rd-party Lisp libraries often bind keys, but that
some keys are specifically reserved, by convention, for users. Point
out which keys are reserved for users.
2. Make it clear that users can, in any case, bind ANY keys they want;
they are not limited to binding user-reserved keys. In particular,
users can rebind keys that Emacs or some 3rd-party library has already
bound.
3. State that after a user has bound a key, evaluating some Emacs code
(including loading a Lisp library) might rebind that key if it is not
reserved for users. This is the reason some keys are reserved for
users: to prevent the bother of some non-user code overriding user
key bindings.
The keys reserved for users are currently specified only in the Elisp
manual (node `Key Binding Conventions'). Please consider adding a link
to that node from wherever the user-reserved keys will be called out in
the Emacs manual.
A likely location in the Emacs manual for such info would be somewhere
under node `Customizing Key Bindings'.
In GNU Emacs 26.0.91 (build 1, x86_64-w64-mingw32)
of 2018-01-22
Repository revision: 752fba992b793a74d202c9cfc3e1a92fd458e748
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
`configure --without-dbus --host=x86_64-w64-mingw32
--without-compress-install 'CFLAGS=-O2 -static -g3''
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#30530: 26.0; Emacs manual: mention (1) user-reserved keys, (2) users can bind any keys
2018-02-19 16:16 Drew Adams
@ 2018-02-24 10:35 ` Eli Zaretskii
0 siblings, 0 replies; 14+ messages in thread
From: Eli Zaretskii @ 2018-02-24 10:35 UTC (permalink / raw)
To: Drew Adams, Nicolas Goaziou; +Cc: 30530
> Date: Mon, 19 Feb 2018 08:16:09 -0800 (PST)
> From: Drew Adams <drew.adams@oracle.com>
>
> Following up on the request by Nicolas Goaziou in bug #28263, please
> consider adding some information about the keys that users can bind.
I'm sorry, but I really don't understand the issue here, and I would
prefer not to re-read the long discussion in that bug report (and
expect not to be any wiser if I did). Can someone please summarize
the issue at hand?
> 1. Say that Emacs and 3rd-party Lisp libraries often bind keys, but that
> some keys are specifically reserved, by convention, for users. Point
> out which keys are reserved for users.
Users can bind _any_ keys, as you yourself say:
> 2. Make it clear that users can, in any case, bind ANY keys they want;
> they are not limited to binding user-reserved keys. In particular,
> users can rebind keys that Emacs or some 3rd-party library has already
> bound.
Given this, what good will it do to say something about keys reserved
for users in the user manual? Lisp developers should know that, which
is why i tis in the ELisp manual.
> 3. State that after a user has bound a key, evaluating some Emacs code
> (including loading a Lisp library) might rebind that key if it is not
> reserved for users. This is the reason some keys are reserved for
> users: to prevent the bother of some non-user code overriding user
> key bindings.
How would this help users? What would they do to avoid that?
Bottom line, I don't really understand the issue you are asking to be
solved. The bug report is phrased as a list of instructions to be
executed, but that's not how bug reporting should work -- you should
describe the problem itself as well.
Thanks.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2018-03-02 15:49 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <<f630bd00-a129-48ec-8788-2ed09964b598@default>
[not found] ` <<83lgfi4qw2.fsf@gnu.org>
2018-02-24 17:00 ` bug#30530: 26.0; Emacs manual: mention (1) user-reserved keys, (2) users can bind any keys Drew Adams
2018-02-24 17:44 ` Eli Zaretskii
2018-02-24 21:27 ` Nicolas Goaziou
2018-03-01 15:44 ` Eli Zaretskii
[not found] ` <<87zi3y13jf.fsf@nicolasgoaziou.fr>
[not found] ` <<83d10nyf4y.fsf@gnu.org>
2018-03-01 17:31 ` Drew Adams
2018-03-01 19:22 ` Eli Zaretskii
2018-03-01 19:30 ` Noam Postavsky
[not found] ` <<<87zi3y13jf.fsf@nicolasgoaziou.fr>
[not found] ` <<<83d10nyf4y.fsf@gnu.org>
[not found] ` <<92c8fd97-8e96-4e2b-8706-f5ca97869912@default>
[not found] ` <<831sh3y51x.fsf@gnu.org>
2018-03-01 21:00 ` Drew Adams
2018-03-01 21:33 ` Noam Postavsky
2018-03-02 5:32 ` Eli Zaretskii
[not found] ` <<<<87zi3y13jf.fsf@nicolasgoaziou.fr>
[not found] ` <<<<83d10nyf4y.fsf@gnu.org>
[not found] ` <<<92c8fd97-8e96-4e2b-8706-f5ca97869912@default>
[not found] ` <<<831sh3y51x.fsf@gnu.org>
[not found] ` <<eea83f2b-2dea-49c6-941d-5db34a741a5d@default>
[not found] ` <<83woyvvy8g.fsf@gnu.org>
2018-03-02 15:17 ` Drew Adams
2018-03-02 15:49 ` Eli Zaretskii
2018-02-19 16:16 Drew Adams
2018-02-24 10:35 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.