Jürgen Spitzmüller wrote:
Stefan Schimanski wrote:
LyX: Unknown parameter name `embed' for command include [around line
86 of file /tmp/lyx_tmpdir25406ydwNjw/25406yian3v current token:
'embed' context: 'InsetCommandParams::read']
terminate called after throwing an instance of
'lyx::support::ExceptionMessage'
what(): InsetCommandParams: include
I suppose we need another file format change (the sooner, the better) and
remove those embedding stuff from the documents again.
Should be easy to do, you just need to generalize the existing method
revert_external_embedding in lyx_1_6.py and reuse it for the conversion.
Unfortunately, it's not that simple right now. I think Bo has removed
the embedding stuff from InsetInclude only, so removing the embed
parameter globally may cause other problems. Then again, it might be
worth a try. Stefan, you could do this as a test. Run your file through
sed -e 's/^embed//'
which should just strip out all those lines. Then see if you can load
it. You may get some errors, but I think it may still work.
Does LyX really need to throw an exception there? Couldn't we just eat
the line and try to continue? See the attached patch....
rh
Index: src/insets/InsetCommandParams.cpp
===================================================================
--- src/insets/InsetCommandParams.cpp (revision 24326)
+++ src/insets/InsetCommandParams.cpp (working copy)
@@ -286,9 +286,7 @@
params_[token] = lex.getDocString();
} else {
lex.printError("Unknown parameter name `$$Token' for
command " + cmdName_);
- throw ExceptionMessage(WarningException,
- _("InsetCommandParams: ") +
from_ascii(cmdName_),
- _("Unknown parameter name: ") +
from_utf8(token));
+ lex.eatLine();
}
}
if (token != "\\end_inset") {