emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

compilation-goto-locus, pop-up-windows, same-window-regexps


From: Alex Schroeder
Subject: compilation-goto-locus, pop-up-windows, same-window-regexps
Date: Sun, 16 Mar 2003 11:43:28 +0100
User-agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.2.92

I propose to change the end of compilation-goto-locus from this:

  ;; Show compilation buffer in other window, scrolled to this error.
  (let* ((pop-up-windows t)
         ;; Use an existing window if it is in a visible frame.
         (w (or (get-buffer-window (marker-buffer (car next-error)) 'visible)
                ;; Pop up a window.
                (display-buffer (marker-buffer (car next-error))))))
    (set-window-point w (car next-error))
    (set-window-start w (car next-error))
    (compilation-set-window-height w)))

to this:

  ;; Show compilation buffer in other window, scrolled to this error.
  (when pop-up-windows
    ;; Use an existing window if it is in a visible frame.
    (let ((w (or (get-buffer-window (marker-buffer (car next-error)) 'visible)
                 ;; Pop up a window.
                 (display-buffer (marker-buffer (car next-error))))))
      (set-window-point w (car next-error))
      (set-window-start w (car next-error))
      (compilation-set-window-height w))))

What I am trying to achieve is this:

I want Emacs to use one window for each task, ie. when I read mail, in
one window, and write code in a second window, I don't Emacs to change
my window configurations.  I don't want Emacs to split my windows, and
I don't want Emacs to delete other windows.

This is why I started using the following settings.  Try it in emacs
-q.

(setq pop-up-windows nil
      same-window-regexps '("."))

Now run a grep command:

(grep "grep -n setq ~/.emacs")

The *grep* buffer should be the only visible window, now.  Hit RET on
one of the matches.  The window continues to show the grep buffer!

I am not very happy with this solution, however.  I think the best
solution would be to eliminate all occurences of binding
pop-up-windows.  We should look at these situations and decide what
the best way to handle them is -- without making new windows.

Alex.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]