On 2019-01-16, Scott Kostyshak wrote:

> [-- Type: text/plain, Encoding: quoted-printable --]

> On Wed, Jan 16, 2019 at 07:26:01PM +0000, Guenter Milde wrote:

>> >> Patch applied ...
>> >> The test for
>> >>   $ ctest -R modernCV
>> >> leads to
>> >>   3733 - export/examples/modernCV_lyx16 (Failed)
>> >>   4956 - export/examples/es/modernCV_lyx16 (Failed)

>> > I get the same.

>> However, the reason is a different one, the file modernCV.16.lyx is
>> valid (loads without error) but is still broken (does not compile).

> OK but I don't think that broken compilation causes the lyx16 test to
> fail.

>> If there are no regressions for other lyx2lyx test, I will commit both
>> patches.

> That sounds like a good plan, but the following test fails with your
> patch:

>   ctest -R "localization_test_lyx16"

> It fails because of lack of convergence. 
...

This was kind of expected. So removing the "\n" after "\\backslash" solves
one problem but creates another one.

Actually, I assume the fix was done to solve "lack of convergence" errors:

In *.lyx files produced by LyX, the "\\backslash" macro is always on a line
of its own.

LyX normalises files, that means a "*.lyx" file with the lines

   \backslash texttt

does not lead to a parsing error but saving the file (after some change or
with save_as) this becomes 

   \backslash
   texttt

If lyx2lyx omits the linebreak after "\backslash", this means reading and
saving the file with LyX will add a linebreak.

I change my proposal to: "drop this patch".

+1 lyx2lyx creates files that are more similar to files created by LyX itself.

-1 the original commit makes bug hunting via bisect harder in some cases as
   it may mask the real reason for a problem.
   
   It may even be that in some cases an old conversion routine was broken
   because it over-relied on the line counts. Still it seems better to fix
   these instead of newer routines expecting the file layout generated by LyX.

Günter

Reply via email to