bug-gnu-emacs
[Top][All Lists]
Advanced

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

Re: next-error insists on split windows


From: Kevin Rodgers
Subject: Re: next-error insists on split windows
Date: Wed, 26 Apr 2006 11:04:03 -0600
User-agent: Thunderbird 1.5.0.2 (Windows/20060308)

Bill Wohler wrote:
Kevin Rodgers <address@hidden> writes:

Bill Wohler wrote:
Kim F. Storm <address@hidden> wrote:
Bill Wohler <address@hidden> writes:
FWIW, I agree with you. I don't know if Emacs 22 provides any relief.
(setq grep-window-height 5)
Thanks for the aspirin, Kim ;-). It would still be great if next-error
didn't insist on making the window visible.
What happens if you try:

(setq special-display-buffer-names
      (cons '("*grep*" ignore)
            special-display-buffer-names))

Worse! With that code you either get:

  compilation-set-window-height: Wrong type argument: window-live-p, nil

That makes sense, since the buffer was not actually displayed it has no
window.  Should compilation-set-window-height or the calls to it check
window-live-p instead of assuming the buffer has been displayed?

Or if you s/ignore/'ignore/, then you get a separate frame that
occludes your work!

Right, 'ignore is just (quote ignore), which is interpreted as setting
the special frame's quote parameter to ignore.

Thanks for an intriguing suggestion, though.

Note that the error isn't with grep, it's with next-error.

So M-x compile and M-x grep ought to display the *compilation* and
*grep* buffers, but next-error and previous-error shouldn't.  Does
advising them to preserve the window configuration do what you want:

(defadvice next-error (around save-window-excursion activate)
  "Preserve the current window configuration."
  (save-window-excursion
    ad-do-it))

(defadvice previous-error (around save-window-excursion activate)
  "Preserve the current window configuration."
  (save-window-excursion
    ad-do-it))

--
Kevin Rodgers





reply via email to

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