Gnus development mailing list
 help / color / mirror / Atom feed
* Crashing Emacs and unfinished drafts
@ 2001-03-07 16:19 Kai Großjohann
  2001-03-07 16:36 ` Crashing Emacs and unsaved nnfolders Alan Shutko
  2001-03-07 18:20 ` Crashing Emacs and unfinished drafts ShengHuo ZHU
  0 siblings, 2 replies; 5+ messages in thread
From: Kai Großjohann @ 2001-03-07 16:19 UTC (permalink / raw)


When Emacs crashes while I'm composing a message in Gnus, I expect
the associated auto-save file to appear in the nndraft:drafts group.
It happened to me just a couple of minutes ago.¹  A file
~/News/drafts/drafts/#42#, say, was left behind.  However, Gnus does
not recognize this file.

After `mv #42# 42', all is dandy and Gnus sees the draft.

So, we have two alternatives:

(1) Have Emacs auto-save into ~/News/drafts/drafts/42 rather than
    ~/News/drafts/drafts/#42#.

(2) Have nndraft.el grok the #42# style filenames.

Or should I have done a M-x recover-session RET before starting Gnus?
But Gnus deals automatically with its ~/.newsrc auto-save file,
doesn't it?

kai
-- 
Be indiscrete.  Do it continuously.


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

* Crashing Emacs and unsaved nnfolders
  2001-03-07 16:19 Crashing Emacs and unfinished drafts Kai Großjohann
@ 2001-03-07 16:36 ` Alan Shutko
  2001-03-07 18:31   ` ShengHuo ZHU
  2001-03-07 18:20 ` Crashing Emacs and unfinished drafts ShengHuo ZHU
  1 sibling, 1 reply; 5+ messages in thread
From: Alan Shutko @ 2001-03-07 16:36 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> When Emacs crashes 

Similar problem.  I use nnmail-expiry-target to send some things to
nnfolder groups for archival.  Those files are appended to in memory
and saved when gnus quits.  They are not saved when I hit "s" in
*Group*.  (Problem 1.)

If Emacs should crash before I quit Gnus, Gnus uses the last-saved
version of the file, and loses anything which had been modified in the
autosave.  

Given Gnus' ability to handle other unsaved files (like newsrc) it
would be nice if it would handle these, but it would also be nice if
it would save them when I hit s.

-- 
Alan Shutko <ats@acm.org> - In a variety of flavors!
Every journalist has a novel in him, which is an excellent place for it.


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

* Re: Crashing Emacs and unfinished drafts
  2001-03-07 16:19 Crashing Emacs and unfinished drafts Kai Großjohann
  2001-03-07 16:36 ` Crashing Emacs and unsaved nnfolders Alan Shutko
@ 2001-03-07 18:20 ` ShengHuo ZHU
  1 sibling, 0 replies; 5+ messages in thread
From: ShengHuo ZHU @ 2001-03-07 18:20 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> When Emacs crashes while I'm composing a message in Gnus, I expect
> the associated auto-save file to appear in the nndraft:drafts group.
> It happened to me just a couple of minutes ago.¹  A file
> ~/News/drafts/drafts/#42#, say, was left behind.  However, Gnus does
> not recognize this file.
> 
> After `mv #42# 42', all is dandy and Gnus sees the draft.
> 
> So, we have two alternatives:
> 
> (1) Have Emacs auto-save into ~/News/drafts/drafts/42 rather than
>     ~/News/drafts/drafts/#42#.
> 
> (2) Have nndraft.el grok the #42# style filenames.
> 
> Or should I have done a M-x recover-session RET before starting Gnus?
> But Gnus deals automatically with its ~/.newsrc auto-save file,
> doesn't it?

Fixed.

ShengHuo


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

* Re: Crashing Emacs and unsaved nnfolders
  2001-03-07 16:36 ` Crashing Emacs and unsaved nnfolders Alan Shutko
@ 2001-03-07 18:31   ` ShengHuo ZHU
  2001-03-07 19:12     ` Alan Shutko
  0 siblings, 1 reply; 5+ messages in thread
From: ShengHuo ZHU @ 2001-03-07 18:31 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 859 bytes --]

Alan Shutko <ats@acm.org> writes:

> Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
> 
> > When Emacs crashes 
> 
> Similar problem.  I use nnmail-expiry-target to send some things to
> nnfolder groups for archival.  Those files are appended to in memory
> and saved when gnus quits.  They are not saved when I hit "s" in
> *Group*.  (Problem 1.)
> 
> If Emacs should crash before I quit Gnus, Gnus uses the last-saved
> version of the file, and loses anything which had been modified in the
> autosave.  
> 
> Given Gnus' ability to handle other unsaved files (like newsrc) it
> would be nice if it would handle these, but it would also be nice if
> it would save them when I hit s.

You can try the attached patch (not in the CVS repository).  The
drawback is that Gnus has to save the entire nnfolder file for each
expired article.

ShengHuo


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nnmail.el-6.10.diff --]
[-- Type: text/x-patch, Size: 619 bytes --]

Index: nnmail.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/nnmail.el,v
retrieving revision 6.10
diff -u -u -r6.10 nnmail.el
--- nnmail.el	2001/02/08 23:53:22	6.10
+++ nnmail.el	2001/03/07 18:25:21
@@ -1632,7 +1632,7 @@
     (when (nnheader-functionp target)
       (setq target (funcall target group)))
     (unless (eq target 'delete)
-      (gnus-request-accept-article target nil nil t))))
+      (gnus-request-accept-article target nil t t))))
 
 (defun nnmail-check-syntax ()
   "Check (and modify) the syntax of the message in the current buffer."

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

* Re: Crashing Emacs and unsaved nnfolders
  2001-03-07 18:31   ` ShengHuo ZHU
@ 2001-03-07 19:12     ` Alan Shutko
  0 siblings, 0 replies; 5+ messages in thread
From: Alan Shutko @ 2001-03-07 19:12 UTC (permalink / raw)


ShengHuo ZHU <zsh@cs.rochester.edu> writes:

> You can try the attached patch (not in the CVS repository).  The
> drawback is that Gnus has to save the entire nnfolder file for each
> expired article.

I was afraid you'd say that.  That's bad.  Very bad.  One reason I use
nnfolder is so I can have gzipped nnfolders (I have 134MB already,
gzipped) and regzipping a 9MB file every time I expire a message
(about a 100 messages a day in that group) would quickly make me hate
life.  8^)

How about just making it save when you do gnus-group-save-newsrc...
no, that really doesn't make sense.  How about a
"gnus-group-save-everything" which I can bind to s in *Group*?  I
guess I could just add something to gnus-save-newsrc-hook.

-- 
Alan Shutko <ats@acm.org> - In a variety of flavors!
A lie in time saves nine.


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

end of thread, other threads:[~2001-03-07 19:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-07 16:19 Crashing Emacs and unfinished drafts Kai Großjohann
2001-03-07 16:36 ` Crashing Emacs and unsaved nnfolders Alan Shutko
2001-03-07 18:31   ` ShengHuo ZHU
2001-03-07 19:12     ` Alan Shutko
2001-03-07 18:20 ` Crashing Emacs and unfinished drafts ShengHuo ZHU

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