From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#1073: 23.0.60; Bad interaction between compilation-scroll-output and dedicated windows Date: Fri, 03 Oct 2008 14:36:23 +0200 Message-ID: <48E611C7.7020901@gmx.at> References: Reply-To: martin rudalics , 1073@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030705080508040506050201" X-Trace: ger.gmane.org 1223038214 4176 80.91.229.12 (3 Oct 2008 12:50:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 3 Oct 2008 12:50:14 +0000 (UTC) To: Lawrence Mitchell , 1073@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 03 14:51:11 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 1Klk7j-0001TC-5w for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Oct 2008 14:51:11 +0200 Original-Received: from localhost ([127.0.0.1]:54095 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Klk6f-0000QP-Qo for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Oct 2008 08:50:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Klk6a-0000Q1-Tg for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2008 08:50:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Klk6Z-0000Pi-Ip for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2008 08:50:00 -0400 Original-Received: from [199.232.76.173] (port=48386 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Klk6Z-0000Pe-5d for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2008 08:49:59 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:46341) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Klk6Y-0000Xu-CL for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2008 08:49:58 -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 m93CnubP010599; Fri, 3 Oct 2008 05:49:56 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m93Cj36Y009433; Fri, 3 Oct 2008 05:45:03 -0700 X-Loop: don@donarmstrong.com Resent-From: martin rudalics Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 03 Oct 2008 12:45:02 +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.12230374508200 (code B ref 1073); Fri, 03 Oct 2008 12:45:02 +0000 Original-Received: (at 1073) by emacsbugs.donarmstrong.com; 3 Oct 2008 12:37:30 +0000 Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m93CbQvt008193 for <1073@emacsbugs.donarmstrong.com>; Fri, 3 Oct 2008 05:37:27 -0700 Original-Received: (qmail invoked by alias); 03 Oct 2008 12:37:20 -0000 Original-Received: from 62-47-54-80.adsl.highway.telekom.at (EHLO [62.47.54.80]) [62.47.54.80] by mail.gmx.net (mp032) with SMTP; 03 Oct 2008 14:37:20 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/mNBR33+Hm8PpT5b6+6w9+UuDlTsWq29FsJ6sZ8H FSYut/wr39aVcN User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) In-Reply-To: X-Y-GMX-Trusted: 0 X-FuHaFi: 0.73,0.66 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Fri, 03 Oct 2008 08:50:00 -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:21032 Archived-At: This is a multi-part message in MIME format. --------------030705080508040506050201 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit > 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? martin --------------030705080508040506050201 Content-Type: text/plain; name="1073.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="1073.diff" *** progmodes/compile.el.~1.476.~ 2008-06-13 18:22:16.000000000 +0200 --- progmodes/compile.el 2008-10-03 14:31:45.718750000 +0200 *************** *** 1280,1289 **** (cons proc compilation-in-progress)))) ;; Now finally cd to where the shell started make/grep/... (setq default-directory thisdir)) ! (if (buffer-local-value 'compilation-scroll-output outbuf) ! (save-selected-window ! (select-window outwin) ! (goto-char (point-max)))) ;; Make it so the next C-x ` will use this buffer. (setq next-error-last-buffer outbuf))) --- 1280,1290 ---- (cons proc compilation-in-progress)))) ;; Now finally cd to where the shell started make/grep/... (setq default-directory thisdir)) ! ! (with-current-buffer (window-buffer outwin) ! (when (local-variable-p 'compilation-scroll-output) ! (goto-char (point-max)))) ! ;; Make it so the next C-x ` will use this buffer. (setq next-error-last-buffer outbuf))) --------------030705080508040506050201--