From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: martin rudalics <rudalics@gmx.at>, 1073@emacsbugs.donarmstrong.com
Cc: Lawrence Mitchell <wence@gmx.li>
Subject: bug#1073: 23.0.60; Bad interaction between compilation-scroll-output and dedicated windows
Date: Fri, 03 Oct 2008 15:18:25 +0200 [thread overview]
Message-ID: <48E61BA1.9090307@gmail.com> (raw)
In-Reply-To: <48E611C7.7020901@gmx.at>
martin rudalics wrote:
>> When this code in `compilation-start' is executed:
>>
>> (if (buffer-local-value 'compilation-scroll-output outbuf)
>> (save-selected-window
>> (select-window outwin)
>> (goto-char (point-max))))
>>
>> outwin is #<window 13 on *compilation*>
>> and after the select-window call (selected-window) is #<window 13
>> on *compilation*>. However, at this point (current-buffer)
>> returns *test*, rather than *compilation*.
>
> This is a very, very great nuisance of `select-window'. Would the
> attached patch DTRT?
I did not try the patch so maybe I misunderstand it. But is not the
problem that (current-buffer) is not the same as (window-buffer)?
If so then perhaps using
(save-selected-window
(select-window outwin)
(with-current-buffer (window-buffer)
(goto-char (point-max)))
would do the expected thing?
But it looks strange to me. How does one know that this will change the
point in outwin? It would be much cleaner with something like a defmacro
`with-window-buffer' which would take a window as its first argument.
With that defmacro the code would be
(with-window-buffer outwin
(goto-char (point-max))
next prev parent reply other threads:[~2008-10-03 13:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <48E74069.6000809@gmx.at>
2008-10-03 9:20 ` bug#1073: 23.0.60; Bad interaction between compilation-scroll-output and dedicated windows Lawrence Mitchell
2008-10-03 12:36 ` martin rudalics
2008-10-03 13:01 ` Lawrence Mitchell
2008-10-03 13:18 ` martin rudalics
2008-10-03 15:48 ` Lawrence Mitchell
2008-10-03 13:18 ` Lennart Borgman (gmail) [this message]
2008-10-03 13:42 ` martin rudalics
2008-10-03 13:46 ` Lennart Borgman (gmail)
2008-10-03 14:29 ` martin rudalics
2008-10-03 14:49 ` Lennart Borgman (gmail)
2008-10-05 0:54 ` Stefan Monnier
2008-10-05 18:58 ` martin rudalics
2008-10-04 10:15 ` bug#1073: marked as done (23.0.60; Bad interaction between compilation-scroll-output and dedicated windows) Emacs bug Tracking System
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=48E61BA1.9090307@gmail.com \
--to=lennart.borgman@gmail.com \
--cc=1073@emacsbugs.donarmstrong.com \
--cc=rudalics@gmx.at \
--cc=wence@gmx.li \
/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.