[comp.emacs] GNUS. Can one restart a suspension?

squash@math.ufl.edu (Jonathan King) (10/11/90)

I'm misunderstanding something about suspension of a GNUS session.
In *Newsgroup* mode, the documentation says:

  `z'
       Suspend the current GNUS session to make it possible to resume it
       later (`gnus-Group-suspend').

and then

  If a GNUS session is suspended by the command `z'
  (`gnus-Group-suspend'), it is possible to resume it later without any
  time-consuming initializations.  Switch to the Newsgroup buffer and type
  `g' (`gnus-Group-get-new-news') to get newly arrived articles if you
  want to resume the suspended GNUS session.


MY ERROR?:  I suspend GNUS with `z', leave the workstation idle for
several hours, come back and switch to the *Newsgroup* buffer, type
`g' and see a message (approx)  "Process NNTP not running..."

Is this supposed to happen?  Is there a way to "suspend" GNUS for
several hours or days so that I can restart it very quickly (say, by
not checking for new newsgroups --just continuing reading the ones had?)

Jonathan

bob@MorningStar.Com (Bob Sutterfield) (10/12/90)

In article <SQUASH.90Oct10174727@shadrach.math.ufl.edu> squash@math.ufl.edu (Jonathan King) writes:
   I suspend GNUS with `z', leave the workstation idle for several
   hours, come back and switch to the *Newsgroup* buffer, type `g' and
   see a message (approx) "Process NNTP not running..."

Sounds like your idle time crossed a threshold, and nntpd gave up on
you, packed it in, and closed the connection.  It's not GNUS' fault.

toad@CS.CMU.EDU (Todd Kaufmann) (10/12/90)

      I suspend GNUS with `z', leave the workstation idle for several
      hours, come back and switch to the *Newsgroup* buffer, type `g' and
      see a message (approx) "Process NNTP not running..."

   Sounds like your idle time crossed a threshold, and nntpd gave up on
   you, packed it in, and closed the connection.  It's not GNUS' fault.


But don't despair!  This'll re-open the connection... (from my .emacs):


;;; when the connection dies..

(defun gnus-reopen ()
  (interactive)
  (gnus-open-server gnus-nntp-server))


The current cached headers will be bogus, so if you're in *Subject* you should
"q" and reselect the group from *Newsgroup*.

 -todd

nuge@ctmed@gemed.ge.com (James A. Nugent) (10/12/90)

In article <BOB.90Oct11172746@volitans.MorningStar.Com>
bob@MorningStar.Com (Bob Sutterfield) writes:

> In article <SQUASH.90Oct10174727@shadrach.math.ufl.edu>
> squash@math.ufl.edu (Jonathan King) writes:

>    I suspend GNUS with `z', leave the workstation idle for several
>    hours, come back and switch to the *Newsgroup* buffer, type `g' and
>    see a message (approx) "Process NNTP not running..."

> Sounds like your idle time crossed a threshold, and nntpd gave up on
> you, packed it in, and closed the connection.  It's not GNUS' fault.


        Exactly. But it's easy to re-connect to the nntp server. In
fact, I close the nntp server when I suspend just to be clean about it
and not waste a connection.  (I leave GNUS loaded all day.) Then I
open the server (manually) when I "unsuspend" GNUS, i.e. switch to the
*Newsgroup* buffer.


I close the connection on the suspend hook:

(setq gnus-Suspend-gnus-hook '(lambda () 
				(gnus-save-newsrc-file) ; may be gone a long time
				(nntp-close-server)))   ; close nntp connection


And bind the "o" key to reopen the connection in Group mode:

(setq gnus-Group-mode-hook 
      '(lambda () (define-key gnus-Group-mode-map "o" '(lambda () (interactive)
							 (gnus-open-server 
							   gnus-nntp-server
							   gnus-nntp-service)))))

After switching to the *Newsgroup* buffer, I type o (for "open
server") before "g". It would be possible to check and open the
connection automatically, as gnus-post-news does, but I didn't think
it was worth it. If you forget the "o" you just get an error when you
do "g" so you do "o" then "g" again.

--
Jim Nugent