From unknown Sat Aug 16 11:41:07 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#21271 <21271@debbugs.gnu.org> To: bug#21271 <21271@debbugs.gnu.org> Subject: Status: 25.0.5; `field' text-property screws with `line-end-position' Reply-To: bug#21271 <21271@debbugs.gnu.org> Date: Sat, 16 Aug 2025 18:41:07 +0000 retitle 21271 25.0.5; `field' text-property screws with `line-end-position' reassign 21271 emacs submitter 21271 bruce.connor.am@gmail.com severity 21271 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 15 17:59:11 2015 Received: (at submit) by debbugs.gnu.org; 15 Aug 2015 21:59:11 +0000 Received: from localhost ([127.0.0.1]:56937 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZQjTr-0004q0-0r for submit@debbugs.gnu.org; Sat, 15 Aug 2015 17:59:11 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33164) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZQjTo-0004pr-JE for submit@debbugs.gnu.org; Sat, 15 Aug 2015 17:59:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZQjTn-0008A5-MS for submit@debbugs.gnu.org; Sat, 15 Aug 2015 17:59:08 -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,BODY_URI_ONLY, FREEMAIL_FROM,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52287) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQjTn-0008A1-J5 for submit@debbugs.gnu.org; Sat, 15 Aug 2015 17:59:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43169) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQjTm-0000Wa-Pj for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2015 17:59:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZQjTl-00089n-Uj for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2015 17:59:06 -0400 Received: from mail-la0-x230.google.com ([2a00:1450:4010:c03::230]:36681) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQjTl-00089c-JS for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2015 17:59:05 -0400 Received: by lagz9 with SMTP id z9so60397369lag.3 for ; Sat, 15 Aug 2015 14:59:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:date:message-id:subject:from:to :content-type; bh=PO9V8l5yZsgCKAmCtMb460JMKNBIVqSSsNhL2bwA1Xw=; b=agUVvxZp0rsBcbGPMMSODbHC6s6f3DNMHGD2DZazpDJFa9JfmrEZEtG87KKpPoLO4n 7z0z1J9T0rVapzH7nacjpiJWg8jbUTGXvmQ4ADGs+gZXom/XyMFQr0GmVRasyfUqjGsP 9QX+qpvDKqpw5zER3YV90oh0BzpDPJY03T+wdarLyO9p7rbZcZncec8+MtGlM9JrJopY Vb63ydqln7zgjFHYD8M6+IEYvx/OdrJ2fO0OpldEuGFM0rD1qas+rQDaECBMGQT6Renj ipwVfmrMT1BK0ot35wfXDpzDeVkI0BHeCb9iBymtAbknY9rOVi3glWIe8ybN8OyAX6ds 97Jw== MIME-Version: 1.0 X-Received: by 10.152.180.161 with SMTP id dp1mr31354669lac.21.1439675943590; Sat, 15 Aug 2015 14:59:03 -0700 (PDT) Received: by 10.25.134.139 with HTTP; Sat, 15 Aug 2015 14:59:03 -0700 (PDT) Date: Sat, 15 Aug 2015 22:59:03 +0100 X-Google-Sender-Auth: 5Cp4Azg8JMisNBj9f88k3N6jcwM Message-ID: Subject: 25.0.5; `field' text-property screws with `line-end-position' From: Artur Malabarba To: bug-gnu-emacs@gnu.org 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: -3.0 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: bruce.connor.am@gmail.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) 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). From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 15 18:34:33 2015 Received: (at 21271) by debbugs.gnu.org; 15 Aug 2015 22:34:33 +0000 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 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 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 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 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 MIME-Version: 1.0 Message-ID: <2ffa4ae9-0ce8-4c29-bebb-9fcd05b5c18c@default> Date: Sat, 15 Aug 2015 15:34:29 -0700 (PDT) From: Drew Adams To: bruce.connor.am@gmail.com, 21271@debbugs.gnu.org Subject: RE: bug#21271: 25.0.5; `field' text-property screws with `line-end-position' References: In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: userv0022.oracle.com [156.151.31.74] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 21271 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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). From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 15 19:10:37 2015 Received: (at 21271-done) by debbugs.gnu.org; 15 Aug 2015 23:10:37 +0000 Received: from localhost ([127.0.0.1]:56986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZQkaz-0006ZT-CA for submit@debbugs.gnu.org; Sat, 15 Aug 2015 19:10:37 -0400 Received: from mail-la0-f51.google.com ([209.85.215.51]:36823) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZQkaw-0006ZK-TB for 21271-done@debbugs.gnu.org; Sat, 15 Aug 2015 19:10:35 -0400 Received: by lagz9 with SMTP id z9so60763475lag.3 for <21271-done@debbugs.gnu.org>; Sat, 15 Aug 2015 16:10:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=TBacyt3ATJIVDAwU1xkd1HwiJoroQfcr94HUC3pw1GU=; b=0heN3aRfuSkp1XeCjdEAuN0dQoMKWfOiZTEILI669/B2tk/cCNQD2WlHAa352pJMCy t9wdvsPcDY3a2z+TxlKOzPtrg+8M5Ksn6IIjZZnElkhuKZM9z1X2uAuVtAEv3MwOA+e9 wfjeg8X4jGRE4lcv7QYNw9KDT4xwumn30YyTfVxFg4MfKAjI3ggwTZXD964E+c2xAIIT 5vPDdYbIzPmPw0q3LmJ6hAiWSreKjgeujFK4YmNPwNWEFXb4t5cmb3RGunaMXPbluXhj r77XJ7HU0pj6CewJzh6w2e8pPy4o3z8UKyhrX7w6Qp/6VkGyT1EtuUUwWCVFLTOJyzcV t3Qg== MIME-Version: 1.0 X-Received: by 10.112.210.137 with SMTP id mu9mr48454173lbc.95.1439680233909; Sat, 15 Aug 2015 16:10:33 -0700 (PDT) Received: by 10.25.134.139 with HTTP; Sat, 15 Aug 2015 16:10:33 -0700 (PDT) In-Reply-To: <2ffa4ae9-0ce8-4c29-bebb-9fcd05b5c18c@default> References: <2ffa4ae9-0ce8-4c29-bebb-9fcd05b5c18c@default> Date: Sun, 16 Aug 2015 00:10:33 +0100 X-Google-Sender-Auth: hmbIzTIfdY_9RpqXNha7-LbZz0E Message-ID: Subject: Re: bug#21271: 25.0.5; `field' text-property screws with `line-end-position' From: Artur Malabarba To: Drew Adams Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21271-done Cc: 21271-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: bruce.connor.am@gmail.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Thanks Drew. I was so used to this function and so surprised about this behavior that it didn't even occur to me to read the docstring more carefully. That even explains how to prevent it. I'm closing this now. From unknown Sat Aug 16 11:41:07 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 13 Sep 2015 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator