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: Sat, 21 Jan 2012 11:05:26 +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=f46d044468e1f68eb104b706f0bd X-Trace: dough.gmane.org 1327140373 1235 80.91.229.12 (21 Jan 2012 10:06:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 21 Jan 2012 10:06:13 +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 Sat Jan 21 11:06:09 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 1RoXpk-00025U-GS for ged-emacs-devel@m.gmane.org; Sat, 21 Jan 2012 11:06:04 +0100 Original-Received: from localhost ([::1]:45517 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoXpe-0006UW-MO for ged-emacs-devel@m.gmane.org; Sat, 21 Jan 2012 05:05:58 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:34187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoXpY-0006U8-5w for emacs-devel@gnu.org; Sat, 21 Jan 2012 05:05:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RoXpU-0003Ai-1V for emacs-devel@gnu.org; Sat, 21 Jan 2012 05:05:51 -0500 Original-Received: from mail-tul01m020-f169.google.com ([209.85.214.169]:44117) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoXpT-0003Ac-Ua for emacs-devel@gnu.org; Sat, 21 Jan 2012 05:05:48 -0500 Original-Received: by obbta7 with SMTP id ta7so2026866obb.0 for ; Sat, 21 Jan 2012 02:05:47 -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=FQjJ7mWoThRCadl1jlQ02gDCYaktoi/PCgtQW03rE74=; b=b2L5ity59NrHJPZ1H/4gn7O+0KFPQVYwWdZkry/6RPQFPz/XcYFhd5urlumtopOpvW nKrxqi7g7HGtLn9Co6zLka4aq8bfTwSFbAMbZD47w89NrSL1JNiy4SGT0cm797vNe3CE I+zrGykYbKVbCNLbuJlMKst8Ipu1WjrKNxbok= Original-Received: by 10.182.222.102 with SMTP id ql6mr1204936obc.2.1327140347219; Sat, 21 Jan 2012 02:05:47 -0800 (PST) Original-Received: by 10.60.49.103 with HTTP; Sat, 21 Jan 2012 02:05:26 -0800 (PST) In-Reply-To: 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:147808 Archived-At: --f46d044468e1f68eb104b706f0bd Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable As we agreed about the solution, could you please merge this patch ? This bug is really annoying to me and probably to many others. Thanks. J=E9r=E9my 2012/1/20 J=E9r=E9my Compostella > 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 :) > --f46d044468e1f68eb104b706f0bd Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable As we agreed about the solution, could you please merge this patch ?
Th= is bug is really annoying to me and probably to many others.

=
Thanks.

J=E9r=E9my

2012/1/20 J=E9r=E9my Compostella <jeremy.compostella@gmail.com>
=
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&= #39;s my point and my patch remove this.
Thanks.

It's time to friday beer evening now :)

--f46d044468e1f68eb104b706f0bd--