1 Sep
2011
1 Sep
'11
12:15 p.m.
Glenn Linderman writes:
How many different iterators into the same text would be concurrently needed by an application? And why?
A WYSIWYG editor for structured text (TeX, HTML) might want two (at least), one for the "source" window and one for the "rendered" window. One might want to save the state of the iterators (if that's possible) and cache it as one moves the "window" forward to make short backward motion fast, giving you two (or four, etc) more.
Seems like if it is dealing with text at the level of grapheme clusters, it needs that type of iterator. Of course, if it does I/O it needs codec access, but that is by nature sequential from the starting point to the end point.
`save-region' ? `save-text-remove-markup' ?