[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Advice on how to save/restore editor buffers



I would like to do the following for a Zwei application:

I would like to "save the state of the buffer" at some point, 
then allow some editing operations, then later optionally
restore the saved state [edited text, point and mark]. What's 
the best way to do this with the minimal amount of fuss
and overhead?

- Save the buffer by COPY-INTERVAL, POINT and MARK by
COPY-BP. 
- As above, but make strings instead and use indices into strings.
- In the case I don't change buffers, but some buffer text
has been edited, can I avoid save/restore on the buffer interval?
- When do I need MOVES type bp's vs. NIL type bp's?