On Fri, Mar 15, 2002 at 09:32:42AM +0000, Angus Leeming wrote: > Some initial points: > * it would be nice if insets were buffer agnostic
Yes! > * we have tried not to store a Buffer ptr in the insets and have largely > succeeded, but not quite. That biggie insettabular stores the buffer. We should identify the places where the Buffer is 'needed' and look for architectural changes to remove these needs. >From what I see, the buffer pointer is mainly used to 'get up in the tree of nested insets'. This would be unnecessary if we had proper iterators working on that _tree_ - i.e. something closer to the math cursor than to the 'distributed cursor' approach of the rest of LyX. > * cut and paste still makes use of current_view. cut&paste actually should be a purely structural change of the document data. > It seems to me that difficulties arise because we haven't separated cleanly > the concept of copying an inset and inserting it into a buffer. I think the problem lies even deeper. We have not seperated an inset from its environment. > Implementation 1 > [...] > Implementation 2 > [...] > What do people think of this? Neither. Insets should be completely buffer agnostic. Buffer specific information should be handed down by arguments to any function that need to access it. In general, this should not be the buffer pointer, but only a pointer or reference to the part of the buffer information that is really needed. > I've been thinking about this because I played a little with my BibtexCache I can't say anything about the bibtex stuff since I don't know it at all, though... Andre' -- André Pönitz .............................................. [EMAIL PROTECTED]