GNU bug report logs -
#32676
[PATCH] Add option to highlight the 'next-error' error message
Previous Next
Reported by: Ernesto Alfonso <erjoalgo <at> gmail.com>
Date: Mon, 10 Sep 2018 05:24:02 UTC
Severity: wishlist
Tags: fixed, patch
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
>> 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:
>
> Makes sense; go ahead and apply.
Now pushed. After a day of using it, I realized this feature paved the way
to another very useful feature: when the highlighting overlay is not removed
after going to the next occurrence, and leaves the highlighting
on all visited lines, this provides an overview what lines were
already visited, and what lines not yet visited - like visited links
are highlighted differently in browsers. This patch builds this feature
on the top of the initial patch:
[next-error-message-highlight-keep.patch (text/x-diff, inline)]
diff --git a/lisp/simple.el b/lisp/simple.el
index 97f6d4837e..c2e5ff4c5a 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -119,8 +119,12 @@ next-error-recenter
:version "23.1")
(defcustom next-error-message-highlight nil
- "If non-nil, highlight the current error message in the `next-error' buffer."
- :type 'boolean
+ "If non-nil, highlight the current error message in the `next-error' buffer.
+If the value is `keep', highlighting is permanent, so all visited error
+messages are highlighted; this helps to see what messages were visited."
+ :type '(choice (const :tag "Highlight the current error" t)
+ (const :tag "Highlight all visited errors" keep)
+ (const :tag "No highlighting" nil))
:group 'next-error
:version "28.1")
@@ -482,7 +486,8 @@ next-error-message-highlight
"Highlight the current error message in the ‘next-error’ buffer."
(when next-error-message-highlight
(with-current-buffer error-buffer
- (when next-error--message-highlight-overlay
+ (when (and next-error--message-highlight-overlay
+ (not (eq next-error-message-highlight 'keep)))
(delete-overlay next-error--message-highlight-overlay))
(let ((ol (make-overlay (line-beginning-position) (1+ (line-end-position)))))
;; do not override region highlighting
This bug report was last modified 4 years and 251 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.