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-fileFile where the Gnus registry will be stored.
gnus-registry-dbThe article registry by Message ID. See ‘registry-db’.
gnus-registry-default-markThe default mark. Should be a valid key for ‘gnus-registry-marks’.
gnus-registry-default-sort-functionSort function to use when pruning the registry.
gnus-registry-dirtyBoolean set to t when the registry is modified.
gnus-registry-extra-entries-preciousWhat extra keys are precious, meaning entries with them won’t get pruned.
gnus-registry-installWhether the registry should be installed.
gnus-registry-marksList of registry marks and their options.
gnus-registry-max-entriesMaximum number of entries in the registry, nil for unlimited.
gnus-registry-minimum-subject-lengthThe minimum length of a subject before it’s considered trackable.
gnus-registry-prune-factorWhen pruning, try to prune back to this factor less than the maximum size.
gnus-registry-register-allIf non-nil, register all articles in the registry.
gnus-registry-split-strategyThe splitting strategy applied to the keys in ‘gnus-registry-track-extra’.
gnus-registry-track-extraWhether the registry should track extra data about a message.
gnus-registry-unfollowed-addressesList of addresses that gnus-registry-split-fancy-with-parent won’t trace.
gnus-registry-unfollowed-groupsList of groups that gnus-registry-split-fancy-with-parent won’t return.

Defined functions (51)

gnus-registry--munge-group-names(DB &optional ENCODE)
gnus-registry--set/remove-mark(MARK REMOVE ARTICLES)
gnus-registry--split-fancy-with-parent-internal
gnus-registry-action(ACTION DATA-HEADER FROM &optional TO METHOD)
gnus-registry-article-marks-to-chars(HEADERS)
gnus-registry-article-marks-to-names(HEADERS)
gnus-registry-clear()
gnus-registry-delete-entries(IDLIST)
gnus-registry-do-marks(TYPE FUNCTION)
gnus-registry-extract-addresses(TEXT)
gnus-registry-fetch-message-id-fast(ARTICLE)
gnus-registry-fetch-recipients-fast(ARTICLE)
gnus-registry-fetch-sender-fast(ARTICLE)
gnus-registry-fetch-simplified-message-subject-fast(ARTICLE)
gnus-registry-find-keywords(KEYWORD)
gnus-registry-fixup-registry(DB)
gnus-registry-follow-group-p(GROUP)
gnus-registry-get-article-marks(&rest ARTICLES)
gnus-registry-get-id-key(ID KEY)
gnus-registry-get-or-make-entry(ID &optional NO-CREATE)
gnus-registry-group-count(ID)
gnus-registry-handle-action(ID FROM TO SUBJECT SENDER &optional RECIPIENTS)
gnus-registry-ignore-group-p(GROUP)
gnus-registry-import-eld(FILE)
gnus-registry-initialize()
gnus-registry-insert(DB ID ENTRY)
gnus-registry-install-hooks()
gnus-registry-install-p()
gnus-registry-install-shortcuts()
gnus-registry-load()
gnus-registry-make-db(&optional FILE)
gnus-registry-post-process-groups(MODE KEY GROUPS)
gnus-registry-read(FILE)
gnus-registry-read-mark()
gnus-registry-register-message-ids()
gnus-registry-remake-db(&optional FORSURE)
gnus-registry-remove-article-mark(&rest ARTICLES)
gnus-registry-remove-extra-data(EXTRA)
gnus-registry-save(&optional FILE DB)
gnus-registry-set-article-mark(&rest ARTICLES)
gnus-registry-set-article-mark-internal(MARK ARTICLES &optional REMOVE SHOW-MESSAGE)
gnus-registry-set-id-key(ID KEY VALS)
gnus-registry-simplify-subject(SUBJECT)
gnus-registry-sort-addresses(&rest ADDRESSES)
gnus-registry-sort-by-creation-time(L R)
gnus-registry-split-fancy-with-parent()
gnus-registry-spool-action(ID GROUP &optional SUBJECT SENDER RECIPIENTS)
gnus-registry-unload-hook()
gnus-registry-user-format-function-M(HEADERS)
gnus-registry-wash-for-keywords(&optional FORCE)
gnus-try-warping-via-registry()

Defined faces (0)