GNU bug report logs - #37733
[PATCH]: Erroneous grep call thows exception in compilation-tear-down-arrow-spec-in-margin.

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Sun, 13 Oct 2019 13:06:01 UTC

Severity: normal

Tags: patch

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Alan Mackenzie <acm <at> muc.de>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#37733: closed ([PATCH]: Erroneous grep call thows exception
 in compilation-tear-down-arrow-spec-in-margin.)
Date: Sun, 13 Oct 2019 13:23:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 13 Oct 2019 13:22:42 +0000
with message-id <20191013132242.GD10125 <at> ACM>
and subject line Re: bug#37733: Acknowledgement ([PATCH]: Erroneous grep call thows exception in compilation-tear-down-arrow-spec-in-margin.)
has caused the debbugs.gnu.org bug report #37733,
regarding [PATCH]: Erroneous grep call thows exception in compilation-tear-down-arrow-spec-in-margin.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
37733: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=37733
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Alan Mackenzie <acm <at> muc.de>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH]: Erroneous grep call thows exception in
 compilation-tear-down-arrow-spec-in-margin.
Date: Sun, 13 Oct 2019 13:05:12 +0000
In master:
emacs -Q
C-u M-x grep <CR>
grep --color -nH --null '-syn-' *.el <CR> ; Note the '-syn-' is
                                  ; interpreted by grep as flags.

This throws an exception.

Fix as follows:


diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index e312def18d..25c8a4d067 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -2669,10 +2669,11 @@ compilation-set-up-arrow-spec-in-margin
 
 (defun compilation-tear-down-arrow-spec-in-margin ()
   "Restore compilation-arrow-overlay to not using the margin, which is removed."
-  (overlay-put compilation-arrow-overlay 'before-string nil)
-  (delete-overlay compilation-arrow-overlay)
-  (setq compilation-arrow-overlay nil)
-  (set-window-margins (selected-window) (- (car (window-margins)) 2)))
+  (when (overlayp compilation-arrow-overlay)
+    (overlay-put compilation-arrow-overlay 'before-string nil)
+    (delete-overlay compilation-arrow-overlay)
+    (setq compilation-arrow-overlay nil)
+    (set-window-margins (selected-window) (- (car (window-margins)) 2))))
 
 (defun compilation-set-overlay-arrow (w)
   "Set up, or switch off, the overlay-arrow for window W."

.

-- 
Alan Mackenzie (Nuremberg, Germany).


[Message part 3 (message/rfc822, inline)]
From: Alan Mackenzie <acm <at> muc.de>
To: 37733-done <at> debbugs.gnu.org
Subject: Re: bug#37733: Acknowledgement ([PATCH]: Erroneous grep call thows
 exception in compilation-tear-down-arrow-spec-in-margin.)
Date: Sun, 13 Oct 2019 13:22:42 +0000
Bug fixed in the master branch.

-- 
Alan Mackenzie (Nuremberg, Germany).


This bug report was last modified 5 years and 305 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.