GNU bug report logs - #15783
24.3; posn-at-x-y is relative to the buffer area, posn-at-point is relative to the text area.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: 椎野 裕樹 <shiino.yuki@HIDDEN>; dated Fri, 1 Nov 2013 15:58:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 15783 <at> debbugs.gnu.org:


Received: (at 15783) by debbugs.gnu.org; 1 Nov 2013 16:32:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 01 12:32:35 2013
Received: from localhost ([127.0.0.1]:57786 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VcHeD-0004sr-SY
	for submit <at> debbugs.gnu.org; Fri, 01 Nov 2013 12:32:35 -0400
Received: from mtaout21.012.net.il ([80.179.55.169]:50276)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1VcHe9-0004sb-Pw
 for 15783 <at> debbugs.gnu.org; Fri, 01 Nov 2013 12:32:30 -0400
Received: from conversion-daemon.a-mtaout21.012.net.il by
 a-mtaout21.012.net.il (HyperSendmail v2007.08) id
 <0MVL00100F67BF00@HIDDEN> for 15783 <at> debbugs.gnu.org;
 Fri, 01 Nov 2013 18:32:23 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0MVL001WQF9Y5V70@HIDDEN>;
 Fri, 01 Nov 2013 18:32:23 +0200 (IST)
Date: Fri, 01 Nov 2013 18:32:10 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#15783: 24.3;
 posn-at-x-y is relative to the buffer area, posn-at-point is
 relative	to the text area.
In-reply-to: <CADiH1_6Th0H-X7yz2W9cK4YVL-zTAVGjQvsykgJHV5F66fTxjg@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: =?utf-8?B?5qSO6YeOIOijleaouQ==?= <shiino.yuki@HIDDEN>
Message-id: <83fvrgaxrp.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-transfer-encoding: 8BIT
References: <CADiH1_6Th0H-X7yz2W9cK4YVL-zTAVGjQvsykgJHV5F66fTxjg@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 15783
Cc: 15783 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> From: 椎野 裕樹
> 	<shiino.yuki@HIDDEN>
> Date: Fri, 1 Nov 2013 23:49:00 +0900
> 
> On Emacs 24 with non-nil header-line-format, y offset returned by
> `posn-at-point' is relative to the text area *not including the header
> line*.  However, `posn-at-x-y' takes y offset relative to the buffer
> area *including the header line*.
> 
> Is this by design?

Yes.

> When I get the position by `posn-at-point', and then convert the
> position to the point by `posn-at-x-y', the resulting point does not
> match the point given to `posn-at-point'.

You should test for non-nil header-line-format, and adjust the value
accordingly.

> On Emacs 22 and 23, both functions are relative to the buffer area
> including the header line.  It's fine.

That caused much more grave bugs.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15783; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 1 Nov 2013 15:57:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 01 11:57:56 2013
Received: from localhost ([127.0.0.1]:57681 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VcH6i-0002ls-5y
	for submit <at> debbugs.gnu.org; Fri, 01 Nov 2013 11:57:56 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40181)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <shiino.yuki@HIDDEN>) id 1VcG2n-000137-CV
 for submit <at> debbugs.gnu.org; Fri, 01 Nov 2013 10:49:49 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <shiino.yuki@HIDDEN>) id 1VcG2h-0003Zy-7J
 for submit <at> debbugs.gnu.org; Fri, 01 Nov 2013 10:49:43 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:54103)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <shiino.yuki@HIDDEN>) id 1VcG2h-0003Zu-3c
 for submit <at> debbugs.gnu.org; Fri, 01 Nov 2013 10:49:43 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:41898)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <shiino.yuki@HIDDEN>) id 1VcG2g-0003Iq-8J
 for bug-gnu-emacs@HIDDEN; Fri, 01 Nov 2013 10:49:43 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <shiino.yuki@HIDDEN>) id 1VcG2f-0003Zb-Cz
 for bug-gnu-emacs@HIDDEN; Fri, 01 Nov 2013 10:49:42 -0400
Received: from mail-qa0-x236.google.com ([2607:f8b0:400d:c00::236]:40754)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <shiino.yuki@HIDDEN>) id 1VcG2f-0003ZW-96
 for bug-gnu-emacs@HIDDEN; Fri, 01 Nov 2013 10:49:41 -0400
Received: by mail-qa0-f54.google.com with SMTP id j15so656772qaq.13
 for <bug-gnu-emacs@HIDDEN>; Fri, 01 Nov 2013 07:49:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:from:date:message-id:subject:to:content-type;
 bh=sS46RXiGeTPeHuuMuuFIhEiFXKZEKF6f7i4i8fwJSNo=;
 b=UwEbRVVwAZgXkyQ2Yr6urL8Cycs/FMn6NJWS5k0ruPCReRDt0DlOoKZfiAh2ZQBI6W
 rMAYJqMi90xKIZiRv/vdNO3M9EAEIXPZVPoPHt5gve5vai57jgeCN2jBCa36YdOfj1Hm
 GikvlZVWbr/88AvZz3ApTponqYfw7jU9N54puINczlcjlNTJARXr2JHpjyvCPzf4nStY
 4G6uiKGHPu1bSovwGAxCvU8KZIxTXh0JmNO0bFVcwBfZrHxMf9eeB21j/bNiZlgHyG8l
 x2DNrVaZwt4UHt53m4dMthUV1p5tBYdFHI881SiJbHO/jGjltAfPk0UD/FmG2ANKWf1W
 BFrA==
X-Received: by 10.224.138.4 with SMTP id y4mr4477483qat.65.1383317380271; Fri,
 01 Nov 2013 07:49:40 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.96.211.233 with HTTP; Fri, 1 Nov 2013 07:49:00 -0700 (PDT)
From: =?UTF-8?B?5qSO6YeOIOijleaouQ==?= <shiino.yuki@HIDDEN>
Date: Fri, 1 Nov 2013 23:49:00 +0900
Message-ID: <CADiH1_6Th0H-X7yz2W9cK4YVL-zTAVGjQvsykgJHV5F66fTxjg@HIDDEN>
Subject: 24.3; posn-at-x-y is relative to the buffer area, posn-at-point is
 relative to the text area.
To: bug-gnu-emacs@HIDDEN
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Fri, 01 Nov 2013 11:57:55 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

On Emacs 24 with non-nil header-line-format, y offset returned by
`posn-at-point' is relative to the text area *not including the header
line*.  However, `posn-at-x-y' takes y offset relative to the buffer
area *including the header line*.

Is this by design?

When I get the position by `posn-at-point', and then convert the
position to the point by `posn-at-x-y', the resulting point does not
match the point given to `posn-at-point'.

This seems to me a serious inconsistency.

On Emacs 22 and 23, both functions are relative to the buffer area
including the header line.  It's fine.

Cheers,
Yuki Shiino




Acknowledgement sent to 椎野 裕樹 <shiino.yuki@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#15783; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.