in reply to Implementing (elisp-like) buffers in Perl 6: how to do buffer-localisation of arbitrary package variables?
Have you looked at the text widget in Tk? It has markers and regions and allows arbitrary labeling of (possibly discontiguous) regions of text. I think it's pretty cool, and might have some of the fundimental features you're looking for.