On 16/05/2014 9:45 p.m., Jürgen Spitzmüller wrote:
2014-05-16 9:41 GMT+02:00 Jürgen Spitzmüller:
2014-05-16 8:34 GMT+02:00 Wu, Yan:
Today when I am writing with LyX. Suddenly the document
crushed, with one message says: emergency stop...I could not
tell exactly.
Then the file closed but I could not open it again later. It
is really a disaster for me if I lost the document.
I write the email to ask any help I can get from you. Thank
you very much in advance. Looking forward to your response.
First, check if you have a backup in the backup directory set in
Tools > Preferences > Path. If so (hopefully), you will find a
backup of the file there.
Next, open the LyX file with a text editor. If it ends with
\begin_inset Tabular
instead of
\end_body
\end_document
then you have probably faced this bug
http://www.lyx.org/trac/ticket/9049
Just for the record: It turned out it was this bug, but fortunately,
we managed to restore the file completely. Yan sent me the emergency
files and backups (the one embraced in # and the one ending with
lyx~), and it turned out both were complete, and the latter was the
most actual one.
Here is an advice, in case you are unlucky enough to get hit by this:
* Check if the lyx file itself is complete (ends with \end_document)
* If not, check if either the emergency file (#...#) or the backup
file (*.lyx~) are complete
* If only one is, rename it to the name of the original file.
* If both are (as in Yan's case), give them different names and check
the differences in LyX via Tools > Compare
Jürgen
Perhaps it is time to have a default location for a backup directory
(beside one's personal LyX directory?), and for backing up files to be
turned on "out of the box". Not everyone scrutinises all the options
under Tools > Preferences. I suspect there are plenty of users who
don't know about backups and how easy it is to create them
automatically. People can always turn this off or change the location if
they have other preferences.
Andrew
PS I've named my backup directory Lymbo.