>>> Is there a different variable that should be used instead? >> >> I can't find another variable. Maybe a new variable should be created, >> with a name like next-error-current. > > Re-reading the code, we don't really need the variable at all. The call > to the highlighting function has been moved into the C-x ` command, > after all, so we already know what buffer to use, and where point is. > > So I've now changed this to just highlight the current line in the > "error buffer", which seems to work fine in the couple of use cases I > tried. Simplicity is the hallmark of truth :-) Surprisingly, this feature works everywhere, even in diff-mode. But when using next-error on an empty line in diff-mode, its highlighting is too short to notice - only 1 character wide. Maybe the next-error-message face should extend to the end of the window like hl-line-mode face does? I tried to add the attribute ':extend t' to the next-error-message face, but it has no effect. Maybe because currently highlighting is not added to the trailing newline. Indeed, with this patch it works: