Bo Peng wrote:
Comments welcome. And see the long FIXME about remaining issues.
Why do you remove updateParam and manipulate (in add/remove database
etc) these parameter strings again and again? The original idea was to
change EmbeddedFiles, and write these strings from the file list each
time.
I tried using updateParam() after introducing getTeXFile, but that
didn't work. The problem is that there's no way to tell when you get
back from EmbeddedFiles what the ORIGINAL path was. Things like: biblio,
../biblio, /home/me/biblio, etc, all look the same to EmbeddedFiles at
that point, because it just has an absolute path. So I more or less went
back to the old code, fixed up a bit.
It may be that fixing the FIXME will require storing something like the
original path with Embedded File, and it wouldn't surprise me if that
were needed elsewhere, too. If so, then it MAY be possible to
reintroduce updateParam. But I'm not sure that would be a good idea,
anyway. It's precisely this constant conversion between different
representations of the same data that led to the original trouble. This
patch basically makes the InsetCommandParams representation the one that
is official, and the bibfiles_ representation is constructed from it as
needed; it has to be that direction, because EmbeddedFile doesn't have
the original path. We can't quite do that in updateEmbeddedFile(), but
we can do it elsewhere.
rh