From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#37488: 27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward' Date: Fri, 27 Sep 2019 16:15:47 +0200 Message-ID: <87impdomek.fsf@gnus.org> References: <87y2yfo8fv.fsf@web.de> <834l10oj0n.fsf@gnu.org> <87lfucv7n5.fsf@gnus.org> <83sgokmnch.fsf@gnu.org> <87h84zdrbl.fsf@gnus.org> <83impfkmxp.fsf@gnu.org> <87pnjmj2bg.fsf@gnus.org> <835zlelv28.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="236357"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: michael_heerdegen@web.de, lekktu@gmail.com, 37488@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 27 18:20:52 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iDszC-000zK2-Le for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Sep 2019 18:20:50 +0200 Original-Received: from localhost ([::1]:53128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDszA-0006CD-1b for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Sep 2019 12:20:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46197) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDr2W-0008Vv-1e for bug-gnu-emacs@gnu.org; Fri, 27 Sep 2019 10:16:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iDr2R-000392-M5 for bug-gnu-emacs@gnu.org; Fri, 27 Sep 2019 10:16:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39433) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iDr2Q-00038w-Dx for bug-gnu-emacs@gnu.org; Fri, 27 Sep 2019 10:16:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iDr2Q-0000CE-7J for bug-gnu-emacs@gnu.org; Fri, 27 Sep 2019 10:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Sep 2019 14:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37488 X-GNU-PR-Package: emacs Original-Received: via spool by 37488-submit@debbugs.gnu.org id=B37488.1569593754719 (code B ref 37488); Fri, 27 Sep 2019 14:16:02 +0000 Original-Received: (at 37488) by debbugs.gnu.org; 27 Sep 2019 14:15:54 +0000 Original-Received: from localhost ([127.0.0.1]:48254 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDr2I-0000BX-3V for submit@debbugs.gnu.org; Fri, 27 Sep 2019 10:15:54 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:60266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDr2F-0000BJ-6t for 37488@debbugs.gnu.org; Fri, 27 Sep 2019 10:15:53 -0400 Original-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 1iDr2B-0002K1-NK; Fri, 27 Sep 2019 16:15:50 +0200 In-Reply-To: <835zlelv28.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 26 Sep 2019 22:24:47 +0300") 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:167399 Archived-At: Eli Zaretskii writes: > But that's not what the code seems to do. It just compares the value > of property in the found region with that at point. In this example, > they both are "o", so the code will reject the "oo" region at the end, > and try to find the next one (and fail, because there's none). No. Once again, you can test this behaviour with this simple code: (insert "This is " (propertize "bold1" 'face 'bold) " and this is " (propertize "italic1" 'face 'italic) (propertize "bold2" 'face 'bold) (propertize "italic2" 'face 'italic) " at the end") Put point inside the first bold text and see the difference between (text-property-search-forward 'face 'bold t t) (text-property-search-forward 'face 'bold t nil) >> >> > I don't understand how this answers my questions. >> >> >> >> Try (text-property-search-forward 'face) on the example. It'll give you >> >> all regions that has a face property. >> > >> > That's a weird way to get to the result, if someone wants it. >> >> Seems like the obvious way to me. > > The obvious one would be to call next-single-property-change. That doesn't give you the region matched. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no