> I tried this with emacs -Q on a mac using Gnu Emacs 26.3. > > Using customize-variable I set next-error-highlight to t ("Semipermanent > highlighting") and saved that value for the current session. > > I then ran M-x grep and got a *grep* buffer and moved through the errors > using n and p. The matches appeared in another window and were > highlighted but the highlighting disappeared after a short time (could > be the default value of 0.5 seconds) even if I didn't hit a key. > > My understanding of next-error-highlight is when set to t, the > highlighting should remain until I enter another command. Yet > it seems to disappear on it's own. Sorry for the delay, I looked at this bug report, and the solution for you is to customize next-error-highlight-no-select instead of next-error-highlight, because next-error-highlight-no-select affects the highlighting of non-selected windows displayed from the *grep* buffer with n and p keys. Before closing this bug report, I propose to improve the documentation: