From unknown Sat Jun 21 15:59:51 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#1073 <1073@debbugs.gnu.org> To: bug#1073 <1073@debbugs.gnu.org> Subject: Status: 23.0.60; Bad interaction between compilation-scroll-output and dedicated windows Reply-To: bug#1073 <1073@debbugs.gnu.org> Date: Sat, 21 Jun 2025 22:59:51 +0000 retitle 1073 23.0.60; Bad interaction between compilation-scroll-output and= dedicated windows reassign 1073 emacs submitter 1073 Lawrence Mitchell severity 1073 normal thanks From lawrence.mitchell@ed.ac.uk Fri Oct 3 02:21:03 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.2 required=4.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 3 Oct 2008 09:21:03 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m939Ks81024801 for ; Fri, 3 Oct 2008 02:20:56 -0700 Received: from mx10.gnu.org ([199.232.76.166]:38331) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1Klgo1-0001p2-I2 for emacs-pretest-bug@gnu.org; Fri, 03 Oct 2008 05:18:37 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KlgqB-0005MV-Bm for emacs-pretest-bug@gnu.org; Fri, 03 Oct 2008 05:20:53 -0400 Received: from treacle.ucs.ed.ac.uk ([129.215.16.102]:34867) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Klgq5-0005HW-KM for emacs-pretest-bug@gnu.org; Fri, 03 Oct 2008 05:20:51 -0400 Received: from wrath.ph.ed.ac.uk (wrath.ph.ed.ac.uk [129.215.73.7]) by treacle.ucs.ed.ac.uk (8.13.8/8.13.4) with ESMTP id m939KM4u014026 for ; Fri, 3 Oct 2008 10:20:27 +0100 (BST) Received: from lamacq.ph.ed.ac.uk (lamacq.ph.ed.ac.uk [129.215.72.156]) by wrath.ph.ed.ac.uk (8.13.8/8.12.10) with ESMTP id m939KLQJ000806 for ; Fri, 3 Oct 2008 10:20:22 +0100 Received: from lamacq.ph.ed.ac.uk (localhost.localdomain [127.0.0.1]) by lamacq.ph.ed.ac.uk (8.13.1/8.12.10) with ESMTP id m939KLvF007202 for ; Fri, 3 Oct 2008 10:20:21 +0100 Received: (from s0198183@localhost) by lamacq.ph.ed.ac.uk (8.13.1/8.13.1/Submit) id m939KLbS007197; Fri, 3 Oct 2008 10:20:21 +0100 X-Authentication-Warning: lamacq.ph.ed.ac.uk: s0198183 set sender to lawrence.mitchell@ed.ac.uk using -f From: Lawrence Mitchell To: emacs-pretest-bug@gnu.org Subject: 23.0.60; Bad interaction between compilation-scroll-output and dedicated windows Organization: me Date: Fri, 03 Oct 2008 10:20:21 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Edinburgh-Scanned: at treacle.ucs.ed.ac.uk with MIMEDefang 2.60, Sophie, Sophos Anti-Virus, Clam AntiVirus X-Scanned-By: MIMEDefang 2.60 on 129.215.16.102 X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) In GNU Emacs 23.0.60.3 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2008-09-24 on lamacq.ph.ed.ac.uk Windowing system distributor `The X.Org Foundation', version 11.0.60802000 configured using `configure '-C' '--prefix=/scratch/s0198183/applications/emacs-trunk/' 'CFLAGS=-ggdb3 -O0' '--without-rsvg'' If an Emacs frame is split into multiple windows (two will do) of which one is dedicated and compilation-scroll-output is t then `compile' in the non-dedicated window will end up moving point. Steps to reproduce: emacs -Q --eval \ '(progn (split-window-vertically) (set-window-dedicated-p (selected-window) t) (switch-to-buffer-other-window "*test*") (insert initial-scratch-message) (goto-char (point-min)) (setq compilation-scroll-output t) (compile "echo \"test\"") (kill-buffer "*compilation*"))' Note how point is left at the /end/ of the buffer *test* rather than the beginning. This appears to be a problem with a mismatch between what `selected-window' and `current-buffer' return. 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 #. However, at this point (current-buffer) returns *test*, rather than *compilation*. Cheers, Lawrence -- Lawrence Mitchell From rudalics@gmx.at Fri Oct 3 05:37:29 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.1 required=4.0 tests=AWL,BAYES_00,FOURLA, HAS_BUG_NUMBER,MIXEDBDN,MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1073) by emacsbugs.donarmstrong.com; 3 Oct 2008 12:37:30 +0000 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 Received: (qmail invoked by alias); 03 Oct 2008 12:37:20 -0000 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 Message-ID: <48E611C7.7020901@gmx.at> Date: Fri, 03 Oct 2008 14:36:23 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Lawrence Mitchell , 1073@debbugs.gnu.org Subject: Re: bug#1073: 23.0.60; Bad interaction between compilation-scroll-output and dedicated windows References: In-Reply-To: Content-Type: multipart/mixed; boundary="------------030705080508040506050201" X-Y-GMX-Trusted: 0 X-FuHaFi: 0.73,0.66 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-- From lawrence.mitchell@ed.ac.uk Fri Oct 3 06:01:48 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.7 required=4.0 tests=AWL,BAYES_00,FOURLA, HAS_BUG_NUMBER,MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1073) by emacsbugs.donarmstrong.com; 3 Oct 2008 13:01:48 +0000 Received: from nougat.ucs.ed.ac.uk (nougat.ucs.ed.ac.uk [129.215.13.205]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m93D1iGS014132 for <1073@emacsbugs.donarmstrong.com>; Fri, 3 Oct 2008 06:01:45 -0700 Received: from wrath.ph.ed.ac.uk (wrath.ph.ed.ac.uk [129.215.73.7]) by nougat.ucs.ed.ac.uk (8.13.8/8.13.4) with ESMTP id m93D1gQm015525; Fri, 3 Oct 2008 14:01:42 +0100 (BST) Received: from lamacq.ph.ed.ac.uk (lamacq.ph.ed.ac.uk [129.215.72.156]) by wrath.ph.ed.ac.uk (8.13.8/8.12.10) with ESMTP id m93D1gu3005826; Fri, 3 Oct 2008 14:01:42 +0100 Received: from lamacq.ph.ed.ac.uk (localhost.localdomain [127.0.0.1]) by lamacq.ph.ed.ac.uk (8.13.1/8.12.10) with ESMTP id m93D1gAo012393; Fri, 3 Oct 2008 14:01:42 +0100 Received: (from s0198183@localhost) by lamacq.ph.ed.ac.uk (8.13.1/8.13.1/Submit) id m93D1g4U012388; Fri, 3 Oct 2008 14:01:42 +0100 X-Authentication-Warning: lamacq.ph.ed.ac.uk: s0198183 set sender to lawrence.mitchell@ed.ac.uk using -f From: Lawrence Mitchell To: martin rudalics Cc: 1073@debbugs.gnu.org Subject: Re: bug#1073: 23.0.60; Bad interaction between compilation-scroll-output and dedicated windows Organization: me References: <48E611C7.7020901@gmx.at> Date: Fri, 03 Oct 2008 14:01:42 +0100 In-Reply-To: <48E611C7.7020901@gmx.at> (martin rudalics's message of "Fri, 03 Oct 2008 14:36:23 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Edinburgh-Scanned: at nougat.ucs.ed.ac.uk with MIMEDefang 2.60, Sophie, Sophos Anti-Virus, Clam AntiVirus X-Scanned-By: MIMEDefang 2.60 on 129.215.13.205 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? The attached patch fixes the observed problem, however, I do not think that it is entirely correct: [...] > ! > ! (with-current-buffer (window-buffer outwin) > ! (when (local-variable-p 'compilation-scroll-output) local-variable-p will return t if compilation-scroll-output is nil, but buffer-local. I think you mean (when (buffer-local-value 'compilation-scroll-output (current-buffer)) ...) ? [...] Cheers, Lawrence From lennart.borgman@gmail.com Fri Oct 3 06:18:40 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.4 required=4.0 tests=AWL,BAYES_00,FOURLA, HAS_BUG_NUMBER,MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1073) by emacsbugs.donarmstrong.com; 3 Oct 2008 13:18:40 +0000 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 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 Message-ID: <48E61BA1.9090307@gmail.com> Date: Fri, 03 Oct 2008 15:18:25 +0200 From: "Lennart Borgman (gmail)" 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 MIME-Version: 1.0 To: martin rudalics , 1073@debbugs.gnu.org CC: Lawrence Mitchell Subject: Re: bug#1073: 23.0.60; Bad interaction between compilation-scroll-output and dedicated windows References: <48E611C7.7020901@gmx.at> In-Reply-To: <48E611C7.7020901@gmx.at> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 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)) From rudalics@gmx.at Fri Oct 3 06:20:03 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.2 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MIXEDBDN,MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1073) by emacsbugs.donarmstrong.com; 3 Oct 2008 13:20:04 +0000 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 m93DJtJr018520 for <1073@emacsbugs.donarmstrong.com>; Fri, 3 Oct 2008 06:19:57 -0700 Received: (qmail invoked by alias); 03 Oct 2008 13:19:50 -0000 Received: from 62-47-55-7.adsl.highway.telekom.at (EHLO [62.47.55.7]) [62.47.55.7] by mail.gmx.net (mp014) with SMTP; 03 Oct 2008 15:19:50 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19c7TJMzZRc1agFOE2wgldAFza2W/GhiZb18loT7N crP4kMBAPZ2/Xh Message-ID: <48E61BA4.2020509@gmx.at> Date: Fri, 03 Oct 2008 15:18:28 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Lawrence Mitchell CC: 1073@debbugs.gnu.org Subject: Re: bug#1073: 23.0.60; Bad interaction between compilation-scroll-output and dedicated windows References: <48E611C7.7020901@gmx.at> In-Reply-To: Content-Type: multipart/mixed; boundary="------------030606060209070003050209" X-Y-GMX-Trusted: 0 X-FuHaFi: 0.78,0.67 This is a multi-part message in MIME format. --------------030606060209070003050209 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit > The attached patch fixes the observed problem, however, I do not > think that it is entirely correct: > > [...] >> ! >> ! (with-current-buffer (window-buffer outwin) >> ! (when (local-variable-p 'compilation-scroll-output) > > local-variable-p will return t if compilation-scroll-output is > nil, but buffer-local. You're right. > I think you mean > (when (buffer-local-value 'compilation-scroll-output (current-buffer)) Not really. This would be t in *test*, I suppose. Try the attached one instead, please. Thanks, martin. --------------030606060209070003050209 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 15:11:15.406250000 +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,1291 ---- (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 (and (local-variable-p 'compilation-scroll-output) ! compilation-scroll-output) ! (goto-char (point-max)))) ! ;; Make it so the next C-x ` will use this buffer. (setq next-error-last-buffer outbuf))) --------------030606060209070003050209-- From rudalics@gmx.at Fri Oct 3 06:42:37 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.6 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1073) by emacsbugs.donarmstrong.com; 3 Oct 2008 13:42:37 +0000 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 m93DgXjL024613 for <1073@emacsbugs.donarmstrong.com>; Fri, 3 Oct 2008 06:42:35 -0700 Received: (qmail invoked by alias); 03 Oct 2008 13:42:28 -0000 Received: from 62-47-55-7.adsl.highway.telekom.at (EHLO [62.47.55.7]) [62.47.55.7] by mail.gmx.net (mp058) with SMTP; 03 Oct 2008 15:42:28 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19bKH1r85xbcIuK2ZKXmuV2nBz4+HrIFfv4l5p+ET NfLmBFn8FE+Nkf Message-ID: <48E62129.9090903@gmx.at> Date: Fri, 03 Oct 2008 15:42:01 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: "Lennart Borgman (gmail)" CC: 1073@debbugs.gnu.org, Lawrence Mitchell Subject: Re: bug#1073: 23.0.60; Bad interaction between compilation-scroll-output and dedicated windows References: <48E611C7.7020901@gmx.at> <48E61BA1.9090307@gmail.com> In-Reply-To: <48E61BA1.9090307@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.8 > 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)? Yes. But the real problem is that `select-window' returns immediately (that is, without making its buffer current) when its argument is the selected window. martin From lennart.borgman@gmail.com Fri Oct 3 06:54:47 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.4 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1073) by emacsbugs.donarmstrong.com; 3 Oct 2008 13:54:47 +0000 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 m93Dshkn027220 for <1073@emacsbugs.donarmstrong.com>; Fri, 3 Oct 2008 06:54:45 -0700 Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:65153 helo=[127.0.0.1]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1Klkze-00085H-3Y; Fri, 03 Oct 2008 15:46:55 +0200 Message-ID: <48E62247.6080007@gmail.com> Date: Fri, 03 Oct 2008 15:46:47 +0200 From: "Lennart Borgman (gmail)" 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 MIME-Version: 1.0 To: martin rudalics CC: 1073@debbugs.gnu.org, Lawrence Mitchell Subject: Re: bug#1073: 23.0.60; Bad interaction between compilation-scroll-output and dedicated windows References: <48E611C7.7020901@gmx.at> <48E61BA1.9090307@gmail.com> <48E62129.9090903@gmx.at> In-Reply-To: <48E62129.9090903@gmx.at> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 081003-0, 2008-10-03), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.151.87 X-Scan-Result: No virus found in message 1Klkze-00085H-3Y. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1Klkze-00085H-3Y 72a5944d89d68cf338775aefb153438b martin rudalics wrote: >> 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)? > > Yes. But the real problem is that `select-window' returns immediately > (that is, without making its buffer current) when its argument is the > selected window. Thanks, that was what I thought. That is why I am suggesting the defmacro. I think it would be useful and it is not dangerous to introduce it. Even in a feature freeze and can be of value to fixing problems with this strange behaviour of select-window. And the semantic of the defmacro could be the same even if select-window is "corrected". And the changes, but since you did not answer to that I guess I was misunderstanding something there. From rudalics@gmx.at Fri Oct 3 07:30:16 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1073) by emacsbugs.donarmstrong.com; 3 Oct 2008 14:30:16 +0000 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 m93EUD0x004242 for <1073@emacsbugs.donarmstrong.com>; Fri, 3 Oct 2008 07:30:14 -0700 Received: (qmail invoked by alias); 03 Oct 2008 14:30:07 -0000 Received: from 62-47-47-52.adsl.highway.telekom.at (EHLO [62.47.47.52]) [62.47.47.52] by mail.gmx.net (mp051) with SMTP; 03 Oct 2008 16:30:07 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+W9EQGWhaWbIFFuCAS1ez6cnohiPJwvr2JP6bG9H h4Z6yIjNDKMquU Message-ID: <48E62C54.9060003@gmx.at> Date: Fri, 03 Oct 2008 16:29:40 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: "Lennart Borgman (gmail)" CC: 1073@debbugs.gnu.org, Lawrence Mitchell Subject: Re: bug#1073: 23.0.60; Bad interaction between compilation-scroll-output and dedicated windows References: <48E611C7.7020901@gmx.at> <48E61BA1.9090307@gmail.com> <48E62129.9090903@gmx.at> <48E62247.6080007@gmail.com> In-Reply-To: <48E62247.6080007@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.89 > And the changes, but since you did not answer to that I guess I was > misunderstanding something there. I'm not sure what you mean but the change you proposed missed the local-variable issue completely. martin From lennart.borgman@gmail.com Fri Oct 3 07:49:53 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.5 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1073) by emacsbugs.donarmstrong.com; 3 Oct 2008 14:49:53 +0000 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 m93EnoTf008741 for <1073@emacsbugs.donarmstrong.com>; Fri, 3 Oct 2008 07:49:51 -0700 Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:62381 helo=[127.0.0.1]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1KllyW-0001Hz-5P; Fri, 03 Oct 2008 16:49:49 +0200 Message-ID: <48E63106.3040709@gmail.com> Date: Fri, 03 Oct 2008 16:49:42 +0200 From: "Lennart Borgman (gmail)" 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 MIME-Version: 1.0 To: martin rudalics CC: 1073@debbugs.gnu.org, Lawrence Mitchell Subject: Re: bug#1073: 23.0.60; Bad interaction between compilation-scroll-output and dedicated windows References: <48E611C7.7020901@gmx.at> <48E61BA1.9090307@gmail.com> <48E62129.9090903@gmx.at> <48E62247.6080007@gmail.com> <48E62C54.9060003@gmx.at> In-Reply-To: <48E62C54.9060003@gmx.at> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 081003-0, 2008-10-03), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.151.87 X-Scan-Result: No virus found in message 1KllyW-0001Hz-5P. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1KllyW-0001Hz-5P df7dcd5e700cbd927b298e384466a1ca martin rudalics wrote: >> And the changes, but since you did not answer to that I guess I was >> misunderstanding something there. > > I'm not sure what you mean but the change you proposed missed the > local-variable issue completely. Ah, my bad. I was just misreading. And the macro is of course pointless since one can always do what you did, ie (with-current-buffer (window-buffer outwin) ... From lawrence.mitchell@ed.ac.uk Fri Oct 3 08:48:47 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-9.1 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1073) by emacsbugs.donarmstrong.com; 3 Oct 2008 15:48:47 +0000 Received: from nougat.ucs.ed.ac.uk (nougat.ucs.ed.ac.uk [129.215.13.205]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m93Fmirb023797 for <1073@emacsbugs.donarmstrong.com>; Fri, 3 Oct 2008 08:48:45 -0700 Received: from wrath.ph.ed.ac.uk (wrath.ph.ed.ac.uk [129.215.73.7]) by nougat.ucs.ed.ac.uk (8.13.8/8.13.4) with ESMTP id m93Fmh66005405; Fri, 3 Oct 2008 16:48:43 +0100 (BST) Received: from lamacq.ph.ed.ac.uk (lamacq.ph.ed.ac.uk [129.215.72.156]) by wrath.ph.ed.ac.uk (8.13.8/8.12.10) with ESMTP id m93Fmhep001213; Fri, 3 Oct 2008 16:48:43 +0100 Received: from lamacq.ph.ed.ac.uk (localhost.localdomain [127.0.0.1]) by lamacq.ph.ed.ac.uk (8.13.1/8.12.10) with ESMTP id m93Fmhd3016381; Fri, 3 Oct 2008 16:48:43 +0100 Received: (from s0198183@localhost) by lamacq.ph.ed.ac.uk (8.13.1/8.13.1/Submit) id m93Fmheq016376; Fri, 3 Oct 2008 16:48:43 +0100 X-Authentication-Warning: lamacq.ph.ed.ac.uk: s0198183 set sender to lawrence.mitchell@ed.ac.uk using -f From: Lawrence Mitchell To: martin rudalics Cc: 1073@debbugs.gnu.org Subject: Re: bug#1073: 23.0.60; Bad interaction between compilation-scroll-output and dedicated windows Organization: me References: <48E611C7.7020901@gmx.at> <48E61BA4.2020509@gmx.at> Date: Fri, 03 Oct 2008 16:48:43 +0100 In-Reply-To: <48E61BA4.2020509@gmx.at> (martin rudalics's message of "Fri, 03 Oct 2008 15:18:28 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Edinburgh-Scanned: at nougat.ucs.ed.ac.uk with MIMEDefang 2.60, Sophie, Sophos Anti-Virus, Clam AntiVirus X-Scanned-By: MIMEDefang 2.60 on 129.215.13.205 martin rudalics wrote: >> I think you mean >> (when (buffer-local-value 'compilation-scroll-output (current-buffer)) > Not really. This would be t in *test*, I suppose. Try the attached one > instead, please. Ah yes. The updated patch does work correctly. Cheers, Lawrence From rudalics@gmx.at Sat Oct 4 03:08:13 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1073-done) by emacsbugs.donarmstrong.com; 4 Oct 2008 10:08:14 +0000 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 m94A8Ae1007639 for <1073-done@emacsbugs.donarmstrong.com>; Sat, 4 Oct 2008 03:08:11 -0700 Received: (qmail invoked by alias); 04 Oct 2008 10:08:04 -0000 Received: from 62-47-38-151.adsl.highway.telekom.at (EHLO [62.47.38.151]) [62.47.38.151] by mail.gmx.net (mp030) with SMTP; 04 Oct 2008 12:08:04 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19ZMmwjM7VZhpTqd+tb7NH0U+Tv3XttKobWin71c+ W0eegYc4rm+IxS Message-ID: <48E74069.6000809@gmx.at> Date: Sat, 04 Oct 2008 12:07:37 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: 1073-done@debbugs.gnu.org CC: Lawrence Mitchell Subject: Re: bug#1073: 23.0.60; Bad interaction between compilation-scroll-output and dedicated windows References: <48E611C7.7020901@gmx.at> <48E61BA4.2020509@gmx.at> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.86 I checked in a slightly different fix. Please have a look. Thanks, martin. From monnier@iro.umontreal.ca Sat Oct 4 17:54:16 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.3 required=4.0 tests=AWL,BAYES_00,FOURLA, HAS_BUG_NUMBER,MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1073) by emacsbugs.donarmstrong.com; 5 Oct 2008 00:54:16 +0000 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m950sCG5000710 for <1073@emacsbugs.donarmstrong.com>; Sat, 4 Oct 2008 17:54:14 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqAEAHyt50jO+IH3/2dsb2JhbACBcbcEgWiBBQ X-IronPort-AV: E=Sophos;i="4.33,362,1220241600"; d="scan'208";a="27986083" Received: from 206-248-129-247.dsl.teksavvy.com (HELO ceviche.home) ([206.248.129.247]) by ironport2-out.teksavvy.com with ESMTP; 04 Oct 2008 20:54:01 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 858DCB4100; Sat, 4 Oct 2008 20:54:01 -0400 (EDT) From: Stefan Monnier To: martin rudalics Cc: 1073@debbugs.gnu.org, Lawrence Mitchell Subject: Re: bug#1073: 23.0.60; Bad interaction between compilation-scroll-output and dedicated windows Message-ID: References: <48E611C7.7020901@gmx.at> Date: Sat, 04 Oct 2008 20:54:01 -0400 In-Reply-To: <48E611C7.7020901@gmx.at> (martin rudalics's message of "Fri, 03 Oct 2008 14:36:23 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> 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 > *** 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))) I think the select-window thingy is/was needed in order to make sure we move point in the relevant window, rather than just moving point in the relevant buffer. So maye something like: (with-selected-window outwin (with-current-buffer (window-buffer outwin) ...)) would be better. Stefan From rudalics@gmx.at Sun Oct 5 11:59:48 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.6 required=4.0 tests=AWL,BAYES_00,FOURLA, HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1073) by emacsbugs.donarmstrong.com; 5 Oct 2008 18:59:48 +0000 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 m95IxhTX012761 for <1073@emacsbugs.donarmstrong.com>; Sun, 5 Oct 2008 11:59:45 -0700 Received: (qmail invoked by alias); 05 Oct 2008 18:59:37 -0000 Received: from 62-47-56-1.adsl.highway.telekom.at (EHLO [62.47.56.1]) [62.47.56.1] by mail.gmx.net (mp035) with SMTP; 05 Oct 2008 20:59:37 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX184N0QQDNY4+8dnK6y85DDfHSLctx888PeKzm08Cl ygUN3WPOImJqzV Message-ID: <48E90E41.4050502@gmx.at> Date: Sun, 05 Oct 2008 20:58:09 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Stefan Monnier CC: 1073@debbugs.gnu.org, Lawrence Mitchell Subject: Re: bug#1073: 23.0.60; Bad interaction between compilation-scroll-output and dedicated windows References: <48E611C7.7020901@gmx.at> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.71 > I think the select-window thingy is/was needed in order to make sure we > move point in the relevant window, rather than just moving point in the > relevant buffer. > So maye something like: > > (with-selected-window outwin > (with-current-buffer (window-buffer outwin) > ...)) > > would be better. The original code had (goto-char (point-max)) which moves point in all windows showing the relevant buffer. In that sense I didn't change the semantics of the original code. IIUC you want something similar to the ;; Position point as the user will see it. (let ((desired-visible-point ;; Put it at the end if `compilation-scroll-output' is set. (if compilation-scroll-output (point-max) ;; Normally put it at the top. (point-min)))) (if (eq outwin (selected-window)) (goto-char desired-visible-point) (set-window-point outwin desired-visible-point))) stuff a few lines above? Or am I missing something? martin From unknown Sat Jun 21 15:59:51 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Mon, 03 Nov 2008 15:24:03 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator