This reverts a small part of 0526eb9d and gets rid of the double calls of
SVN::findFile() and GIT::findFile(). Please note that git detection does
currently not work because of 26dd4d0c.
When using 'find' and a string is not found, this is not an error or a
surprising event. It is often expected (e.g. after searching through
the whole document for a certain string eventually you will get this
message). The exclamation mark should be reserved for messages that
are unexpected or that need extra attention, such as errors.
Since a complete solution requires some refactoring, I fixed the bug for the
most important case: The main document language is only supported by
polyglossia. If any other language than the main one is only supported by
polyglossia the bug is still there.
This will be needed for layout forward compatibility, and could also be used
for a layout editor. Writing was only implemented for styles, not for complete
layout files (text class). I rarely made use of default values for missing
variables which exist in read(), so the output it a bit verbose (but more safe
against future changes). Also, some things like CopyStyle are never written for
obvious reasons.
This is a second attempt to fix the problem described in
6df4a7bb (2c2c1767 reverted the first attempt).
The solution here is more general: if we get to a certain point
in the code and there is no filename, an error is given.
The following command now gives an error:
lyx -e pdf2
And the following command continues to not give an error:
lyx myfile.lyx -e pdf
Before, the following commands correctly exited with code 1, but now
a reason for exiting is also given:
lyx -e pdf2 doesNotExist
lyx doesNotExist -e pdf2
This reverts commit 6df4a7bb40.
As Vincent points out, this commit is not correct. For one reason,
it would incorrectly exit with error for the following syntax:
lyx myfile.lyx -e pdf
I will look for a correct solution to the problem specified in the
message of the reverted commit.
Before, 'lyx -e pdf2' would give no error and would exit with 0. A use
case is if a user has in a bash script the following command:
lyx -e pdf2 "${mylxyfile}" || exit 1
where 'lyx' is mispelled as 'lxy' and thus yields an empty
string. If LyX does not exit with an error, the script continues where
the user probably intends for it to stop.
output, due to failure to clean the ids in the new citation stuff.
I've solved this by allowing the citation format information to contain
keys of the form "clean:key". This signals that we are to apply the
html::cleanAttr() function to the key before returning it. I.e., we
strip non-alphanumeric stuff, basically.