Gnus development mailing list
 help / color / mirror / Atom feed
* gnus-agent-batch - two problems and one question
@ 2004-11-27 14:54 Maciek Pasternacki
  0 siblings, 0 replies; only message in thread
From: Maciek Pasternacki @ 2004-11-27 14:54 UTC (permalink / raw)


Hello.

I already posted this questions to gnu.emacs.gnus (or whichever
mailing list is that group combined with) few days ago but that list
seems to be more dead than not, so I repost my questions here.

I use a handful of NNTP servers with Gnus (current CVS No Gnus, Gnu
Emacs 21.3.1 on PLD Linux Distribution) 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
select 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"
                          "~/.emacs.d/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).

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))

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.

Other problem is connected with (nnml-use-compressed-files t).  When
I get mail (i.e. press `g' and mail is imported from Mailbox to nnml)
with my normal Emacs session, it works fine.  When mail is imported
with gnus-agent-batch, it appears as `may have expired or been
cancelled'.  When I looked into files where messages were supposed to
be, filenames ended with .gz but weren't compressed (they were plain
text) -- they were inaccessible since Gnus tried to `gunzip -c' them
and gzip returned an error.  While I can work around this by
remembering to `g'et new mail before running gnus-agent-batch or with
some shell plumbing to recompress such files manually, it seems to be
some kind of bug in Gnus.

And the question is: is it possible and safe to run gnus-agent-batch
(preferably as a cron job) on remote shell account with 100% uptime
and better connection with news servers and then instead of fetching
articles on workstation just rsync ~/News/agent from remote account?
Won't it mess up marks, lose information or break something?

Thanks in advance for answers,
		--japhy

-- 
__    Maciek Pasternacki <maciekp@japhy.fnord.org> [ http://japhy.fnord.org/ ]
`| _   |_\  / { ...as Mao Tsu says,
,|{-}|}| }\/                     if Shit didn't Happen
\/   |____/            you'd Explode...       }  ( Apocrypha Discordia )  -><-




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-11-27 14:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-27 14:54 gnus-agent-batch - two problems and one question Maciek Pasternacki

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).