Op 5-8-2013 13:07, Scott Kostyshak schreef:
On Mon, Aug 5, 2013 at 6:02 AM, Vincent van Ravesteijn <v...@lyx.org> wrote:
Op 4-8-2013 22:23, Scott Kostyshak schreef:

On Sat, Aug 3, 2013 at 3:54 AM, Scott Kostyshak <skost...@lyx.org> wrote:
On Fri, Aug 2, 2013 at 5:58 AM, Vincent van Ravesteijn <v...@lyx.org>
wrote:
On Fri, Aug 2, 2013 at 11:45 AM, Kornel Benko <kor...@lyx.org> wrote:
About the patch... why do we care about malformed LyX documents ? How
can
this happen ? Are there some documents in a very old fileformat. Then
we
should update those.


At least now the tests will show it.


If this is a valid argument, we can throw in a thousand of ad-hoc checks
at
random places, ...
I don't consider this an ad-hoc check because I don't view it as a
test for the LyX documents (although as Kornel points out it might
have this extra benefit). I view it as a test of the assumption that
the export tests are making. The export tests depend on finding the
'default_output_format' buffer param. For the tests to work correctly,
it is assumed that the buffer param exists. This patch tests that
assumption.

Scott
Vincent, do you have more comments on this?

Scott

Well, I still didn't get an answer to my question why it is needed ?
Currently when no default_output_format is found we are assuming a
default output format of 'pdf'. I tried to improve things by focusing
on the "assuming" part of the previous statement, but I'm fine with
improving the 'pdf' part of the assumption, as you suggest below.

Why did you assume 'pdf' in the first place ?

Now, I see that the lyx2lyx script doesn't add the default_output_format parameter. That looks like a bug to me.

Only if there are lyx files with an old file format. In that case:

- a) we should update all lyx docs to the latest format anyway;
- b) we can just check for the fileformat to see whether it has the latest
format;
- c) we can assume "default" when there is no "default_output_format".
The attached patch implements c): If no 'default_output_format' is
found, then we assume 'default'.

Is it OK?

Scott

I guess so.

Vincent

Reply via email to