From unknown Mon Aug 11 18:54:46 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Jul 2019 09:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 36486 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 36486@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.156214707423916 (code B ref -1); Wed, 03 Jul 2019 09:45:01 +0000 Received: (at submit) by debbugs.gnu.org; 3 Jul 2019 09:44:34 +0000 Received: from localhost ([127.0.0.1]:48389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hiboX-0006Df-Gp for submit@debbugs.gnu.org; Wed, 03 Jul 2019 05:44:33 -0400 Received: from lists.gnu.org ([209.51.188.17]:38169) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hiboU-0006DT-Np for submit@debbugs.gnu.org; Wed, 03 Jul 2019 05:44:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40350) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiboS-0005AG-6x for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2019 05:44:30 -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.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hiboR-0008Ne-AH for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2019 05:44:28 -0400 Received: from mail-wr1-f52.google.com ([209.85.221.52]:38754) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hiboO-00089q-SU for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2019 05:44:27 -0400 Received: by mail-wr1-f52.google.com with SMTP id p11so1998889wro.5 for ; Wed, 03 Jul 2019 02:44:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=1lbWNQx73IEGSdBf1+4kbzccwGDanicn+7D0HGj2h+g=; b=g2mu4KPXb0gLlQiytaucy6nOBjSjo99dpu0ITcrZL6a7jqUGRoURIa+eAARmC+T/3a PAkRxQwenVbBMlfdBI3tfG8ZlQSAxhiHj/zKSgcuE2hUgW63eg1z/4q/SJZQ+nx2IUzF 0p//llFLUEwhvQYt745qQsgfopK0itmAMSqG/+FB2Z9FcY2Nd7xqTHkX0Ig1jWKF12Xv Eb8xhhqaW2Rpxvpenobp9eiOc3HZkzvegNc7ZKQuokWWJK+0EqRnojCc8q1F0QQ+z+in VNGiGAMUGWDJcWov1/+ydThK6ZOPgwxgF8Jr7huG9IA7Mz2fC9y0BJDayczvB01onWXS k8OQ== X-Gm-Message-State: APjAAAUgEiiD/z9dAhyMLHg3UGl5sfhqCdAJb75hUJ9eMTTfhVWD9hcQ 6un6VBj84MKWXYKwouk2pC0UCEmYJI1kO3DjnrXbbA== X-Google-Smtp-Source: APXvYqwdBmkJj53S2POiinETKfnr72BC97s780EWlGdjX2uKbYRTjSe7+Zkkxvn/en/IpOFTqORtW/TszGsmJEOtNF0= X-Received: by 2002:a05:6000:14b:: with SMTP id r11mr3301311wrx.196.1562147061179; Wed, 03 Jul 2019 02:44:21 -0700 (PDT) MIME-Version: 1.0 From: Stefan Kangas Date: Wed, 3 Jul 2019 11:44:09 +0200 Message-ID: Content-Type: multipart/mixed; boundary="000000000000ab3fb0058cc3b40f" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.221.52 X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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 (--) --000000000000ab3fb0058cc3b40f Content-Type: text/plain; charset="UTF-8" Attached is a patch with additional test cases for text-property-search which checks the returned match object. Unlike older test cases, these also check the value of prop-match-value. Thanks, Stefan Kangas --000000000000ab3fb0058cc3b40f Content-Type: application/octet-stream; name="0001-Add-tests-for-text-property-search-to-check-prop-mat.patch" Content-Disposition: attachment; filename="0001-Add-tests-for-text-property-search-to-check-prop-mat.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jxn20i4o0 RnJvbSBkODYzODJiYjI1NmJiYjM4MDgzNTE2NjY3NjRjYjEyNzY0NzAxNmQyIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBTdGVmYW4gS2FuZ2FzIDxzdGVmYW5rYW5nYXNAZ21haWwuY29t PgpEYXRlOiBNb24sIDEgSnVsIDIwMTkgMjM6MTQ6NTYgKzAyMDAKU3ViamVjdDogW1BBVENIXSBB ZGQgdGVzdHMgZm9yIHRleHQtcHJvcGVydHktc2VhcmNoIHRvIGNoZWNrIHByb3AtbWF0Y2gtdmFs dWUKCiogdGVzdC9saXNwL2VtYWNzLWxpc3AvdGV4dC1wcm9wZXJ0eS1zZWFyY2gtdGVzdHMuZWwK KHdpdGgtbWF0Y2gtdGVzdCk6IE5ldyBtYWNyby4KKHRleHQtcHJvcGVydHktc2VhcmNoLWZvcndh cmQtcHJvcC1tYXRjaC1tYXRjaC1mYWNlLW5pbC1uaWwpCih0ZXh0LXByb3BlcnR5LXNlYXJjaC1m b3J3YXJkLXByb3AtbWF0Y2gtbWF0Y2gtZmFjZS1ib2xkLXQpCih0ZXh0LXByb3BlcnR5LXNlYXJj aC1mb3J3YXJkLXByb3AtbWF0Y2gtbWF0Y2gtZmFjZS1ib2xkLW5pbCkKKHRleHQtcHJvcGVydHkt c2VhcmNoLWJhY2t3YXJkLXByb3AtbWF0Y2gtbWF0Y2gtZmFjZS1uaWwtbmlsKQoodGV4dC1wcm9w ZXJ0eS1zZWFyY2gtYmFja3dhcmQtcHJvcC1tYXRjaC1tYXRjaC1mYWNlLWl0YWxpYy10KQoodGV4 dC1wcm9wZXJ0eS1zZWFyY2gtYmFja3dhcmQtcHJvcC1tYXRjaC1tYXRjaC1mYWNlLWl0YWxpYy1u aWwpOgpBZGQgdGVzdCBjYXNlcyB0byBhbHNvIHZlcmlmeSB0aGUgdmFsdWUgb2YgcHJvcC1tYXRj aC12YWx1ZS4KLS0tCiAuLi4vZW1hY3MtbGlzcC90ZXh0LXByb3BlcnR5LXNlYXJjaC10ZXN0cy5l bCAgfCA0MyArKysrKysrKysrKysrKysrKysrCiAxIGZpbGUgY2hhbmdlZCwgNDMgaW5zZXJ0aW9u cygrKQoKZGlmZiAtLWdpdCBhL3Rlc3QvbGlzcC9lbWFjcy1saXNwL3RleHQtcHJvcGVydHktc2Vh cmNoLXRlc3RzLmVsIGIvdGVzdC9saXNwL2VtYWNzLWxpc3AvdGV4dC1wcm9wZXJ0eS1zZWFyY2gt dGVzdHMuZWwKaW5kZXggNDdkYjU0YTA1MS4uMjFhMjVjNzgzNSAxMDA2NDQKLS0tIGEvdGVzdC9s aXNwL2VtYWNzLWxpc3AvdGV4dC1wcm9wZXJ0eS1zZWFyY2gtdGVzdHMuZWwKKysrIGIvdGVzdC9s aXNwL2VtYWNzLWxpc3AvdGV4dC1wcm9wZXJ0eS1zZWFyY2gtdGVzdHMuZWwKQEAgLTEwOCw2ICsx MDgsNDkgQEAgdGV4dC1wcm9wZXJ0eS1zZWFyY2gtYmFja3dhcmQtcGFydGlhbC1ub24tY3VycmVu dC1ib2xkLXQKICAgICAgICAgICAgICAnKCJib2xkMSIpCiAgICAgICAgICAgICAgMzUpKQogCiso ZGVmbWFjcm8gd2l0aC1tYXRjaC10ZXN0IChmb3JtIGJlZ2lubmluZyBlbmQgdmFsdWUgJm9wdGlv bmFsIHBvaW50KQorICBgKHdpdGgtdGVtcC1idWZmZXIKKyAgICAgKHRleHQtcHJvcGVydHktc2V0 dXApCisgICAgICh3aGVuICxwb2ludAorICAgICAgIChnb3RvLWNoYXIgLHBvaW50KSkKKyAgICAg KHNob3VsZCAoZXF1YWwgLGZvcm0KKyAgICAgICAgICAgICAgICAgICAgKG1ha2UtcHJvcC1tYXRj aCA6YmVnaW5uaW5nICxiZWdpbm5pbmcKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA6ZW5kICxlbmQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6dmFs dWUgLHZhbHVlKSkpKSkKKworKGVydC1kZWZ0ZXN0IHRleHQtcHJvcGVydHktc2VhcmNoLWZvcndh cmQtcHJvcC1tYXRjaC1tYXRjaC1mYWNlLW5pbC1uaWwgKCkKKyAgKHdpdGgtbWF0Y2gtdGVzdAor ICAgKHRleHQtcHJvcGVydHktc2VhcmNoLWZvcndhcmQgJ2ZhY2UgbmlsIG5pbCkKKyAgIDkgMTQg J2JvbGQpKQorCisoZXJ0LWRlZnRlc3QgdGV4dC1wcm9wZXJ0eS1zZWFyY2gtZm9yd2FyZC1wcm9w LW1hdGNoLW1hdGNoLWZhY2UtYm9sZC10ICgpCisgICh3aXRoLW1hdGNoLXRlc3QKKyAgICh0ZXh0 LXByb3BlcnR5LXNlYXJjaC1mb3J3YXJkICdmYWNlICdib2xkIHQpCisgICA5IDE0ICdib2xkKSkK KworKGVydC1kZWZ0ZXN0IHRleHQtcHJvcGVydHktc2VhcmNoLWZvcndhcmQtcHJvcC1tYXRjaC1t YXRjaC1mYWNlLWJvbGQtbmlsICgpCisgICh3aXRoLW1hdGNoLXRlc3QKKyAgICh0ZXh0LXByb3Bl cnR5LXNlYXJjaC1mb3J3YXJkICdmYWNlICdib2xkIG5pbCkKKyAgIDEgOSBuaWwpKQorCisoZXJ0 LWRlZnRlc3QgdGV4dC1wcm9wZXJ0eS1zZWFyY2gtYmFja3dhcmQtcHJvcC1tYXRjaC1tYXRjaC1m YWNlLW5pbC1uaWwgKCkKKyAgKHdpdGgtbWF0Y2gtdGVzdAorICAgKHRleHQtcHJvcGVydHktc2Vh cmNoLWJhY2t3YXJkICdmYWNlIG5pbCBuaWwpCisgICAzOSA0NiAnaXRhbGljCisgICAocG9pbnQt bWF4KSkpCisKKyhlcnQtZGVmdGVzdCB0ZXh0LXByb3BlcnR5LXNlYXJjaC1iYWNrd2FyZC1wcm9w LW1hdGNoLW1hdGNoLWZhY2UtaXRhbGljLXQgKCkKKyAgKHdpdGgtbWF0Y2gtdGVzdAorICAgKHRl eHQtcHJvcGVydHktc2VhcmNoLWJhY2t3YXJkICdmYWNlICdpdGFsaWMgdCkKKyAgIDM5IDQ2ICdp dGFsaWMKKyAgIChwb2ludC1tYXgpKSkKKworKGVydC1kZWZ0ZXN0IHRleHQtcHJvcGVydHktc2Vh cmNoLWJhY2t3YXJkLXByb3AtbWF0Y2gtbWF0Y2gtZmFjZS1pdGFsaWMtbmlsICgpCisgICh3aXRo LW1hdGNoLXRlc3QKKyAgICh0ZXh0LXByb3BlcnR5LXNlYXJjaC1iYWNrd2FyZCAnZmFjZSAnaXRh bGljIG5pbCkKKyAgIDQ2IDU3IG5pbAorICAgKHBvaW50LW1heCkpKQorCiAocHJvdmlkZSAndGV4 dC1wcm9wZXJ0eS1zZWFyY2gtdGVzdHMpCiAKIDs7OyB0ZXh0LXByb3BlcnR5LXNlYXJjaC10ZXN0 cy5lbCBlbmRzIGhlcmUKLS0gCjIuMjEuMAoK --000000000000ab3fb0058cc3b40f-- From unknown Mon Aug 11 18:54:46 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Jul 2019 14:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36486 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Kangas Cc: 36486@debbugs.gnu.org Received: via spool by 36486-submit@debbugs.gnu.org id=B36486.1562423146475 (code B ref 36486); Sat, 06 Jul 2019 14:26:01 +0000 Received: (at 36486) by debbugs.gnu.org; 6 Jul 2019 14:25:46 +0000 Received: from localhost ([127.0.0.1]:55686 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjldK-00007V-Iv for submit@debbugs.gnu.org; Sat, 06 Jul 2019 10:25:46 -0400 Received: from quimby.gnus.org ([80.91.231.51]:53402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjldI-00007M-6u for 36486@debbugs.gnu.org; Sat, 06 Jul 2019 10:25:44 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hjld9-0005H5-Gv; Sat, 06 Jul 2019 16:25:37 +0200 From: Lars Ingebrigtsen References: Date: Sat, 06 Jul 2019 16:25:35 +0200 In-Reply-To: (Stefan Kangas's message of "Wed, 3 Jul 2019 11:44:09 +0200") Message-ID: <87pnmndyu8.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Kangas writes: > Attached is a patch with additional test cases for > text-property-search which checks the returned match object. Unlike > older test cases, these also check the value of prop-match-value. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) Stefan Kangas writes: > Attached is a patch with additional test cases for > text-property-search which checks the returned match object. Unlike > older test cases, these also check the value of prop-match-value. Looks good; I've now applied them to the trunk. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 06 10:25:48 2019 Received: (at control) by debbugs.gnu.org; 6 Jul 2019 14:25:48 +0000 Received: from localhost ([127.0.0.1]:55688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjldL-00007m-Sm for submit@debbugs.gnu.org; Sat, 06 Jul 2019 10:25:48 -0400 Received: from quimby.gnus.org ([80.91.231.51]:53416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjldK-00007U-EC for control@debbugs.gnu.org; Sat, 06 Jul 2019 10:25:46 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hjldH-0005HA-TN for control@debbugs.gnu.org; Sat, 06 Jul 2019 16:25:45 +0200 Date: Sat, 06 Jul 2019 16:25:43 +0200 Message-Id: <87o927dyu0.fsf@mouse.gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #36486 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 36486 fixed close 36486 27.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) tags 36486 fixed close 36486 27.1 quit From unknown Mon Aug 11 18:54:46 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Jul 2019 23:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36486 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch fixed To: Lars Ingebrigtsen Cc: 36486@debbugs.gnu.org, Stefan Kangas Received: via spool by 36486-submit@debbugs.gnu.org id=B36486.156254057617715 (code B ref 36486); Sun, 07 Jul 2019 23:03:01 +0000 Received: (at 36486) by debbugs.gnu.org; 7 Jul 2019 23:02:56 +0000 Received: from localhost ([127.0.0.1]:57531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkGBM-0004be-5Q for submit@debbugs.gnu.org; Sun, 07 Jul 2019 19:02:56 -0400 Received: from bird.elm.relay.mailchannels.net ([23.83.212.17]:18101) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkGBK-0004bV-8J for 36486@debbugs.gnu.org; Sun, 07 Jul 2019 19:02:55 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id BE2C7501450; Sun, 7 Jul 2019 23:02:52 +0000 (UTC) Received: from pdx1-sub0-mail-a86.g.dreamhost.com (100-96-8-155.trex.outbound.svc.cluster.local [100.96.8.155]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 4BCFE5012E4; Sun, 7 Jul 2019 23:02:51 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a86.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.3); Sun, 07 Jul 2019 23:02:52 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Daffy-Ski: 622e59050cdd9ce4_1562540572583_3023426718 X-MC-Loop-Signature: 1562540572583:603557842 X-MC-Ingress-Time: 1562540572582 Received: from pdx1-sub0-mail-a86.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a86.g.dreamhost.com (Postfix) with ESMTP id 0D07E80172; Sun, 7 Jul 2019 16:02:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=vAuKkecTGR7omYnsgKWgxtzg3PI=; b= VotRsi5sCjILNOThWxjenK3CpjF3lxaVikLEapkxamDWY1D7PlS6hP4OY0WdE8MC Sa1g3Y7FvVa30dAq6qnYjjK8a3OLjwNWzyLNWUPeAUXN/LpmlQoq+oC2BKxule16 TZDPffSrnce3/1BTfCDakzt9e4QBnY7rJXcqnePCr6U= Received: from mail.jurta.org (m91-129-109-127.cust.tele2.ee [91.129.109.127]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a86.g.dreamhost.com (Postfix) with ESMTPSA id BA9BE80179; Sun, 7 Jul 2019 16:02:43 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a86 From: Juri Linkov Organization: LINKOV.NET References: <87pnmndyu8.fsf@mouse.gnus.org> Date: Mon, 08 Jul 2019 01:59:22 +0300 In-Reply-To: <87pnmndyu8.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Sat, 06 Jul 2019 16:25:35 +0200") Message-ID: <87pnmlzbzt.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrfeelgddugecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehmtderredtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtledruddvjeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdelrdduvdejpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheplhgrrhhsihesghhnuhhsrdhorhhgnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) --=-=-= Content-Type: text/plain >> Attached is a patch with additional test cases for >> text-property-search which checks the returned match object. Unlike >> older test cases, these also check the value of prop-match-value. > > Looks good; I've now applied them to the trunk. BTW, I tried to use text-property-search as a command interactively, but it lacks support for reading the second argument VALUE. Here is the patch that implements it: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=text-property-search-value.patch diff --git a/lisp/emacs-lisp/text-property-search.el b/lisp/emacs-lisp/text-property-search.el index 41ca07057e..5027bc406c 100644 --- a/lisp/emacs-lisp/text-property-search.el +++ b/lisp/emacs-lisp/text-property-search.el @@ -54,10 +54,14 @@ text-property-search-forward that's matching), and `prop-match-value' (the value of PROPERTY at the start of the region)." (interactive - (list - (let ((string (completing-read "Search for property: " obarray))) - (when (> (length string) 0) - (intern string obarray))))) + (let* ((property (completing-read "Search for property: " obarray)) + (property (when (> (length property) 0) + (intern property obarray))) + (value (when property + (completing-read "Search for property value: " obarray))) + (value (when (> (length value) 0) + (intern value obarray)))) + (list property value))) (cond ;; No matches at the end of the buffer. ((eobp) --=-=-=-- From unknown Mon Aug 11 18:54:46 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Jul 2019 16:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36486 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch fixed To: Juri Linkov Cc: 36486@debbugs.gnu.org, Stefan Kangas Received: via spool by 36486-submit@debbugs.gnu.org id=B36486.15626027208406 (code B ref 36486); Mon, 08 Jul 2019 16:19:01 +0000 Received: (at 36486) by debbugs.gnu.org; 8 Jul 2019 16:18:40 +0000 Received: from localhost ([127.0.0.1]:59370 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkWLg-0002BU-If for submit@debbugs.gnu.org; Mon, 08 Jul 2019 12:18:40 -0400 Received: from quimby.gnus.org ([80.91.231.51]:58142) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkWLe-0002BM-UT for 36486@debbugs.gnu.org; Mon, 08 Jul 2019 12:18:39 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hkWLY-0003Ec-Gk; Mon, 08 Jul 2019 18:18:34 +0200 From: Lars Ingebrigtsen References: <87pnmndyu8.fsf@mouse.gnus.org> <87pnmlzbzt.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEUCDDPo6NwQG0ALFTsA Bi3+/u4GEDY+R2UazpW6AAACZklEQVQ4jYWUQW/bMAyFCTlQzj0IuXpUZ181qVCuxmLk7oPhq2IX 6rVzmunv70lxtw4bNgaGDH0mH8lQoodhUOMw/mGk/tz7D3hQGX3Aw/2dmLlNKT3AxuGQDqmYGqnP tuuqGPfjtOs3+7yBYl/H6Smvkvb+d6Am5/t9wuv500hdiPE5xFOIs5qO6bF9eez77ksGPhLgBt5S egO4jHTW1lpttbazGub18bpu4KPGYNmIFqmdEerEPLN2FosazHN3TLwroFuiW5bFOWcBeseJeScR qotxwQ+WPSTbdLVPFdI9QxptwQOPWnznlrmWCNVTsR1JAVA1dmVuMjizZfhoLADGaG64yhpnSDu7 aOetmsyTEfzKp03cOY+sFoAmaAFf2VxKqDULwtTExPPKwmiAEwpAo0q6E1dNvLJ4nS+l8pyry+lm EFamq8gaqMNtWR1YNIGbijkDHzeDBz4Irq5YbHVwebJ4srqx87Et6cq7QwXxNrkgAh3TReVeZXnH 1qqDrT0JQ41+GUliV5fEIO6pocWQkceRKJZYstRhgiG/gRP/NLSEsGsoZtDdpcO9V1STDxSpLVOC At1dI4OAaaJjqcOWOnQJVUuTwYuijqSUIbcR4hq6MSIUwPld2ubKo8FH+KePahP3Po/PpGUtKYea 4eFcg3lz7Fz2qKtfwOp7D7UaWCNOQCiAvoN+Hh+SAGxFTdYUj/vwoI76NvB+5dC5uRbwiKH0ffHx NmixdvCvwpKBlNFXfvHhNukYUBAiO1XOhw8aUnQbXsu45gOq6DmfReZyuIf0LW2mKJ/893vh4/Xx r7vk7+AHYDoITYamAOAAAAAASUVORK5CYII= Date: Mon, 08 Jul 2019 18:18:32 +0200 In-Reply-To: <87pnmlzbzt.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 08 Jul 2019 01:59:22 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: > + (let* ((property (completing-read "Search for property: " obarray)) > + (property (when (> (length property) 0) > + (intern property obarray))) > + (value (when property > + (completing-read "Sear [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) Juri Linkov writes: > + (let* ((property (completing-read "Search for property: " obarray)) > + (property (when (> (length property) 0) > + (intern property obarray))) > + (value (when property > + (completing-read "Search for property value: " obarray))) > + (value (when (> (length value) 0) > + (intern value obarray)))) Hm... well, the value doesn't have to be a symbol, so I don't think this is quite right -- it could be a string, or, well, anything. I think that's why it doesn't prompt for value in the interactive form, because it didn't seem useful. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Aug 11 18:54:46 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Jul 2019 21:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36486 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch fixed To: Lars Ingebrigtsen Cc: 36486@debbugs.gnu.org, Stefan Kangas Received: via spool by 36486-submit@debbugs.gnu.org id=B36486.156262134025701 (code B ref 36486); Mon, 08 Jul 2019 21:29:01 +0000 Received: (at 36486) by debbugs.gnu.org; 8 Jul 2019 21:29:00 +0000 Received: from localhost ([127.0.0.1]:59746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkbC0-0006gS-Hs for submit@debbugs.gnu.org; Mon, 08 Jul 2019 17:29:00 -0400 Received: from bird.elm.relay.mailchannels.net ([23.83.212.17]:27415) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkbBz-0006gJ-Gc for 36486@debbugs.gnu.org; Mon, 08 Jul 2019 17:28:59 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 97D45142D2C; Mon, 8 Jul 2019 21:28:58 +0000 (UTC) Received: from pdx1-sub0-mail-a97.g.dreamhost.com (100-96-1-102.trex.outbound.svc.cluster.local [100.96.1.102]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 23517142E1A; Mon, 8 Jul 2019 21:28:58 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a97.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.3); Mon, 08 Jul 2019 21:28:58 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Cure-Keen: 0bf96eab746402fd_1562621338415_1284711258 X-MC-Loop-Signature: 1562621338415:2226536303 X-MC-Ingress-Time: 1562621338415 Received: from pdx1-sub0-mail-a97.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a97.g.dreamhost.com (Postfix) with ESMTP id 6325681FCE; Mon, 8 Jul 2019 14:28:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=MMJE9d+fIOeNCE9rl0ojZXXUuzg=; b= gqZYN5A/5EhUD9cLv6w+vyr11BpDRvGlAcdJLMZ0cBUuDz5ad2Wreorb65FzOXpP q8AnYidlIxrRU7XGaXFMmEU9NoyarfIu7L8y1YzaCfhb1hcfPXD0eaNew2689npg eQZSF2dAm9Ncp9wJJvDVS1PhK2nb8BpJA8aGLXEBAMs= Received: from mail.jurta.org (m91-129-109-127.cust.tele2.ee [91.129.109.127]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a97.g.dreamhost.com (Postfix) with ESMTPSA id 6C80781FC3; Mon, 8 Jul 2019 14:28:48 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a97 From: Juri Linkov Organization: LINKOV.NET References: <87pnmndyu8.fsf@mouse.gnus.org> <87pnmlzbzt.fsf@mail.linkov.net> Date: Mon, 08 Jul 2019 23:51:57 +0300 In-Reply-To: (Lars Ingebrigtsen's message of "Mon, 08 Jul 2019 18:18:32 +0200") Message-ID: <874l3w5jwy.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrgedtgdduieehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdelrdduvdejnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtledruddvjedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehlrghrshhisehgnhhushdrohhrghenucevlhhushhtvghrufhiiigvpedu X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) >> + (let* ((property (completing-read "Search for property: " obarray)) >> + (property (when (> (length property) 0) >> + (intern property obarray))) >> + (value (when property >> + (completing-read "Search for property value: " obarray))) >> + (value (when (> (length value) 0) >> + (intern value obarray)))) > > Hm... well, the value doesn't have to be a symbol, so I don't think > this is quite right -- it could be a string, or, well, anything. I > think that's why it doesn't prompt for value in the interactive form, > because it didn't seem useful. But searching for a certain font-lock face value is the most useful application of this command. How do you do that? From unknown Mon Aug 11 18:54:46 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Jul 2019 21:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36486 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch fixed To: Juri Linkov Cc: 36486@debbugs.gnu.org, Stefan Kangas Received: via spool by 36486-submit@debbugs.gnu.org id=B36486.156262288612250 (code B ref 36486); Mon, 08 Jul 2019 21:55:02 +0000 Received: (at 36486) by debbugs.gnu.org; 8 Jul 2019 21:54:46 +0000 Received: from localhost ([127.0.0.1]:59796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkbav-0003BW-V6 for submit@debbugs.gnu.org; Mon, 08 Jul 2019 17:54:46 -0400 Received: from quimby.gnus.org ([80.91.231.51]:34250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkbau-0003BO-6F for 36486@debbugs.gnu.org; Mon, 08 Jul 2019 17:54:44 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hkbam-0005Yo-LT; Mon, 08 Jul 2019 23:54:38 +0200 From: Lars Ingebrigtsen References: <87pnmndyu8.fsf@mouse.gnus.org> <87pnmlzbzt.fsf@mail.linkov.net> <874l3w5jwy.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEXw4sqykINZDASXcGD+ /OtyPB/SuK5HtkdZAAACfElEQVQ4jXWTsXLbMAyG4ZrVLEaq5oY5d7ZKyTN5wXFOlCgzWat4/0fo D8pxlxZ3uVD8APwAAVO00Q+ZmmLtsvHBW5FshsNGJTYi0gH+chc7SiZq8sY9bSngerTZPLhHhBIV n/vQE3OaEZ+p/HQvBu6dtdvlakgkjlYaa+2De4G7hYiJAwMkEeu9zV/ci9jB5qb0FoBDEEgg+283 iNRcW4tUjUWJNpPgj4MJxQ+y9Wmj4Zwg3XTjxjBoSRbTh40u5yBNQV16z0W0174tSNVRgUTJFQQE db63mWm8RH0G2cxOUK81LVKZmGxGwb0CaA+SszlElJsIlVsxCiigDmjEC9N2DI0dpAEIcCMS9MET 01XLRRc30CCXGAUck+TSWVaQWJ+TDPcK4A4vVo3EotPZ4siUS7Kd9ziZQAf+tr6t63REHaWNfvZv r0EjIs+L9+sUkUq647rO62vIFSAYgIUptc8r7KPBLPmZZ2SdJylMlxArSLdU8zr4KW1M1h7/RkSa 9WNqk6HRV7A+BQUOJ2gMANxUsDzp2z47rXadus6QPVfx5VFBPNXoaTgYaveq1h+aKq07yNFgfMfF wfEDLwSNau9GNcKxfnzXt0s3ENC5PXz9BHwH6Vw7rx9nTRVQhYJnbGIZjjcAAlAjDhajpBpxanGi gICTW94FK5pu4hWQgtW952Aoph3kCua9j4JUh+ZaFes9/VwXBYK9Emy7mv4Q5B5xZfK+VDA737mx Hv2ETaZo4v5Aznu332OCWIZktNwTZMDWz0dkneDVnXDrXGW1wUm3SadzWrSu2sMeMfEOdlPvG8DG 6jLcwWfI1NaI6O827//6iyj4h0n+D4D9AehP82BHjrQVAAAAAElFTkSuQmCC Date: Mon, 08 Jul 2019 23:54:36 +0200 In-Reply-To: <874l3w5jwy.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 08 Jul 2019 23:51:57 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: > But searching for a certain font-lock face value is the most useful > application of this command. How do you do that? Non-interactively? Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) Juri Linkov writes: > But searching for a certain font-lock face value is the most useful > application of this command. How do you do that? Non-interactively? (I've never used it to search for any faces. :-)) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Aug 11 18:54:46 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Jul 2019 20:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36486 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch fixed To: Lars Ingebrigtsen Cc: 36486@debbugs.gnu.org, Stefan Kangas Received: via spool by 36486-submit@debbugs.gnu.org id=B36486.156270464124441 (code B ref 36486); Tue, 09 Jul 2019 20:38:02 +0000 Received: (at 36486) by debbugs.gnu.org; 9 Jul 2019 20:37:21 +0000 Received: from localhost ([127.0.0.1]:34358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkwrY-0006M9-UX for submit@debbugs.gnu.org; Tue, 09 Jul 2019 16:37:21 -0400 Received: from cheetah.birch.relay.mailchannels.net ([23.83.209.34]:14389) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkwrW-0006Lz-R6 for 36486@debbugs.gnu.org; Tue, 09 Jul 2019 16:37:19 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id C43461A2245; Tue, 9 Jul 2019 20:37:17 +0000 (UTC) Received: from pdx1-sub0-mail-a78.g.dreamhost.com (100-96-11-126.trex.outbound.svc.cluster.local [100.96.11.126]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 3E1711A23FB; Tue, 9 Jul 2019 20:37:17 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a78.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.3); Tue, 09 Jul 2019 20:37:17 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Stop-Sponge: 256e51ae73b6cc07_1562704637517_1028455349 X-MC-Loop-Signature: 1562704637517:3783696249 X-MC-Ingress-Time: 1562704637517 Received: from pdx1-sub0-mail-a78.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a78.g.dreamhost.com (Postfix) with ESMTP id DE16883DC2; Tue, 9 Jul 2019 13:37:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=fVkX3V6FEVEZrnfWuSGfI5UwDJc=; b= x7PJHnwhuFG5D8JXbx39d7Ssy3A4OE2P5P2j7B7sNxuGdGAXlV0Gus+VrHNpuNUq Pa/p3tZVd8NJ+FLiT7P1mVDv5xdUy5VMel2H/mm8s4VB2SbyGRWs3CKjffFaLG7Z utiwoMq+BdXYJyAP3RXU6M0iS5IwSOx3H8nOmkOZUt4= Received: from mail.jurta.org (m91-129-109-127.cust.tele2.ee [91.129.109.127]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a78.g.dreamhost.com (Postfix) with ESMTPSA id 98FE183DCD; Tue, 9 Jul 2019 13:37:09 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a78 From: Juri Linkov Organization: LINKOV.NET References: <87pnmndyu8.fsf@mouse.gnus.org> <87pnmlzbzt.fsf@mail.linkov.net> <874l3w5jwy.fsf@mail.linkov.net> Date: Tue, 09 Jul 2019 23:31:05 +0300 In-Reply-To: (Lars Ingebrigtsen's message of "Mon, 08 Jul 2019 23:54:36 +0200") Message-ID: <87r26zgdbq.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrgeefgdduiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehmtderredtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtledruddvjeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdelrdduvdejpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheplhgrrhhsihesghhnuhhsrdhorhhgnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) --=-=-= Content-Type: text/plain >> But searching for a certain font-lock face value is the most useful >> application of this command. How do you do that? > > Non-interactively? > > (I've never used it to search for any faces. :-)) It is useful interactively to find errors fontified with the error face. Here is a better patch that can read symbols as well as strings: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=text-property-search-value.2.patch diff --git a/lisp/emacs-lisp/text-property-search.el b/lisp/emacs-lisp/text-property-search.el index 41ca07057e..9c45cee3c1 100644 --- a/lisp/emacs-lisp/text-property-search.el +++ b/lisp/emacs-lisp/text-property-search.el @@ -54,10 +54,13 @@ text-property-search-forward that's matching), and `prop-match-value' (the value of PROPERTY at the start of the region)." (interactive - (list - (let ((string (completing-read "Search for property: " obarray))) - (when (> (length string) 0) - (intern string obarray))))) + (let* ((property (completing-read "Search for property: " obarray)) + (property (when (> (length property) 0) + (intern property obarray))) + (value (when property + (read-from-minibuffer "Search for property value: " + nil nil t nil "nil")))) + (list property value))) (cond ;; No matches at the end of the buffer. ((eobp) --=-=-=-- From unknown Mon Aug 11 18:54:46 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Jul 2019 21:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36486 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch fixed To: Juri Linkov Cc: 36486@debbugs.gnu.org, Stefan Kangas Received: via spool by 36486-submit@debbugs.gnu.org id=B36486.15627091507394 (code B ref 36486); Tue, 09 Jul 2019 21:53:01 +0000 Received: (at 36486) by debbugs.gnu.org; 9 Jul 2019 21:52:30 +0000 Received: from localhost ([127.0.0.1]:34416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hky2H-0001vC-MW for submit@debbugs.gnu.org; Tue, 09 Jul 2019 17:52:29 -0400 Received: from quimby.gnus.org ([80.91.231.51]:54180) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hky2E-0001v1-Eh for 36486@debbugs.gnu.org; Tue, 09 Jul 2019 17:52:28 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hky29-0001HL-FL; Tue, 09 Jul 2019 23:52:23 +0200 From: Lars Ingebrigtsen References: <87pnmndyu8.fsf@mouse.gnus.org> <87pnmlzbzt.fsf@mail.linkov.net> <874l3w5jwy.fsf@mail.linkov.net> <87r26zgdbq.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAD1BMVEVsLRYFAQIKAgMsCQoS AwXLpAKXAAACUklEQVQ4jW2UDZLrKAyEey0OELAPYH4OwFgcwAbuf6Ztkcm8ebWrVCpGn1sISQQQ VW38Ksy4GtMM5tI5x/qtXLb5BvPnkVbl5xHzlw38eQfHL/BLMBH+B6RUJvxfkVKK3qeYUvoLNHrN YgoJsXz8314qGGki/gg+fh8W8J8Mn4+XFkNBkf8IyvuA+Oygnx0MVYQ36H6XdyRfZk8ZOOQ7UF0g hh7TrC0huYvS6I9qodLxhNkP6EQXrAOMzBfCEedThli6J5xn/HEy3+N4ZpjxRmOtXvjH+xd26f4J Tzt6qeznTHhVghOMdDl/jaQRklY/1I58bvslzo/jypJ1HlYSDV+FQULbN6VgyDW0Wz+SH5WJBe9v BqnbHEVbJwjpNJC8z13L6KKUWCifT0EqPbBx7FC5mNMbHLfDGKvVb7syx8yicwDvpsPmK+VUUmkc NjwGcps8VZWW9Upptsl8Hr8Dw5XNCVwbNrIMNGCbQ0q/nKLKyGiccIAr9gYuZE55vSVnuDkEoIT1 yKyF1nHeyDzbgFQOOkH0s9RKQMja8iqMBfbmZ8Z96616dbqx7hGekFUG7ipV5LqARkAJhl0wLpiI w3ZpdVUsFlIloFxcc3AEcovFQsxWkerEXQ7d7iKBGLDh0sqD85PSqNSsCxx5Bui9CZr0knKFrGsN axzcizVoLdWeLV+GsJLsgm2nfLJqWzaf1jeg0ID3wKa/QFhgdBsKqQvoAtvLZj74rGtjtfcX0BMI X36/TWEa2EFYxEDAgT7vfBvAt8WDk4uvIy/AVKVV+6f6FxumpgkVXDvMAAAAAElFTkSuQmCC Date: Tue, 09 Jul 2019 23:52:21 +0200 In-Reply-To: <87r26zgdbq.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 09 Jul 2019 23:31:05 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: > It is useful interactively to find errors fontified > with the error face. Here is a better patch that > can read symbols as well as strings: [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) Juri Linkov writes: > It is useful interactively to find errors fontified > with the error face. Here is a better patch that > can read symbols as well as strings: [...] > + (value (when property > + (read-from-minibuffer "Search for property value: " > + nil nil t nil "nil")))) > + (list property value))) I don't understand -- this will still return a symbol. (And error out if you enter stuff like "foo bar".) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Aug 11 18:54:46 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Jul 2019 22:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36486 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch fixed To: Lars Ingebrigtsen Cc: 36486@debbugs.gnu.org, Stefan Kangas Received: via spool by 36486-submit@debbugs.gnu.org id=B36486.156279816916162 (code B ref 36486); Wed, 10 Jul 2019 22:37:01 +0000 Received: (at 36486) by debbugs.gnu.org; 10 Jul 2019 22:36:09 +0000 Received: from localhost ([127.0.0.1]:36784 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlLC5-0004Cc-GR for submit@debbugs.gnu.org; Wed, 10 Jul 2019 18:36:09 -0400 Received: from bonobo.elm.relay.mailchannels.net ([23.83.212.22]:65287) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlLC0-0004CR-Nv for 36486@debbugs.gnu.org; Wed, 10 Jul 2019 18:36:08 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 5E2495E1DE9; Wed, 10 Jul 2019 22:36:03 +0000 (UTC) Received: from pdx1-sub0-mail-a30.g.dreamhost.com (100-96-1-113.trex.outbound.svc.cluster.local [100.96.1.113]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id E5D915E2AA5; Wed, 10 Jul 2019 22:36:02 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a30.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.3); Wed, 10 Jul 2019 22:36:03 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Lettuce-Abaft: 24510f83555fa1e2_1562798163206_2334662457 X-MC-Loop-Signature: 1562798163206:112917507 X-MC-Ingress-Time: 1562798163206 Received: from pdx1-sub0-mail-a30.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a30.g.dreamhost.com (Postfix) with ESMTP id 9622B82E3F; Wed, 10 Jul 2019 15:35:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=linkov.net; bh=3M6Js2 VFEMKi8o6YOSZ/m9ME7L8=; b=t5Mwvx3s/uzukjDzJ7w2znpKEa7aBJzucYVKEt kpsCP1v5pS41eQkEXeF8lqwhdEDn979fHJ4pXJNlhGiAYEk/Zvweze/DMKUVF3mN /hxegZqFXAgU/4tMpUMSrK3cf3jfn32eX4bLL8BnwI8J84RVY1VDF8eFOG3dR66u z+HAw= Received: from mail.jurta.org (m91-129-110-101.cust.tele2.ee [91.129.110.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a30.g.dreamhost.com (Postfix) with ESMTPSA id 0FC2082E43; Wed, 10 Jul 2019 15:35:53 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a30 From: Juri Linkov Organization: LINKOV.NET References: <87pnmndyu8.fsf@mouse.gnus.org> <87pnmlzbzt.fsf@mail.linkov.net> <874l3w5jwy.fsf@mail.linkov.net> <87r26zgdbq.fsf@mail.linkov.net> Date: Thu, 11 Jul 2019 01:29:45 +0300 In-Reply-To: (Lars Ingebrigtsen's message of "Tue, 09 Jul 2019 23:52:21 +0200") Message-ID: <87o921mskm.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrgeejgdduvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtgfesthekredttderjeenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrdduuddtrddutddunecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddutddruddtuddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehlrghrshhisehgnhhushdrohhrghenucevlhhushhtvghrufhiiigvpedt Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) >> It is useful interactively to find errors fontified >> with the error face. Here is a better patch that >> can read symbols as well as strings: > > [...] > >> + (value (when property >> + (read-from-minibuffer "Search for property value: = " >> + nil nil t nil "nil")))) >> + (list property value))) > > I don't understand -- this will still return a symbol. (And error out > if you enter stuff like "foo bar".) Yes, entering a symbol returns a symbol, entering a string like "foo bar" returns a string "foo bar" literally. Currently text-property-search-forward has more problems: today I needed to search the property =E2=80=98face=E2=80=99 with the val= ue =E2=80=98hi-yellow=E2=80=99 in the buffer with regexps highlighted by hi-= lock.el. Executing interactively: M-x text-property-search-forward RET face RET hi-yellow RET failed to find the property because all hi-lock occurrences were combined with font-lock text properties, i.e. all they had the property =E2=80=98face=E2=80=99 with the value =E2=80=98(hi-yellow font-l= ock-keyword-face)=E2=80=99 and text-property-search-forward fails to find a value in the list of values. From unknown Mon Aug 11 18:54:46 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Jul 2019 14:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36486 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch fixed To: Juri Linkov Cc: 36486@debbugs.gnu.org, Stefan Kangas Received: via spool by 36486-submit@debbugs.gnu.org id=B36486.156285465315887 (code B ref 36486); Thu, 11 Jul 2019 14:18:02 +0000 Received: (at 36486) by debbugs.gnu.org; 11 Jul 2019 14:17:33 +0000 Received: from localhost ([127.0.0.1]:38324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlZt6-00047x-W6 for submit@debbugs.gnu.org; Thu, 11 Jul 2019 10:17:33 -0400 Received: from quimby.gnus.org ([80.91.231.51]:55826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlZt3-000455-N6 for 36486@debbugs.gnu.org; Thu, 11 Jul 2019 10:17:30 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hlZsw-0004OJ-Bc; Thu, 11 Jul 2019 16:17:27 +0200 From: Lars Ingebrigtsen References: <87pnmndyu8.fsf@mouse.gnus.org> <87pnmlzbzt.fsf@mail.linkov.net> <874l3w5jwy.fsf@mail.linkov.net> <87r26zgdbq.fsf@mail.linkov.net> <87o921mskm.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEUkGwwNCQT5+OtyZj5A NhuekmO8tIfMxJpwXbpLAAACRElEQVQ4jWWTwZKbMAyG5YG925PdPkC2W67bsc3ZGat77gxr8gAp 5p4U/PqVZEgzrQZI7A/pl2QB1yNZV9ac5/JgKwg4dsuYMy3zxD+l5LyB480mMdvnObP/P2CwPW2y 7eDN2Wp93kDZRH4hsO1ghXkDNwwYCIy7x7yLuMYOG2AZGOcKXmNaJqc9h5orqC6v/dxdnfJ38TFX 8HW8Hrvfyv4HuuNxKq8qjn9BqSKlXM6jwnu6d5CWfvSn9se43j0k1jLOabInaPy4g5rWW9+tFxug sZUQqOpdLqNzQKASBiJynlLCoEIzEHkAb2tyiKCk9UxYQ9Qv3lEPIWcG1DHxoJon66nv5kCHm/hY kgCKVQZHoD2vfLxsEqocKVPaV/psHwB5XBfLCsY8xW+PIJeLKBvT4I2BE0BovqAyplUm2iixvIUz 92xe7MnocNLR+rJSXj7BTNNFt/1uUKlnP/Q0j1QKg8JDOXwSIIcPTp26Q4Ammiqfkmq1vn2RhhLJ 4kH34l0bVHq5MikyVzXUYhOifjrQisWt5zoS3ZNNTh2aZ1pJFy34tM2/fVeHp+ClcIwWtiG3jiZX xxDlLxnwIyLS6gQG8Yay29IVoI2yUEYjUgpBvgdo6aIvYAcUHDQYzSgABZSm64Ctf6c3yMQLgxyT eQZ4mZTsGzB0boQwhLrx01QDVtchtigRNEfcAL0NECkzFmGqdg+krFrEgcI177uDqWlBdB8DttBs KTHQpM0JRxcUAfXgQfVIkVyWuRtoTU+l6/Q82B+a9AiHe95C5gAAAABJRU5ErkJggg== Date: Thu, 11 Jul 2019 16:17:22 +0200 In-Reply-To: <87o921mskm.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 11 Jul 2019 01:29:45 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: >> I don't understand -- this will still return a symbol. (And error out >> if you enter stuff like "foo bar".) > > Yes, entering a symbol returns a symbol, entering a string > like "foo bar" returns [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) Juri Linkov writes: >> I don't understand -- this will still return a symbol. (And error out >> if you enter stuff like "foo bar".) > > Yes, entering a symbol returns a symbol, entering a string > like "foo bar" returns a string "foo bar" literally. Oh, right. Hm. Well, entering things with "..." is very unusual in Emacs prompts, so if we want that, the prompt should at least say that that's what's expected... > Currently text-property-search-forward has more problems: > today I needed to search the property =E2=80=98face=E2=80=99 with the val= ue > =E2=80=98hi-yellow=E2=80=99 in the buffer with regexps highlighted by hi-= lock.el. > Executing interactively: > > M-x text-property-search-forward RET face RET hi-yellow RET > > failed to find the property because all hi-lock occurrences were > combined with font-lock text properties, i.e. all they had the > property =E2=80=98face=E2=80=99 with the value =E2=80=98(hi-yellow font-l= ock-keyword-face)=E2=80=99 > and text-property-search-forward fails to find a value in the list > of values. Yes, you can't really use text-property-search-forward to do that in any meaningful manner, which is why I didn't add that to the interactive bit. It's a function useful almost only when programming, and the only useful interactive thing is to vaguely poke around in the buffer. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Aug 11 18:54:46 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Jul 2019 22:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36486 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch fixed To: Lars Ingebrigtsen Cc: 36486@debbugs.gnu.org, Stefan Kangas Received: via spool by 36486-submit@debbugs.gnu.org id=B36486.156288292621416 (code B ref 36486); Thu, 11 Jul 2019 22:09:01 +0000 Received: (at 36486) by debbugs.gnu.org; 11 Jul 2019 22:08:46 +0000 Received: from localhost ([127.0.0.1]:38973 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlhF8-0005ZM-61 for submit@debbugs.gnu.org; Thu, 11 Jul 2019 18:08:46 -0400 Received: from fossa.birch.relay.mailchannels.net ([23.83.209.62]:3187) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlhF6-0005ZE-TB for 36486@debbugs.gnu.org; Thu, 11 Jul 2019 18:08:45 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id BC4702C1FE4; Thu, 11 Jul 2019 22:08:43 +0000 (UTC) Received: from pdx1-sub0-mail-a86.g.dreamhost.com (100-96-35-167.trex.outbound.svc.cluster.local [100.96.35.167]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 38FB32C1FEE; Thu, 11 Jul 2019 22:08:43 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a86.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.3); Thu, 11 Jul 2019 22:08:43 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Fumbling-Lonely: 267b650f08ce5c7e_1562882923599_1264750504 X-MC-Loop-Signature: 1562882923599:3803002218 X-MC-Ingress-Time: 1562882923599 Received: from pdx1-sub0-mail-a86.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a86.g.dreamhost.com (Postfix) with ESMTP id 764D980EC0; Thu, 11 Jul 2019 15:08:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version :content-type; s=linkov.net; bh=XJ51PvSN1DJxtadEuAzDW4Mz13Q=; b= 0+F8NY72XHlaAv0x9Trf25Qi1x3i92hzIZ2U3y98v63jnjM/3hMaQwoeSNqCmTrc VxId2pQ+DOG2FqPzewWTusiBP0bRnhT76xuBXoSuRAIGUe+YzjBQZkJslZNTNTUY DjuXxJqwco43NjVcOL+v8snAZkZzvtFTO+uWH1dm0N4= Received: from mail.jurta.org (m91-129-110-101.cust.tele2.ee [91.129.110.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a86.g.dreamhost.com (Postfix) with ESMTPSA id B78ED80EBE; Thu, 11 Jul 2019 15:08:35 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a86 From: Juri Linkov In-Reply-To: (Lars Ingebrigtsen's message of "Thu, 11 Jul 2019 16:17:22 +0200") Organization: LINKOV.NET References: <87pnmndyu8.fsf@mouse.gnus.org> <87pnmlzbzt.fsf@mail.linkov.net> <874l3w5jwy.fsf@mail.linkov.net> <87r26zgdbq.fsf@mail.linkov.net> <87o921mskm.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Date: Fri, 12 Jul 2019 01:08:06 +0300 Message-ID: <87muhkw7l9.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrgeelgddtjecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffujghofhgffffkgggtsehmtderredtreejnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddutddruddtudenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrdduuddtrddutddupdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheplhgrrhhsihesghhnuhhsrdhorhhgnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >>> I don't understand -- this will still return a symbol. (And error ou= t >>> if you enter stuff like "foo bar".) >> >> Yes, entering a symbol returns a symbol, entering a string >> like "foo bar" returns a string "foo bar" literally. > > Oh, right. Hm. Well, entering things with "..." is very unusual in > Emacs prompts, so if we want that, the prompt should at least say that > that's what's expected... Fixed in the following patch. >> Currently text-property-search-forward has more problems: >> today I needed to search the property =E2=80=98face=E2=80=99 with the = value >> =E2=80=98hi-yellow=E2=80=99 in the buffer with regexps highlighted by = hi-lock.el. >> Executing interactively: >> >> M-x text-property-search-forward RET face RET hi-yellow RET >> >> failed to find the property because all hi-lock occurrences were >> combined with font-lock text properties, i.e. all they had the >> property =E2=80=98face=E2=80=99 with the value =E2=80=98(hi-yellow fon= t-lock-keyword-face)=E2=80=99 >> and text-property-search-forward fails to find a value in the list >> of values. > > Yes, you can't really use text-property-search-forward to do that in an= y > meaningful manner, which is why I didn't add that to the interactive > bit. It's a function useful almost only when programming, and the only > useful interactive thing is to vaguely poke around in the buffer. Implemented in this patch: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=text-property-search-value.3.patch diff --git a/lisp/emacs-lisp/text-property-search.el b/lisp/emacs-lisp/text-property-search.el index 41ca07057e..a44516992a 100644 --- a/lisp/emacs-lisp/text-property-search.el +++ b/lisp/emacs-lisp/text-property-search.el @@ -54,10 +54,13 @@ text-property-search-forward that's matching), and `prop-match-value' (the value of PROPERTY at the start of the region)." (interactive - (list - (let ((string (completing-read "Search for property: " obarray))) - (when (> (length string) 0) - (intern string obarray))))) + (let* ((property (completing-read "Search for property: " obarray)) + (property (when (> (length property) 0) + (intern property obarray))) + (value (when property + (read-from-minibuffer "Search for property value (quote strings): " + nil nil t nil "nil")))) + (list property value))) (cond ;; No matches at the end of the buffer. ((eobp) @@ -200,7 +203,9 @@ text-property--match-p (setq predicate #'equal)) ((eq predicate nil) (setq predicate (lambda (val p-val) - (not (equal val p-val)))))) + (not (if (and (listp p-val) (not (listp val))) + (member val p-val) + (equal val p-val))))))) (funcall predicate value prop-value)) (provide 'text-property-search) --=-=-=-- From unknown Mon Aug 11 18:54:46 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 Jul 2019 14:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36486 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch fixed To: Juri Linkov Cc: 36486@debbugs.gnu.org, Stefan Kangas Received: via spool by 36486-submit@debbugs.gnu.org id=B36486.156294224930901 (code B ref 36486); Fri, 12 Jul 2019 14:38:02 +0000 Received: (at 36486) by debbugs.gnu.org; 12 Jul 2019 14:37:29 +0000 Received: from localhost ([127.0.0.1]:40490 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlwfw-00082L-Ot for submit@debbugs.gnu.org; Fri, 12 Jul 2019 10:37:29 -0400 Received: from quimby.gnus.org ([80.91.231.51]:45618) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlwfu-000826-Ca for 36486@debbugs.gnu.org; Fri, 12 Jul 2019 10:37:27 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hlwfp-0006v4-7H; Fri, 12 Jul 2019 16:37:23 +0200 From: Lars Ingebrigtsen References: <87pnmndyu8.fsf@mouse.gnus.org> <87pnmlzbzt.fsf@mail.linkov.net> <874l3w5jwy.fsf@mail.linkov.net> <87r26zgdbq.fsf@mail.linkov.net> <87o921mskm.fsf@mail.linkov.net> <87muhkw7l9.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAD1BMVEX+/gfj2Qr//whAOgT/ /wkKSUWSAAACfklEQVQ4jU2U2xmkIAyFI04BXCwgRAogxgIU6b+mPXFm91teUH5zOwmStFvnfLY5 47xPPGkqPfNCInPdHNzbHMAWRKK2F+DDJ0vbZORZVeaQNF4gOvcc7kMktP0AGHIt1GSytj3TcjCF zx7DnLMhRmtCRfbIoWSisMbPnMMBPFKhPVKolimUSENEAIawA5xJNbegazQRDy5shHesPYubSruQ 1RQi5dX9cz3G2olFylbJzfByUCKpGc8BwMaN4Aw/9WBlhisxmIqKg1sFADlLIeFVufbPrJTMs1wO WjX1EIjMrDeAYhvyQeKmCaUXpRTFgZlGB9ViyYFMySAaggNYCIjSZe0cfuBrYZ0kAEDyqv0Lbsqs pgzVOuqT2h1wa5fXYQZ1ag9lk/0FCO5AiqEwaGsiazzFTplfsH5BACghih3TgbQBEGRRnIrJEux8 wQxcLIqntOZmvGQ7m4PBYiiEAPZ8Q6i/gARqoVkAz1EBjp8rL1C9yX3U/uDt/A9g2qQe7dLnnLdC Xvu8IAnAfrRm6waXDqC4p8TUJmMsrpKZ0wsu2jAmkBCJ4SR9oF+BD7g6hDmEvWTxL9UFwobgBwdm SUvGBEwpudrP1QlHIvrk5hfgPssLFACDxU2fo+FiydRiHVEMYMCinmiSDgArhvLMIh0+3Pt56YRF m6Vgg0n0GDKebejXVSku4YMxQOelrdsoTdHgATC/4BQeoyDRD6R8XbWvK4zOGNZwoQFme4NfHryH EaalVE7/9E33Wj1dTSn5INvp6dz9X4Hv1j+QW1vjEpe/krx7D3Sp+1Pvw1fE1xTzfnkffPBxAnzR dy3pt+Jvv35oWRbcTkIevvBzmH8AXd+kTBu5Ba4AAAAASUVORK5CYII= Date: Fri, 12 Jul 2019 16:37:21 +0200 In-Reply-To: <87muhkw7l9.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 12 Jul 2019 01:08:06 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: > - (not (equal val p-val)))))) > + (not (if (and (listp p-val) (not (listp val))) > + (member val p-val) > + (equal val p-val))))))) No, that's not an acceptable change, I think -- this function is a search primitive, not a DWIM thing. There's an abundance of things that can be stored in text properties, to be compared with any num [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) Juri Linkov writes: > - (not (equal val p-val)))))) > + (not (if (and (listp p-val) (not (listp val))) > + (member val p-val) > + (equal val p-val))))))) No, that's not an acceptable change, I think -- this function is a search primitive, not a DWIM thing. There's an abundance of things that can be stored in text properties, to be compared with any number of predicates. You're trying to special-case it to search for faces, for some reason, and that's not what it's for. If you want a function to search for faces, that's something you can write (based on this function), but that's not what this function is for. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Aug 11 18:54:46 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 Jul 2019 18:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36486 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch fixed To: Lars Ingebrigtsen Cc: 36486@debbugs.gnu.org, Stefan Kangas Received: via spool by 36486-submit@debbugs.gnu.org id=B36486.15629579158006 (code B ref 36486); Fri, 12 Jul 2019 18:59:01 +0000 Received: (at 36486) by debbugs.gnu.org; 12 Jul 2019 18:58:35 +0000 Received: from localhost ([127.0.0.1]:40735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hm0kc-000253-Kr for submit@debbugs.gnu.org; Fri, 12 Jul 2019 14:58:34 -0400 Received: from fossa.birch.relay.mailchannels.net ([23.83.209.62]:13532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hm0ka-00024u-8n for 36486@debbugs.gnu.org; Fri, 12 Jul 2019 14:58:33 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id CACF21A14BB; Fri, 12 Jul 2019 18:58:30 +0000 (UTC) Received: from pdx1-sub0-mail-a71.g.dreamhost.com (100-96-11-126.trex.outbound.svc.cluster.local [100.96.11.126]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 068951A0A52; Fri, 12 Jul 2019 18:58:30 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a71.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.3); Fri, 12 Jul 2019 18:58:30 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Name-Daffy: 0138f07962b3b936_1562957910417_472682463 X-MC-Loop-Signature: 1562957910417:3733177685 X-MC-Ingress-Time: 1562957910417 Received: from pdx1-sub0-mail-a71.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a71.g.dreamhost.com (Postfix) with ESMTP id 67EEA8020A; Fri, 12 Jul 2019 11:58:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=5knL/tazT7fHpVlPrGpl6fojYCM=; b= VRC2IoYOMZshFOJgt+IeLwPaWHXYui7M44g2z+SSSAtWo/vdjxXNL4pJEdx0nuup PRxNbmOv1EKKo6XWbP0ymDSQ4bEmw72spSyu95gTHceirOJXlQ9qyk5MCywh/4CG 6OfF2OWRZ4J0z41TK1MwVQ+wLLG6BP19G8ChMLqfU3I= Received: from mail.jurta.org (m91-129-103-134.cust.tele2.ee [91.129.103.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a71.g.dreamhost.com (Postfix) with ESMTPSA id B162E801FF; Fri, 12 Jul 2019 11:58:20 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a71 From: Juri Linkov Organization: LINKOV.NET References: <87pnmndyu8.fsf@mouse.gnus.org> <87pnmlzbzt.fsf@mail.linkov.net> <874l3w5jwy.fsf@mail.linkov.net> <87r26zgdbq.fsf@mail.linkov.net> <87o921mskm.fsf@mail.linkov.net> <87muhkw7l9.fsf@mail.linkov.net> Date: Fri, 12 Jul 2019 21:47:27 +0300 In-Reply-To: (Lars Ingebrigtsen's message of "Fri, 12 Jul 2019 16:37:21 +0200") Message-ID: <87tvbrm6o0.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrhedtgddufedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesmhdtreertdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdefrddufeegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtfedrudefgedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehlrghrshhisehgnhhushdrohhrghenucevlhhushhtvghrufhiiigvpedt X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) --=-=-= Content-Type: text/plain >> - (not (equal val p-val)))))) >> + (not (if (and (listp p-val) (not (listp val))) >> + (member val p-val) >> + (equal val p-val))))))) > > No, that's not an acceptable change, I think -- this function is a > search primitive, not a DWIM thing. There's an abundance of things that > can be stored in text properties, to be compared with any number of > predicates. You're trying to special-case it to search for faces, for > some reason, and that's not what it's for. Then it's possible to add lambda to `predicate' arg in interactive spec only like below. > If you want a function to search for faces, that's something you can > write (based on this function), but that's not what this function is for. Of course, I can write and add it to ~/.emacs. But the question is: do you think this is generally useful? For example, to search hi-lock properties, etc. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=text-property-search-value.4.patch diff --git a/lisp/emacs-lisp/text-property-search.el b/lisp/emacs-lisp/text-property-search.el index 41ca07057e..867094539f 100644 --- a/lisp/emacs-lisp/text-property-search.el +++ b/lisp/emacs-lisp/text-property-search.el @@ -54,10 +54,16 @@ text-property-search-forward that's matching), and `prop-match-value' (the value of PROPERTY at the start of the region)." (interactive - (list - (let ((string (completing-read "Search for property: " obarray))) - (when (> (length string) 0) - (intern string obarray))))) + (let* ((property (completing-read "Search for property: " obarray)) + (property (when (> (length property) 0) + (intern property obarray))) + (value (when property + (read-from-minibuffer "Search for property value (quote strings): " + nil nil t nil "nil")))) + (list property value (lambda (val p-val) + (not (if (and (listp p-val) (not (listp val))) + (member val p-val) + (equal val p-val))))))) (cond ;; No matches at the end of the buffer. ((eobp) --=-=-=-- From unknown Mon Aug 11 18:54:46 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 Jul 2019 23:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36486 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch fixed To: Juri Linkov Cc: 36486@debbugs.gnu.org, Stefan Kangas Received: via spool by 36486-submit@debbugs.gnu.org id=B36486.156297486111682 (code B ref 36486); Fri, 12 Jul 2019 23:41:02 +0000 Received: (at 36486) by debbugs.gnu.org; 12 Jul 2019 23:41:01 +0000 Received: from localhost ([127.0.0.1]:40951 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hm59x-00032L-02 for submit@debbugs.gnu.org; Fri, 12 Jul 2019 19:41:01 -0400 Received: from quimby.gnus.org ([80.91.231.51]:51426) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hm59u-00032B-Qy for 36486@debbugs.gnu.org; Fri, 12 Jul 2019 19:40:59 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hm59p-00036y-HK; Sat, 13 Jul 2019 01:40:56 +0200 From: Lars Ingebrigtsen References: <87pnmndyu8.fsf@mouse.gnus.org> <87pnmlzbzt.fsf@mail.linkov.net> <874l3w5jwy.fsf@mail.linkov.net> <87r26zgdbq.fsf@mail.linkov.net> <87o921mskm.fsf@mail.linkov.net> <87muhkw7l9.fsf@mail.linkov.net> <87tvbrm6o0.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEVtRhsIAgAyHwoUCAIk FAdKLhHdsXOm1R+OAAACc0lEQVQ4jUWTTZLjIAyF1Zl29hQ+QBrDrBuL2XcAz9pxTK9dUxXuf4R5 wk5alYp/PovHExLlMp/rdlU6lplKKYtBWJsJz7U+vFLRUQNO3ttEeK71pJQaAboCtnQnszAyzrW+ C5gbwF+Hv4EcVqp3gABADcjvTrLSNgi4bLV2ZS7GFRF3WGlLAFruunmeW5IlbLb+8wIm+aS9BzEk Eu8MoOJ3bWvBScyZIFFX9m1bL5BzIskfGCk+OICHeLc5NfBIIWjFTX3rSnGrZOCrE4fMGmAXQVEO sIYpXjX7KCJUUMQcudmLU0kcrmOpsuGCIhrJeGTjnGHmXsq2QQNgkNKOxRWksD6cFCyVAdbRzXNJ Oam4OylLzoHqZtvZrfzRr00EwMJ5fQQ3l86kP2/hfdmd4Axh8DReKFqvL2/2vnw/AWq1RrfEpDQl 2y+X3WIDyThrvOLOmNG6ZnGBdTr1k8vG89jRPGWzi2BbdNfRBev5k86daU4aSPTRBxPsXX1R7Qaf dycLDPoeGRPx5bx1KLM76phJ9XnKcaLzmWhLHFu5ZFeKw2wX6V+cGQ1NpInrEGnQ0l0Sb6E5kQyN ZaBz2cEvPT0BC9Dh6wlGaQITLYUcF/UDVPgNEdEIaC407gHuSssd6k6hXFlafQc33ErfwEcwiZWW Dj6AbiLYVb4q1RPRC/wFEIMBfdu7cc/5QA9/Qn1NpNoIsA70BL2oA0hoGQ8BV3m6ENknQFqbGzm7 PEln/YBPAIxtt09Ufi2FI5TZ2ycNnbAD2CpOyv6K4QB6LBhxOawjbk8QzTGupV3LjVjCa9nJYops CoE3ABoXzynkjJblPbz6DzPN7B9lIYn+AAAAAElFTkSuQmCC Date: Sat, 13 Jul 2019 01:40:53 +0200 In-Reply-To: <87tvbrm6o0.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 12 Jul 2019 21:47:27 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: > Of course, I can write and add it to ~/.emacs. But the question is: > do you think this is generally useful? For example, to search > hi-lock properties, etc. I don't think this code complication belongs in that function. If there should be a function to search for faces, then face-search-forward should be written (and it would be a very simple call to text [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) Juri Linkov writes: > Of course, I can write and add it to ~/.emacs. But the question is: > do you think this is generally useful? For example, to search > hi-lock properties, etc. I don't think this code complication belongs in that function. If there should be a function to search for faces, then face-search-forward should be written (and it would be a very simple call to text-property-search-forward with the correct predicate). But I haven't heard anybody clamouring for such a command, really... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no