Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: David Carlton <carlton@math.stanford.edu>
Subject: Re: How to handle when a server is down?
Date: 23 Aug 2002 11:05:27 -0700	[thread overview]
Message-ID: <ro11y8plac8.fsf@jackfruit.Stanford.EDU> (raw)
In-Reply-To: <m3znvfvj0t.fsf@localhost.localdomain>

In article <m3znvfvj0t.fsf@localhost.localdomain>, Bob Babcock <wssddc@gis.net> 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


  parent reply	other threads:[~2002-08-23 18:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ubs7wcg7b.fsf@synopsys.com>
2002-08-21 17:05 ` Vasily Korytov
     [not found]   ` <u7kikces2.fsf@synopsys.com>
     [not found]     ` <87adngrp3i.fsf@unix.home>
     [not found]       ` <5llm6zzyd2.fsf@rum.cs.yale.edu>
     [not found]         ` <uy9azbyqb.fsf@synopsys.com>
     [not found]           ` <m3znvfvj0t.fsf@localhost.localdomain>
2002-08-23 18:05             ` David Carlton [this message]
     [not found]     ` <vafu1lhy492.fsf@lucy.cs.uni-dortmund.de>
2002-08-26 20:29       ` David Masterson
     [not found] ` <m365y3xw8k.fsf@multivac.cwru.edu>
2002-08-23  3:31   ` Mark Triggs
     [not found]     ` <vafy9aty49q.fsf@lucy.cs.uni-dortmund.de>
2002-08-26 20:31       ` David Masterson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ro11y8plac8.fsf@jackfruit.Stanford.EDU \
    --to=carlton@math.stanford.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).