I am still working on the rest of the embedding feature, but it will not hurt to bring up a few issues for discussion.
Currently, embedded files are recognized by their absolute filename only and duplicate registrations (Inset::registerEmbeddedFiles()) are merged. Using the current update() algorithm, ParConstIteartor of the last inset that refers to an embedded file is stored. In the embedding dialog, if you click on a file item, the main buffer will move to the paragraph of that inset. This raises the question whether or not we should save multiple copies of the same file in the file_list_ (of course not to the disk) when an embedded file is referred by multiple insets. This may simplify signal handling when an inset is removed, and will make the embedding dialog more useful. The embedding list itself will of course be more complicated. There is another related question: should we update buffer::embeddedFiles() if embedding is disabled for this buffer? The answer seems to be an obvious NO, but I like the convenience to view/edit/navigate to certain embedded file using the embedding dialog. Cheers, Bo