So the fact that BufferList doesn't know about clones is going to cause
other problems. I suggest we do one of two things. (i) Make BufferList
aware of clones. This seems like a lot of work for little benefit, and
it might cause other problems. (ii) Add:
Index: /cvs/lyx-devel/trunk/src/BufferList.cpp
===================================================================
--- /cvs/lyx-devel/trunk/src/BufferList.cpp (revision 33673)
+++ /cvs/lyx-devel/trunk/src/BufferList.cpp (working copy)
@@ -234,6 +234,7 @@
bool BufferList::isLoaded(Buffer const * b) const
{
+ LASSERT(!b || !b->isClone(), /* */);
BufferStorage::const_iterator cit =
find(bstore.begin(), bstore.end(), b);
return cit != bstore.end();
for the time being, or else have isLoaded() return true if b is a clone.
This already reveals one problem. The initUnicodeMath routine calls the
latexString() method in InsetMathHull, which checks
Inset::isBufferValid() which calls isLoaded(), which always returns
false during export. So no encoding is ever set.
rh