extents and insert-before-markers

Stephen J. Turnbull stephen at xemacs.org
Thu Jan 12 11:31:58 EST 2012


Julian Bradfield writes:

 > I suppose the general case I have in mind is where you have two extents
 > covering adjacent fields:
 > 
 > xxxxxyyyyyy
 > 
 > and if point is at the first y, there's a clear distinction between
 > adding to the end of field x, and adding to the beginning of field y.

Sure.  In most applications I can thing of, though, there would be an
"inert" separator such as "|".  So the picture I would expect is

[xxxxx]|[yyyyyy]

(where the square brackets are metacharacters indicating closed extent
endpoints and are not displayed).  In fact, you could wrap the
separator in an invisible extent, but that would be a little weird for
users.  In many others, the "natural" arrangement would be start-open,
end-closed (aka append-only extents).

 > If you were using markers to track the fields (as vm does), then
 > insert-before-markers and insert are the way you'd do it. But with
 > extents would the only possibility be to change the openness each
 > time?

There's also explicit set-extent-endpoints, and the insert-then-delete
dance.

Does VM really sometimes insert and sometimes insert-before-markers at
the same place?



More information about the XEmacs-Beta mailing list