views:

94

answers:

2

The Emacs extension markerpen.el (link text) allows you to hightlight arbitrary regions in your buffer. With this extension, the added highlighting is lost once you kill the buffer though. However, it would be nice to be able to highlight arbitrary regions of a file in a "persistent" way -- in the sense that the added hightlighting is not lost after I close the file.

Do you know of any way I could have such a "persistent" highlighting?

Thanks very much.

+2  A: 

At the moment, no feature like this exists, so you'd need to create an extension to markerpen.el which created a metafile containing highlight points in each file that had them. (I'd suggest creating a metafile for each file)

When setting marks, each time one is added to markerpen-overlays you could update the related metafile.

When you load any file, you could check for the existence of the metafile (or when you invoked the markerpen library)

Then load the metafile and create the marks.

slomojo
+3  A: 

Try enriched-mode.

huaiyuan