unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How modify behavior when you click on a compile error?
@ 2008-12-14  0:18 seberino
  2008-12-16 21:13 ` Rob Giardina
  0 siblings, 1 reply; 2+ messages in thread
From: seberino @ 2008-12-14  0:18 UTC (permalink / raw)
  To: help-gnu-emacs

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



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

* Re: How modify behavior when you click on a compile error?
  2008-12-14  0:18 How modify behavior when you click on a compile error? seberino
@ 2008-12-16 21:13 ` Rob Giardina
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Giardina @ 2008-12-16 21:13 UTC (permalink / raw)
  To: help-gnu-emacs

On Dec 13, 7:18 pm, "seber...@spawar.navy.mil"
<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)))


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

end of thread, other threads:[~2008-12-16 21:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-14  0:18 How modify behavior when you click on a compile error? seberino
2008-12-16 21:13 ` Rob Giardina

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).