Gnus development mailing list
 help / color / mirror / Atom feed
* saving gnus .newsrc.eld
@ 1997-09-25  7:01 Mark Hovey
  1997-09-25 14:01 ` Colin Rafferty
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Hovey @ 1997-09-25  7:01 UTC (permalink / raw)


A minor defect of Gnus has been bothering me for a while, so since we
are at the beginning of a new development cycle I thought I would
mention it.  If I run Gnus, then forget about it and kill emacs later
without ever quitting Gnus, then save-buffers-kill-emacs (C-x C-c) asks
me if I want to save .newsrc-dribble.  At this point I have no good
option except to hit C-g, switch to the *Group buffer, and quit Gnus.
If I do not do this and just allow Emacs to save .newsrc-dribble, then
the next time I start Gnus it will ask me if I want to read the autosave
file.  I don't lose any mail this way, but it is still annoying.  

Is there some variable I can set so that Gnus will automatically save
itself when I leave a Gnus-controlled buffer, or something of that
sort?  In general, is there a good solution to this?

My current solution is to redefine save-buffers-kill-emacs in my .gnus
file by adding the lines

  (setq gnus-interactive-exit nil)
  (gnus-group-exit)

right after the interactive statement.  

Anybody have anything better to do?
                   Mark Hovey


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: saving gnus .newsrc.eld
  1997-09-25  7:01 saving gnus .newsrc.eld Mark Hovey
@ 1997-09-25 14:01 ` Colin Rafferty
  0 siblings, 0 replies; 2+ messages in thread
From: Colin Rafferty @ 1997-09-25 14:01 UTC (permalink / raw)


Mark Hovey writes:

> If I run Gnus, then forget about it and kill emacs later
> without ever quitting Gnus, then save-buffers-kill-emacs (C-x C-c) asks
> me if I want to save .newsrc-dribble.  At this point I have no good
> option except to hit C-g, switch to the *Group buffer, and quit Gnus.

> Is there some variable I can set so that Gnus will automatically save
> itself when I leave a Gnus-controlled buffer, or something of that
> sort?  In general, is there a good solution to this?

While it is very difficult to recognize leaving a Gnus buffer, there are 
ways of coming close.

I have the following in my .gnus.el:

    (add-hook 'gnus-summary-exit-hook 'gnus-dribble-save)

You could change it from gnus-dribble-save to gnus-group-save-newsrc,
but I don't think the time spent is worth it.

> My current solution is to redefine save-buffers-kill-emacs in my .gnus
> file by adding the lines

>   (setq gnus-interactive-exit nil)
>   (gnus-group-exit)

> right after the interactive statement.  

> Anybody have anything better to do?

A better choice might be to put something on `kill-emacs-query-functions'.

Untested code follows:

    (add-hook 'kill-emacs-query-functions
              '(lambda ()
                 (let ((gnus-interactive-exit nil))
                   (gnus-group-exit)
                   nil))) ; this nil is important, see doc for k-e-q-f

-- 
export-a-crypto-system, see: http://www.dcs.ex.ac.uk/~aba/rsa/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-09-25 14:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-09-25  7:01 saving gnus .newsrc.eld Mark Hovey
1997-09-25 14:01 ` Colin Rafferty

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