From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rob Giardina Newsgroups: gmane.emacs.help Subject: Re: How modify behavior when you click on a compile error? Date: Tue, 16 Dec 2008 13:13:53 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <1f314dcf-c92c-4a6e-a611-d46a078cc27c@a12g2000pro.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1229463733 17482 80.91.229.12 (16 Dec 2008 21:42:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Dec 2008 21:42:13 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 16 22:43:18 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LChgx-0000TC-8X for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Dec 2008 22:42:59 +0100 Original-Received: from localhost ([127.0.0.1]:58654 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LChfl-0002pW-90 for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Dec 2008 16:41:45 -0500 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!z27g2000prd.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 25 Original-NNTP-Posting-Host: 204.253.35.209 Original-X-Trace: posting.google.com 1229462033 15843 127.0.0.1 (16 Dec 2008 21:13:53 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 16 Dec 2008 21:13:53 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z27g2000prd.googlegroups.com; posting-host=204.253.35.209; posting-account=8Z_DbwoAAAC85ph26XsXGxjI56J9g-ht User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1a1) Gecko/2008072510 Shiretoko/3.1a1,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:165375 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:60705 Archived-At: On Dec 13, 7:18=A0pm, "seber...@spawar.navy.mil" wrote: > When I compile/run a Python program with errors, I can click on an > error to move to a buffer with corresponding offending source code line > (s). > > How modify what happens when you click on these "error links"?? > > Specifically, I want the "error link" to *not* split the window but > rather display source code buffer in the current window. > > Chris ;;this is just a little bit dirty :) (require 'cl) (defadvice compilation-goto-locus (around stay-in-comp-buffer activate) (let ((same-window-buffer-names (cons (buffer-name (marker-buffer (ad-get-arg 1))) same-window-buffer-names)) (orig-pop-to-buffer (symbol-function 'pop-to-buffer))) ;;override pop-to-buffer -- compilation-goto-locus always sets other-window which ignores same-window-buffer-names (flet ((pop-to-buffer (buffer &optional other-window norecord) (funcall orig-pop-to-buffer buffer nil norecord))) ad-do-it)))