Xref: utzoo comp.unix.questions:28230 news.newusers.questions:3811 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewse!danj1 From: Dan_Jacobson@ATT.COM Newsgroups: comp.unix.questions,news.newusers.questions Subject: Re: string search in "rn" Message-ID: Date: 24 Jan 91 16:59:16 GMT References: <19522@hydra.gatech.EDU> <11067@jpl-devvax.JPL.NASA.GOV> <1991Jan22.202458.14825@murdoch.acc.Virginia.EDU> Sender: danj1@cbnewse.att.com (Dan Jacobson) Reply-To: danj1@ihlpa.att.com Organization: AT&T-BL, Naperville IL, USA Lines: 80 In-Reply-To: clc5q@shamash.cs.Virginia.EDU's message of 22 Jan 91 20:24:58 GMT >>>>> On 22 Jan 91 20:24:58 GMT, clc5q@shamash.cs.Virginia.EDU (Clark L. Coleman) said: Clark> I have seen some neat tricks with KILL files, but how do you find the Clark> documentation for this stuff? The man pages for "rn" are pretty much Clark> useless (on my system, anyway) for sophisticated kills. Well, two wrongs make a right (you not at least posting this originally to news.newusers.questions (actually it seems more advanced than a "newuser" question) & me deluding you from rn with the following GNUS [a different newsreader---use it inside GNU Emacs] advertisement.) Begin GNUS advertisement [for GNUS info, read newsgroup gnu.emacs.gnus & write info-gnus-english-request@tut.cis.ohio-state.edu]. ------ File: gnus Node: Example of a KILL File, Prev: Editing KILL Files, Up: KILL File, Next: Advanced Kills Example of a KILL File ====================== The following is an example of a local KILL file for newsgroup `control'. This is currently being used by the author. ;; Apply to the newsgroup `control' if the NNTP server is flab. (if (string-equal gnus-nntp-server "flab") (progn (gnus-kill "Subject" "ihave flab\\|sendme") (gnus-kill "Subject" "cancel\\|newgroup\\|rmgroup" "d") (gnus-expunge "X"))) File: gnus Node: Advanced Kills, Prev: Example of a KILL File, Up: KILL File Advanced Kill Processing ======================== Internally, applying kills means to run the hook `gnus-Apply-kill-hook'. It is called after the Subject buffer is prepared for a selected newsgroup. The default hook is the function `gnus-apply-kill-file' which loads a global KILL file and a local KILL file in this order. A different style of the kill processing can be implemented by customizing this hook. For example, if you think a global KILL file is unnecessary, you can use the following hook which applies only a local KILL file. This change can save the time for checking the existence of a global KILL file. (setq gnus-Apply-kill-hook '(lambda () ;; Apply a local KILL file. (load (gnus-newsgroup-kill-file gnus-newsgroup-name) t nil t))) On the contrary, the following example enables only a global KILL file. (setq gnus-Apply-kill-hook '(lambda () ;; Apply a global KILL file. (load (gnus-newsgroup-kill-file nil) t nil t))) Here is an advanced example that drastically reduces the time for applying KILL files. This hook does the kill processing directly without loading the KILL files. (setq gnus-Apply-kill-hook '(lambda () ;; Apply to the newsgroup `control' ;; if the NNTP server is flab. (and (string-equal gnus-nntp-server "flab") (string-equal gnus-newsgroup-name "control") (progn (gnus-kill "Subject" "ihave flab\\|sendme") (gnus-kill "Subject" "cancel\\|newgroup\\|rmgroup" "d") (gnus-expunge "X"))))) -- Dan_Jacobson@ATT.COM Naperville IL USA +1 708-979-6364