Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!think!caip!cbmvax!bpa!burdvax!sdcrdcf!lwall From: lwall@sdcrdcf.UUCP (Larry Wall) Newsgroups: net.news.b,net.news.adm Subject: Re: rn and .newsrc Message-ID: <2907@sdcrdcf.UUCP> Date: Mon, 28-Jul-86 19:08:46 EDT Article-I.D.: sdcrdcf.2907 Posted: Mon Jul 28 19:08:46 1986 Date-Received: Wed, 30-Jul-86 00:46:02 EDT References: <3694@ut-ngp.UUCP> Reply-To: lwall@sdcrdcf.UUCP (Larry Wall) Organization: System Development Corporation R&D, Santa Monica Lines: 76 Keywords: rn .newsrc Xref: mnetor net.news.b:342 net.news.adm:615 In article <3694@ut-ngp.UUCP> merworth@ut-ngp.UUCP (Boyd Merworth) writes: > If I have a group marked in my .newsrc file to which I > do not subscribe, why does rn keep appending article numbers > to that entry if the article has been cross-posted to a group > to which I subscribe? Eventually, if readnews is invoked on > login, I get an error message, ".newsrc line too long". The > line is even too long for vi to handle! Rn is just trying to be polite, and stay one step ahead of the user. Just because a newsgroup is not subscribed to currently does not mean that it will not be subscribed to in the future. So rn marks the Xreffed articles in the unsubscribed group so that, if the newsgroup is resubscribed to, the articles will not need to be viewed. Now, as it happens, under certain circumstances, this can cause the line in the .newsrc to grow longer than 1024 bytes, which causes certain other programs grief. Rn doesn't care how long the lines are--you got the memory, rn will swallow the line. If you never look at the .newsrc with anything but rn, you'll never have the problem. Most people who use rn don't invoke readnews any more. (If you want to check for news in your login script, some variant of "rn -c" is apt to be somewhat faster.) Rn does, in general, try to keep the .newsrc in a state that readnews can handle. This includes some amount of effort to coalesce long lines in the .newsrc. During a given rn session, the first time a newsgroups is Xreffed into, a check is made of the minimum article number in the newsgroup, and any unread articles less than that are assumed expired and marked read. (This happens even in newsgroups you don't visit, such as unsubscribed ones.) On any Xref marking, range coalescing is done if possible. There are a couple of things that can defeat this, however: 1) Using an old version of rn (pre 4.3). 2) Letting stranded articles hang around forever. By a stranded article, I mean one that isn't in the history file, so expire can't zap it, but is still on the disk, so the minimum article number in the active file never increases. (If you are running an older version of the news system (pre 2.10.2), there is no mininum article number in the active file--in this case rn gets the minimum article number directly out of the spool directory. You can still have a stranded article problem.) There are a couple of things to do about this. If you are an SA, fix your news system so you don't have stranded articles. This involves properly interlocking expire and rnews so articles don't come in while expire is recreating the history file. This has been mentioned on the net before. If you aren't an SA, you have several options open to you. * Write your own version of readnews and vi to handle long lines. :-) * Bug your SA to fix expire. * Don't use anything but rn. Let's hear it for product loyalty, heh, heh... * Visit the newsgroup (with rn) when the line gets too long and read the stranded articles. This will almost always shorten the line to less than 1024, whereupon you can use readnews or vi. Yeah, I know, hard to do with unsubscribed groups. You could always define a macro... * Delete the .newsrc lines of newsgroups that you really and truly never want to see again. Rn will not put them back in. Unfortunately, some versions of readnews will, but at least the line will start out short again. * Write some kind of filter to fix your .newsrc periodically. * Don't use rn any more. (*sob*) If your expire is working right, you should almost never have this problem. The two longest lines in my .newsrc stay at about 800 bytes long. I haven't read either of the newsgroups in many months. I hope you find this explication satisfactory. Larry Wall sdcrdcf!lwall