I'm presently combing isearch.el
to find out how to highlight-string
and unhighlight-string
in the buffer. This is needed when highlight-regexp
will not work -- e.g., a string like this:
** Active [#A] .;;;;;;;;;;;;;;;;;;;;;;;;;;;; HIGH ;;;;;;;;;;;;;;;;;;;;;;;;;;;. :HIGH:
DEADLINE: <2013-12-15 Sun>
The functions isearch-highlight (beg end)
and isearch-dehighlight
are almost exactly what is needed -- I just need to modify (beg end)
so that a string can be used.
beg
and end
may move during the function (e.g., org-archive-subtree
), so it is a few extra lines of code to find the string again and re-define beg
and end
-- it would be nice to just use something like (highlight-string string).
highlight-regexp
"not work"? What is the spec for your hypotheticalhighlight-string
? Is it something more than(highlight-regexp (reqgexp-quote string))
?(highlight-regexp (regexp-quote string))
before. Thank you very much -- greatly appreciated !!!regexp-opt
makes a string literal, as a regexp. I posted the info as an answer, for clarity.