From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Liu Newsgroups: gmane.emacs.bugs Subject: bug#13992: 24.3; New command compilation-display-error Date: Mon, 18 Mar 2013 21:00:08 +0800 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1363611707 20415 80.91.229.3 (18 Mar 2013 13:01:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Mar 2013 13:01:47 +0000 (UTC) To: 13992@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 18 14:02:13 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UHZha-0002Uo-N2 for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Mar 2013 14:02:10 +0100 Original-Received: from localhost ([::1]:43513 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHZhD-00078m-NP for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Mar 2013 09:01:47 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHZh3-00075y-Ck for bug-gnu-emacs@gnu.org; Mon, 18 Mar 2013 09:01:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHZgv-0005rG-Ku for bug-gnu-emacs@gnu.org; Mon, 18 Mar 2013 09:01:37 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56992) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHZgv-0005rC-I9 for bug-gnu-emacs@gnu.org; Mon, 18 Mar 2013 09:01:29 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UHZiQ-00048o-LN; Mon, 18 Mar 2013 09:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Leo Liu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: monnier@iro.umontreal.ca, bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Mar 2013 13:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 13992 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: Stefan Monnier Original-Received: via spool by submit@debbugs.gnu.org id=B.136361175115866 (code B ref -1); Mon, 18 Mar 2013 13:03:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Mar 2013 13:02:31 +0000 Original-Received: from localhost ([127.0.0.1]:32864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UHZht-00047o-Bu for submit@debbugs.gnu.org; Mon, 18 Mar 2013 09:02:30 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46884) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UHZhn-00047X-B4 for submit@debbugs.gnu.org; Mon, 18 Mar 2013 09:02:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHZg6-0005ix-C4 for submit@debbugs.gnu.org; Mon, 18 Mar 2013 09:00:44 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:52986) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHZg6-0005it-86 for submit@debbugs.gnu.org; Mon, 18 Mar 2013 09:00:38 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58225) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHZg0-00071r-2l for bug-gnu-emacs@gnu.org; Mon, 18 Mar 2013 09:00:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHZfp-0005ab-EX for bug-gnu-emacs@gnu.org; Mon, 18 Mar 2013 09:00:32 -0400 Original-Received: from mail-da0-x230.google.com ([2607:f8b0:400e:c00::230]:63700) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHZfp-0005ZB-98 for bug-gnu-emacs@gnu.org; Mon, 18 Mar 2013 09:00:21 -0400 Original-Received: by mail-da0-f48.google.com with SMTP id p8so491417dan.35 for ; Mon, 18 Mar 2013 06:00:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:subject:x-debbugs-cc:date:message-id :mime-version:content-type; bh=kQ7VLCcXX7bMNVGdN94ihbcnlKC4S9Q3+P8dOW6fAMU=; b=GmTJwFwPoL+Ff6omCXnE0Y94bZa5blXGmIFOvTpEGDN2Q4MAetzjIIL+2fy7dhJ3s8 /CDdAIEodIgipXohDi+96bgbkcnIBsqWPQVn8voBBIG9dD3FK4QYayBU2T+D/uhJsLq/ 3qkcIeWWz3G5/yYIjqyyN7ARa8cJv+tYDxXYFppctoEGjQ0XQdkoHXFvM+RC+FO9NZCb wZ4Jey7brNMoFHtkI5nr8FCAAzEOwPBpUHzFcl9uaiiGUfiOxVMlBphgaRDSWVjTXEhc iZRQGN1bicsI3Y7Wya98M/eOg4Tu2bedry6qD3ZURWRGvvcdGGj/viRs5X+b/kbu8owP d2CQ== X-Received: by 10.68.212.170 with SMTP id nl10mr33327904pbc.39.1363611620282; Mon, 18 Mar 2013 06:00:20 -0700 (PDT) Original-Received: from localhost ([182.48.109.29]) by mx.google.com with ESMTPS id xs10sm8167919pac.8.2013.03.18.06.00.14 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 18 Mar 2013 06:00:19 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:72673 Archived-At: 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)