File: gnus-registry.el.html
This is the gnus-registry.el package, which works with all Gnus backends, not just nnmail. The major issue is that it doesn't go across backends, so for instance if an article is in nnml:sys and you see a reference to it in nnimap splitting, the article will end up in nnimap:sys
gnus-registry.el intercepts article respooling, moving, deleting, and copying for all backends. If it doesn't work correctly for you, submit a bug report and I'll be glad to fix it. It needs better documentation in the manual (also on my to-do list).
If you want to track recipients (and you should to make the
gnus-registry splitting work better), you need the To and Cc
headers collected by Gnus. Note that in more recent Gnus versions
this is already the case: look at gnus-extra-headers to be sure.
;;; you may also want Gcc Newsgroups Keywords X-Face
(add-to-list 'gnus-extra-headers 'To)
(add-to-list 'gnus-extra-headers 'Cc)
(setq nnmail-extra-headers gnus-extra-headers)
Put this in your startup file (~/.gnus.el for instance) or use Customize:
(setq gnus-registry-max-entries 2500
gnus-registry-track-extra '(sender subject recipient))
(gnus-registry-initialize)
Then use this in your fancy-split:
(: gnus-registry-split-fancy-with-parent)
This won't work as expected unless gnus-registry-register-all
is set to t.
You should also consider using the nnregistry backend to look up articles. See the Gnus manual for more information.
Finally, you can put %uM in your summary line format to show the registry marks if you do this:
show the marks as single characters (see the :char property in
gnus-registry-marks):
(defalias 'gnus-user-format-function-M #'gnus-registry-article-marks-to-chars)
show the marks by name (see gnus-registry-marks):
(defalias 'gnus-user-format-function-M #'gnus-registry-article-marks-to-names)
TODO:
- get the correct group on spool actions
- articles that are spooled to a different backend should be moved
after splitting
Defined variables (16)
gnus-registry-cache-file | File where the Gnus registry will be stored. |
gnus-registry-db | The article registry by Message ID. See ‘registry-db’. |
gnus-registry-default-mark | The default mark. Should be a valid key for ‘gnus-registry-marks’. |
gnus-registry-default-sort-function | Sort function to use when pruning the registry. |
gnus-registry-dirty | Boolean set to t when the registry is modified. |
gnus-registry-extra-entries-precious | What extra keys are precious, meaning entries with them won’t get pruned. |
gnus-registry-install | Whether the registry should be installed. |
gnus-registry-marks | List of registry marks and their options. |
gnus-registry-max-entries | Maximum number of entries in the registry, nil for unlimited. |
gnus-registry-minimum-subject-length | The minimum length of a subject before it’s considered trackable. |
gnus-registry-prune-factor | When pruning, try to prune back to this factor less than the maximum size. |
gnus-registry-register-all | If non-nil, register all articles in the registry. |
gnus-registry-split-strategy | The splitting strategy applied to the keys in ‘gnus-registry-track-extra’. |
gnus-registry-track-extra | Whether the registry should track extra data about a message. |
gnus-registry-unfollowed-addresses | List of addresses that gnus-registry-split-fancy-with-parent won’t trace. |
gnus-registry-unfollowed-groups | List of groups that gnus-registry-split-fancy-with-parent won’t return. |