GNU bug report logs - #13992
24.3; New command compilation-display-error

Previous Next

Package: emacs;

Reported by: Leo Liu <sdl.web <at> gmail.com>

Date: Mon, 18 Mar 2013 13:03:02 UTC

Severity: normal

Found in version 24.3

Done: Leo Liu <sdl.web <at> gmail.com>

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: Leo Liu <sdl.web <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#13992: closed (24.3; New command compilation-display-error)
Date: Tue, 19 Mar 2013 00:23:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Tue, 19 Mar 2013 08:20:29 +0800
with message-id <m1boagz1de.fsf <at> gmail.com>
and subject line Re: bug#13992: 24.3; New command compilation-display-error
has caused the debbugs.gnu.org bug report #13992,
regarding 24.3; New command compilation-display-error
to be marked as done.

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


-- 
13992: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13992
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Leo Liu <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3; New command compilation-display-error
Date: Mon, 18 Mar 2013 21:00:08 +0800
Hello Stefan,

The attached patch looks like a good addition to compile.el. Bind it to
C-o as in occur-mode. -- Leo

diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 68a83b47..b82afc67 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1810,6 +1810,7 @@ (defvar compilation-minor-mode-map
     (define-key map [follow-link] 'mouse-face)
     (define-key map "\C-c\C-c" 'compile-goto-error)
     (define-key map "\C-m" 'compile-goto-error)
+    (define-key map "\C-o" 'compilation-display-error)
     (define-key map "\C-c\C-k" 'kill-compilation)
     (define-key map "\M-n" 'compilation-next-error)
     (define-key map "\M-p" 'compilation-previous-error)
@@ -1854,6 +1855,7 @@ (defvar compilation-mode-map
     (define-key map [follow-link] 'mouse-face)
     (define-key map "\C-c\C-c" 'compile-goto-error)
     (define-key map "\C-m" 'compile-goto-error)
+    (define-key map "\C-o" 'compilation-display-error)
     (define-key map "\C-c\C-k" 'kill-compilation)
     (define-key map "\M-n" 'compilation-next-error)
     (define-key map "\M-p" 'compilation-previous-error)
@@ -2295,6 +2297,12 @@ (defun compilation-previous-file (n)
   (interactive "p")
   (compilation-next-file (- n)))
 
+(defun compilation-display-error ()
+  "Display the source for current error in another window."
+  (interactive)
+  (setq compilation-current-error (point))
+  (next-error-no-select 0))
+
 (defun kill-compilation ()
   "Kill the process made by the \\[compile] or \\[grep] commands."
   (interactive)


[Message part 3 (message/rfc822, inline)]
From: Leo Liu <sdl.web <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 13992-done <at> debbugs.gnu.org
Subject: Re: bug#13992: 24.3; New command compilation-display-error
Date: Tue, 19 Mar 2013 08:20:29 +0800
Hi Eli,

I have put the code in trunk. If you have a better name than
compilation-display-error feel free to tweak it ;)

Leo


This bug report was last modified 12 years and 72 days ago.

Previous Next


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