From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?J=E9r=E9my_Compostella?= Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] windmove.el: Fix windmove-reference-loc miscalculation Date: Fri, 20 Jan 2012 19:14:48 +0100 Message-ID: References: <87wr8ntkxb.fsf@Apollo.jerryland.fr> <4F193B95.5000808@gmx.at> <4F19AD77.5000705@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=14dae9399ac139920004b6f9a9ba X-Trace: dough.gmane.org 1327083331 22144 80.91.229.12 (20 Jan 2012 18:15:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 20 Jan 2012 18:15:31 +0000 (UTC) Cc: Sylvain Rousseau , emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 20 19:15:22 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RoIzi-0004CF-2p for ged-emacs-devel@m.gmane.org; Fri, 20 Jan 2012 19:15:22 +0100 Original-Received: from localhost ([::1]:60636 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoIzh-0001kL-Cw for ged-emacs-devel@m.gmane.org; Fri, 20 Jan 2012 13:15:21 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:40631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoIza-0001jB-T2 for emacs-devel@gnu.org; Fri, 20 Jan 2012 13:15:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RoIzW-0004Ai-GU for emacs-devel@gnu.org; Fri, 20 Jan 2012 13:15:14 -0500 Original-Received: from mail-tul01m020-f169.google.com ([209.85.214.169]:34282) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoIzW-0004Ab-8n for emacs-devel@gnu.org; Fri, 20 Jan 2012 13:15:10 -0500 Original-Received: by obbta7 with SMTP id ta7so1319518obb.0 for ; Fri, 20 Jan 2012 10:15:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=i7a7rKyNzW8TR5Yld0noqEbmBnf+MYFEiBtKwY3thGI=; b=sHm4IabKOwzzgk3sU6YULWpt6/8ec0uFzm6G0skt+Np3j1OpvgNzPNYAWqfl6SGC8s hSmIZ2mMKqCCpUV3NqqrjeT27MgXaL0OjP5MyT3DdCWS4sZyIBKCnRNWY3H9SPpM5ZDa lZwRWSezhnBCfAC+p6v9v/MIMQ630eUNkw6O0= Original-Received: by 10.182.116.38 with SMTP id jt6mr27663723obb.52.1327083309076; Fri, 20 Jan 2012 10:15:09 -0800 (PST) Original-Received: by 10.60.49.103 with HTTP; Fri, 20 Jan 2012 10:14:48 -0800 (PST) In-Reply-To: <4F19AD77.5000705@gmx.at> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.214.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:147786 Archived-At: --14dae9399ac139920004b6f9a9ba Content-Type: text/plain; charset=ISO-8859-1 2012/1/20 martin rudalics > > Effectively the issue is only windmove.el related. > > So IIUC the issue is that `windmove-reference-loc' > > (windmove-coord-add > top-left > (let ((col-row > (posn-col-row > (posn-at-point (window-point window) window)))) > (cons (- (car col-row) (window-hscroll window)) > (cdr col-row))))))))) > > wrongly subtracts the value returned by `window-hscroll' from a column > value correctly calculated by `posn-at-point' (window_box_left_offset)? > > Yes, you're perfectly right that's my point and my patch remove this. Thanks. It's time to friday beer evening now :) --14dae9399ac139920004b6f9a9ba Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
2012/1/20 martin rudalics <= rudalics@gmx.at>
> Effectively the issue is only windmove.el related.
So IIUC the issue is that `windmove-reference-loc'

=A0 =A0 =A0 =A0 =A0(windmove-coord-add
=A0 =A0 =A0 =A0 =A0 =A0 top-left
=A0 =A0 =A0 =A0 =A0 =A0 (let ((col-row
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(posn-col-row
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (posn-at-point (window-point windo= w) window))))
=A0 =A0 =A0 =A0 =A0 =A0 =A0 (cons (- (car col-row) (window-hscroll window)= )
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (cdr col-row)))))))))

wrongly subtracts the value returned by `window-hscroll' from a column<= br> value correctly calculated by `posn-at-point' (window_box_left_offset)?=

Yes, you're perfectly right that's my poi= nt and my patch remove this.
Thanks.

It's time to friday beer evening now :)
--14dae9399ac139920004b6f9a9ba--