Emacs: persistent highlighting of a region

大城市里の小女人 提交于 2019-12-06 00:58:31

问题


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.


回答1:


Try enriched-mode.




回答2:


Yes, such a feature does exist. And you can add the highlighting in any number of ways, including sweeping the mouse marker pen-style.

http://www.emacswiki.org/emacs/HighLight#PermanentHighlighting




回答3:


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.



来源:https://stackoverflow.com/questions/3903137/emacs-persistent-highlighting-of-a-region

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!