From: Robert Pluim <rpluim@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: michael_heerdegen@web.de, emacs-devel@gnu.org, orontee@gmail.com
Subject: Re: master 2ef6f943abd: Add option to control default outlining in 'C-h b'
Date: Tue, 25 Apr 2023 12:11:57 +0200 [thread overview]
Message-ID: <87fs8o9spe.fsf@gmail.com> (raw)
In-Reply-To: <838regwcnt.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 25 Apr 2023 12:09:58 +0300")
>>>>> On Tue, 25 Apr 2023 12:09:58 +0300, Eli Zaretskii <eliz@gnu.org> said:
>> This code and the defcustom is new in emacs-29, so we can still change
>> it to be a predicate instead. At least we should document is better
Eli> Agreed. Patches welcome.
I assumed you were agreeing to the code change, which looks like this:
diff --git a/lisp/outline.el b/lisp/outline.el
index 0e90c59c285..266b3a168f6 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -1517,10 +1517,11 @@ outline-default-rules
When nil, the subtree is hidden unconditionally.
-When equal to a list, each element should be one of the following:
+When equal to a list, each element should be one of the
+following, which are checked in order:
- A cons cell with CAR `match-regexp' and CDR a regexp, the
- subtree will be hidden when the outline heading match the
+ subtree will be hidden when the outline heading matches the
regexp.
- `subtree-has-long-lines' to only show the heading branches when
@@ -1532,9 +1533,9 @@ outline-default-rules
- A cons cell of the form (custom-function . FUNCTION) where
FUNCTION is a lambda function or function name which will be
- called without arguments with point at the beginning of the
- heading and the match data set appropriately, the function
- being expected to toggle the heading visibility."
+ called without arguments, with point at the beginning of the
+ heading, and the match data set appropriately. If the function
+ returns nil the subtree will be shown, otherwise it is hidden."
:version "29.1"
:type '(choice (const :tag "Hide subtree" nil)
(set :tag "Show subtree unless"
@@ -1649,9 +1650,10 @@ outline--show-headings-up-to-level
;; show only branches when long lines are detected
;; in subtree
(outline-show-branches))
- (custom-function
- ;; call custom function if defined
- (funcall custom-function))
+ ;; call custom function if defined
+ ((and custom-function
+ (funcall custom-function))
+ (outline-hide-entry))
(t
;; if no previous clause succeeds, show subtree
(outline-show-subtree))))))
Robert
--
next prev parent reply other threads:[~2023-04-25 10:11 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <168233653969.13461.3810563138120581789@vcs2.savannah.gnu.org>
[not found] ` <20230424114219.F2AEAC0004A@vcs2.savannah.gnu.org>
2023-04-24 13:08 ` master 2ef6f943abd: Add option to control default outlining in 'C-h b' Robert Pluim
2023-04-24 16:24 ` Eli Zaretskii
2023-04-24 16:45 ` Robert Pluim
2023-04-24 18:34 ` Eli Zaretskii
2023-04-25 8:13 ` Robert Pluim
2023-04-25 1:13 ` Michael Heerdegen
2023-04-25 6:45 ` Eli Zaretskii
2023-04-25 8:25 ` Robert Pluim
2023-04-25 9:09 ` Eli Zaretskii
2023-04-25 10:11 ` Robert Pluim [this message]
2023-04-25 11:44 ` Eli Zaretskii
2023-04-25 12:17 ` Robert Pluim
2023-04-25 16:51 ` Juri Linkov
2023-04-25 17:02 ` Eli Zaretskii
2023-04-25 17:35 ` Juri Linkov
2023-04-25 18:00 ` Eli Zaretskii
2023-04-26 8:17 ` Robert Pluim
2023-04-26 9:18 ` Eli Zaretskii
2023-04-26 10:01 ` Robert Pluim
2023-04-26 10:33 ` Eli Zaretskii
2023-04-26 11:52 ` Robert Pluim
2023-04-25 18:32 ` Michael Heerdegen
2023-05-29 13:16 ` Robert Pluim
2023-05-30 1:08 ` Michael Heerdegen
2023-04-29 8:13 ` Eshel Yaron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fs8o9spe.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=michael_heerdegen@web.de \
--cc=orontee@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this 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.