From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#15783: 24.3; posn-at-x-y is relative to the buffer area, posn-at-point is relative to the text area. Date: Fri, 17 Nov 2017 11:32:45 +0200 Message-ID: <83zi7lgshu.fsf@gnu.org> References: <83fvrgaxrp.fsf@gnu.org> <87k1yp4aar.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1510911254 32200 195.159.176.226 (17 Nov 2017 09:34:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 17 Nov 2017 09:34:14 +0000 (UTC) Cc: shiino.yuki@gmail.com, 15783@debbugs.gnu.org To: Alex Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 17 10:34:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFd2E-00080u-W6 for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Nov 2017 10:34:07 +0100 Original-Received: from localhost ([::1]:44734 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFd2M-0006GO-9f for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Nov 2017 04:34:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36575) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFd2D-0006FO-BQ for bug-gnu-emacs@gnu.org; Fri, 17 Nov 2017 04:34:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFd2A-00027h-7h for bug-gnu-emacs@gnu.org; Fri, 17 Nov 2017 04:34:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35560) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eFd2A-00027D-3b for bug-gnu-emacs@gnu.org; Fri, 17 Nov 2017 04:34:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eFd29-0008JI-Tp for bug-gnu-emacs@gnu.org; Fri, 17 Nov 2017 04:34:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Nov 2017 09:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15783 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15783-submit@debbugs.gnu.org id=B15783.151091119131889 (code B ref 15783); Fri, 17 Nov 2017 09:34:01 +0000 Original-Received: (at 15783) by debbugs.gnu.org; 17 Nov 2017 09:33:11 +0000 Original-Received: from localhost ([127.0.0.1]:44241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFd1L-0008IH-GB for submit@debbugs.gnu.org; Fri, 17 Nov 2017 04:33:11 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:45286) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFd1K-0008I4-I1 for 15783@debbugs.gnu.org; Fri, 17 Nov 2017 04:33:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFd1C-0000e1-7x for 15783@debbugs.gnu.org; Fri, 17 Nov 2017 04:33:05 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42482) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFd1C-0000dT-4C; Fri, 17 Nov 2017 04:33:02 -0500 Original-Received: from [176.228.60.248] (port=2815 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eFd1B-0004u4-H4; Fri, 17 Nov 2017 04:33:01 -0500 In-reply-to: <87k1yp4aar.fsf@gmail.com> (message from Alex on Fri, 17 Nov 2017 01:46:36 -0600) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:139995 Archived-At: > From: Alex > Cc: 椎野 裕樹 , > 15783@debbugs.gnu.org > Date: Fri, 17 Nov 2017 01:46:36 -0600 > > >> 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. > > What kind of bugs did it cause? See bug#7390, for example. > It's pretty jarring to have the following return nil when a > header-line is present: > > (let ((x-y (posn-x-y (posn-at-point)))) > (equal x-y (posn-x-y (posn-at-x-y (car x-y) > (cdr x-y))))) It's less than ideal, but the alternatives are worse. > I noticed this since an Emacs package uses posn-x-y and posn-at-x-y to > try to preserve the point's screen coordinates before and after a > scroll. With a header-line, this puts the point one row too high. > > It should probably just let-bind `scroll-preserve-screen-position', > right? Probably. > Still, the above is pretty counterintuitive. If nothing else, I > think this incompatibility should be highlighted. Not sure what "highlighted" means in this context. What are you suggesting in practice? > P.S. I noticed that the manual for `posn-at-x-y' states that the WHOLE > argument affects both X and Y, but the docstring only states that X is > affected. Feel free to fix such discrepancies without any discussion, and thanks.