I agree with John, having had the exact same problem. Rather than deleting
emergency files, they should be copied to a /tmp folder somewhere. This is
what vim does, and there's no reason not to do it in lyx.
Oh, and the autosave that goes down to 1 min only may be too little. I'd let
the user autosave every second if need be. Crashes happen...
Best,
-Jose

Jose Quesada, PhD.
Research scientist,
Max Planck Institute,
Center for Adaptive Behavior and Cognition,
Berlin
http://www.josequesada.name/
http://twitter.com/Quesada


On Mon, Oct 25, 2010 at 6:00 PM, John McCabe-Dansted <gma...@gmail.com>wrote:

> On Mon, Oct 25, 2010 at 11:48 PM, Richard Heck <rgh...@comcast.net> wrote:
> > As John said, it looks to me as if we remove the autosave file at the
> wrong
> > time: What if the attempt to read the original file fails? It seems to me
> > that we should remove it (a) if we read it successfully; (b) if we read
> the
> > original successfully. That would be the attached patch.
> >
> > Does this seem right?
> >
> > Richard
>
> My concern was that the user would accidentally pick "Load Original",
> and LyX would instantly delete the autosave file.
>
> In my experience, user (me) error is more common than the bug you found.
>
> I'd instead put "autosaveFile.removeFile();" somewhere in Buffer::save().
>
> --
> John C. McCabe-Dansted
>

Reply via email to