Path: utzoo!censor!geac!jtsv16!uunet!tut.cis.ohio-state.edu!armadillo.cis.ohio-state.edu!lum From: lum@armadillo.cis.ohio-state.edu (Lum Johnson) Newsgroups: news.newusers.questions Subject: Re: Re: editing .newsrc Message-ID: <56990@tut.cis.ohio-state.edu> Date: 7 Aug 89 14:56:56 GMT References: <354@wet.UUCP> <2354@bingvaxu.cc.binghamton.edu> <1736@frog.UUCP> Reply-To: Lum Johnson Distribution: na Organization: The Ohio State University, IRCC/CIS Joint Computing Laboratory Lines: 49 In article <1736@frog.UUCP> jp@frog.UUCP (John Pimentel) writes: >In article <2354@bingvaxu.cc.binghamton.edu> cjoslyn@bingvaxu.cc.binghamton.edu.cc.binghamton.edu (Cliff Joslyn) writes: >>In article <354@wet.UUCP> epsilon@wet.UUCP (Eric P. Scott) writes: >>>.. [T]he only "safe" thing [to do] is change : to ! or vice versa. >> >>I frequently change the order of .newsrc so that the groups I am >>most interested in get up first, change the numbers after the : >>in order to see articles that I should have already seen, etc. >>I always make a copy of .newsrc to restore if I mung it up. > >I .. rearrange the entire .newsrc file (.. in alphabetical order). >Occasionally, .. I re-edit [a] newsgroup to have no numbers, or 1-1, >or 1. However, in the beginning when I was but a wee pup I made a big >goof and had ` :! ', instead of ` : ' or ` ! ' and nearly lost a >majority of the list. Agreed, before you edit a file that an automatic parser will process, be certain you know the syntax cold. Some parsers will forgive you and some will get you every time. My .newsrc file is sorted into two different sections: subscribed groups in order of the last article number in each so I can scan groups with low traffic and new groups early and groups with heavy traffic later; and unsubscribed groups in alphabetical order, with numbers compressed to `1-n' to save space and time. The latter effect is achieved with a simple (GNU Emacs) keyboard macro: M-< C-s ! ;; Find first exclamation mark C-x ( ;; Begin keyboard macro C-s , ;; Find first comma C-e M-b C-@ ;; Set mark before last number on line C-r ! Space 1 - ;; Find `! 1-' earlier on line C-s ;; Move to end of `! 1-' field C-w ;; Remove text from point to mark C-x ) ;; End keyboard macro C-u C-u C-u C-x e ;; Execute macro 64 times ;; or until no more commas (Note well that `C-w' immediately after `C-x h' kills the entire contents of the buffer, so it should be used with reasonable caution; `C-w' and `C-y' are inverse operations - they will undo each other.) Lum -=- -- Lum Johnson lum@cis.ohio-state.edu lum@osu-20.ircc.ohio-state.edu "You got it kid -- the large print giveth and the small print taketh away." -------