8.13 Kill Files

Gnus still supports those pesky old kill files. In fact, the kill file entries can now be expiring, which is something I wrote before Daniel Quinlan thought of doing score files, so I’ve left the code in there.

In short, kill processing is a lot slower (and I do mean a lot) than score processing, so it might be a good idea to rewrite your kill files into score files.

Anyway, a kill file is a normal emacs-lisp file. You can put any forms into this file, which means that you can use kill files as some sort of primitive hook function to be run on group entry, even though that isn’t a very good idea.

Normal kill files look like this:

(gnus-kill "From" "Lars Ingebrigtsen")
(gnus-kill "Subject" "ding")
(gnus-expunge "X")

This will mark every article written by me as read, and remove the marked articles from the summary buffer. Very useful, you’ll agree.

Other programs use a totally different kill file syntax. If Gnus encounters what looks like a rn kill file, it will take a stab at interpreting it.

Two summary functions for editing a GNUS kill file:

M-k

Edit this group’s kill file (gnus-summary-edit-local-kill).

M-K

Edit the general kill file (gnus-summary-edit-global-kill).

Two group mode functions for editing the kill files:

M-k

Edit this group’s kill file (gnus-group-edit-local-kill).

M-K

Edit the general kill file (gnus-group-edit-global-kill).

Kill file variables:

gnus-kill-file-name

A kill file for the group ‘soc.motss’ is normally called soc.motss.KILL. The suffix appended to the group name to get this file name is detailed by the gnus-kill-file-name variable. The “global” kill file (not in the score file sense of “global”, of course) is just called KILL.

gnus-kill-save-kill-file

If this variable is non-nil, Gnus will save the kill file after processing, which is necessary if you use expiring kills.

gnus-apply-kill-hook

A hook called to apply kill files to a group. It is (gnus-apply-kill-file) by default. If you want to ignore the kill file if you have a score file for the same group, you can set this hook to (gnus-apply-kill-file-unless-scored). If you don’t want kill files to be processed, you should set this variable to nil.

gnus-kill-file-mode-hook

A hook called in kill-file mode buffers.