Visible Mark for Emacs
Visible Mark is an Emacs library developed by Jorgen Schaefer, Yann Hodique, and MATSUYAMA Tomohiro. The official version of Visible Mark can be found on EmacsWiki.
This is the project page for the version of Visible Mark found in my git repository. It has an improved procedure for keeping the mark decorations updated, better handling of mark decorations at newlines, and better support for showing several marks in (configurable) different colors.
Visible Mark is perfectly usable day-to-day, but there is still room for improvement. I plan to continue working on it a bit at a time until it seemlessly integrates with Emacs.
Obtain visible-mark.el and put it somewhere in your Emacs load-path.
Load it and configure it with code like this in your .emacs:
(require 'visible-mark) (setq visible-mark-max 2) (defface my-visible-mark-face-2 `((t (:background "orange" :foreground "black"))) "Face for the mark." :group 'visible-mark) (setq visible-mark-faces `(visible-mark-face my-visible-mark-face-2)) (global-visible-mark-mode +1)
Make sure that visible-mark-faces has at least as many entries as the number given by visible-mark-max.
When two marks are in the same spot, the decorations are displayed side-by-side. It would be preferable to only show the mark decoration for the most recent mark in the spot.
Observed in circe, when the buffer has a right margin, and there is a mark at the beginning of a line, any text in the margin on that line gets styled with the mark's face. May also happen for left margins, but haven't tested yet.