From monnier@iro.umontreal.ca Sat May 10 11:50:30 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=0.0 required=4.0 tests=none autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 10 May 2008 18:50:30 +0000 Received: from mercure.iro.umontreal.ca (mercure.iro.umontreal.ca [132.204.24.67]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m4AIoRKY019896 for ; Sat, 10 May 2008 11:50:28 -0700 Received: by mercure.iro.umontreal.ca (Postfix, from userid 20848) id 0005F2CFCE8; Sat, 10 May 2008 14:50:26 -0400 (EDT) X-Original-To: monnier@iro.umontreal.ca Received: from perlin.iro.umontreal.ca (perlin.iro.umontreal.ca [132.204.24.51]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id C39992CFCE6 for ; Sat, 10 May 2008 14:50:26 -0400 (EDT) Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by perlin.iro.umontreal.ca (Postfix) with ESMTP id C9A24148218 for ; Sat, 10 May 2008 14:50:21 -0400 (EDT) Received: from localhost ([127.0.0.1]:60328 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Juu9F-0007eE-Kk for monnier@iro.umontreal.ca; Sat, 10 May 2008 14:50:21 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JuWSg-0002yK-F9 for bug-gnu-emacs@gnu.org; Fri, 09 May 2008 13:32:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JuWSe-0002xm-JB for bug-gnu-emacs@gnu.org; Fri, 09 May 2008 13:32:49 -0400 Received: from [199.232.76.173] (port=42669 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JuWSe-0002xf-GD for bug-gnu-emacs@gnu.org; Fri, 09 May 2008 13:32:48 -0400 Received: from iris-63.mc.com ([63.96.239.141]:46390 helo=mc.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JuWSe-0005E4-BO for bug-gnu-emacs@gnu.org; Fri, 09 May 2008 13:32:48 -0400 Received: from CHM-EMAIL1.ad.mc.com by mc.com (8.8.8+Sun/SMI-SVR4) id NAA10544; Fri, 9 May 2008 13:32:46 -0400 (EDT) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Fri, 9 May 2008 13:32:40 -0400 Message-ID: Thread-Topic: Bugs in window-at and coordinates-in-window-p built-in functions Thread-Index: Acix+q4aNv0X85hmRzCemz8Ed+NHjA== From: "Hill, Gregory" To: X-detected-kernel: by monty-python.gnu.org: Solaris 2.5-7 (2) X-Mailman-Approved-At: Sat, 10 May 2008 14:46:51 -0400 Subject: Bugs in window-at and coordinates-in-window-p built-in functions 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: , Sender: bug-gnu-emacs-bounces+monnier=iro.umontreal.ca@gnu.org Errors-To: bug-gnu-emacs-bounces+monnier=iro.umontreal.ca@gnu.org X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.6, requis 5, autolearn=not spam, BAYES_00 -2.60, SPF_HELO_PASS -0.00) X-DIRO-MailScanner-From: bug-gnu-emacs-bounces+monnier=iro.umontreal.ca@gnu.org GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600) of 2007-06-02 on RELEASE =20 Use split-window-vertically once and split-window-horizontally twice to create a frame that is split into 4 approximately equal sections (2 x 2). =20 Display a different buffer in each of the 4 windows. =20 Move the cursor to anywhere in the lower-right window. =20 Use eval-expression to execute the following expression: (let* ((edges (window-edges)) (x (first edges)) (y (1- (second edges)))) (window-at x y)) Logically, this should return the upper-right window, but it actually returns the upper-left window. Possibly related to this bug, execute the following expression with the cursor in any window: (let* ((edges (window-edges)) (x (first edges)) (y (second edges)) (window (selected-window))) (coordinates-in-window-p (cons x y) window)) Logically this should return (0 . 0) but it actually returns 'left-fringe. Execute the following expression with the cursor in the lower-right window: (let* ((edges (window-edges)) (x (first edges)) (y (1- (second edges))) (window (window-at x y)))=20 (coordinates-in-window-p (cons x y) window)) It returns 'vertical-line when it should really return 'mode-line. The same expression evaluated with the cursor in the lower-left window returns 'mode-line as it should. From rudalics@gmx.at Sat Aug 2 12:09: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=-5.1 required=4.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 214) by emacsbugs.donarmstrong.com; 2 Aug 2008 19:09:03 +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 m72J8xU8030104 for <214@emacsbugs.donarmstrong.com>; Sat, 2 Aug 2008 12:09:00 -0700 Received: (qmail invoked by alias); 02 Aug 2008 19:08:52 -0000 Received: from 62-47-53-130.adsl.highway.telekom.at (EHLO [62.47.53.130]) [62.47.53.130] by mail.gmx.net (mp033) with SMTP; 02 Aug 2008 21:08:52 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+p2TwMcxKpecnuCwgOcboCAfvrtPTXBaT+z5Cd8x mHCuO5t0IGXmHo Message-ID: <4894B088.4020706@gmx.at> Date: Sat, 02 Aug 2008 21:07:52 +0200 From: martin rudalics User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en MIME-Version: 1.0 To: 214@debbugs.gnu.org CC: ghill@mc.com Subject: Re: Bugs in window-at and coordinates-in-window-p built-in functions Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.67 Thank you for your report. Sorry for the late response. > Use split-window-vertically once and split-window-horizontally twice to > create a frame that is split into 4 approximately equal sections (2 x > 2). > > Display a different buffer in each of the 4 windows. > > Move the cursor to anywhere in the lower-right window. > > Use eval-expression to execute the following expression: > > (let* ((edges (window-edges)) > (x (first edges)) > (y (1- (second edges)))) > (window-at x y)) > > Logically, this should return the upper-right window, but it actually > returns the upper-left window. The position is exactly at the border between two windows and the fact that you "are" in the lower-right window is irrelevant when `window-at' is evaluated. Maybe `window-at' should refuse to return _any_ window in this case, but expecting a correct result from `window-at' at a border between two windows is not quite fair in the first place. > Possibly related to this bug, execute the following expression with the > cursor in any window: > > (let* ((edges (window-edges)) > (x (first edges)) > (y (second edges)) > (window (selected-window))) > (coordinates-in-window-p (cons x y) window)) > > Logically this should return (0 . 0) but it actually returns > 'left-fringe. Because your window is probably displaying a fringe. Remove the fringe and it will return (0 . 0). Anyway, this is not related to the above behavior. > Execute the following expression with the cursor in the lower-right > window: > > (let* ((edges (window-edges)) > (x (first edges)) > (y (1- (second edges))) > (window (window-at x y))) > (coordinates-in-window-p (cons x y) window)) > > It returns 'vertical-line when it should really return 'mode-line. The > same expression evaluated with the cursor in the lower-left window > returns 'mode-line as it should. Indirectly, this is the cause of the behavior you observed. The "vertical-line" is that small vertical line between the mode lines of two adjacent windows (you can use it to resize windows horizontally with the mouse). Hence, the return value is correct, but the doc-string of `coordinates-in-window-p' could be improved - most people hardly know what a "sibling" is in this context and 'vertical-line is returned in a few other cases as well. martin From cyd@stupidchicken.com Tue Aug 12 14:52:25 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=-3.4 required=4.0 tests=AWL,BAYES_00, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at control) by emacsbugs.donarmstrong.com; 12 Aug 2008 21:52:25 +0000 Received: from cyd (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7CLqMun012066 for ; Tue, 12 Aug 2008 14:52:23 -0700 Received: by cyd (Postfix, from userid 1000) id 2343457E2EC; Tue, 12 Aug 2008 17:52:53 -0400 (EDT) From: Chong Yidong To: control@debbugs.gnu.org Subject: Bug maintenance Date: Tue, 12 Aug 2008 17:52:53 -0400 Message-ID: <87od3x99ze.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii tags 91 moreinfo close 214 tags 403 moreinfo close 499 tags 516 patch thanks From unknown Sat Jun 21 05:16:40 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Wed, 10 Sep 2008 14:24:06 +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