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. >> 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. > A simple solution might be for LyX to automatically treat the document > as if it were a template it decides the layout is broken -- change to > article or whatever, but in read-only mode, so that you can only save > the modified document under a new name. That would leave the original > (now presumably broken) version intact. This is a nice idea, I hope it is easy to implement and look forward to see it in the next version. Günter
