all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#13992: 24.3; New command compilation-display-error
@ 2013-03-18 13:00 Leo Liu
  2013-03-18 17:30 ` Eli Zaretskii
  2013-03-18 18:13 ` Stefan Monnier
  0 siblings, 2 replies; 5+ messages in thread
From: Leo Liu @ 2013-03-18 13:00 UTC (permalink / raw)
  To: 13992

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)





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#13992: 24.3; New command compilation-display-error
  2013-03-18 13:00 bug#13992: 24.3; New command compilation-display-error Leo Liu
@ 2013-03-18 17:30 ` Eli Zaretskii
  2013-03-19  0:02   ` Leo Liu
  2013-03-18 18:13 ` Stefan Monnier
  1 sibling, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2013-03-18 17:30 UTC (permalink / raw)
  To: Leo Liu; +Cc: 13992

> From: Leo Liu <sdl.web@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?





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#13992: 24.3; New command compilation-display-error
  2013-03-18 13:00 bug#13992: 24.3; New command compilation-display-error Leo Liu
  2013-03-18 17:30 ` Eli Zaretskii
@ 2013-03-18 18:13 ` Stefan Monnier
  1 sibling, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2013-03-18 18:13 UTC (permalink / raw)
  To: Leo Liu; +Cc: 13992

> 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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#13992: 24.3; New command compilation-display-error
  2013-03-18 17:30 ` Eli Zaretskii
@ 2013-03-19  0:02   ` Leo Liu
  2013-03-19  0:20     ` Leo Liu
  0 siblings, 1 reply; 5+ messages in thread
From: Leo Liu @ 2013-03-19  0:02 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 13992

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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#13992: 24.3; New command compilation-display-error
  2013-03-19  0:02   ` Leo Liu
@ 2013-03-19  0:20     ` Leo Liu
  0 siblings, 0 replies; 5+ messages in thread
From: Leo Liu @ 2013-03-19  0:20 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 13992-done

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





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-03-19  0:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-18 13:00 bug#13992: 24.3; New command compilation-display-error Leo Liu
2013-03-18 17:30 ` Eli Zaretskii
2013-03-19  0:02   ` Leo Liu
2013-03-19  0:20     ` Leo Liu
2013-03-18 18:13 ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.