From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/964 Path: news.gmane.org!not-for-mail From: David Carlton Newsgroups: gmane.emacs.gnus.user Subject: Re: How to handle when a server is down? Date: 23 Aug 2002 11:05:27 -0700 Message-ID: References: <87fzx8m9ar.fsf@unix.home> <87adngrp3i.fsf@unix.home> <5llm6zzyd2.fsf@rum.cs.yale.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1138667816 9119 80.91.229.2 (31 Jan 2006 00:36:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 00:36:56 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:28:25 2006 Original-Path: quimby.gnus.org!lackawana.kippona.com!news.infoave.net!news.stealth.net!news.stealth.net!newsfeed.news2me.com!canoe.uoregon.edu!logbridge.uoregon.edu!newsfeed.stanford.edu!nntp.stanford.edu!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-Sender: carlton@jackfruit.Stanford.EDU Original-NNTP-Posting-Host: jackfruit.stanford.edu User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) Original-Xref: bridgekeeper.physik.uni-ulm.de gnus-emacs-gnus:1104 Original-Lines: 61 X-Gnus-Article-Number: 1104 Tue Jan 17 17:28:25 2006 Xref: news.gmane.org gmane.emacs.gnus.user:964 Archived-At: In article , Bob Babcock writes: > I've been told that this isn't the way gnus is supposed to be used, > but here's how I deal with this problem: you can have different > .newsrc files for different servers if you name them > .newsrc-servername. So I have one for each news server I use. I > switch between them using commands of the form: > (defun news-earthlink () > (interactive) > (setq gnus-select-method '(nntp "news.earthlink.net"))) > .newsrc-news.earthlink.net and .newsrc-news.earthlink.net.eld then > track only earthlink newsgroups. You need to quit from one server > before switching to another or else you'll still use the .newsrc > file for the first server after the switch. (I don't consider this > a bug. It's useful if your isp has multiple news servers with > articles numbered the same and some of those servers are down or > overloaded.) I was just browsing through my .emacs file (well, actually my .xemacs/init.el file), and I noticed the following commented-out code, dating from maybe 3 or 5 years ago: ;(defun sfrt-gnus () ; (interactive) ; (let ((gnus-nntp-server "news.sfrt.com")) ; (gnus))) As with the above poster, I had a special .newsrc file, .newsrc-news.sfrt.com. This uses a semi-obsolete variable; probably better would be (defun sfrt-gnus () (interactive) (let ((gnus-select-method '(nntp "news.sfrt.com"))) (gnus))) The point here is that Emacs-lisp is dynamically scoped rather than lexically scoped, so during the above call to gnus, whenever some piece of code refers to the variable gnus-select-method, it will get your local gnus-select-method rather than the global gnus-select-method. So as long as Gnus only refers to gnus-select-method during the inital call to gnus (as opposed to when you, say, enter a newsgroup to read its messages), this suggestion is like the above poster's suggestion with the advantage that, if you do sfrt-gnus, then quit from it, and then do gnus, you'll get back to your old familiar news settings, which I don't think is the case with the above poster's suggestion. But, like I said, this worked several years ago, and for all I know the design of Gnus has changed enough in the interim that it won't work any more. Whether this suggestion or the above poster's suggestion is better depends on how widely Gnus refers to the gnus-select-method variable and on how transient you want your changing of news servers to be. Good luck... David Carlton carlton@math.stanford.edu