Abdelrazak Younes wrote:
> So this has nothing to do with those two static variables inside
> insetcite.C right?

Well, indirectly. The timestamps are stored there.

> If I am right, then you just need to transfer the cached_keys variable
> to Buffer.
> And if I am still right then the problem with lengthy kpsewhich Georg
> mentioned is present now, independantly of this natbib minor problem:
> i.e.: kpsewhich will be called again if you close and reopen a file.

yes, I think so. The problem was that we checked if the cache was empty, not 
if the cache did not contain data for the current buffer. The attached patch 
fixes this. I'd propose to shove this in despite what we are doing later. I'd 
also like to put it in 1.4.

> Please test this.

I'm sorry, I don't have time to do so now. I'll see if I can do it tomorrow.

Jürgen
Index: src/insets/insetcite.C
===================================================================
--- src/insets/insetcite.C	(Revision 16608)
+++ src/insets/insetcite.C	(Arbeitskopie)
@@ -96,7 +96,7 @@
 	}
 
 	// build the keylist only if the bibfiles have been changed
-	if (cached_keys.empty() || bibfileStatus.empty() || changed) {
+	if (cached_keys[&buffer].empty() || bibfileStatus.empty() || changed) {
 		typedef vector<std::pair<string, docstring> > InfoType;
 		InfoType bibkeys;
 		buffer.fillWithBibKeys(bibkeys);

Reply via email to