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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13992 in the body.
You can then email your comments to 13992 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org:
bug#13992; Package emacs. (Mon, 18 Mar 2013 13:03:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo Liu <sdl.web <at> gmail.com>:
New bug report received and forwarded. Copy sent to monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org. (Mon, 18 Mar 2013 13:03:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

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)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13992; Package emacs. (Mon, 18 Mar 2013 17:34:02 GMT) Full text and rfc822 format available.

Message #8 received at 13992 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 13992 <at> debbugs.gnu.org
Subject: Re: bug#13992: 24.3; New command compilation-display-error
Date: Mon, 18 Mar 2013 19:30:54 +0200
> From: Leo Liu <sdl.web <at> gmail.com>
> Date: Mon, 18 Mar 2013 21:00:08 +0800
> 
> The attached patch looks like a good addition to compile.el. Bind it to
> C-o as in occur-mode. -- Leo

Thanks.  The name of the command could have more mnemonic payload,
though.  How about compilation-msg-locus-other-window?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13992; Package emacs. (Mon, 18 Mar 2013 18:15:01 GMT) Full text and rfc822 format available.

Message #11 received at 13992 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 13992 <at> debbugs.gnu.org
Subject: Re: bug#13992: 24.3; New command compilation-display-error
Date: Mon, 18 Mar 2013 14:13:00 -0400
> The attached patch looks like a good addition to compile.el.  Bind it to
> C-o as in occur-mode. -- Leo

Fine by me,


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13992; Package emacs. (Tue, 19 Mar 2013 00:05:02 GMT) Full text and rfc822 format available.

Message #14 received at 13992 <at> debbugs.gnu.org (full text, mbox):

From: Leo Liu <sdl.web <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 13992 <at> debbugs.gnu.org
Subject: Re: bug#13992: 24.3; New command compilation-display-error
Date: Tue, 19 Mar 2013 08:02:47 +0800
On 2013-03-19 01:30 +0800, Eli Zaretskii wrote:
> The name of the command could have more mnemonic payload, though. How
> about compilation-msg-locus-other-window?

The name 'compilation-display-error' is more consistent with how things
are named in compile.el, for example, compile-goto-error. And commands
end with -other-window usually switch you to that window.

Leo




Reply sent to Leo Liu <sdl.web <at> gmail.com>:
You have taken responsibility. (Tue, 19 Mar 2013 00:23:02 GMT) Full text and rfc822 format available.

Notification sent to Leo Liu <sdl.web <at> gmail.com>:
bug acknowledged by developer. (Tue, 19 Mar 2013 00:23:02 GMT) Full text and rfc822 format available.

Message #19 received at 13992-done <at> debbugs.gnu.org (full text, mbox):

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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 16 Apr 2013 11:24:04 GMT) Full text and rfc822 format available.

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.