In article <1992Sep30.111108.3
...@Princeton.EDU>, greg@phoenix (Gregory Nowak) writes:
>}I'd appreciate some simple examples of how to use the hook-kill
>}processing in Weiner's gnews.
That's i-e. When in doubt, use "Weemba".
>} The examples in the document are very
>}commplex, and do not directly address the simple question I have:
I think the following example (buried way down, I admit) is the type
you were looking for.
headlines\|politics
("From" "Right-Wing-...@Bolt.Loose.Mil" article-junk)
("From" "Left-Wing-L...@Chicken.Delite" article-junk)
("Subject" "\\(\\<\\|hand\\)guns?\\>" article-junk)
These are the more typical uses of hook-kills. Note how
simply I can dispose of articles that I find uninteresting
across multiple newsgroup boundaries.
>}(1) what is the exact equivalent of an "rn" kill file line:
>}
>} /stuff/j
The "Subject" hook-kill corresponds to `/boring-subject/j', and the "From"
hook-kill corresponds to `/From: boring-user/j'.
>}Has anyone got pre-written functions that would match the "rn"
>}functions of the "j" or "k" keys (junk this subject for the
>}session, and permanently kill it).
This is pretty easy, but Greg gave you the long answer.
"j" is group-junk, and "k" is group-kill. ("K" is group-kill-permanent.)
Note that "h" will get you the brief summary of commands and their keys,
"H" will get you the long summary.
In general, just about every `rn' function was preserved in some form or
other. An rn->Gnews conversion guide comes with the manual. Inside Info,
look for the "* features:: Gnews rn-analogues" node inside the top Gnews
menu.
>Yes -- Gnews does! Say, for example, that you want to permanently kill
>the subject of the article you're reading. First hit ESC K.
This is the more general approach. One other specialized detail is
the hook-kill-alist variable. You use this to fold several newsgroups
into one for the sake of editing the group's hook-kills, including the
automatic "K". Inside your .emacs file, put in something like the
following:
(setq hook-kill-alist '(("rec.arts.sf.written" . "rec.arts.sf.*")
("rec.arts.sf.misc" . "rec.arts.sf.*")
("rec.arts.sf.announce" . "rec.arts.sf.*")
("comp.unix.wizards" . "comp.unix.*")
("comp.unix.programmer" . "comp.unix.*")
("comp.unix.questions" . "comp.unix.*")
("gnu.emacs.gnews" . "^gnu\\|emacs")
("gnu.misc.discuss" . "^gnu\\|emacs")
("gnu.emacs.help" . "^gnu\\|emacs")
("comp.emacs" . "^gnu\\|emacs")))
Note that the hook-kill processing for _any_ comp.unix.* group is
covered by the "comp.unix.*" hook-kills, regardless of what this
variable is. But only within the above mentioned groups does K and
ESC-K edit the "comp.unix.*" hook-kills, and thus permit immediate
cross-group killing.
What's the possible difference you ask? For example, I normally avoid
signatures beyond the minimum, but I have a special GNU signature (see
below). The following is in my "^gnu\|emacs" hook-kill list:
(pre nil gnews-set 'reply-signature-default-major "/users/weemba/.apple")
This is done in every gnu/emacs newsgroup. But "K"illing is dependent
on the h-k-alist variable. So "K"illing within gnu.emacs shows up in
every gnu/emacs newsgroup. But "K"illing in gnu.gcc has no effect outside
gnu.gcc. (No, this is not an exciting difference.)
--
-Matthew P Wiener (wee...@sagi.wistar.upenn.edu) If Apple owned
NBC, they would sue Nike for comedy-interface copyright violation.