From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: [Fwd: Re: next-error insists on split windows]
Date: Fri, 28 Apr 2006 09:45:05 -0600 [thread overview]
Message-ID: <44523881.6030607@yahoo.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 295 bytes --]
Bill Wohler confirms my attached analysis and workaround:
> That seems to be doing what I hoped. Nice job. Thanks! That'll work
> nicely until the underlying code gets an option for configuring this
> behavior.
>
> To OP would probably appreciate a copy of this.
Thanks,
--
Kevin Rodgers
[-- Attachment #2: Re: next-error insists on split windows --]
[-- Type: message/rfc822, Size: 2140 bytes --]
From: Kevin Rodgers <ihs_4664@yahoo.com>
To: Bill Wohler <wohler@newt.com>
Subject: Re: next-error insists on split windows
Date: Thu, 27 Apr 2006 11:08:12 -0600
Message-ID: <4450FA7C.7040001@yahoo.com>
Bill Wohler wrote:
> Kevin Rodgers <ihs_4664@yahoo.com> writes:
>
>> 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))
>
> It's a bit too strong since if the buffer with the next error isn't
> current visible, you won't see it.
OK, I've dug a little deeper and I think I understand how this works.
The compilation buffer is displayed by compilation-goto-locus, but only
when next-error and friends were called from some other buffer or the
compilation buffer isn't already visible.
I don't think messing with display-buffer is a good idea, but after the
buffer is displayed compilation-set-window-height is called (unless it
was already visible, which doesn't concern us). So perhaps advising
compilation-set-window to undisplay the buffer when it was called in
that context will work:
(defadvice compilation-set-window-height (after delete-window activate)
"Undisplay WINDOW if `compilation-goto-locus' made it visible."
(when (and (boundp 'from-compilation-buffer)
(boundp 'pre-existing)
(or (not from-compilation-buffer)
(not pre-existing)))
(delete-window (ad-get-arg 0))))
--
Kevin
[-- Attachment #3: Type: text/plain, Size: 149 bytes --]
_______________________________________________
bug-gnu-emacs mailing list
bug-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs
reply other threads:[~2006-04-28 15:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44523881.6030607@yahoo.com \
--to=ihs_4664@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.