I recently discovered highlight-changes-mode and I added it to my proofs-typesetting setup (LaTeX). I usually make some temporary changes to my buffer that I like not to be tracked (highlighted) when higlight-changes-mode is active.

Is it possible to do it? If so, how?

Edit. As for regexp highlighting in my question highlight-regexp: what's the variable in which they are stored? I imagine it can be done by let binding the variable(s) in which overlays are stored. Unfortunately I've not been able to find it.

A MWE of what I'm searching for can be explained by the following example.

Let's say I'm working on a LaTeX project in the proofreading stage. At a certain point I want to highlight a word/regexp in the PDF output. I can do:

  ;; "WORD" --> "{\color{red} WORD}"
  (perform-replace "WORD" 
                   "{\\color{red} WORD}" 
                   nil nil nil 1 nil (point-min) (point-max))

  ;; pdflatex the buffer-file

  (perform-replace "{\\color{red} WORD}" 
                   nil nil nil 1 nil (point-min) (point-max))

In this case highlight-changes-mode will track all my temporary changes. My purpose is to create a wrapper form this kind of operation that makes them not be tracked by highlight-changes-mode.


highlight-changes-remove-highlight might be handy for this. The best way to find out about it is to read the source file for the highlight-changes code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.