* bug#40916: [PATCH] Add "p" and "n" convenience bindings to help-mode-map
@ 2020-04-28 0:26 Amin Bandali
2020-04-28 17:02 ` Drew Adams
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Amin Bandali @ 2020-04-28 0:26 UTC (permalink / raw)
To: 40916
[-- Attachment #1.1: Type: text/plain, Size: 572 bytes --]
Hello,
The following binds "p" to backward-button, and "n" to forward-button in
help-mode-map for more conveniently jumping between buttons in *Help*
buffers. I have found myself constantly reaching for these in *Help*
buffers after using helpful [0] for a while.
[0]: https://github.com/Wilfred/helpful
I thought about adding these to button-map itself, but that seemed like
a more invasive change, and I wasn't sure about its side effects e.g. in
non-read-only buffers.
The patch is against emacs-27, since it's a trivial and hopefully
completely harmless change.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-Add-p-and-n-convenience-bindings-to-help-mode-map.patch --]
[-- Type: text/x-diff, Size: 1039 bytes --]
From efcca34ed0cab882318e2654dd667e31f6d32511 Mon Sep 17 00:00:00 2001
From: Amin Bandali <bandali@gnu.org>
Date: Mon, 27 Apr 2020 20:06:55 -0400
Subject: [PATCH] Add "p" and "n" convenience bindings to help-mode-map
* lisp/help-mode.el (help-mode-map): Bind "p" to backward-button, and
"n" to forward-button for more conveniently jumping between buttons in
*Help* buffers.
---
lisp/help-mode.el | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index bae8281147..0f8380255e 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -37,6 +37,8 @@ help-mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map (make-composed-keymap button-buffer-map
special-mode-map))
+ (define-key map "p" 'backward-button)
+ (define-key map "n" 'forward-button)
(define-key map [mouse-2] 'help-follow-mouse)
(define-key map "l" 'help-go-back)
(define-key map "r" 'help-go-forward)
--
2.25.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 857 bytes --]
^ permalink raw reply related [flat|nested] 7+ messages in thread
* bug#40916: [PATCH] Add "p" and "n" convenience bindings to help-mode-map
2020-04-28 0:26 bug#40916: [PATCH] Add "p" and "n" convenience bindings to help-mode-map Amin Bandali
@ 2020-04-28 17:02 ` Drew Adams
2020-04-29 5:23 ` Amin Bandali
2020-04-28 17:33 ` Stefan Kangas
2020-08-08 12:08 ` Lars Ingebrigtsen
2 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2020-04-28 17:02 UTC (permalink / raw)
To: Amin Bandali, 40916
> The following binds "p" to backward-button, and "n" to forward-button
> in help-mode-map for more conveniently jumping between buttons in *Help*
> buffers. I have found myself constantly reaching for these in *Help*
> buffers after using helpful [0] for a while.
We already have TAB and S-TAB. TAB has been
there forever, and S-TAB was added because it
was claimed to be "standard" or "conventional"
in some way.
And TAB and S-TAB are the same keys we use in
Info (where `n' and `p' move forward/backward
among node siblings).
Are we adding redundant keys now just because
someone gets used to them in some other app
or 3rd-party library?
Nothing prevents a user from binding `n' and
`p' that way. And nothing prevents a library
from having a minor mode that binds them.
And Emacs not binding them by default means
they remain available for something else in
the future.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#40916: [PATCH] Add "p" and "n" convenience bindings to help-mode-map
2020-04-28 0:26 bug#40916: [PATCH] Add "p" and "n" convenience bindings to help-mode-map Amin Bandali
2020-04-28 17:02 ` Drew Adams
@ 2020-04-28 17:33 ` Stefan Kangas
2020-04-29 5:15 ` Amin Bandali
2020-08-08 12:08 ` Lars Ingebrigtsen
2 siblings, 1 reply; 7+ messages in thread
From: Stefan Kangas @ 2020-04-28 17:33 UTC (permalink / raw)
To: Amin Bandali; +Cc: 40916
Hi Amin,
Amin Bandali <bandali@gnu.org> writes:
> The following binds "p" to backward-button, and "n" to forward-button in
> help-mode-map for more conveniently jumping between buttons in *Help*
> buffers. I have found myself constantly reaching for these in *Help*
> buffers after using helpful [0] for a while.
Thanks, I like the idea. I tried it, and it seems useful.
But I have one concern. Is there anything else we could use those
keys for? For example, what about navigating sections in the file, or
even (next|previous)-line?
Let's say we introduce a "foldable" help buffer, such that minor mode
documentation would be collapsed by default. (Sorry, I can't find the
feature request now, but it's in the bug tracker somewhere.)
Will this key binding still be the one we want?
> The patch is against emacs-27, since it's a trivial and hopefully
> completely harmless change.
I think we should do this on master to let people test the change and
get used to it. Maybe we will want to change it before release.
Best regards,
Stefan Kangas
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#40916: [PATCH] Add "p" and "n" convenience bindings to help-mode-map
2020-04-28 17:33 ` Stefan Kangas
@ 2020-04-29 5:15 ` Amin Bandali
2020-05-01 0:36 ` Stefan Kangas
0 siblings, 1 reply; 7+ messages in thread
From: Amin Bandali @ 2020-04-29 5:15 UTC (permalink / raw)
To: Stefan Kangas; +Cc: 40916
[-- Attachment #1: Type: text/plain, Size: 1809 bytes --]
Hi Stefan,
Stefan Kangas <stefan@marxist.se> writes:
> Hi Amin,
>
> Amin Bandali <bandali@gnu.org> writes:
>
>> The following binds "p" to backward-button, and "n" to forward-button in
>> help-mode-map for more conveniently jumping between buttons in *Help*
>> buffers. I have found myself constantly reaching for these in *Help*
>> buffers after using helpful [0] for a while.
>
> Thanks, I like the idea. I tried it, and it seems useful.
>
Thank you.
>
> But I have one concern. Is there anything else we could use those
> keys for? For example, what about navigating sections in the file, or
> even (next|previous)-line?
>
> Let's say we introduce a "foldable" help buffer, such that minor mode
> documentation would be collapsed by default. (Sorry, I can't find the
> feature request now, but it's in the bug tracker somewhere.)
>
> Will this key binding still be the one we want?
>
That's indeed a valid question/criticism. And my answer is that I'm not
quite sure. As of now, I think having this behaviour makes sense; but I
can't say for sure it would remain the best use for p/n in the future.
Especially considering the "foldable" help idea you mentioned, which I
had not heard of or considered prior to writing this reply. :-)
>
>> The patch is against emacs-27, since it's a trivial and hopefully
>> completely harmless change.
>
> I think we should do this on master to let people test the change and
> get used to it. Maybe we will want to change it before release.
>
> Best regards,
> Stefan Kangas
>
That's a good argument for doing this on master at least at first.
Best,
--
Amin Bandali
Free Software activist | GNU maintainer & webmaster
GPG: BE62 7373 8E61 6D6D 1B3A 08E8 A21A 0202 4881 6103
https://bandali.eu.org
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 857 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#40916: [PATCH] Add "p" and "n" convenience bindings to help-mode-map
2020-04-28 17:02 ` Drew Adams
@ 2020-04-29 5:23 ` Amin Bandali
0 siblings, 0 replies; 7+ messages in thread
From: Amin Bandali @ 2020-04-29 5:23 UTC (permalink / raw)
To: Drew Adams; +Cc: 40916
[-- Attachment #1: Type: text/plain, Size: 1448 bytes --]
Drew Adams <drew.adams@oracle.com> writes:
>> The following binds "p" to backward-button, and "n" to forward-button
>> in help-mode-map for more conveniently jumping between buttons in *Help*
>> buffers. I have found myself constantly reaching for these in *Help*
>> buffers after using helpful [0] for a while.
>
> We already have TAB and S-TAB. TAB has been
> there forever, and S-TAB was added because it
> was claimed to be "standard" or "conventional"
> in some way.
>
> And TAB and S-TAB are the same keys we use in
> Info (where `n' and `p' move forward/backward
> among node siblings).
>
Thanks; I am already aware of those.
>
> Are we adding redundant keys now just because
> someone gets used to them in some other app
> or 3rd-party library?
>
No, we are discussing it. And I don't see anything inherently wrong
with having more than one keybinding for a command; as is already the
case for various other built-in commands.
>
> Nothing prevents a user from binding `n' and
> `p' that way. And nothing prevents a library
> from having a minor mode that binds them.
>
> And Emacs not binding them by default means
> they remain available for something else in
> the future.
>
Yes; these are valid criticisms. See my reply to Stefan.
--
Amin Bandali
Free Software activist | GNU maintainer & webmaster
GPG: BE62 7373 8E61 6D6D 1B3A 08E8 A21A 0202 4881 6103
https://bandali.eu.org
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 857 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#40916: [PATCH] Add "p" and "n" convenience bindings to help-mode-map
2020-04-29 5:15 ` Amin Bandali
@ 2020-05-01 0:36 ` Stefan Kangas
0 siblings, 0 replies; 7+ messages in thread
From: Stefan Kangas @ 2020-05-01 0:36 UTC (permalink / raw)
To: Amin Bandali; +Cc: 40916
Amin Bandali <bandali@gnu.org> writes:
>> Let's say we introduce a "foldable" help buffer, such that minor mode
>> documentation would be collapsed by default. (Sorry, I can't find the
>> feature request now, but it's in the bug tracker somewhere.)
>>
>> Will this key binding still be the one we want?
>
> That's indeed a valid question/criticism. And my answer is that I'm not
> quite sure. As of now, I think having this behaviour makes sense; but I
> can't say for sure it would remain the best use for p/n in the future.
> Especially considering the "foldable" help idea you mentioned, which I
> had not heard of or considered prior to writing this reply. :-)
I found the bug where the above feature was discussed:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=2473
Best regards,
Stefan Kangas
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#40916: [PATCH] Add "p" and "n" convenience bindings to help-mode-map
2020-04-28 0:26 bug#40916: [PATCH] Add "p" and "n" convenience bindings to help-mode-map Amin Bandali
2020-04-28 17:02 ` Drew Adams
2020-04-28 17:33 ` Stefan Kangas
@ 2020-08-08 12:08 ` Lars Ingebrigtsen
2 siblings, 0 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-08 12:08 UTC (permalink / raw)
To: Amin Bandali; +Cc: 40916
Amin Bandali <bandali@gnu.org> writes:
> The following binds "p" to backward-button, and "n" to forward-button in
> help-mode-map for more conveniently jumping between buttons in *Help*
> buffers. I have found myself constantly reaching for these in *Help*
> buffers after using helpful [0] for a while.
The objection was raised that we might want to use these keys for other
commands in the future in these buffers, and I agree with that.
Besides, there's a bunch of other modes that have buttons that already
bind n/p for other things, and TAB/S-TAB work in all these buffers. So
I think we'd be encouraging users to remember the wrong set of key
strokes here: They should rely on TAB/S-TAB everywhere.
So I'm closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-08-08 12:08 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-28 0:26 bug#40916: [PATCH] Add "p" and "n" convenience bindings to help-mode-map Amin Bandali
2020-04-28 17:02 ` Drew Adams
2020-04-29 5:23 ` Amin Bandali
2020-04-28 17:33 ` Stefan Kangas
2020-04-29 5:15 ` Amin Bandali
2020-05-01 0:36 ` Stefan Kangas
2020-08-08 12:08 ` Lars Ingebrigtsen
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.