This is actually a generic InsetInfo issue:
1/ the contents of the inset is computed in updateBuffer, so that it
is available for drawing but also for latex output (think batch
export). When it is called, it deletes the existing inner paragraph
and replaces it by a new one
2/ metrics build a new Row object that represents to paragraph
3/ draw() relies on this information
Now, imagine that updateBuffer() is called after metrics(). This can
happen for many reasons, and does happen here (display a shortcut info
and change the shortcut file from cua to emacs).
This problem has been here forever, but is only visible now that the
(experimental) bookmark display code needs to read the underlying
paragraph id.
The solution is to compute the inset contents at metrics time. This
is done by moving the relevant code to a new standalone build() method
that is called in metrics() but also in latex().
Both lyx2lyx and LyX write output to the terminal, and it's helpful
to know which messages are coming from lyx2lyx. For example, before
this commit if we opened a document in LyX that has a newer file format than
lyx2lyx can deal with, we see the following output in the terminal:
Warning: 619: Format not supported.
Warning: Quitting.
Error: Document format failure
The first two lines (the warnings) are output from lyx2lyx, and the
third is output by LyX. This output was particularly confusing
because I first thought "LyX tries to quit if the document is too
new?", but in fact LyX still stays open; it just doesn't open the
document. After this change, the output is now the following:
lyx2lyx warning: 619: Format not supported.
lyx2lyx warning: Quitting.
Error: Document format failure
These exports now pass, and a quick check of the output looks good.
These might have been fixed (although it is just a guess) due to the
following entry in the changelog of luaotfload v3.19:
A new algorithm for selecting fonts based on font family names
allows to more reliably load fonts based on their family name.
This commit reverts 2a665dcc.
Except for dvi/ps output chain for which this trick was meant.
Also, issue an error message in this case. This is analogous to
the other output flavors now.
This is important for commands like !`, that are equivalent to \textexclamdown. However, ! is matched earlier, because the logic works with prefixes, hence the output doesn't make sense.
This avoid a crash when doing
command-sequence inset-forall Caption char-delete-forward; statistics; undo
in the user guide when a malformed selection is created.
The selection happens here because char-delete-forward will select the
caption instead of deleting it if the "force" parameter is not given.
This is a poor API IMO, it is the plain <del> action that should use a
special parameter.