I would like to know the reason why this answer was deleted. Here is the full content of the answer:
Try http://www.emacswiki.org/emacs/msearch.el All occurences of the text selected with the cursor are highlighted. You have to drag over the string which you want to highlight. That enables you to easily change the selection without changing the highlight.
If you want to preserve the highlighting of a string you can freeze it.
You can enslave a buffer to another buffer. Text selected in the master buffer will also be highlighted in the slave buffer. That is useful for comparing buffers. It is also useful for taking notes in one buffer while you investigate the text in another one. You can have a collection of keywords in the notes buffer. Drag over such a keyword and its occurences in the investigated text will be highlighted.
I am using this stuff for years now. I added the freezing quite recently. So, maybe something is broken. If this is the case leave me a note on http://www.emacswiki.org/emacs/msearch or here.
I already visited the potential reasons in the Help Center, but could not find a direct match.
- The answer fits the question. (Highlighting all occurrences of a word selected with the mouse.) The highlighting keeps permanent when the cursor moves due to a vscroll. (That is the actual reason for the restriction that you have to select the word with a mouse-drag motion.)
- It is not an exact duplicate of other answers.
- It is essentially more than a link to an external site.
So, what is the actual reason for deleting it?