On Wed, Oct 15, 2014 at 10:31 AM, Jean-Marc Lasgouttes
<lasgout...@lyx.org> wrote:
> Le 15/10/2014 09:17, Alfredo Braunstein a écrit :
>>
>> Thanks a lot Jürgen. The following insets do not have a ::latex
>> implementation and thus are at a risk of dataloss in advanced s&r
>> (although some of these maybe inherit it from some other one). Maybe
>> the safest thing would be to implement Inset::latex that outputs some
>> unmatchable string when the runparams.force_output flag is set. Would
>> this be a good idea? How can I build an unmatchable string?
>
>
> I don't understand: I guess many inset just inherit their ::latex method.
> What is the risk exactly.

Advanced Search & replace all [math:x]->[math:y] in a document containing

[disabled branch: blah blah][math:x]

the result is

[math:y]

i.e. the branch inset is gone. (same with a LyX Note, etc)

> Also, you may want to take in account the following method:
>
>         /// Is the content of this inset part of the output document?
>         virtual bool producesOutput() const { return true; }
> You could also check whether there have been some output after calling
> ::latex and add a special marker otherwise.

Where? *::latex gets called recursively... The advanced s&r stuff
seems pretty complicated to me (and, from a quick look, a bit of a
hack if you ask me. No offense to the authors I hope, it is actually
an amazing feature). Adding a force_output flag could be an easy fix
to the dataloss with no negative consequences that I can think of.
What is your concern?

A/

Reply via email to