From unknown Sun Jun 22 06:25:53 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#7390 <7390@debbugs.gnu.org> To: bug#7390 <7390@debbugs.gnu.org> Subject: Status: 24.0.50; pos-col-row gives incorrect row Reply-To: bug#7390 <7390@debbugs.gnu.org> Date: Sun, 22 Jun 2025 13:25:53 +0000 retitle 7390 24.0.50; pos-col-row gives incorrect row reassign 7390 emacs submitter 7390 "Drew Adams" severity 7390 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 13 12:51:28 2010 Received: (at submit) by debbugs.gnu.org; 13 Nov 2010 17:51:28 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHKG8-0003kS-EW for submit@debbugs.gnu.org; Sat, 13 Nov 2010 12:51:28 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHKG6-0003kN-38 for submit@debbugs.gnu.org; Sat, 13 Nov 2010 12:51:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PHKKn-0001nj-5L for submit@debbugs.gnu.org; Sat, 13 Nov 2010 12:56:18 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:42303) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PHKKn-0001ne-33 for submit@debbugs.gnu.org; Sat, 13 Nov 2010 12:56:17 -0500 Received: from [140.186.70.92] (port=46560 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PHKKm-0006mu-2h for bug-gnu-emacs@gnu.org; Sat, 13 Nov 2010 12:56:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PHKKh-0001m6-7X for bug-gnu-emacs@gnu.org; Sat, 13 Nov 2010 12:56:15 -0500 Received: from rcsinet10.oracle.com ([148.87.113.121]:40548) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PHKKh-0001lk-1H for bug-gnu-emacs@gnu.org; Sat, 13 Nov 2010 12:56:11 -0500 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id oADHu6NN032703 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 13 Nov 2010 17:56:08 GMT Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id oADHu5Me002033 for ; Sat, 13 Nov 2010 17:56:05 GMT Received: from abhmt018.oracle.com by acsmt355.oracle.com with ESMTP id 775529901289670915; Sat, 13 Nov 2010 09:55:15 -0800 Received: from dradamslap1 (/10.159.14.224) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 13 Nov 2010 09:55:15 -0800 From: "Drew Adams" To: Subject: 24.0.50; pos-col-row gives incorrect row Date: Sat, 13 Nov 2010 09:55:15 -0800 Message-ID: <9C53EFF0802044A489EF842E6A1B8150@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcuDW+0IZfGgTIvPQUSpalWsStm1Kw== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) emacs -Q Load David Ponce's tabbar.el version 1.3, from here: http://sourceforge.net/projects/emhacks/files/tabbar/1.3/tabbar-1.3.tar.gz/downl oad M-x tabbar-mode That adds a tab bar to each window. I don't see anything in the tabbar.el code that should perturb the behavior of pos-col-row, but something does. I'm no expert on the tabbar code or pos-col-row. I hope that someone can debug this and fix it. My guess is that pos-col-row is incorrectly thinking that the tab bar is part of the buffer. The easiest way to see the problem is to do this: M-x picture-mode Click mouse-1 somewhere - e.g. the fourth char in some buffer. The result is that the cursor (point) is moved down one line from where you clicked, so the active region shows from the click position to point (one line down). Do the same thing with tabbar-mode turned off, and there is no problem: point does not move down a line: it is exactly where you clicked. The problem arises in picture-mouse-set-point, where it calls pos-col-row: the wrong row is returned. This is presumably because it is counting the tabbar row, which is not part of the buffer. Dunno whether this is a bug in pos-col-row (that would be my guess) or in tabbar.el. I shouldn't think that tabbar.el should need to do something to compensate and make pos-col-row DTRT. But again, I'm no expert on this. In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) of 2010-11-09 on 3249CTO Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (4.4) --no-opt --cflags -Ic:/imagesupport/include' From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 13 13:58:13 2010 Received: (at 7390) by debbugs.gnu.org; 13 Nov 2010 18:58:13 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHLIj-0004tg-Hq for submit@debbugs.gnu.org; Sat, 13 Nov 2010 13:58:13 -0500 Received: from mtaout22.012.net.il ([80.179.55.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHLIh-0004tI-0z for 7390@debbugs.gnu.org; Sat, 13 Nov 2010 13:58:12 -0500 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LBU00L007DGFD00@a-mtaout22.012.net.il> for 7390@debbugs.gnu.org; Sat, 13 Nov 2010 21:02:10 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.126.249.126]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LBU00JRO7JJPSI0@a-mtaout22.012.net.il>; Sat, 13 Nov 2010 21:02:10 +0200 (IST) Date: Sat, 13 Nov 2010 21:02:13 +0200 From: Eli Zaretskii Subject: Re: bug#7390: 24.0.50; pos-col-row gives incorrect row In-reply-to: <9C53EFF0802044A489EF842E6A1B8150@us.oracle.com> X-012-Sender: halo1@inter.net.il To: Drew Adams Message-id: <8362w1dp3e.fsf@gnu.org> References: <9C53EFF0802044A489EF842E6A1B8150@us.oracle.com> X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 7390 Cc: 7390@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > Resent-Sender: help-debbugs@gnu.org > From: "Drew Adams" > Date: Sat, 13 Nov 2010 09:55:15 -0800 > Cc: > > emacs -Q > > Load David Ponce's tabbar.el version 1.3, from here: > http://sourceforge.net/projects/emhacks/files/tabbar/1.3/tabbar-1.3.tar.gz/downl > oad > > M-x tabbar-mode > > That adds a tab bar to each window. I don't see anything in the > tabbar.el code that should perturb the behavior of pos-col-row, but > something does. I'm no expert on the tabbar code or pos-col-row. I > hope that someone can debug this and fix it. My guess is that > pos-col-row is incorrectly thinking that the tab bar is part of the > buffer. > > The easiest way to see the problem is to do this: > > M-x picture-mode > > Click mouse-1 somewhere - e.g. the fourth char in some buffer. The > result is that the cursor (point) is moved down one line from where you > clicked, so the active region shows from the click position to point > (one line down). As a matter of fact, this problem is present in Emacs 23.2 as well, and in the current pretest of Emacs 23.3. An easier way to reproduce is this: emacs -Q C-x b foo RET M-: (setq header-line-format "foo") RET M-x picture-mode RET Now type 2 lines of text, and click the mouse on the first line. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 13 14:13:06 2010 Received: (at 7390) by debbugs.gnu.org; 13 Nov 2010 19:13:06 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHLX7-000505-Rn for submit@debbugs.gnu.org; Sat, 13 Nov 2010 14:13:06 -0500 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHLX6-0004zj-7D for 7390@debbugs.gnu.org; Sat, 13 Nov 2010 14:13:04 -0500 Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id oADJHsUY017655 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 13 Nov 2010 19:17:55 GMT Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id oADJHsI8026177; Sat, 13 Nov 2010 19:17:54 GMT Received: from abhmt016.oracle.com by acsmt354.oracle.com with ESMTP id 776671051289675844; Sat, 13 Nov 2010 11:17:24 -0800 Received: from dradamslap1 (/10.159.14.224) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 13 Nov 2010 11:17:24 -0800 From: "Drew Adams" To: "'Eli Zaretskii'" References: <9C53EFF0802044A489EF842E6A1B8150@us.oracle.com> <8362w1dp3e.fsf@gnu.org> Subject: RE: bug#7390: 24.0.50; pos-col-row gives incorrect row Date: Sat, 13 Nov 2010 11:17:25 -0800 Message-ID: <9525BC9B2A3D4E468620581BEC0FF49A@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <8362w1dp3e.fsf@gnu.org> Thread-Index: AcuDZWWefiH9wpYTQousaDRq0tor7wAAbCdA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 7390 Cc: 7390@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) > As a matter of fact, this problem is present in Emacs 23.2 as well, > and in the current pretest of Emacs 23.3. > > An easier way to reproduce is this: > > emacs -Q > C-x b foo RET > M-: (setq header-line-format "foo") RET > M-x picture-mode RET > > Now type 2 lines of text, and click the mouse on the first line. Thanks for narrowing this down, in particular removing tabbar.el from the equation. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 13 16:06:01 2010 Received: (at 7390-done) by debbugs.gnu.org; 13 Nov 2010 21:06:02 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHNIP-0005ln-HB for submit@debbugs.gnu.org; Sat, 13 Nov 2010 16:06:01 -0500 Received: from mtaout21.012.net.il ([80.179.55.169]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHNIN-0005li-NW for 7390-done@debbugs.gnu.org; Sat, 13 Nov 2010 16:06:00 -0500 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0LBU00A00DBTDO00@a-mtaout21.012.net.il> for 7390-done@debbugs.gnu.org; Sat, 13 Nov 2010 23:10:50 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.126.249.126]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LBU00ASSDI17F60@a-mtaout21.012.net.il>; Sat, 13 Nov 2010 23:10:50 +0200 (IST) Date: Sat, 13 Nov 2010 23:10:56 +0200 From: Eli Zaretskii Subject: Re: bug#7390: 24.0.50; pos-col-row gives incorrect row In-reply-to: <8362w1dp3e.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: drew.adams@oracle.com, 7390-done@debbugs.gnu.org Message-id: <834obldj4v.fsf@gnu.org> References: <9C53EFF0802044A489EF842E6A1B8150@us.oracle.com> <8362w1dp3e.fsf@gnu.org> X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 7390-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > Date: Sat, 13 Nov 2010 21:02:13 +0200 > From: Eli Zaretskii > Cc: 7390@debbugs.gnu.org > > emacs -Q > C-x b foo RET > M-: (setq header-line-format "foo") RET > M-x picture-mode RET > > Now type 2 lines of text, and click the mouse on the first line. I see that Chong modified picture.el to not use posn-col-row. But I think that posn-col-row should pay attention to the existence of the header line, so I fixed that as well (on the emacs-23 branch). From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 13 16:08:34 2010 Received: (at 7390) by debbugs.gnu.org; 13 Nov 2010 21:08:34 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHNKr-0005nH-MK for submit@debbugs.gnu.org; Sat, 13 Nov 2010 16:08:34 -0500 Received: from pantheon-po41.its.yale.edu ([130.132.50.98]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHNKk-0005nC-J0 for 7390@debbugs.gnu.org; Sat, 13 Nov 2010 16:08:27 -0500 Received: from furball (c-71-192-165-84.hsd1.ct.comcast.net [71.192.165.84]) (authenticated bits=0) by pantheon-po41.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id oADLDIJX002737 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 13 Nov 2010 16:13:18 -0500 Received: by furball (Postfix, from userid 1000) id BEFF816062F; Sat, 13 Nov 2010 16:13:14 -0500 (EST) From: Chong Yidong To: Eli Zaretskii Subject: Re: bug#7390: 24.0.50; pos-col-row gives incorrect row References: <9C53EFF0802044A489EF842E6A1B8150@us.oracle.com> <8362w1dp3e.fsf@gnu.org> Date: Sat, 13 Nov 2010 16:13:14 -0500 In-Reply-To: <8362w1dp3e.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 13 Nov 2010 21:02:13 +0200") Message-ID: <87eiapkjv9.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 7390 Cc: Drew Adams , 7390@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.0 (---) Eli Zaretskii writes: > As a matter of fact, this problem is present in Emacs 23.2 as well, > and in the current pretest of Emacs 23.3. > > An easier way to reproduce is this: > > emacs -Q > C-x b foo RET > M-: (setq header-line-format "foo") RET > M-x picture-mode RET > > Now type 2 lines of text, and click the mouse on the first line. I've checked a fix for picture-mouse-set-point into the emacs-23 branch. The underlying situation is currently somewhat unsatisfactory---the pixel position of a mouse-event in the text area counts X from the start of the text area (excluding margins and fringes), and Y from the top of the window (including the header line). This arises from some internal redisplay engine semantics, and is not really intuitive. Rightfully, the header-line should be excluded from the pixel Y coordinates. It's not feasible to change this for Emacs 23, since existing code might depend on the current behavior. But we can contemplate changing this in Emacs 24. (Such a change will not affect the picture-mouse-set-point fix.) From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 13 16:16:36 2010 Received: (at 7390) by debbugs.gnu.org; 13 Nov 2010 21:16:36 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHNSd-0005rJ-LZ for submit@debbugs.gnu.org; Sat, 13 Nov 2010 16:16:35 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHNSb-0005rE-MO for 7390@debbugs.gnu.org; Sat, 13 Nov 2010 16:16:34 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LBU00K00DQQ3900@a-mtaout20.012.net.il> for 7390@debbugs.gnu.org; Sat, 13 Nov 2010 23:21:12 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.126.249.126]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LBU00ICEDZ80RP0@a-mtaout20.012.net.il>; Sat, 13 Nov 2010 23:21:10 +0200 (IST) Date: Sat, 13 Nov 2010 23:21:16 +0200 From: Eli Zaretskii Subject: Re: bug#7390: 24.0.50; pos-col-row gives incorrect row In-reply-to: <87eiapkjv9.fsf@stupidchicken.com> X-012-Sender: halo1@inter.net.il To: Chong Yidong Message-id: <831v6oex83.fsf@gnu.org> References: <9C53EFF0802044A489EF842E6A1B8150@us.oracle.com> <8362w1dp3e.fsf@gnu.org> <87eiapkjv9.fsf@stupidchicken.com> X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 7390 Cc: drew.adams@oracle.com, 7390@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > From: Chong Yidong > Cc: Drew Adams , 7390@debbugs.gnu.org > Date: Sat, 13 Nov 2010 16:13:14 -0500 > > I've checked a fix for picture-mouse-set-point into the emacs-23 branch. > > The underlying situation is currently somewhat unsatisfactory---the > pixel position of a mouse-event in the text area counts X from the start > of the text area (excluding margins and fringes), and Y from the top of > the window (including the header line). > > This arises from some internal redisplay engine semantics, and is not > really intuitive. Rightfully, the header-line should be excluded from > the pixel Y coordinates. It's not feasible to change this for Emacs 23, > since existing code might depend on the current behavior. But we can > contemplate changing this in Emacs 24. I could revert my change to emacs-23 branch and install it on the trunk instead. (Although I cannot see how this could hurt existing code -- did you see Lisp code that actually depends on this?) From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 13 16:26:35 2010 Received: (at 7390) by debbugs.gnu.org; 13 Nov 2010 21:26:35 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHNcJ-0005w4-GZ for submit@debbugs.gnu.org; Sat, 13 Nov 2010 16:26:35 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHNcH-0005vw-9j for 7390@debbugs.gnu.org; Sat, 13 Nov 2010 16:26:34 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LBU00K00E4G5800@a-mtaout20.012.net.il> for 7390@debbugs.gnu.org; Sat, 13 Nov 2010 23:30:40 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.126.249.126]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LBU00IEOEF3LJN0@a-mtaout20.012.net.il>; Sat, 13 Nov 2010 23:30:40 +0200 (IST) Date: Sat, 13 Nov 2010 23:30:46 +0200 From: Eli Zaretskii Subject: Re: bug#7390: 24.0.50; pos-col-row gives incorrect row In-reply-to: <834obldj4v.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: Chong Yidong Message-id: <83zktcdi7t.fsf@gnu.org> References: <9C53EFF0802044A489EF842E6A1B8150@us.oracle.com> <8362w1dp3e.fsf@gnu.org> <834obldj4v.fsf@gnu.org> X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 7390 Cc: 7390@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > Date: Sat, 13 Nov 2010 23:10:56 +0200 > From: Eli Zaretskii > Cc: > > I think that posn-col-row should pay attention to the existence of > the header line E.g., artist.el is broken in the same way as picture.el, when there's a header line in the window where you draw. Many users of posn-col-row only use it to compute the difference between two rows -- those will be unaffected by my change in posn-col-row. So I still maintain that the fix in posn-col-row should stay in the emacs-23 branch. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 13 16:32:49 2010 Received: (at 7390) by debbugs.gnu.org; 13 Nov 2010 21:32:50 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHNiL-0005zx-NY for submit@debbugs.gnu.org; Sat, 13 Nov 2010 16:32:49 -0500 Received: from pantheon-po25.its.yale.edu ([130.132.50.119]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHNiJ-0005zs-LF for 7390@debbugs.gnu.org; Sat, 13 Nov 2010 16:32:48 -0500 Received: from furball (c-71-192-165-84.hsd1.ct.comcast.net [71.192.165.84]) (authenticated bits=0) by pantheon-po25.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id oADLbdHa007283 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 13 Nov 2010 16:37:39 -0500 Received: by furball (Postfix, from userid 1000) id C3F3416062F; Sat, 13 Nov 2010 16:37:35 -0500 (EST) From: Chong Yidong To: Eli Zaretskii Subject: Re: bug#7390: 24.0.50; pos-col-row gives incorrect row References: <9C53EFF0802044A489EF842E6A1B8150@us.oracle.com> <8362w1dp3e.fsf@gnu.org> <834obldj4v.fsf@gnu.org> <83zktcdi7t.fsf@gnu.org> Date: Sat, 13 Nov 2010 16:37:35 -0500 In-Reply-To: <83zktcdi7t.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 13 Nov 2010 23:30:46 +0200") Message-ID: <8739r4lxb4.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 7390 Cc: 7390@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.9 (--) Eli Zaretskii writes: > I could revert my change to emacs-23 branch and install it on the > trunk instead. (Although I cannot see how this could hurt existing > code -- did you see Lisp code that actually depends on this?) > > E.g., artist.el is broken in the same way as picture.el, when there's > a header line in the window where you draw. > > Many users of posn-col-row only use it to compute the difference > between two rows -- those will be unaffected by my change in > posn-col-row. > > So I still maintain that the fix in posn-col-row should stay in the > emacs-23 branch. OK, but then this should be documented in etc/NEWS, just in case there is someone who cares about the exact behavior of posn-col-row. Would you mind doing that? Also, we have to remember to change posn-col-row again, when we fix the deeper problem---the X and Y pixel coordinate mismatch that I described earlier. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 13 16:34:21 2010 Received: (at 7390) by debbugs.gnu.org; 13 Nov 2010 21:34:21 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHNjp-00060r-9z for submit@debbugs.gnu.org; Sat, 13 Nov 2010 16:34:21 -0500 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHNjn-00060m-Me for 7390@debbugs.gnu.org; Sat, 13 Nov 2010 16:34:20 -0500 Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id oADLd94a006909 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 13 Nov 2010 21:39:11 GMT Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id oADLd97q005892; Sat, 13 Nov 2010 21:39:09 GMT Received: from abhmt006.oracle.com by acsmt353.oracle.com with ESMTP id 775665821289684281; Sat, 13 Nov 2010 13:38:01 -0800 Received: from dradamslap1 (/10.159.14.224) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 13 Nov 2010 13:38:01 -0800 From: "Drew Adams" To: "'Chong Yidong'" , "'Eli Zaretskii'" References: <9C53EFF0802044A489EF842E6A1B8150@us.oracle.com><8362w1dp3e.fsf@gnu.org> <87eiapkjv9.fsf@stupidchicken.com> Subject: RE: bug#7390: 24.0.50; pos-col-row gives incorrect row Date: Sat, 13 Nov 2010 13:38:01 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87eiapkjv9.fsf@stupidchicken.com> Thread-Index: AcuDd50VjxOyl9vITSGRaKVV+rnisQAAnX9Q X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 7390 Cc: 7390@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) Thanks to you both for fixing this so quickly. > The underlying situation is currently somewhat unsatisfactory---the > pixel position of a mouse-event in the text area counts X > from the start of the text area (excluding margins and fringes), > and Y from the top of the window (including the header line). Yes, that's an inconsistency. But what do we want "pixel" position to mean? Both (1) a position within the text area and (2) a position overall (including things like scroll bars and header lines can be useful. We should not sacrifice one for the other. What you need in terms of a position depends on what you are trying to do. It seems we need either two different functions (for each such positioning function) or an argument that determines the behavior. > This arises from some internal redisplay engine semantics, and is not > really intuitive. Rightfully, the header-line should be excluded from > the pixel Y coordinates. No, I don't think there is any such "rightfully". Both behaviors are important and useful (position within text area and position within total frame/window including non-text decorations). We should not decide that one of them is "right". But each of them needs to be consistent. > It's not feasible to change this for Emacs 23, > since existing code might depend on the current behavior. But we can > contemplate changing this in Emacs 24. > > (Such a change will not affect the picture-mouse-set-point fix.) Let's contemplate coming up with functions that give both kinds of position, not just one. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 13 16:39:18 2010 Received: (at 7390) by debbugs.gnu.org; 13 Nov 2010 21:39:18 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHNoc-00064B-FI for submit@debbugs.gnu.org; Sat, 13 Nov 2010 16:39:18 -0500 Received: from pantheon-po42.its.yale.edu ([130.132.50.101]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHNoa-00063x-TR for 7390@debbugs.gnu.org; Sat, 13 Nov 2010 16:39:17 -0500 Received: from furball (c-71-192-165-84.hsd1.ct.comcast.net [71.192.165.84]) (authenticated bits=0) by pantheon-po42.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id oADLi8Yi015497 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 13 Nov 2010 16:44:09 -0500 Received: by furball (Postfix, from userid 1000) id BD05C16062F; Sat, 13 Nov 2010 16:44:04 -0500 (EST) From: Chong Yidong To: Eli Zaretskii Subject: Re: bug#7390: 24.0.50; pos-col-row gives incorrect row References: <9C53EFF0802044A489EF842E6A1B8150@us.oracle.com> <8362w1dp3e.fsf@gnu.org> <87eiapkjv9.fsf@stupidchicken.com> Date: Sat, 13 Nov 2010 16:44:04 -0500 In-Reply-To: <87eiapkjv9.fsf@stupidchicken.com> (Chong Yidong's message of "Sat, 13 Nov 2010 16:13:14 -0500") Message-ID: <87y68wkifv.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 7390 Cc: Drew Adams , 7390@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.9 (--) Chong Yidong writes: > I've checked a fix for picture-mouse-set-point into the emacs-23 branch. Hmm; I took a closer look at your fix, and it doesn't seem quite right. If you make an abnormally tall header-line, e.g. (setq header-line-format (propertize "foo" 'face '(:height 5.0))) then this new code gives the wrong value. What's needed is to subtract the pixel Y position of the top of the text area from the pixel Y position of the top of the window. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 13 16:51:15 2010 Received: (at 7390) by debbugs.gnu.org; 13 Nov 2010 21:51:15 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHO0B-00069I-4c for submit@debbugs.gnu.org; Sat, 13 Nov 2010 16:51:15 -0500 Received: from mtaout22.012.net.il ([80.179.55.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHO08-00069A-PE for 7390@debbugs.gnu.org; Sat, 13 Nov 2010 16:51:14 -0500 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LBU00M00FDAY700@a-mtaout22.012.net.il> for 7390@debbugs.gnu.org; Sat, 13 Nov 2010 23:55:28 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.126.249.126]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LBU00M0MFKDE580@a-mtaout22.012.net.il>; Sat, 13 Nov 2010 23:55:26 +0200 (IST) Date: Sat, 13 Nov 2010 23:55:32 +0200 From: Eli Zaretskii Subject: Re: bug#7390: 24.0.50; pos-col-row gives incorrect row In-reply-to: <87y68wkifv.fsf@stupidchicken.com> X-012-Sender: halo1@inter.net.il To: Chong Yidong Message-id: <83y68wdh2j.fsf@gnu.org> References: <9C53EFF0802044A489EF842E6A1B8150@us.oracle.com> <8362w1dp3e.fsf@gnu.org> <87eiapkjv9.fsf@stupidchicken.com> <87y68wkifv.fsf@stupidchicken.com> X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 7390 Cc: drew.adams@oracle.com, 7390@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > From: Chong Yidong > Cc: Drew Adams , 7390@debbugs.gnu.org > Date: Sat, 13 Nov 2010 16:44:04 -0500 > > Chong Yidong writes: > > > I've checked a fix for picture-mouse-set-point into the emacs-23 branch. > > Hmm; I took a closer look at your fix, and it doesn't seem quite right. > If you make an abnormally tall header-line, e.g. > > (setq header-line-format (propertize "foo" 'face '(:height 5.0))) > > then this new code gives the wrong value. That's expected: posn-col-row is documented to return an approximation, based on the assumption that all the lines are of the canonical height. Your example breaks that assumption. Similar problems will happen if one of the lines above the mouse click uses an unusually large font. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 13 16:56:04 2010 Received: (at 7390) by debbugs.gnu.org; 13 Nov 2010 21:56:04 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHO4p-0006BE-R2 for submit@debbugs.gnu.org; Sat, 13 Nov 2010 16:56:04 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHO4n-0006Ar-OJ for 7390@debbugs.gnu.org; Sat, 13 Nov 2010 16:56:02 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LBU00K00FS8IG00@a-mtaout20.012.net.il> for 7390@debbugs.gnu.org; Sun, 14 Nov 2010 00:00:53 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.126.249.126]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LBU00KRXFTE3270@a-mtaout20.012.net.il>; Sun, 14 Nov 2010 00:00:53 +0200 (IST) Date: Sun, 14 Nov 2010 00:00:57 +0200 From: Eli Zaretskii Subject: Re: bug#7390: 24.0.50; pos-col-row gives incorrect row In-reply-to: <8739r4lxb4.fsf@stupidchicken.com> X-012-Sender: halo1@inter.net.il To: Chong Yidong Message-id: <83wrogdgti.fsf@gnu.org> References: <9C53EFF0802044A489EF842E6A1B8150@us.oracle.com> <8362w1dp3e.fsf@gnu.org> <834obldj4v.fsf@gnu.org> <83zktcdi7t.fsf@gnu.org> <8739r4lxb4.fsf@stupidchicken.com> X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 7390 Cc: 7390@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > From: Chong Yidong > Cc: 7390@debbugs.gnu.org > Date: Sat, 13 Nov 2010 16:37:35 -0500 > > > So I still maintain that the fix in posn-col-row should stay in the > > emacs-23 branch. > > OK, but then this should be documented in etc/NEWS, just in case there > is someone who cares about the exact behavior of posn-col-row. Would > you mind doing that? Done. > Also, we have to remember to change posn-col-row again, when we fix the > deeper problem---the X and Y pixel coordinate mismatch that I described > earlier. Yes, it's a mess. How about filing a bug report about this? That's the best way not to forget, I think. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 13 17:26:57 2010 Received: (at 7390) by debbugs.gnu.org; 13 Nov 2010 22:26:57 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHOYi-0006OZ-W5 for submit@debbugs.gnu.org; Sat, 13 Nov 2010 17:26:57 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHOYg-0006OU-S7 for 7390@debbugs.gnu.org; Sat, 13 Nov 2010 17:26:56 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LBU00K00H72QF00@a-mtaout20.012.net.il> for 7390@debbugs.gnu.org; Sun, 14 Nov 2010 00:31:46 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.126.249.126]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LBU00K2DH8U32C0@a-mtaout20.012.net.il>; Sun, 14 Nov 2010 00:31:45 +0200 (IST) Date: Sun, 14 Nov 2010 00:31:49 +0200 From: Eli Zaretskii Subject: Re: bug#7390: 24.0.50; pos-col-row gives incorrect row In-reply-to: X-012-Sender: halo1@inter.net.il To: Drew Adams Message-id: <83vd40dfe2.fsf@gnu.org> References: <9C53EFF0802044A489EF842E6A1B8150@us.oracle.com> <8362w1dp3e.fsf@gnu.org> <87eiapkjv9.fsf@stupidchicken.com> X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 7390 Cc: cyd@stupidchicken.com, 7390@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > From: "Drew Adams" > Cc: <7390@debbugs.gnu.org> > Date: Sat, 13 Nov 2010 13:38:01 -0800 > > But what do we want "pixel" position to mean? Both (1) a position within the > text area and (2) a position overall (including things like scroll bars and > header lines can be useful. You already have (2) in the mouse event itself. The posn-* functions are about (1). From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 14 12:30:39 2010 Received: (at 7390) by debbugs.gnu.org; 14 Nov 2010 17:30:39 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHgPW-0007eb-N8 for submit@debbugs.gnu.org; Sun, 14 Nov 2010 12:30:38 -0500 Received: from pantheon-po16.its.yale.edu ([130.132.50.72]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHgPU-0007eW-B1 for 7390@debbugs.gnu.org; Sun, 14 Nov 2010 12:30:36 -0500 Received: from furball (dhcp128036226184.central.yale.edu [128.36.226.184]) (authenticated bits=0) by pantheon-po16.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id oAEHZUaM032234 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 14 Nov 2010 12:35:31 -0500 Received: by furball (Postfix, from userid 1000) id 9418F16055F; Sun, 14 Nov 2010 12:35:30 -0500 (EST) From: Chong Yidong To: Eli Zaretskii Subject: Re: bug#7390: 24.0.50; pos-col-row gives incorrect row References: <9C53EFF0802044A489EF842E6A1B8150@us.oracle.com> <8362w1dp3e.fsf@gnu.org> <87eiapkjv9.fsf@stupidchicken.com> <87y68wkifv.fsf@stupidchicken.com> <83y68wdh2j.fsf@gnu.org> Date: Sun, 14 Nov 2010 12:35:30 -0500 In-Reply-To: <83y68wdh2j.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 13 Nov 2010 23:55:32 +0200") Message-ID: <87k4kf7qql.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 7390 Cc: drew.adams@oracle.com, 7390@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Eli Zaretskii writes: >> (setq header-line-format (propertize "foo" 'face '(:height 5.0))) >> >> then this new code gives the wrong value. > > That's expected: posn-col-row is documented to return an > approximation, based on the assumption that all the lines are of the > canonical height. Your example breaks that assumption. Similar > problems will happen if one of the lines above the mouse click uses an > unusually large font. I know, but posn-col-row, when called for a text area event position, ought to give the (approximate) row/column number counting from the top of the text area. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 16 14:54:28 2010 Received: (at 7390) by debbugs.gnu.org; 16 Nov 2010 19:54:28 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PIRbn-0006rH-PA for submit@debbugs.gnu.org; Tue, 16 Nov 2010 14:54:28 -0500 Received: from pantheon-po41.its.yale.edu ([130.132.50.98]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PIRbm-0006rC-OF for 7390@debbugs.gnu.org; Tue, 16 Nov 2010 14:54:27 -0500 Received: from furball (dhcp128036014244.central.yale.edu [128.36.14.244]) (authenticated bits=0) by pantheon-po41.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id oAGJxQoB013768 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 16 Nov 2010 14:59:26 -0500 Received: by furball (Postfix, from userid 1000) id 058BE16086B; Tue, 16 Nov 2010 14:59:25 -0500 (EST) From: Chong Yidong To: Eli Zaretskii Subject: Re: bug#7390: 24.0.50; pos-col-row gives incorrect row References: <9C53EFF0802044A489EF842E6A1B8150@us.oracle.com> <8362w1dp3e.fsf@gnu.org> <834obldj4v.fsf@gnu.org> <83zktcdi7t.fsf@gnu.org> <8739r4lxb4.fsf@stupidchicken.com> <83wrogdgti.fsf@gnu.org> Date: Tue, 16 Nov 2010 14:59:25 -0500 In-Reply-To: <83wrogdgti.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 14 Nov 2010 00:00:57 +0200") Message-ID: <87pqu5f3aa.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 7390 Cc: 7390@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Eli Zaretskii writes: >> Also, we have to remember to change posn-col-row again, when we fix the >> deeper problem---the X and Y pixel coordinate mismatch that I described >> earlier. > > Yes, it's a mess. How about filing a bug report about this? That's > the best way not to forget, I think. I've just changed this in the trunk. From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 12 02:09:01 2010 Received: (at 7390) by debbugs.gnu.org; 12 Dec 2010 07:09:02 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PRg3J-0007Bt-2E for submit@debbugs.gnu.org; Sun, 12 Dec 2010 02:09:01 -0500 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PRg3G-0007Bg-7f for 7390@debbugs.gnu.org; Sun, 12 Dec 2010 02:08:59 -0500 Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 5941DC055D; Sun, 12 Dec 2010 16:15:04 +0900 (JST) Date: Sun, 12 Dec 2010 16:15:04 +0900 Message-ID: From: YAMAMOTO Mitsuharu To: 7390@debbugs.gnu.org, eliz@gnu.org Subject: Re: bug#7390: 24.0.50; pos-col-row gives incorrect row In-Reply-To: <834obldj4v.fsf@gnu.org> References: <9C53EFF0802044A489EF842E6A1B8150@us.oracle.com> <8362w1dp3e.fsf@gnu.org> <834obldj4v.fsf@gnu.org> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 7390 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) >>>>> On Sat, 13 Nov 2010 23:10:56 +0200, Eli Zaretskii said: > I see that Chong modified picture.el to not use posn-col-row. But I > think that posn-col-row should pay attention to the existence of the > header line, so I fixed that as well (on the emacs-23 branch). Perhaps `header-line-height' should be enclosed with (with-current-buffer (window-buffer window) ...) as in the case of `line-spacing'? YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 12 02:23:11 2010 Received: (at 7390) by debbugs.gnu.org; 12 Dec 2010 07:23:11 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PRgH1-0007V7-CV for submit@debbugs.gnu.org; Sun, 12 Dec 2010 02:23:11 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PRgH0-0007Uw-BU for 7390@debbugs.gnu.org; Sun, 12 Dec 2010 02:23:10 -0500 Received: from eliz by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1PRgMs-0006kl-Ks; Sun, 12 Dec 2010 02:29:14 -0500 From: Eli Zaretskii To: YAMAMOTO Mitsuharu In-reply-to: (message from YAMAMOTO Mitsuharu on Sun, 12 Dec 2010 16:15:04 +0900) Subject: Re: bug#7390: 24.0.50; pos-col-row gives incorrect row References: <9C53EFF0802044A489EF842E6A1B8150@us.oracle.com> <8362w1dp3e.fsf@gnu.org> <834obldj4v.fsf@gnu.org> Message-Id: Date: Sun, 12 Dec 2010 02:29:14 -0500 X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: 7390 Cc: 7390@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) > Date: Sun, 12 Dec 2010 16:15:04 +0900 > From: YAMAMOTO Mitsuharu > > >>>>> On Sat, 13 Nov 2010 23:10:56 +0200, Eli Zaretskii said: > > > I see that Chong modified picture.el to not use posn-col-row. But I > > think that posn-col-row should pay attention to the existence of the > > header line, so I fixed that as well (on the emacs-23 branch). > > Perhaps `header-line-height' should be enclosed with > (with-current-buffer (window-buffer window) ...) as in the case of > `line-spacing'? What would be the use-cases where this is necessary? From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 12 02:31:55 2010 Received: (at 7390) by debbugs.gnu.org; 12 Dec 2010 07:31:55 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PRgPT-0007hl-Hs for submit@debbugs.gnu.org; Sun, 12 Dec 2010 02:31:55 -0500 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PRgPO-0007hR-00 for 7390@debbugs.gnu.org; Sun, 12 Dec 2010 02:31:53 -0500 Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 2FEB1C055D; Sun, 12 Dec 2010 16:37:56 +0900 (JST) Date: Sun, 12 Dec 2010 16:37:56 +0900 Message-ID: From: YAMAMOTO Mitsuharu To: Eli Zaretskii Subject: Re: bug#7390: 24.0.50; pos-col-row gives incorrect row In-Reply-To: References: <9C53EFF0802044A489EF842E6A1B8150@us.oracle.com> <8362w1dp3e.fsf@gnu.org> <834obldj4v.fsf@gnu.org> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 7390 Cc: YAMAMOTO Mitsuharu , 7390@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) >>>>> On Sun, 12 Dec 2010 02:29:14 -0500, Eli Zaretskii said: >> Perhaps `header-line-height' should be enclosed with >> (with-current-buffer (window-buffer window) ...) as in the case of >> `line-spacing'? > What would be the use-cases where this is necessary? I don't know. But I don't think posn-* functions assume the buffer of the window containing the given position is the current buffer. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 12 15:40:47 2010 Received: (at 7390) by debbugs.gnu.org; 12 Dec 2010 20:40:47 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PRsis-0002FC-W0 for submit@debbugs.gnu.org; Sun, 12 Dec 2010 15:40:47 -0500 Received: from mtaout21.012.net.il ([80.179.55.169]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PRsip-0002Ew-Tw for 7390@debbugs.gnu.org; Sun, 12 Dec 2010 15:40:45 -0500 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0LDC003001KHMD00@a-mtaout21.012.net.il> for 7390@debbugs.gnu.org; Sun, 12 Dec 2010 22:46:51 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.229.142.197]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LDC003PD1Q2MA00@a-mtaout21.012.net.il>; Sun, 12 Dec 2010 22:46:51 +0200 (IST) Date: Sun, 12 Dec 2010 22:47:07 +0200 From: Eli Zaretskii Subject: Re: bug#7390: 24.0.50; pos-col-row gives incorrect row In-reply-to: X-012-Sender: halo1@inter.net.il To: YAMAMOTO Mitsuharu Message-id: <83d3p6u3as.fsf@gnu.org> References: <9C53EFF0802044A489EF842E6A1B8150@us.oracle.com> <8362w1dp3e.fsf@gnu.org> <834obldj4v.fsf@gnu.org> X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 7390 Cc: mituharu@math.s.chiba-u.ac.jp, 7390@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > Date: Sun, 12 Dec 2010 16:37:56 +0900 > From: YAMAMOTO Mitsuharu > Cc: YAMAMOTO Mitsuharu , > 7390@debbugs.gnu.org > > >>>>> On Sun, 12 Dec 2010 02:29:14 -0500, Eli Zaretskii said: > > >> Perhaps `header-line-height' should be enclosed with > >> (with-current-buffer (window-buffer window) ...) as in the case of > >> `line-spacing'? > > > What would be the use-cases where this is necessary? > > I don't know. But I don't think posn-* functions assume the buffer of > the window containing the given position is the current buffer. You are right. I fixed that. From unknown Sun Jun 22 06:25:53 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 10 Jan 2011 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator