From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#21271: 25.0.5; `field' text-property screws with `line-end-position' Date: Sat, 15 Aug 2015 15:34:29 -0700 (PDT) Message-ID: <2ffa4ae9-0ce8-4c29-bebb-9fcd05b5c18c@default> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1439678126 22135 80.91.229.3 (15 Aug 2015 22:35:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 15 Aug 2015 22:35:26 +0000 (UTC) To: bruce.connor.am@gmail.com, 21271@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 16 00:35:11 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZQk2g-0005Th-S2 for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Aug 2015 00:35:11 +0200 Original-Received: from localhost ([::1]:50944 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQk2f-000202-T3 for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Aug 2015 18:35:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQk2d-0001zA-1I for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2015 18:35:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZQk2Z-0007xW-0u for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2015 18:35:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36501) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQk2Y-0007x3-Tf for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2015 18:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZQk2Y-0005iC-HT for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2015 18:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Aug 2015 22:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21271 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21271-submit@debbugs.gnu.org id=B21271.143967807321912 (code B ref 21271); Sat, 15 Aug 2015 22:35:02 +0000 Original-Received: (at 21271) by debbugs.gnu.org; 15 Aug 2015 22:34:33 +0000 Original-Received: from localhost ([127.0.0.1]:56944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZQk25-0005hL-0M for submit@debbugs.gnu.org; Sat, 15 Aug 2015 18:34:33 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:29510) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZQk22-0005hB-Iz for 21271@debbugs.gnu.org; Sat, 15 Aug 2015 18:34:31 -0400 Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t7FMYTcT003558 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 15 Aug 2015 22:34:29 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t7FMYSWF013582 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sat, 15 Aug 2015 22:34:28 GMT Original-Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t7FMYSJY027688; Sat, 15 Aug 2015 22:34:28 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: userv0022.oracle.com [156.151.31.74] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:105511 Archived-At: Confirmed. This is the case as far back as property `field' has existed, AFAICT. (It is not the case for Emacs 20, which has no built-in property `field'. It is the case for Emacs 22. Dunno about 21.) But this part of the doc string seems to indicate that this behavior is to be expected: This function constrains the returned position to the current field unless that would be on a different line than the original, unconstrained result. If N is nil or 1, and a rear-sticky field ends at point, the scan stops as soon as it starts. To ignore field boundaries bind =E2=80=98inhibit-field-text-motion=E2=80=99 to t. > 1. In an empty buffer, hit RET and type some text on the second > line. > 2. Place point at the start of the second line. > 3. Run (line-end-position) and verify that the value is correct > (something greater than 3) > 4. Run (add-text-properties (1- (point)) (point) '(field 1)) > 5. Run (line-end-position) and you'll get 2 (which is the poistion > of the end of the field).