From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#40053: 28.0; text-property-search-forward skips first region Date: Fri, 13 Mar 2020 19:46:29 +0100 Message-ID: <87h7ysgkje.fsf@gmx.net> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="80348"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 40053@debbugs.gnu.org To: Dustin Lacewell Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 13 20:02:30 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jCpZk-000Kks-Gh for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 13 Mar 2020 20:02:28 +0100 Original-Received: from localhost ([::1]:35748 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCpZj-0002bY-CW for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 13 Mar 2020 15:02:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35934) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCpKq-0001y9-9H for bug-gnu-emacs@gnu.org; Fri, 13 Mar 2020 14:47:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCpKp-0007Ro-9k for bug-gnu-emacs@gnu.org; Fri, 13 Mar 2020 14:47:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54260) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jCpKp-0007RT-2f for bug-gnu-emacs@gnu.org; Fri, 13 Mar 2020 14:47:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jCpKn-0003O3-UX for bug-gnu-emacs@gnu.org; Fri, 13 Mar 2020 14:47:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Mar 2020 18:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40053 X-GNU-PR-Package: emacs Original-Received: via spool by 40053-submit@debbugs.gnu.org id=B40053.158412519912987 (code B ref 40053); Fri, 13 Mar 2020 18:47:01 +0000 Original-Received: (at 40053) by debbugs.gnu.org; 13 Mar 2020 18:46:39 +0000 Original-Received: from localhost ([127.0.0.1]:60233 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jCpKR-0003NP-7N for submit@debbugs.gnu.org; Fri, 13 Mar 2020 14:46:39 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:51795) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jCpKP-0003NA-Bi for 40053@debbugs.gnu.org; Fri, 13 Mar 2020 14:46:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1584125190; bh=TPOMXqPbRMzlNzirZ2ja6Uf7YrpF/Ly9DpmN6Ga5XUo=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=cmWL31/wisXxu+ICPuFtyl9n5bN3bYCS3dPcOjSY9DgrPktr/kOT4cMGmeLx8hgrA /SaeswCXxB2Rznl6z0RyunbDuvr/b+cEHcWIKrYdRFTyLks5FVjZr9ovwfTNPK3GpP fLpz1SRlkJaHji3toMIT4Cp83xhyC7sHK6XO1kug= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from strobe-lfs84 ([178.6.220.14]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M2wKq-1jBjOk2YZQ-003JAn; Fri, 13 Mar 2020 19:46:30 +0100 In-Reply-To: (Dustin Lacewell's message of "Fri, 13 Mar 2020 12:35:25 -0500") X-Provags-ID: V03:K1:Ezonxms/lCvEEu4dFhX4//rPiY8rvoemRcM2W2ylM7Zdc2XZoM4 rXFth1YcOMXMDpy0dcMp6voWdcYVNonM9kQprjOTDmovcGTfH3iWH1FbLZGSBgknHcL4Bys hOzX+8qcRr4ljoxQbLrtmBzG7xyRAF/l0iE22pW2jFJzOZv+mY1+x6dcMUnWPNqCj3x1wc3 RoIVgauZvsC0Ty726s1mQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:gz9QZp/aFh0=:sj7/Oq5KJ0J622aqQABXkn 8xO9gh7MGoyO18nTCGSgjAscqppEUiA6C38Tvu6E+7FbiF47SAjW/18/QimisIuHtOiZKRONi RjtvrALoUK/pWqNYYuYz4e62DxlNhap+ExkgF48eTZW77StD3Gp8IMKuP6+S6uch0rwQzawlW MFi8/jA3tqs4dXL40i6TfbZ6oysreHLZ6HIafGCW7IBmM3VDKDVhEfKqj+KwS+380sWteFet2 cxLaTp4rP4WYXYJd0dv+Mxu0r44Wpt2b1iiBzuwIBtWkHnDJkfAzc/zXV/m37qeBSwKBCu503 uqyRBZTw8fRx1+Z2h9J4wjxD2kNrEHkD6RuCOPl9SOfJVsKd0ASv2tfKMdni8QVDpoitK7md7 D3484C43st8QPzmoeIz9xxPUB5PlzSfAjzbId+hktmTg6SLsdi5cFffKbzJaCuWJXpq3hQa8I eLeD93dqJoPBEr8lx5T/4N1M7S+VZl98NDJuQZ+mBsm/4qcL2EyB5XKhz1lctPbEv1XDMfeZR AkXVLJv3DGm9lRMGMCDKw0SpQjr84UrIXo61GzwithPihFg9X+CTN1VT4xvpVUBr1Do6W3j+p KeVQORGAltWEwx882N+0EI7y4x9EOkcBm6lK6MESVwAibstZPAUdqquR1/wd3IdcwrnCCSKFs K6bB/gP/xlthBmKLSPmnznUycwKgdaHdvdMm4fqOzbJu6WvY1gjFms2G8PQBDvqVXyosg62eD fRfigHae0ncK4Qrmnspvt2nbmg8LSxdjCLS3FEPOInghpGbVq9xG9xS0RuZ/+Bi7TUyOjBYV 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: 209.51.188.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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:177292 Archived-At: On Fri, 13 Mar 2020 12:35:25 -0500 Dustin Lacewell wrote: > The following code does not do what I would expect: > > (with-current-buffer (get-buffer-create "*Test*") > (erase-buffer) > (insert " ") > (insert-text-button "Button1" > 'foo 'bar) > (insert " ") > (insert-text-button "Button2" > 'foo 'bar) > (beginning-of-buffer) > (text-property-search-forward 'foo 'bar nil t) > (display-buffer (current-buffer))) > > I would expect the point to land on the first button. However, it > lands on the second. Actually, if text-property-search-forward succeeds it moves to the end of the propertized region, so in this case, just after the first button. And that's what happens with this sexp: (text-property-search-forward 'foo 'bar t t) But you've called it with the argument PREDICATE nil, which means the search succeeds if the value of the propertized text does not match the VALUE argument, i.e. in this case if 'bar does not match 'bar. Since this is false, the search stops, leaving point at the last position where the value of 'foo changed, which is the beginning of the second button. Steve Berman