I had this in ERT:
\htmladdnormallink{file://usr/share/doc/samba-doc/htmldocs/manpages/smb.conf.5.html}{}
I then marked the URL part, i.e. the stuff between the first pair of
braces, and copied.
Then I pasted it into the second pair of braces.
It looked OK on screen. It did not compile. The source view turned up
this monstrosity:
\htmladdnormallink{file://usr/share/doc/samba-doc/htmldocs/manpages/smb.conf.5.html}{\foreignlanguage{norsk}{usr/share/doc/samba-doc/htmldocs/manpages/smb.conf.5.html}}
Two things are very wrong here:
1. Language+font info inside an ERT inset?
No matter what odd combination of languages & fonts there is, there should
be no hidden language or font commands inserted when pasting into ERT.
The LyX file contained this monstrosity, lots of font info _inside_
the ERT where there should be no such thing.
\backslash
htmladdnormallink{
\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\noun off
\color none
file://usr/share/doc/samba-doc/htmldocs/manpages/smb.conf.5.html
\family default
\series default
\shape default
\size default
\emph default
\bar default
\noun default
\color inherit
}{
\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\noun off
\color none
\lang norsk
usr/share/doc/samba-doc/htmldocs/manpages/smb.conf.5.html
\family default
\series default
\shape default
\size default
\emph default
\bar default
\noun default
\color inherit
}
\end_layout
\end_inset
This resulted in the output mentioned above,
which of course didn't work. Font changes in the middle of
a latex command . . .
2. General language mess, which is worse.
Surely some other kinds of inset can use all the font & language information
that was pasted. The second error here is the idea
of the "foreign language norsk". The _document language_ here is "norsk",
so this sequence should never happen. No language command when using
the document language. This used to be a problem with table cells sometime
during 1.5 development (or was it 1.4 development) but it was fixed a long
time ago. Looks like it is getting back. :-(
Helge Hafting