Bo Peng wrote:
The issue is just whether,
when we need to access the parameters, we should do so by looking at
InsetCommandParams, which is the way most of the code works, or whether
we should look at the EmbeddedFileList.
As I have repeated several times, when we look at params, we do not
always get what we want because params *does not* hold all the
information. For example, when we output to latex, and the file is
embedded, we need to use the embedded version and may (I have not
figured this part out) need to output /tmp/blah/biblio, instead of
biblio. This is why we should ask EmbeddedFile for the parameters.
Yes, I understand that we need to look up that information. But what I'm
saying is that I want to use the EmbeddedFileList, which we're keeping
in sync with the params, ONLY to look that information up if and when
it's needed, and not use it in other ways. Yes, this is a minor dispute
now. But it matters, it seems to me, for the other reasons I've
mentioned, viz: If the embedding stuff changes, I want the change only
to affect things that have to do with embedding.
Here's a simple example. I can see lots of reasons one might use a map
in EmbeddedFileList rather than a vector. A common thing to do here is
to find the EmbeddedFile object representing a certain absolute path,
and this is trivial with a map. But if you did that, given the current
implementation, the latex output would (probably) change! Why? Because
maps are sorted by key. I don't think this would actually matter in this
particular case---I don't think that the order in which the bibfiles are
given is significant---but the fact that this could happen points to a
problem with how the EmbeddedFileList is being used. The latex output
should not depend upon implementation details of some distant class, and
the implementation of EmbeddedFileList should not be constrained by the
way we iterate over the bibfiles in InsetBibtex.
I think the latex output stuff is OK now, at least as far as View>DVI is
concerned. At least, I think I committed that part. If not, I will.
rh