summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2021-08-10 17:29:07 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2021-08-10 17:29:20 +0200
commit877df4eb1ca008556572214a917fb3bef2b994b5 (patch)
tree256926f925a6a9a9f7170dd76f92906c02a20e60 /doc
parentd858a637c2ef35079fbc6cd8b2674c6b13de1e99 (diff)
downloademacs-877df4eb1ca008556572214a917fb3bef2b994b5.tar.gz
Add new user option `gnus-topic-prepare-topic'
* doc/misc/gnus.texi (Topic Variables): Document it. * lisp/gnus/gnus-topic.el (gnus-topic-prepare-topic): New user option. (gnus-topic-prepare-topic): Use it.
Diffstat (limited to 'doc')
-rw-r--r--doc/misc/gnus.texi19
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index 17da5071cb6..5f3fba00df7 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -4145,6 +4145,25 @@ The default is 2.
The @code{gnus-topic-display-empty-topics} says whether to display even
topics that have no unread articles in them. The default is @code{t}.
+@vindex gnus-topic-display-predicate
+If @code{gnus-topic-display-predicate} is non-@code{nil}, it should be
+a function that says whether the topic is to be displayed or not.
+The function will be called with one parameter (the name of the topic)
+and should return non-@code{nil} is the topic is to be displayed.
+
+For instance, if you don't even want to be reminded that work exists
+outside of office hours, you can gather all the work-related groups
+into a topic called @samp{"Work"}, and then say something like the
+following:
+
+@lisp
+(setq gnus-topic-display-predicate
+ (lambda (name)
+ (or (not (equal name "Work"))
+ (< 090000
+ (string-to-number (format-time-string "%H%M%S"))
+ 170000))))
+@end lisp
@node Topic Sorting
@subsection Topic Sorting