* bug#62708: [PATCH] Add option to control default outlining in C-h b
@ 2023-04-07 10:37 Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-08 12:53 ` Eli Zaretskii
0 siblings, 1 reply; 8+ messages in thread
From: Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-04-07 10:37 UTC (permalink / raw)
To: 62708
[-- Attachment #1: Type: text/plain, Size: 893 bytes --]
Tags: patch
Hi,
The attached patch adds a user option `describe-bindings-outline-rules`
that is used in `describe-bindings` to as the local value of
`outline-default-rules`. This replaces a currently hard-coded setting
that takes care of hiding "Key translations" to give users more control.
For example, to also have `pixel-scroll-precision-mode` bindings
initially hidden, one can set this option to:
'((match-regexp . "Key translations\\|pixel-scroll-precision-mode"))
In GNU Emacs 30.0.50 (build 1, x86_64-apple-darwin22.4.0, NS
appkit-2299.50 Version 13.3 (Build 22E252)) of 2023-04-06 built on
esmac
Repository revision: 5e5f5b28e92a3bb927bb03c783c426c6c3baeadc
Repository branch: master
Windowing system distributor 'Apple', version 10.3.2299
System Description: macOS 13.3
Configured using:
'configure CFLAGS=-O3 --with-native-compilation --with-json
--with-tree-sitter'
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-option-to-control-default-outlining-in-C-h-b.patch --]
[-- Type: text/patch, Size: 2294 bytes --]
From ce5ef0c3760ba0f954779f9e52d41a1ff89c210b Mon Sep 17 00:00:00 2001
From: Eshel Yaron <me@eshelyaron.com>
Date: Fri, 7 Apr 2023 13:09:59 +0300
Subject: [PATCH] Add option to control default outlining in C-h b
* lisp/help.el (describe-bindings-outline-rules): new user option.
(describe-bindings): use it instead of hardcoding "Key translations".
---
etc/NEWS | 5 +++++
lisp/help.el | 13 +++++++++++--
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index d20d9f65ac9..303b1e3c375 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -30,6 +30,11 @@ applies, and please also update docstrings as needed.
\f
* Changes in Emacs 30.1
+---
+** New user option 'describe-bindings-outline-rules'.
+This user option controls outline visibility in the output buffer of
+'describe-bindings' when 'describe-bindings-outline' in non-nil.
+
** X selection requests are now handled much faster and asynchronously.
This means it should be less necessary to disable the likes of
'select-active-regions' when Emacs is running over a slow network
diff --git a/lisp/help.el b/lisp/help.el
index 6eac037df2c..886c6e0acc8 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -727,6 +727,16 @@ describe-bindings-show-prefix-commands
:group 'help
:version "29.1")
+(defcustom describe-bindings-outline-rules '((match-regexp . "Key translations"))
+ "Visibility rules for outlines in the output buffer of `describe-bindings'.
+This is used as the value of `outline-default-rules' in the
+output buffer of `describe-bindings' when
+`describe-bindings-outline' is non-nil, otherwise this option
+doesn't have any effect."
+ :type 'boolean
+ :group 'help
+ :version "30.1")
+
(declare-function outline-hide-subtree "outline")
(defun describe-bindings (&optional prefix buffer)
@@ -756,8 +766,7 @@ describe-bindings
outline-minor-mode-use-buttons 'insert
;; Hide the longest body.
outline-default-state 1
- outline-default-rules
- '((match-regexp . "Key translations")))
+ outline-default-rules describe-bindings-outline-rules)
(outline-minor-mode 1)
(save-excursion
(goto-char (point-min))
--
2.40.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* bug#62708: [PATCH] Add option to control default outlining in C-h b
2023-04-07 10:37 bug#62708: [PATCH] Add option to control default outlining in C-h b Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-04-08 12:53 ` Eli Zaretskii
2023-04-08 19:39 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2023-04-08 12:53 UTC (permalink / raw)
To: Eshel Yaron; +Cc: 62708
> Date: Fri, 07 Apr 2023 13:37:56 +0300
> From: Eshel Yaron via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
> The attached patch adds a user option `describe-bindings-outline-rules`
> that is used in `describe-bindings` to as the local value of
> `outline-default-rules`. This replaces a currently hard-coded setting
> that takes care of hiding "Key translations" to give users more control.
> For example, to also have `pixel-scroll-precision-mode` bindings
> initially hidden, one can set this option to:
>
> '((match-regexp . "Key translations\\|pixel-scroll-precision-mode"))
Thanks.
However, you already exhausted the amount of changes we can accept
from you without a copyright assignment. Would you like to start your
assignment paperwork at this time? Then we can accept this and other
contributions from you when the paperwork is done.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#62708: [PATCH] Add option to control default outlining in C-h b
2023-04-08 12:53 ` Eli Zaretskii
@ 2023-04-08 19:39 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-21 15:57 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 8+ messages in thread
From: Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-04-08 19:39 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 62708
Hello Eli,
Eli Zaretskii <eliz@gnu.org> writes:
> Thanks.
>
> However, you already exhausted the amount of changes we can accept
> from you without a copyright assignment. Would you like to start your
> assignment paperwork at this time? Then we can accept this and other
> contributions from you when the paperwork is done.
I understand. I have the required documents ready and I /thought/ sent
them over already several weeks ago. I didn't get a confirmation
though. Anyway, I've just sent my paperwork again so I hope it'll be in
order soon.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#62708: [PATCH] Add option to control default outlining in C-h b
2023-04-08 19:39 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-04-21 15:57 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-22 9:53 ` Eli Zaretskii
0 siblings, 1 reply; 8+ messages in thread
From: Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-04-21 15:57 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 62708
Eshel Yaron <me@eshelyaron.com> writes:
> Hello Eli,
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
>> Thanks.
>>
>> However, you already exhausted the amount of changes we can accept
>> from you without a copyright assignment. Would you like to start your
>> assignment paperwork at this time? Then we can accept this and other
>> contributions from you when the paperwork is done.
>
> I understand. I have the required documents ready and I /thought/ sent
> them over already several weeks ago. I didn't get a confirmation
> though. Anyway, I've just sent my paperwork again so I hope it'll be in
> order soon.
FYI I've received confirmation that my copyright assignment is done, so
hopefully that's no longer an issue. Any comments about the patch itself?
Thanks,
Eshel
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#62708: [PATCH] Add option to control default outlining in C-h b
2023-04-21 15:57 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-04-22 9:53 ` Eli Zaretskii
2023-04-23 16:35 ` Juri Linkov
0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2023-04-22 9:53 UTC (permalink / raw)
To: Eshel Yaron, Juri Linkov; +Cc: 62708
> From: Eshel Yaron <me@eshelyaron.com>
> Cc: 62708@debbugs.gnu.org
> Date: Fri, 21 Apr 2023 18:57:21 +0300
>
> FYI I've received confirmation that my copyright assignment is done, so
> hopefully that's no longer an issue.
Right.
> Any comments about the patch itself?
Juri, any comments, or should I install it?
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#62708: [PATCH] Add option to control default outlining in C-h b
2023-04-22 9:53 ` Eli Zaretskii
@ 2023-04-23 16:35 ` Juri Linkov
2023-04-24 11:43 ` Eli Zaretskii
0 siblings, 1 reply; 8+ messages in thread
From: Juri Linkov @ 2023-04-23 16:35 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 62708, Eshel Yaron
>> FYI I've received confirmation that my copyright assignment is done, so
>> hopefully that's no longer an issue.
>
> Right.
>
>> Any comments about the patch itself?
>
> Juri, any comments, or should I install it?
It's nice that the patch makes the currently hard-coded setting
customizable. Usually we strive to reduce the number of user options,
but here I see no other easy way to make this setting customizable
because there is no hook run from this command where the users
could override the default outline settings.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#62708: [PATCH] Add option to control default outlining in C-h b
2023-04-23 16:35 ` Juri Linkov
@ 2023-04-24 11:43 ` Eli Zaretskii
2023-04-29 8:07 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2023-04-24 11:43 UTC (permalink / raw)
To: Juri Linkov; +Cc: 62708-done, me
> From: Juri Linkov <juri@linkov.net>
> Cc: Eshel Yaron <me@eshelyaron.com>, 62708@debbugs.gnu.org
> Date: Sun, 23 Apr 2023 19:35:01 +0300
>
> >> FYI I've received confirmation that my copyright assignment is done, so
> >> hopefully that's no longer an issue.
> >
> > Right.
> >
> >> Any comments about the patch itself?
> >
> > Juri, any comments, or should I install it?
>
> It's nice that the patch makes the currently hard-coded setting
> customizable. Usually we strive to reduce the number of user options,
> but here I see no other easy way to make this setting customizable
> because there is no hook run from this command where the users
> could override the default outline settings.
Thanks, installed on master, and closing the bug.
Yaron, please in the future observe our conventions for commit log
messages (I made the few minor changes they needed this time).
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#62708: [PATCH] Add option to control default outlining in C-h b
2023-04-24 11:43 ` Eli Zaretskii
@ 2023-04-29 8:07 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 0 replies; 8+ messages in thread
From: Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-04-29 8:07 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 62708-done, Juri Linkov
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Juri Linkov <juri@linkov.net>
>> Cc: Eshel Yaron <me@eshelyaron.com>, 62708@debbugs.gnu.org
>> Date: Sun, 23 Apr 2023 19:35:01 +0300
>>
>> >> FYI I've received confirmation that my copyright assignment is done, so
>> >> hopefully that's no longer an issue.
>> >
>> > Right.
>> >
>> >> Any comments about the patch itself?
>> >
>> > Juri, any comments, or should I install it?
>>
>> It's nice that the patch makes the currently hard-coded setting
>> customizable. Usually we strive to reduce the number of user options,
>> but here I see no other easy way to make this setting customizable
>> because there is no hook run from this command where the users
>> could override the default outline settings.
>
> Thanks, installed on master, and closing the bug.
Great.
> Yaron,
It's Eshel, Yaron is my surname.
(I get that a lot though, no worries.)
> please in the future observe our conventions for commit log
> messages (I made the few minor changes they needed this time).
Thanks, will do. I've compared my patch to the installed commit and
made note of your changes.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-04-29 8:07 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-07 10:37 bug#62708: [PATCH] Add option to control default outlining in C-h b Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-08 12:53 ` Eli Zaretskii
2023-04-08 19:39 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-21 15:57 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-22 9:53 ` Eli Zaretskii
2023-04-23 16:35 ` Juri Linkov
2023-04-24 11:43 ` Eli Zaretskii
2023-04-29 8:07 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).