> Is this patch just a trick then to get a file bundled with lyx? > If that is the case, I don't like it.
I am not sure how much you know about this embedding feature so allow me to explain. Skipping all the failed attempts, right now, when you insert a figure, or later any child document like program listing, it can be marked as 'include this file when saved in bundled format'. This does not change anything until you select 'Document -> Save in bundled format'. In the bundled mode, all embeddable files are copied to a temporary directory, and appear to users as embedded. Changes to external files no longer affect the .lyx file, and the .lyx file can be shared with others without these files. A unique design of lyx' embedding feature is that the bundled .lyx file can be unpacked and packed without loss of information. That is to say, people can still use the plain text format and store .lyx file in a svn/cvs repository, and use the bundled format when it is time to share the document with others. Now it comes to the 'embedded child document' inset introduced by this patch. You are right that this is a trick to bundle arbitrary file, but this is a natural way to do it. For example, one can embed customized layout and class files in this way, and distribute a lyx file that can be edited by anyone with lyx installed. Note that another user does not have to install the customized layout and class file to his latex/lyx system. I can of course use a new inset type, but that would be a stripped down version of InsetInclude. I can also allow user to enter such files in Document->Settings->Embedding. Maybe you would like the latter option? Cheers, Bo