From: Leo Liu <sdl.web@gmail.com>
To: 13992@debbugs.gnu.org
Subject: bug#13992: 24.3; New command compilation-display-error
Date: Mon, 18 Mar 2013 21:00:08 +0800 [thread overview]
Message-ID: <m1k3p4zwvb.fsf@gmail.com> (raw)
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)
next reply other threads:[~2013-03-18 13:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-18 13:00 Leo Liu [this message]
2013-03-18 17:30 ` bug#13992: 24.3; New command compilation-display-error Eli Zaretskii
2013-03-19 0:02 ` Leo Liu
2013-03-19 0:20 ` Leo Liu
2013-03-18 18:13 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1k3p4zwvb.fsf@gmail.com \
--to=sdl.web@gmail.com \
--cc=13992@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).