On Monday 10 March 2008 07:30, G. Milde wrote:
> On 9.03.08, Paul A. Rubin wrote:
> > Steve Litt wrote:
> >> Hi all,
> >>
> >> I just lost my entire book structure due to a small modification to my
> >> layout file that prevented compilation. LyX therefore reverted the
> >> book's document class from my custom "rjustbook" to "article", removing
> >> all chapters and flattening out the table of contents.
>
> I always close a document without saving if I come across such warnings.
>
> With just one saving, the backup copy (mybook.lyx~) will still contain the
> custom environments. So a `cp mybook.lyx~ mybook.lyx` saves you the tedious
> hand-reverting.
By the time I knew of the problem, I'd made and saved several changes. If I'm
already given warning messages, perhaps they could be made much more
forceful, like this.
========================================
DANGER ACHTUNG PELEGRO!!!
Your document class has changed, and environments not supported by the new
document class will revert to body text. Save this version UNDER A NEW
FILENAME, and then resolve the problems.
========================================
>
> >> Shame on me, my last backup was 5 days old. But still, it would have
> >> been nice for LyX to say "hey, your layout file just became bad. Do you
> >> REALLY want me to revert your document class to "article", or would you
> >> like to save as (the broken) "whatever" document class so you can fix
> >> the problem without losing content?"
>
> I also vote for a more save handling of such automatic conversions
> that can indeed delete lots of information from the document.
Yeah, I got lucky this time, next time (if I'm silly enough to wait 5 days to
back up) could be much worse.
SteveT
Steve Litt
Books written in LyX:
Troubleshooting Techniques of the Successful Technologist
Twenty Eight Tales of Troubleshooting
Troubleshooting: Just the Facts