Martin Vermeer wrote:
On Fri, Aug 17, 2007 at 03:17:54PM +0300, Dov Feldstern wrote:
Martin Vermeer wrote:
On Fri, Aug 17, 2007 at 02:03:48PM +0300, Dov Feldstern wrote:
...
Thanks Dov... you helped me spot an ordering bug in the revert
list probably due to José. Fixing it doesn't help though... same problem.
Command-line
converting 278->277 however _does_ work: the .lyx file version
number changes. 278->279 simply doesn't seem to change a
thing. (Ah yes, one blank was removed somewhere in the file,
so it's not entirely a dummy op.)
- Martin
I'm trying this here (just from the command line) and it seems to work on
files which don't have any charstyles in them (i.e., format now says 279).
OK, then there is something fishy in the conversion routines
_after_ a charstyle header is found. Do you see anything by
inspection? I am a complete dummy on python debugging.
How do I use charstyles, so that I can test this on a file *with* charstyles
in them? I haven't ever used them yet...
Ok, attached one LyX file version 278 containing a Noun and
an Emph inset. Also the file stdcharstyles.inc, containing
their (new, v. 279) definitions, which you should include,
e.g., in stdclasses.inc.
- Martin
So there are two problems:
One is just a silly mistake --- you forgot the "i += 1", so you're
entering an endless loop (after having found something on line i, you
should resume the search at i+1; see, e.g., close_begin_deeper).
The bigger problem, though, has nothing to do with your code: it looks
like lyx2lyx (at least when run from the command line) is just ignoring
anything with format above 276. If you change your file's format to 276,
then lyx2lyx will work fine. The reason I say that this may only be a
problem from the command line, is that you say that from within LyX it
was just hanging --- which would make sense given that there was an
endless loop because of the first problem. And it's easy to test --
after fixing the above problem, this may now work from within LyX (I
haven't tried). But anyhow, something weird is going on here, Jose
should probably take a look at this one...
Dov