[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
If you read lots and lots of groups, it might be convenient to group them hierarchically according to topics. You put your Emacs groups over here, your sex groups over there, and the rest (what, two groups or so?) you put in some misc section that you never bother with anyway. You can even group the Emacs sex groups as a sub-topic to either the Emacs groups or the sex groups—or both! Go wild!
Here’s an example:
Gnus Emacs -- I wuw it! 3: comp.emacs 2: alt.religion.emacs Naughty Emacs 452: alt.sex.emacs 0: comp.talk.emacs.recovery Misc 8: comp.binaries.fractals 13: comp.sources.unix |
To get this fab functionality you simply turn on (ooh!) the
gnus-topic
minor mode—type t in the group buffer. (This
is a toggling command.)
Go ahead, just try it. I’ll still be here when you get back. La de dum… Nice tune, that… la la la… What, you’re back? Yes, and now press l. There. All your groups are now listed under ‘misc’. Doesn’t that make you feel all warm and fuzzy? Hot and bothered?
If you want this permanently enabled, you should add that minor mode to the hook for the group mode. Put the following line in your ‘~/.gnus.el’ file:
(add-hook 'gnus-group-mode-hook 'gnus-topic-mode) |
2.16.1 Topic Commands | Interactive E-Z commands. | |
2.16.2 Topic Variables | How to customize the topics the Lisp Way. | |
2.16.3 Topic Sorting | Sorting each topic individually. | |
2.16.4 Topic Topology | A map of the world. | |
2.16.5 Topic Parameters | Parameters that apply to all groups in a topic. |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
When the topic minor mode is turned on, a new T submap will be available. In addition, a few of the standard keys change their definitions slightly.
In general, the following kinds of operations are possible on topics. First of all, you want to create topics. Secondly, you want to put groups in topics and to move them around until you have an order you like. The third kind of operation is to show/hide parts of the whole shebang. You might want to hide a topic including its subtopics and groups, to get a better overview of the other groups.
Here is a list of the basic keys that you might need to set up topics the way you like.
Prompt for a new topic name and create it
(gnus-topic-create-topic
).
“Indent” the current topic so that it becomes a sub-topic of the
previous topic (gnus-topic-indent
). If given a prefix,
“un-indent” the topic instead.
“Un-indent” the current topic so that it becomes a sub-topic of the
parent of its current parent (gnus-topic-unindent
).
The following two keys can be used to move groups and topics around. They work like the well-known cut and paste. C-k is like cut and C-y is like paste. Of course, this being Emacs, we use the terms kill and yank rather than cut and paste.
Kill a group or topic (gnus-topic-kill-group
). All groups in the
topic will be removed along with the topic.
Yank the previously killed group or topic
(gnus-topic-yank-group
). Note that all topics will be yanked
before all groups.
So, to move a topic to the beginning of the list of topics, just hit C-k on it. This is like the “cut” part of cut and paste. Then, move the cursor to the beginning of the buffer (just below the “Gnus” topic) and hit C-y. This is like the “paste” part of cut and paste. Like I said—E-Z.
You can use C-k and C-y on groups as well as on topics. So you can move topics around as well as groups.
After setting up the topics the way you like them, you might wish to hide a topic, or to show it again. That’s why we have the following key.
Either select a group or fold a topic (gnus-topic-select-group
).
When you perform this command on a group, you’ll enter the group, as
usual. When done on a topic line, the topic will be folded (if it was
visible) or unfolded (if it was folded already). So it’s basically a
toggling command on topics. In addition, if you give a numerical
prefix, group on that level (and lower) will be displayed.
Now for a list of other commands, in no particular order.
Move the current group to some other topic
(gnus-topic-move-group
). This command uses the process/prefix
convention (see section Process/Prefix).
Go to a topic (gnus-topic-jump-to-topic
).
Copy the current group to some other topic
(gnus-topic-copy-group
). This command uses the process/prefix
convention (see section Process/Prefix).
Hide the current topic (gnus-topic-hide-topic
). If given
a prefix, hide the topic permanently.
Show the current topic (gnus-topic-show-topic
). If given
a prefix, show the topic permanently.
Remove a group from the current topic (gnus-topic-remove-group
).
This command is mainly useful if you have the same group in several
topics and wish to remove it from one of the topics. You may also
remove a group from all topics, but in that case, Gnus will add it to
the root topic the next time you start Gnus. In fact, all new groups
(which, naturally, don’t belong to any topic) will show up in the root
topic.
This command uses the process/prefix convention (see section Process/Prefix).
Move all groups that match some regular expression to a topic
(gnus-topic-move-matching
).
Copy all groups that match some regular expression to a topic
(gnus-topic-copy-matching
).
Toggle hiding empty topics
(gnus-topic-toggle-display-empty-topics
).
Mark all groups in the current topic with the process mark
(gnus-topic-mark-topic
). This command works recursively on
sub-topics unless given a prefix.
Remove the process mark from all groups in the current topic
(gnus-topic-unmark-topic
). This command works recursively on
sub-topics unless given a prefix.
Run all expirable articles in the current group or topic through the
expiry process (if any)
(gnus-topic-expire-articles
). (see section Expiring Mail).
Rename a topic (gnus-topic-rename
).
Delete an empty topic (gnus-topic-delete
).
List all groups that Gnus knows about in a topics-ified way
(gnus-topic-list-active
).
Go to the next topic (gnus-topic-goto-next-topic
).
Go to the previous topic (gnus-topic-goto-previous-topic
).
Edit the topic parameters (gnus-topic-edit-parameters
).
See section Topic Parameters.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The previous section told you how to tell Gnus which topics to display. This section explains how to tell Gnus what to display about each topic.
The topic lines themselves are created according to the
gnus-topic-line-format
variable (see section Formatting Variables).
Valid elements are:
Indentation.
Topic name.
Visibility.
Level.
Number of groups in the topic.
Number of unread articles in the topic.
Number of unread articles in the topic and all its subtopics.
Each sub-topic (and the groups in the sub-topics) will be indented with
gnus-topic-indent-level
times the topic level number of spaces.
The default is 2.
gnus-topic-mode-hook
is called in topic minor mode buffers.
The gnus-topic-display-empty-topics
says whether to display even
topics that have no unread articles in them. The default is t
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
You can sort the groups in each topic individually with the following commands:
Sort the current topic alphabetically by group name
(gnus-topic-sort-groups-by-alphabet
).
Sort the current topic by the number of unread articles
(gnus-topic-sort-groups-by-unread
).
Sort the current topic by group level
(gnus-topic-sort-groups-by-level
).
Sort the current topic by group score
(gnus-topic-sort-groups-by-score
). See section Group Score.
Sort the current topic by group rank
(gnus-topic-sort-groups-by-rank
). See section Group Score.
Sort the current topic alphabetically by back end name
(gnus-topic-sort-groups-by-method
).
Sort the current topic alphabetically by server name
(gnus-topic-sort-groups-by-server
).
Sort the current topic according to the function(s) given by the
gnus-group-sort-function
variable
(gnus-topic-sort-groups
).
When given a prefix argument, all these commands will sort in reverse order. See section Sorting Groups, for more information about group sorting.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
So, let’s have a look at an example group buffer:
Gnus Emacs -- I wuw it! 3: comp.emacs 2: alt.religion.emacs Naughty Emacs 452: alt.sex.emacs 0: comp.talk.emacs.recovery Misc 8: comp.binaries.fractals 13: comp.sources.unix |
So, here we have one top-level topic (‘Gnus’), two topics under that, and one sub-topic under one of the sub-topics. (There is always just one (1) top-level topic). This topology can be expressed as follows:
(("Gnus" visible) (("Emacs -- I wuw it!" visible) (("Naughty Emacs" visible))) (("Misc" visible))) |
This is in fact how the variable gnus-topic-topology
would look
for the display above. That variable is saved in the ‘.newsrc.eld’
file, and shouldn’t be messed with manually—unless you really want
to. Since this variable is read from the ‘.newsrc.eld’ file,
setting it in any other startup files will have no effect.
This topology shows what topics are sub-topics of what topics (right),
and which topics are visible. Two settings are currently
allowed—visible
and invisible
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
All groups in a topic will inherit group parameters from the parent (and ancestor) topic parameters. All valid group parameters are valid topic parameters (see section Group Parameters). When the agent is enabled, all agent parameters (See Agent Parameters in Category Syntax) are also valid topic parameters.
In addition, the following parameters are only valid as topic parameters:
subscribe
When subscribing new groups by topic (see section Subscription Methods), the
subscribe
topic parameter says what groups go in what topic. Its
value should be a regexp to match the groups that should go in that
topic.
subscribe-level
When subscribing new groups by topic (see the subscribe
parameter),
the group will be subscribed with the level specified in the
subscribe-level
instead of gnus-level-default-subscribed
.
Group parameters (of course) override topic parameters, and topic parameters in sub-topics override topic parameters in super-topics. You know. Normal inheritance rules. (Rules is here a noun, not a verb, although you may feel free to disagree with me here.)
Gnus Emacs 3: comp.emacs 2: alt.religion.emacs 452: alt.sex.emacs Relief 452: alt.sex.emacs 0: comp.talk.emacs.recovery Misc 8: comp.binaries.fractals 13: comp.sources.unix 452: alt.sex.emacs |
The ‘Emacs’ topic has the topic parameter (score-file
. "emacs.SCORE")
; the ‘Relief’ topic has the topic parameter
(score-file . "relief.SCORE")
; and the ‘Misc’ topic has the
topic parameter (score-file . "emacs.SCORE")
. In addition,
‘alt.religion.emacs’ has the group parameter (score-file
. "religion.SCORE")
.
Now, when you enter ‘alt.sex.emacs’ in the ‘Relief’ topic, you will get the ‘relief.SCORE’ home score file. If you enter the same group in the ‘Emacs’ topic, you’ll get the ‘emacs.SCORE’ home score file. If you enter the group ‘alt.religion.emacs’, you’ll get the ‘religion.SCORE’ home score file.
This seems rather simple and self-evident, doesn’t it? Well, yes. But
there are some problems, especially with the total-expiry
parameter. Say you have a mail group in two topics; one with
total-expiry
and one without. What happens when you do M-x
gnus-expire-all-expirable-groups? Gnus has no way of telling which one
of these topics you mean to expire articles from, so anything may
happen. In fact, I hereby declare that it is undefined what
happens. You just have to be careful if you do stuff like that.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] |
This document was generated on January 25, 2015 using texi2html 1.82.