From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.bugs Subject: bug#1073: 23.0.60; Bad interaction between compilation-scroll-output and dedicated windows Date: Fri, 03 Oct 2008 15:18:25 +0200 Message-ID: <48E61BA1.9090307@gmail.com> References: <48E611C7.7020901@gmx.at> Reply-To: "Lennart Borgman \(gmail\)" , 1073@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1223040657 12291 80.91.229.12 (3 Oct 2008 13:30:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 3 Oct 2008 13:30:57 +0000 (UTC) Cc: Lawrence Mitchell To: martin rudalics , 1073@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 03 15:31:54 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Klkkr-0000we-TD for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Oct 2008 15:31:38 +0200 Original-Received: from localhost ([127.0.0.1]:38301 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Klkjo-0000b3-PF for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Oct 2008 09:30:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KlkjK-0000NT-TR for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2008 09:30:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KlkjJ-0000MX-Jq for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2008 09:30:02 -0400 Original-Received: from [199.232.76.173] (port=49812 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KlkjI-0000MN-RB for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2008 09:30:01 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:38083) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KlkjH-0000Ns-Bg for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2008 09:30:00 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m93DTuog021045; Fri, 3 Oct 2008 06:29:57 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m93DP42O019912; Fri, 3 Oct 2008 06:25:04 -0700 X-Loop: don@donarmstrong.com Resent-From: "Lennart Borgman (gmail)" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 03 Oct 2008 13:25:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1073 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1073-submit@emacsbugs.donarmstrong.com id=B1073.122303992018515 (code B ref 1073); Fri, 03 Oct 2008 13:25:04 +0000 Original-Received: (at 1073) by emacsbugs.donarmstrong.com; 3 Oct 2008 13:18:40 +0000 Original-Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m93DIahk018509 for <1073@emacsbugs.donarmstrong.com>; Fri, 3 Oct 2008 06:18:38 -0700 Original-Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:62565 helo=[127.0.0.1]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1KlkYF-0004U1-4o; Fri, 03 Oct 2008 15:18:36 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 In-Reply-To: <48E611C7.7020901@gmx.at> X-Enigmail-Version: 0.95.7 X-Antivirus: avast! (VPS 081002-0, 2008-10-02), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.151.87 X-Scan-Result: No virus found in message 1KlkYF-0004U1-4o. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1KlkYF-0004U1-4o f22b96dbfe2b06ac4e46e00e9b4974d7 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Fri, 03 Oct 2008 09:30:02 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:21034 Archived-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 # >> and after the select-window call (selected-window) is #> 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))