info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Temporarily disabling NNTP server


From: Maciek Pasternacki
Subject: Temporarily disabling NNTP server
Date: Thu, 25 Nov 2004 00:38:26 +0100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux)

I use a handful of NNTP servers with Gnus and Gnus-agent.  I download
articles for offline reading with (gnus-agent-batch) so that
gnus-agent doesn't lock my Emacs (it runs *terribly* slow, but I can
handle this by leaving it running it in background).  Lately one of
servers I use is down and it's not known when it'll be up; might be in
few days, might be in few months.  I don't want to delete server from
input methods and/or unsubscribe from groups, lose my Agent archives
of its groups -- it can be back anytime and I want to just turn it on.

When I run M-x gnus-agent-fetch-session or M-: (gnus-agent-batch) RET
from within normal Emacs session, everything runs fine; Gnus sees that
server is down, asks me if I want to go offline, I say yes, Gnus
happily fetches all the articles from other servers.

Problems start when I try to run my gnus-agent-fetch-session like
this:

  $ emacs -batch -l ~/.gnus.agent.batch.el

#v+ ~/.gnus.agent.batch.el
(setq load-path 
      (append load-path '("~/.emacs.d" "~/.emacs.d/gnus/lisp" 
"/opt/bbdb/lisp")))
(require 'gnus)
(gnus-agent-batch)
#v-

Gnus tries to open server that is down and just hangs.  When I use
exactly the same script like this:

  $ emacs -nw -q -l ~/.gnus.agent.batch.el

everything runs fine (but it requires interaction -- Gnus is asking if
it should go offline).

Is there some way to:

a) mark server as disabled (preferably in select method definition),
   so that Gnus doesn't even try to connect to it or ask any
   questions, but just sets it offline and leaves it this way until
   I try to manually open server in *Server* buffer?

b) make gnus-agent-batch just skip offline servers in emacs -batch?

It would be perfect for the second problem if agent could be
programmed to retry connection a few times before giving up and
setting server offline.

If it matters, I use news via SOCKS proxy with socks.el and following
function as nntp-open-connection-function server parameter:

(defun nntp-open-socks-stream (buffer)
  (socks-open-network-stream "nntpd" buffer nntp-address nntp-port-number))

Greets,
                --japhy

-- 
__    Maciek Pasternacki <maciekp@japhy.fnord.org> [ http://japhy.fnord.org/ ]
`| _   |_\  / { I tell you this, no eternal reward will forgive us now
,|{-}|}| }\/                                           for wasting the dawn! }
\/   |____/                                             ( Jim Morrison )  -><-


reply via email to

[Prev in Thread] Current Thread [Next in Thread]