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#1372: posn-at-x-y reports wrong window Date: Wed, 19 Nov 2008 16:09:39 +0100 Message-ID: <49242C33.4090702@gmx.at> References: <356ECE88-9412-46FD-A227-C52D5C87E212@mac.com> Reply-To: martin rudalics , 1372@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040306040306050904010808" X-Trace: ger.gmane.org 1227108656 28375 80.91.229.12 (19 Nov 2008 15:30:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 19 Nov 2008 15:30:56 +0000 (UTC) Cc: Jin Choi To: David Reitter , 1372@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 19 16:31:57 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 1L2p1n-00064A-M5 for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Nov 2008 16:31:40 +0100 Original-Received: from localhost ([127.0.0.1]:59621 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L2p0e-0005vI-RB for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Nov 2008 10:30:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L2p0a-0005ux-0c for bug-gnu-emacs@gnu.org; Wed, 19 Nov 2008 10:30:24 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L2p0Y-0005uM-6a for bug-gnu-emacs@gnu.org; Wed, 19 Nov 2008 10:30:23 -0500 Original-Received: from [199.232.76.173] (port=49128 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L2p0Y-0005uJ-3i for bug-gnu-emacs@gnu.org; Wed, 19 Nov 2008 10:30:22 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:43990) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L2p0T-0001Dn-U1 for bug-gnu-emacs@gnu.org; Wed, 19 Nov 2008 10:30:19 -0500 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 mAJFU9gH000804; Wed, 19 Nov 2008 07:30:09 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mAJFK5gk030420; Wed, 19 Nov 2008 07:20:05 -0800 X-Loop: don@donarmstrong.com Resent-From: martin rudalics Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 19 Nov 2008 15:20:05 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1372 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1372-submit@emacsbugs.donarmstrong.com id=B1372.122710761128974 (code B ref 1372); Wed, 19 Nov 2008 15:20:05 +0000 Original-Received: (at 1372) by emacsbugs.donarmstrong.com; 19 Nov 2008 15:13:31 +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 mAJFDRiw028968 for <1372@emacsbugs.donarmstrong.com>; Wed, 19 Nov 2008 07:13:28 -0800 Original-Received: (qmail invoked by alias); 19 Nov 2008 15:13:20 -0000 Original-Received: from 88-117-33-121.adsl.highway.telekom.at (EHLO [88.117.33.121]) [88.117.33.121] by mail.gmx.net (mp007) with SMTP; 19 Nov 2008 16:13:20 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19/uytIL8R/73CSwloD+WwURHrOS+Fop6MtyRNLMe gmgJ2C74YYiAdv User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) In-Reply-To: X-Y-GMX-Trusted: 0 X-FuHaFi: 0.71,0.64 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Wed, 19 Nov 2008 10:30:23 -0500 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:22491 Archived-At: This is a multi-part message in MIME format. --------------040306040306050904010808 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit > (fringe-mode 0) > C-x 3 C-x 2 C-x o C-x o > (we're now in the large window on the right, with two small windows in > the left half of the frame). > > Insert enough newlines to be vertically just above the horizontal > divider on the left. > > M-: (posn-at-x-y 0 (cdr (posn-x-y (posn-at-point)))) RET > > Insert newline, now we're next to the divider line. > > M-: (posn-at-x-y 0 (cdr (posn-x-y (posn-at-point)))) RET > > --> wrong window (the window in the upper left) is given in the structure. > Instead of 0, the x value can be up to 6 ((frame-char-width) reports 7). Can you try the attached patch? martin --------------040306040306050904010808 Content-Type: text/plain; name="1372.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="1372.diff" *** window.c.~1.634.~ 2008-11-18 18:56:23.703125000 +0100 --- window.c 2008-11-19 16:04:02.078125000 +0100 *************** *** 774,780 **** } else { ! if (eabs (*x - x1) < grabbable_width) { /* Convert X and Y to window relative coordinates. Vertical border is at the right edge of window. */ --- 774,781 ---- } else { ! if ((WINDOW_RIGHTMOST_P (w) || *x < x1) ! && eabs (*x - x1) < grabbable_width) { /* Convert X and Y to window relative coordinates. Vertical border is at the right edge of window. */ --------------040306040306050904010808--