GNU bug report logs - #48317
27.1; text-property-search-forward moves point to end when not found

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Howard Melman <hmelman@HIDDEN>; dated Sun, 9 May 2021 16:42:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 48317 <at> debbugs.gnu.org:


Received: (at 48317) by debbugs.gnu.org; 12 May 2021 16:56:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 12 12:56:11 2021
Received: from localhost ([127.0.0.1]:40325 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lgs9a-0001ap-RB
	for submit <at> debbugs.gnu.org; Wed, 12 May 2021 12:56:11 -0400
Received: from quimby.gnus.org ([95.216.78.240]:60672)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1lgs9Z-0001aa-B6
 for 48317 <at> debbugs.gnu.org; Wed, 12 May 2021 12:56:09 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=lWxx3zBLlraeLRLD7KjBCp8g7COD2RQK+5xbvZoED4s=; b=nepBCVoZxNulOfoxTJBQ9Tjpjn
 pI43Inf53By3R5u+VtNrr3nRUmehpB3FUEFFV/XiGkzPqmFZMde8xzebDu+Codu5zn4lIYYhcC6z3
 lwB+tsD42vhC8fwBK1r0BoHJtXKAQ5ZKVCqUiyN9o8g1VZd12wI+b6TTBy7a8vHzd1qc=;
Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1lgs9Q-0006tE-Cn; Wed, 12 May 2021 18:56:02 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Howard Melman <hmelman@HIDDEN>
Subject: Re: bug#48317: 27.1; text-property-search-forward moves point to
 end when not found
References: <0ECAF0D9-7D8C-4BAA-AFFE-B76634BD0B28@HIDDEN>
 <83o8dj7s48.fsf@HIDDEN>
 <616F7732-ED83-40F0-A460-9298608EAD91@HIDDEN>
 <83lf8n7q8d.fsf@HIDDEN>
 <8877DDB9-7D2B-4DCC-8374-EB8391134EAC@HIDDEN>
 <83fsyv7o4y.fsf@HIDDEN> <87mtt3c62q.fsf@HIDDEN>
 <4E8819BD-AA07-4870-8A90-98FB1F3D45E4@HIDDEN>
 <87fsytpi1s.fsf@HIDDEN>
 <53218944-7009-4BA7-AE3D-BF025EFD41AF@HIDDEN>
 <87mtt1kz1j.fsf@HIDDEN>
 <9D0AA29D-DE30-43D7-8109-84636A3D36F0@HIDDEN>
 <878s4kjaug.fsf@HIDDEN>
 <1A7FC13A-A462-4D59-A0C1-64761BDE12A5@HIDDEN>
X-Now-Playing: Tuxedomoon's _Live in Alberobello, Italy_: "Dizzy"
Date: Wed, 12 May 2021 18:55:59 +0200
In-Reply-To: <1A7FC13A-A462-4D59-A0C1-64761BDE12A5@HIDDEN> (Howard Melman's
 message of "Wed, 12 May 2021 12:29:10 -0400")
Message-ID: <87fsyrhoww.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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:  Howard Melman <hmelman@HIDDEN> writes: > It's probably
 impossible to change in the signature because of > compatibility but perhaps
 this could inform the docstring. AIUI if > this function is not passed a
 VALUE or PREDICATE it searches for [...] 
 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: 48317
Cc: 48317 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Howard Melman <hmelman@HIDDEN> writes:

> It's probably impossible to change in the signature because of
> compatibility but perhaps this could inform the docstring.  AIUI if
> this function is not passed a VALUE or PREDICATE it searches for
> regions that contain PROPERTY (a "trick" because a property having a
> nil value is the same as not being present).  But with just a VALUE it
> searches for areas that don't have the PROPERTY/VALUE combo because
> PREDICATE is nil.  And if PREDICATE is t it searches for areas that do
> have that combo.

I think you've gotten how the function works now.  :-)

Except that the nil PREDICATE isn't exactly the same as "not equal" --
in that case, all regions with the same value (that doesn't match) would
be one single match, but the nil PREDICATE also stops when the value
changes.

> Since in lisp a default optional argument is nil, I think the behavior
> with the default value of PREDICATE is reversed from what it should be
> for a function named "search". Particularly since it changes the sense
> of the function from when just PROPERTY is passed as opposed to when
> PROPERTY and VALUE are passed (right?).

The one parameter version is intuitive, while the two parameter version
isn't -- that's true.  And this certainly wasn't helped by the doc
string stating the opposite of how this function worked.  :-)

> Your example of using this function with a while loop definitely helps
> reveal its intended use.  Perhaps including one when passing VALUE to
> the function would help?

I think that's for the manual, which has copious examples and explains
all the bits.  (And has, as far as I can tell, not been corrected to be
wrong while I wasn't looking.  :-))

> I will happily commented on a proposed docstring if you post it here.
> I've not signed papers but do I have to for docstring contributions?

No, that's not necessary -- but is there anything that needs to be
clarified further?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48317; Package emacs. Full text available.

Message received at 48317 <at> debbugs.gnu.org:


Received: (at 48317) by debbugs.gnu.org; 12 May 2021 16:29:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 12 12:29:19 2021
Received: from localhost ([127.0.0.1]:40255 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lgrjb-0007Ab-5v
	for submit <at> debbugs.gnu.org; Wed, 12 May 2021 12:29:19 -0400
Received: from mail-qk1-f169.google.com ([209.85.222.169]:38647)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hmelman@HIDDEN>) id 1lgrjZ-0007AO-CH
 for 48317 <at> debbugs.gnu.org; Wed, 12 May 2021 12:29:18 -0400
Received: by mail-qk1-f169.google.com with SMTP id q10so18603217qkc.5
 for <48317 <at> debbugs.gnu.org>; Wed, 12 May 2021 09:29:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=R+7MwJkk73ycrmIfDOFbfQJKj1Ksa/8wMu7RbDVIeLA=;
 b=qGv9PkjAlQtUZ5TLFBS+3WsnJDYuu3be2gZ8DEd7ApeOVyixhCLgVNjARCZ2fT0lah
 K2xdIetjcAI8u8eSCJMknemRsglYrk7zAm9Vdp4Xyo94U4m+bGO4Bl6ga6Z5CKV7BdTB
 xnzcZqNZz7JeVjHrwXERmFtVyhQ1dI69oHOE9pdJ3jqurxMGLf43Qv9/SYG5tRNw2S9I
 y02xAli6Z4E7/e9PemDf8D9lFjdgpcz8dDHV6NQOQ+tPVeSFbTerrDniroT/Bs6eufGh
 3ukdwZRdyVimd8Q2Py2i3ZWBI+oKe0IimR4gxjdvo+xAvxTMi62dm1c7Lv0dW/wRP8lj
 xSxQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=R+7MwJkk73ycrmIfDOFbfQJKj1Ksa/8wMu7RbDVIeLA=;
 b=GyY3bajDSgVo8AxWMXbowy1GmwNZkENuEQP8OwyBMuaLz78t7JRmnqKtN7K3sHGNCm
 eUB7k1sqZTHTm/mD5BTZJyndr/rvGtGilnn8aLO5UFj7jz65QUDbycpIosdln4FsvNy5
 k+j8kqV93MHOwlt+ZEINYVIZ8sgI41aBq2wmJaRncIu/DV1H880DbMl1Pongk5VHlh2T
 53HBO4cRQahumET4szLW2IooskNL9w7a66ljo4ii6APzahte5mw0KwuDo2qLwKtvK+/4
 VwnPwc+0a5G5YwfKcukaAeSyx1j2+lHmZP70/zvrJot4+tHJREAfe1rN9ZzxeJZCV0FC
 Iq8g==
X-Gm-Message-State: AOAM531HiypGl8R7aiVUiLSZHMeIfEZ8AHSDg9oDivQhW8TjgUwQSewP
 RjNYkP8219197JYbdSlOmR853YJPTvw=
X-Google-Smtp-Source: ABdhPJx2J83QnKEn8ejAAXLQAYL7gqkWi6OW1qQ2Xt9u1mQyJBmTzIbOJlkUBTN9txVwN/DCo2UElQ==
X-Received: by 2002:a05:620a:681:: with SMTP id
 f1mr34319611qkh.403.1620836951589; 
 Wed, 12 May 2021 09:29:11 -0700 (PDT)
Received: from lumet2.home (pool-108-26-204-101.bstnma.fios.verizon.net.
 [108.26.204.101])
 by smtp.gmail.com with ESMTPSA id t203sm382361qke.83.2021.05.12.09.29.10
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 12 May 2021 09:29:11 -0700 (PDT)
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.6\))
Subject: Re: bug#48317: 27.1; text-property-search-forward moves point to end
 when not found
From: Howard Melman <hmelman@HIDDEN>
In-Reply-To: <878s4kjaug.fsf@HIDDEN>
Date: Wed, 12 May 2021 12:29:10 -0400
Content-Transfer-Encoding: 7bit
Message-Id: <1A7FC13A-A462-4D59-A0C1-64761BDE12A5@HIDDEN>
References: <0ECAF0D9-7D8C-4BAA-AFFE-B76634BD0B28@HIDDEN>
 <83o8dj7s48.fsf@HIDDEN> <616F7732-ED83-40F0-A460-9298608EAD91@HIDDEN>
 <83lf8n7q8d.fsf@HIDDEN> <8877DDB9-7D2B-4DCC-8374-EB8391134EAC@HIDDEN>
 <83fsyv7o4y.fsf@HIDDEN> <87mtt3c62q.fsf@HIDDEN>
 <4E8819BD-AA07-4870-8A90-98FB1F3D45E4@HIDDEN> <87fsytpi1s.fsf@HIDDEN>
 <53218944-7009-4BA7-AE3D-BF025EFD41AF@HIDDEN> <87mtt1kz1j.fsf@HIDDEN>
 <9D0AA29D-DE30-43D7-8109-84636A3D36F0@HIDDEN> <878s4kjaug.fsf@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
X-Mailer: Apple Mail (2.3608.120.23.2.6)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 48317
Cc: 48317 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



On May 12, 2021, at 10:16 AM, Lars Ingebrigtsen <larsi@HIDDEN> wrote:

> Howard Melman <hmelman@HIDDEN> writes:
> 
>>    ;; a region with the specfied face is found,
>>    ;; point is moved to the beginning of it
>>    (text-property-search-forward 'face 'font-lock-function-name-face)
>> 
> No, here you're looking for regions where `face' is not
> `font-lock-function-name-face' -- which will indeed leave you at the
> start of the region where `face' is `font-lock-function-name-face', but
> that's not really what the function matched.

I have read the above a dozen times and still am not sure I follow
it. AIUI since predicate is nil this is looking for regions where face
is not font-lock-function-name-face.  But how does that leave you at
the start of a region where face is indeed
font-lock-function-name-face?  

Is what it's doing leaving you at the end of a region where face isn't
font-lock-function-name-face? (Which thanks to Stephen Berman I
realize that the function leaving you at the beginning or end of a
match was very significant to understanding what was happening).  If
so I think that is not at all intuitive from reading the above line of
code.

> But I understand your confusion now.  

Thank you, I thought I was going crazy.

> The function searches for areas where a text property is matching
> something (according to PREDICATE), and leaves point at the end of the
> match.  You, instead, expect it to leave point at the start of the
> match, which is the opposite of what it does.

I want to be more explicit here.  I do expect it to search for areas
where a text property is matching something.  It of course is
dependent on the value of all of its arguments including PREDICATE,
though I'd expect the default value of PREDICATE to DTRT in the common
case.  I know that common can be misunderstood but for a search
function I thought I was on strong ground that "find the thing I
specify" is the common case.  I don't much care whether this function
leaves you at the start or end of the match, I'd expect to find out
that specific detail from the docstring or observed behavior.  And
usually if I'm lucky I find in the docstring, manual or code some
convenient idiom like your while loop example that makes this choice
very convenient in actual use.

AIUI, all of this confusion is because "leaves you at the end of a not
matching area" and "leaves you at the beginning of a matching area"
happen to be the same place if such an area exists, but is quite
different if it doesn't.

Or could have been avoided if the function was named 
goto-end-of-region-not-matching-text-property
which I *think* is an accurate (though horrible) name?

> Hm...  Oh!  That's wrong in the doc string, too -- it says that it moves
> point to the start of the region, which it certainly doesn't.  I've now
> fixed this in the two doc strings.

It's probably impossible to change in the signature because of
compatibility but perhaps this could inform the docstring.  AIUI if
this function is not passed a VALUE or PREDICATE it searches for
regions that contain PROPERTY (a "trick" because a property having a
nil value is the same as not being present).  But with just a VALUE it
searches for areas that don't have the PROPERTY/VALUE combo because
PREDICATE is nil.  And if PREDICATE is t it searches for areas that do
have that combo.

Since in lisp a default optional argument is nil, I think the behavior
with the default value of PREDICATE is reversed from what it should be
for a function named "search". Particularly since it changes the sense
of the function from when just PROPERTY is passed as opposed to when
PROPERTY and VALUE are passed (right?).

Your example of using this function with a while loop definitely helps
reveal its intended use.  Perhaps including one when passing VALUE to
the function would help?

I will happily commented on a proposed docstring if you post it here.
I've not signed papers but do I have to for docstring contributions?

Thanks.

Howard




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48317; Package emacs. Full text available.

Message received at 48317 <at> debbugs.gnu.org:


Received: (at 48317) by debbugs.gnu.org; 12 May 2021 14:17:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 12 10:17:08 2021
Received: from localhost ([127.0.0.1]:39988 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lgpff-0001LC-NT
	for submit <at> debbugs.gnu.org; Wed, 12 May 2021 10:17:07 -0400
Received: from quimby.gnus.org ([95.216.78.240]:59078)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1lgpfc-0001Kc-Q4
 for 48317 <at> debbugs.gnu.org; Wed, 12 May 2021 10:17:06 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=OwIuDhOOsElkrJpLHBh+VGHZXKj2efj1GM1cwbgvJHM=; b=o90fWy/2R8Fem6OHyAMcx75fKP
 umWgtL7jFbpD/LWsdsq27N+9wDPO2VvrUf2MCSkqklxnfS37AH8DSWXQlfoVKpI6fmjyl9UdRR3dI
 vEBdNEx8mnnQO2I2NGRuprCfNvw66s0Sw690JMMLucdc7DYg1Kn4tQ0Q+wShEQRmLuFk=;
Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1lgpfT-0005Qi-Qr; Wed, 12 May 2021 16:16:58 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Howard Melman <hmelman@HIDDEN>
Subject: Re: bug#48317: 27.1; text-property-search-forward moves point to
 end when not found
References: <0ECAF0D9-7D8C-4BAA-AFFE-B76634BD0B28@HIDDEN>
 <83o8dj7s48.fsf@HIDDEN>
 <616F7732-ED83-40F0-A460-9298608EAD91@HIDDEN>
 <83lf8n7q8d.fsf@HIDDEN>
 <8877DDB9-7D2B-4DCC-8374-EB8391134EAC@HIDDEN>
 <83fsyv7o4y.fsf@HIDDEN> <87mtt3c62q.fsf@HIDDEN>
 <4E8819BD-AA07-4870-8A90-98FB1F3D45E4@HIDDEN>
 <87fsytpi1s.fsf@HIDDEN>
 <53218944-7009-4BA7-AE3D-BF025EFD41AF@HIDDEN>
 <87mtt1kz1j.fsf@HIDDEN>
 <9D0AA29D-DE30-43D7-8109-84636A3D36F0@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEUMDR4pNFhoZ4P/
 ///NGFFJAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+UFDA00AlWXEdEAAAGUSURBVCjPNVKxjtswDKUM
 y0A9eYgCJFvH5ivkAMnQSSlM46ApyxW1v+LQL3AB+9C7KQXsIOZX9lHXcqDwRL5nPdJEGs2FrvQ/
 OKOgZ2WQdoVPl+YNyVmuFWYrkmX2G5yFoI85BqslcUrqQwUJMx6ooi9xSAKkYNe/5EldmXshS+7f
 V3cLyh/hoQldTzYQRIvVK3BM+4lbWRgt7QK2RLkLxNuVrEwdQNhoxSzMjDYDjueLfBdZAVpc16+f
 X+WhJhHJmVX7xVB4Y07JNrfeDNadEwhbb2Z7j2/pXdt6HguRyacKzVPxLuMCCd4e78OeZOnBCu1P
 GZ7IPkcYsuc/wj9gXyinp+K2n2bMT6oNddmNDiPA4+qow3zLm4JwosbEFxThw+p0vg4ZONZYNV4+
 DgCUGwWZCNrKnBRQL3jXIfgESl3R2lRpvEd0uSvnutA0eef5pBsmk0YRj2CGOv0Jrr9gpLX7aIxj
 IGM7UsdN2Sh1NZ68a9+HHNT5mz2xLuUTmfNwd5zAmWz76/e2U7BeyMW6iQlI+Augmnr0p6VtjgAA
 ACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMS0wNS0xMlQxMzo1MjowMiswMDowMOfAgUYAAAAldEVYdGRh
 dGU6bW9kaWZ5ADIwMjEtMDUtMTJUMTM6NTI6MDIrMDA6MDCWnTn6AAAAAElFTkSuQmCC
X-Now-Playing: Bertine Zetlitz's _Morbid Latenight Show_: "Butcher's Son"
Date: Wed, 12 May 2021 16:16:55 +0200
In-Reply-To: <9D0AA29D-DE30-43D7-8109-84636A3D36F0@HIDDEN> (Howard Melman's
 message of "Tue, 11 May 2021 15:28:48 -0400")
Message-ID: <878s4kjaug.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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:  Howard Melman <hmelman@HIDDEN> writes: > To me,
 this function
 behaves unexpectedly different in these cases > (say in a font-locked elisp
 buffer just before the last defun): > > ;; a region with property face is
 found, > ;; point is moved [...] 
 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: 48317
Cc: 48317 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Howard Melman <hmelman@HIDDEN> writes:

> To me, this function behaves unexpectedly different in these cases
> (say in a font-locked elisp buffer just before the last defun):
>
>     ;; a region with property face is found,
>     ;; point is moved to the end of it
>     (text-property-search-forward 'face)

The doc string in Emacs 27 is misleading, because it doesn't emphasise
the meaning of PREDICATE.

What the form above does is look for areas where there's a text property
named `face' that uses the nil predicate on a nil value.  :-)

That is, it finds all areas where the `face' property is not nil --
VALUE is nil, and PREDICATE is nil.

>     ;; a region with the specfied face is found,
>     ;; point is moved to the beginning of it
>     (text-property-search-forward 'face 'font-lock-function-name-face)

No, here you're looking for regions where `face' is not
`font-lock-function-name-face' -- which will indeed leave you at the
start of the region where `face' is `font-lock-function-name-face', but
that's not really what the function matched.

But I understand your confusion now.  The function searches for areas
where a text property is matching something (according to PREDICATE),
and leaves point at the end of the match.  You, instead, expect it to
leave point at the start of the match, which is the opposite of what it
does.

Hm...  Oh!  That's wrong in the doc string, too -- it says that it moves
point to the start of the region, which it certainly doesn't.  I've now
fixed this in the two doc strings.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48317; Package emacs. Full text available.

Message received at 48317 <at> debbugs.gnu.org:


Received: (at 48317) by debbugs.gnu.org; 11 May 2021 23:19:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 11 19:19:04 2021
Received: from localhost ([127.0.0.1]:37769 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lgbea-0003Cg-3I
	for submit <at> debbugs.gnu.org; Tue, 11 May 2021 19:19:04 -0400
Received: from mout.gmx.net ([212.227.15.18]:39583)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stephen.berman@HIDDEN>) id 1lgbeY-0003CC-DR
 for 48317 <at> debbugs.gnu.org; Tue, 11 May 2021 19:19:03 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1620775135;
 bh=XAuuTtRqZssw0NCj4/JoyQWkXuGYfX0watrV9cEFqwE=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=VKsGna6ff0mUv8YR0j/ugZSmsQ9j9z5qnwzACAJSYCISrnslpnWJPyx/941lOHgTm
 B3a+H6Y6YNl5Kc23W/XG8HdrKHr2GlmtjBnlM2ATH92Dk4BwIZSBYtpi5ACDP04Ml4
 lwcOHy9lijJx4B+/+zhV8++tuantrrFJghOnmC7c=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from strobe-jhalfs ([94.220.122.97]) by mail.gmx.net (mrgmx005
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M4JmN-1lgKfW2C7l-000Nb9; Wed, 12
 May 2021 01:18:55 +0200
From: Stephen Berman <stephen.berman@HIDDEN>
To: Howard Melman <hmelman@HIDDEN>
Subject: Re: bug#48317: 27.1; text-property-search-forward moves point to
 end when not found
References: <0ECAF0D9-7D8C-4BAA-AFFE-B76634BD0B28@HIDDEN>
 <83o8dj7s48.fsf@HIDDEN>
 <616F7732-ED83-40F0-A460-9298608EAD91@HIDDEN>
 <83lf8n7q8d.fsf@HIDDEN>
 <8877DDB9-7D2B-4DCC-8374-EB8391134EAC@HIDDEN>
 <83fsyv7o4y.fsf@HIDDEN> <87mtt3c62q.fsf@HIDDEN>
 <4E8819BD-AA07-4870-8A90-98FB1F3D45E4@HIDDEN>
 <87fsytpi1s.fsf@HIDDEN>
 <53218944-7009-4BA7-AE3D-BF025EFD41AF@HIDDEN>
 <87mtt1kz1j.fsf@HIDDEN>
 <9D0AA29D-DE30-43D7-8109-84636A3D36F0@HIDDEN>
Date: Wed, 12 May 2021 01:18:51 +0200
In-Reply-To: <9D0AA29D-DE30-43D7-8109-84636A3D36F0@HIDDEN> (Howard Melman's
 message of "Tue, 11 May 2021 15:28:48 -0400")
Message-ID: <87fsys7tb8.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:w8ARJuMDppenJ5aBylchm5bNpY7nCPcTNNVVBki3ahKFD8lmq1L
 ot7wcU368bAh2dKd4Zj+lgEKGTLtpho+o5P5D8J6XQYdqN2fUtSp+svxvshXyoXBnVOfIEb
 dqInUkq+F+u2BCzI4+YAm3yc896zn0J0gnFwbOWPVo3ACEw/hirvrWaiS0ZPp6ZHEP7WyLo
 +5fwzSQWIvQJLUnxN2xOQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:7Odjv2TnWtU=:JsjiSimPICQZLrumbVp23h
 s/jC+uOnwTjZ3S5Vrux8ezKNJW861R5wn002QghFZCG163fkAQ9tzcUikSORFwEXcrCDHZmYt
 rMMNxzoJmiRhu4uGZqm4Qi2z0K7zNWvIV1PbhYlJSy+oBwlr6EGxAmGrhlSB/0hlhjN1OmqaV
 XKtPcc8hWwCSQXLhFodquA+SPGIgIRehzcgZx5iwo8/MpkEWNqRFvoESnLGnYAm53x4xllMGp
 HHaoGmZZDL8gT0uQOjYFM/lQwEl82nBDvm/r7LmrbXlCR3OqASqm0Tc8pQww4mhDap9XnBScK
 XiD2ilwPHjt4f/2Jf3V0YwVNIVJyMWT68E+Sgpr3fQsE2OANt3l7i9fwz+yf0lK6+sYPUsrVZ
 3vntvTNXZMaIA3bxakkt9orFqAP2CHlAa42DD5B+7NUaEj6RKQUEfkQrtbyLgcZySgbjnl9V+
 oDjJS4Xh6B+MV4UvJ3lpMq12kFldB0JdxEwa2WzSqDql398U0XchBp0dd4yio5aM/QiTpC6hx
 0Jbe/B9wQnhfOsw0N4xzWiZcJF4S30Ua2LJ4L1wOuv5VKHh5jFWKjBmR0WegI/1SUQATLZyaj
 NCPxZuaLVQ2D49wPXNUgVIz74ERgZDnWEkb+0It5Z/cMObYsVy8jWptyS6fmbIp0Qb7Q1j5N0
 az/3y/m0lnqErA9sSkLYSqf4KS+O7cYq+zC4XjY/t4Um8BDwCgHrRt7aDbwZaqUEWeqfBqlQJ
 bRAfUKu5rZpxI331xQkYfClzyUQMMYXjr6VFEgre6AVHr1GcsMH/fSNg9hLAqRgcywYamEUSj
 faIg1sTq0F/yReHx8vHWHTx//4ZETRt6EaA4f7YoQ3E7tS+e7lwjTI2tMTj/vog0w2kddeFIH
 sPkyxwDOrpNi9b7JpvfQ1jhf/I6t2FwhEmnxn8S7svCktOUEpddjESHFxW9zTyQKVrV+vxt5A
 YSfYQYwtOPqSUFu6CV24ndwswQ/sV6w1ooj05FoD6aVRDPIJz0v6IGcxfm6acDGEkIUkg43ov
 OuYTnW/z2bt+CzGCYqZZPZBi/DCacq2Jn9lupBdRbA87acPlJXCUQi3+T4EzXevXGCiRiJ/kg
 ToVPOorZS3dwyaxjoV7BLX+7kpDBLaVKF6qa1glEbAPotbFGDUMnoU9m2A6hoDCqXPvSrav6X
 AVxLy10jjfU+Qf//VV/4xi1MyAULPWxvVBedwRX7DOSpgwHnZfjV9OKjVSsEwHLENgemfF3Va
 u8W4pJt2JFnIhNtVB
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 48317
Cc: Lars Ingebrigtsen <larsi@HIDDEN>, 48317 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On Tue, 11 May 2021 15:28:48 -0400 Howard Melman <hmelman@HIDDEN> wrote:

> To me, this function behaves unexpectedly different in these cases
> (say in a font-locked elisp buffer just before the last defun):
>
>     ;; a region with property face is found,
>     ;; point is moved to the end of it
>     (text-property-search-forward 'face)
>
>     ;; a region with property unused is not found,
>     ;; point is unmoved
>     (text-property-search-forward 'unused)
>
>     ;; a region with the specfied face is found,
>     ;; point is moved to the beginning of it
>     (text-property-search-forward 'face 'font-lock-function-name-face)
>
>     ;; a region with the specfied face is not found,
>     ;; point is moved to eob
>     (text-property-search-forward 'face 'unused)
>
>     ;; a region with the specfied property is not found,
>     ;; point is moved to eob
>     (text-property-search-forward 'unused-prop 'unused-value)
>
> The first two behave perfectly reasonably to me.  And as the manual
> suggests, behaves the same as search-forward.
>
> The 3rd does as well, of course.
>
> I'd expect both the 4th and the 5th to behave the same as the 2nd but
> they move point to eob.
>
> And while I now mostly understand (but don't fully grok) the logic,
> it's baffling to me that to make the last three behave like the first
> two I should set PREDICATE to t (and btw doing so changes the behavior
> of the 3rd to leave point at the end of the match instead of the
> beginning, which seems odd).

It's behaving as documented: without t, the search found some other
value of 'face (possibly nil) not equal to 'font-lock-function-name-face
and moved to the end of the thus propertized text, as documented.  You
should see this in the return value (shown as a message), which could be
something like this: #s(prop-match 37 41 nil)

> The difference between the 3rd and 4th isn't some subtle difference
> between using equal and eq or something, it's that the specified value
> of the face is not found as it was using the default predicate in the
> 3rd case.

No, in the third case the search stopped before the specified value was
found.

>            And particularly in the 5th, the choice of predicate to
> evaluate 'unused-value shouldn't come into play because 'unused-prop
> itself isn't found.
>
> And the documentation describing PREDICATE nil didn't help me at all.
> In the manual it says for nil:
>
>     (which means =E2=80=9Cnot equal=E2=80=9D)
>
> which sounds to me as if it is using the function not.=20=20
>
> And in your updated docstring as:
>
>     a value will match if is not `equal' to VALUE
>
> which really throws me because the 3rd case above works and it's=20
> not "not `equal'" to font-lock-function-name-face!

Again, this is correct: the found value (possibly nil, as illustrated
above) is not equal to 'font-lock-function-name-face.

> Does this explain my confusion?
>
> I interpret all of these:
>
>     (search-forward "defun")
>     (text-property-search-forward 'face)
>     (text-property-search-forward 'face 'font-lock-function-name-face)
>
> to mean search for the thing I specified, whether that's a string, a
> specific property with any value or a specific property with a
> specific value.  But somehow the last one is different. And try as I
> might now to write how it's being interpreted I'm unable to. Search
> for the property face but only if it is font-lock-function-name-face
> or if it isn't...?

In light of the above explanations, is it clearer now?

Steve Berman




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48317; Package emacs. Full text available.

Message received at 48317 <at> debbugs.gnu.org:


Received: (at 48317) by debbugs.gnu.org; 11 May 2021 19:28:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 11 15:28:57 2021
Received: from localhost ([127.0.0.1]:37466 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lgY3s-0001cM-Ot
	for submit <at> debbugs.gnu.org; Tue, 11 May 2021 15:28:57 -0400
Received: from mail-qk1-f174.google.com ([209.85.222.174]:40599)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hmelman@HIDDEN>) id 1lgY3r-0001c7-3U
 for 48317 <at> debbugs.gnu.org; Tue, 11 May 2021 15:28:56 -0400
Received: by mail-qk1-f174.google.com with SMTP id q136so19922400qka.7
 for <48317 <at> debbugs.gnu.org>; Tue, 11 May 2021 12:28:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=t+ziCaBvvlCulswqpvVe5LTvrJ+nxvNesUnNspLECHI=;
 b=QvhQOdQGJYi8wRCf1MencdD2jCOLa81r6QHdVdygFYxqZtyrspLPfBRj7keDtVJ1hm
 awNQDuPnYgXHRzKpVL52Y9xsEhi7mocv+p/Np80/4jRcztUCI1/pC+BZCobTHlpK5r2r
 3XCTAzOhHSqs4oE5gMFjHf3+p44XroRyL0Aw1/Skao3Rm2dXWfCYPJf8HsFCivwPfGaR
 sfj7gQe+2VUkVAypO1vtL+rO9gCoV3lc0m9WGHEmIBuQg7qcDx73G6bGQuI/I3DCkPDK
 WfGN3r0IDjAR10CvPE02szo/j6mY4me9dG52HZMTzySOwY9LUtgLPKYgHndOGVdNUBGz
 XIFw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=t+ziCaBvvlCulswqpvVe5LTvrJ+nxvNesUnNspLECHI=;
 b=fGB9ck9iw6DC/Xg54Zivdz2kzLHrVVbqguhdFJU0r/iw2zWgkCEw2hfGCNy9vjS+mc
 7O3YXaj+HFsG63/dpoOeLoEtSi5bI3v7GGgL624Y0LuCfeZCpFCU7YmdMCZlwCzs0pUB
 OwnCCmriVKHXDBLDpmcIb82N0tnBcW25HZyz8+oRG65wJOAx2K3SFf6vRXIsYZsm1qiq
 y08P3fmeFVJw+GrBOIE6B1elOhteJPAGkYmR0QipNJrYo6p+z/HhawuWCVCtTt85alSK
 0ZbUC1/l/QGORIfL7dlkMK5+qyDYNCgjOf6w5XrQl++4bOM8Z9MYvxRz7zWIt7AA6+2v
 KJ2A==
X-Gm-Message-State: AOAM533ZYBVcwNIaay1ecEAkw+ATaSflAmU173r3TDDREmGP6o2ySFDG
 Hnewa8b26BBdFhEZr0bfoYKlqzijQ0k=
X-Google-Smtp-Source: ABdhPJzywznmnbEQepr3IylhIk6Qpvse2NqvVuqzTpcXNXMMGAK/KR1J1BkBbmqeo3H6pJTKSuJQXQ==
X-Received: by 2002:a05:620a:14b5:: with SMTP id
 x21mr29684496qkj.298.1620761329223; 
 Tue, 11 May 2021 12:28:49 -0700 (PDT)
Received: from lumet2.home (pool-108-26-204-101.bstnma.fios.verizon.net.
 [108.26.204.101])
 by smtp.gmail.com with ESMTPSA id y4sm14573099qti.53.2021.05.11.12.28.48
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 11 May 2021 12:28:48 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.6\))
Subject: Re: bug#48317: 27.1; text-property-search-forward moves point to end
 when not found
From: Howard Melman <hmelman@HIDDEN>
In-Reply-To: <87mtt1kz1j.fsf@HIDDEN>
Date: Tue, 11 May 2021 15:28:48 -0400
Content-Transfer-Encoding: quoted-printable
Message-Id: <9D0AA29D-DE30-43D7-8109-84636A3D36F0@HIDDEN>
References: <0ECAF0D9-7D8C-4BAA-AFFE-B76634BD0B28@HIDDEN>
 <83o8dj7s48.fsf@HIDDEN> <616F7732-ED83-40F0-A460-9298608EAD91@HIDDEN>
 <83lf8n7q8d.fsf@HIDDEN> <8877DDB9-7D2B-4DCC-8374-EB8391134EAC@HIDDEN>
 <83fsyv7o4y.fsf@HIDDEN> <87mtt3c62q.fsf@HIDDEN>
 <4E8819BD-AA07-4870-8A90-98FB1F3D45E4@HIDDEN> <87fsytpi1s.fsf@HIDDEN>
 <53218944-7009-4BA7-AE3D-BF025EFD41AF@HIDDEN> <87mtt1kz1j.fsf@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
X-Mailer: Apple Mail (2.3608.120.23.2.6)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 48317
Cc: 48317 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On May 11, 2021, at 12:36 PM, Lars Ingebrigtsen <larsi@HIDDEN> wrote:
>=20
> Howard Melman <hmelman@HIDDEN> writes:
>=20
>>> I'm sorry, I don't follow you.  It this still about
>>>=20
>>> (text-property-search-forward 'facet 'foo)
>>>=20
>>> ?  That works as designed, as far as I can tell.  (But not as =
documented
>>> in the Emacs 27.1 doc string.)
>>=20
>> Yes, Note that says "facet" and not "face"
>=20
> Yes, that the text property you're looking for is called `facet'?
>=20
>> To be more clear, I find when calling:
>>=20
>>  (text-property-search-forward 'unused-property 'my-package-face)
>>=20
>> when no text in the buffer has the property unused-property, that
>> calling text-property-search-forward moves point to eob.
>>=20
>> Is this intended behavior?  If so I don't understand why.=20
>=20
> I'm not sure I understand what you're not understanding.  :-) =20

I have felt the same way :)  Thanks for your patience.

> You're using nil as the PREDICATE here (a missing parameter is nil), =
which
> means that you're searching for areas in the buffer where the text
> property `facet' is not equal to `foo'.  Which is the rest of the =
buffer.

Thank you for explaining the logic and not just saying "working as =
designed".
"Which is the rest of the buffer." is what clicked for me.

I was reading "text-property-search-forward" as "look forward to find
a text property PROPERTY with value VALUE."  There wasn't one, so the
search should should fail and not move point. =20

To me, this function behaves unexpectedly different in these cases
(say in a font-locked elisp buffer just before the last defun):

    ;; a region with property face is found,
    ;; point is moved to the end of it
    (text-property-search-forward 'face)

    ;; a region with property unused is not found,
    ;; point is unmoved
    (text-property-search-forward 'unused)

    ;; a region with the specfied face is found,
    ;; point is moved to the beginning of it
    (text-property-search-forward 'face 'font-lock-function-name-face)

    ;; a region with the specfied face is not found,
    ;; point is moved to eob
    (text-property-search-forward 'face 'unused)

    ;; a region with the specfied property is not found,
    ;; point is moved to eob
    (text-property-search-forward 'unused-prop 'unused-value)

The first two behave perfectly reasonably to me.  And as the manual
suggests, behaves the same as search-forward.

The 3rd does as well, of course.

I'd expect both the 4th and the 5th to behave the same as the 2nd but
they move point to eob.

And while I now mostly understand (but don't fully grok) the logic,
it's baffling to me that to make the last three behave like the first
two I should set PREDICATE to t (and btw doing so changes the behavior
of the 3rd to leave point at the end of the match instead of the
beginning, which seems odd).

The difference between the 3rd and 4th isn't some subtle difference
between using equal and eq or something, it's that the specified value
of the face is not found as it was using the default predicate in the
3rd case.  And particularly in the 5th, the choice of predicate to
evaluate 'unused-value shouldn't come into play because 'unused-prop
itself isn't found.

And the documentation describing PREDICATE nil didn't help me at all.
In the manual it says for nil:

    (which means =E2=80=9Cnot equal=E2=80=9D)

which sounds to me as if it is using the function not. =20

And in your updated docstring as:

    a value will match if is not `equal' to VALUE

which really throws me because the 3rd case above works and it's=20
not "not `equal'" to font-lock-function-name-face!

Does this explain my confusion?

I interpret all of these:

    (search-forward "defun")
    (text-property-search-forward 'face)
    (text-property-search-forward 'face 'font-lock-function-name-face)

to mean search for the thing I specified, whether that's a string, a
specific property with any value or a specific property with a
specific value.  But somehow the last one is different. And try as I
might now to write how it's being interpreted I'm unable to. Search
for the property face but only if it is font-lock-function-name-face
or if it isn't...?

Howard






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48317; Package emacs. Full text available.

Message received at 48317 <at> debbugs.gnu.org:


Received: (at 48317) by debbugs.gnu.org; 11 May 2021 16:36:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 11 12:36:51 2021
Received: from localhost ([127.0.0.1]:37227 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lgVNL-0003hJ-MM
	for submit <at> debbugs.gnu.org; Tue, 11 May 2021 12:36:51 -0400
Received: from quimby.gnus.org ([95.216.78.240]:48918)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1lgVNK-0003h5-0h
 for 48317 <at> debbugs.gnu.org; Tue, 11 May 2021 12:36:50 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=ayG6TT3zrJuVaFQ2gDT9VCqK4o/Fs/P/ofJTCUGKgjo=; b=WFgir471MGhMNGAQ1pj1XuvH2u
 +DKMSDpHza3Xbl4o9/GPiznWaD/wUNF6Om89DwfH6pK8fcMDpqqlz8ygM7eV4nK2N92V2lYBuDz9M
 7i6dlimbBdwuJjg98Z7Lx7EGoq01Xl/W8PUwH2hktt1FAvdgZcsn5Me/4bVBxvfEujEg=;
Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1lgVNB-0007So-16; Tue, 11 May 2021 18:36:43 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Howard Melman <hmelman@HIDDEN>
Subject: Re: bug#48317: 27.1; text-property-search-forward moves point to
 end when not found
References: <0ECAF0D9-7D8C-4BAA-AFFE-B76634BD0B28@HIDDEN>
 <83o8dj7s48.fsf@HIDDEN>
 <616F7732-ED83-40F0-A460-9298608EAD91@HIDDEN>
 <83lf8n7q8d.fsf@HIDDEN>
 <8877DDB9-7D2B-4DCC-8374-EB8391134EAC@HIDDEN>
 <83fsyv7o4y.fsf@HIDDEN> <87mtt3c62q.fsf@HIDDEN>
 <4E8819BD-AA07-4870-8A90-98FB1F3D45E4@HIDDEN>
 <87fsytpi1s.fsf@HIDDEN>
 <53218944-7009-4BA7-AE3D-BF025EFD41AF@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEXo3LLLxrOJfXRn
 ZVscGhNFOzb///9zooAFAAAAAWJLR0QGYWa4fQAAAAd0SU1FB+UFCxAZODqYmhYAAAGpSURBVDjL
 nZRLuqQgDIXRuwGjn/MGZF7y2ICSBViY/W+lAz6rrzXpM6gB/3fIIUkpxC814llVIyr1CKQC981S
 BJ1jaXdJqbGAIbJ8vGveAJqID0AO0zCvTw4zkn5ygFbvkB5r2ICPNbSnx1QS+hwXU/j3KtHTLDw5
 HdYPsGkIShXLHD6Bsa3S2YHZt4OaWzMs0LoMiC7w86qbYRSdI2TDBSoDSgySDcg32euq2rYSvCwV
 4gxX8UrLulGwPWPWdIL6D5RcfKDj4q939Eu2iS7EqaKKjbgDI0WV2sYQLY0Gs8bJ72BMjbbdSvQS
 /ciOpd+An0Bpy+NdOWp+JHTTBhBKo1LqI7ocgXbA5VQbUI3KY4g0c5Ud+MjPSG0IK4NAhAdw0Sr9
 7krTKec9gCXH5QceBQOPK743sDqXeDE9F0ZK3MoTWE2UbGk45h86wJinmkLKWeMaz1QklSlTpc9l
 CCTb2+pcwBCA3g4w0g34BNDa4iG8A91UwOj3VXkbW2XOU97VG3DnVvOS1RfozqTTts8H0Oc+v/L8
 T3He47/87YNRFubL5wSgAfEf+gvMZqt+vS6oGgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMS0wNS0x
 MVQxNjoyNTo1NiswMDowMKRvoioAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEtMDUtMTFUMTY6MjU6
 NTYrMDA6MDDVMhqWAAAAAElFTkSuQmCC
X-Now-Playing: Seigen Ono's _Comme des =?utf-8?Q?Gar=C3=A7ons?= Volume Two_:
 "You Will Be All Right"
Date: Tue, 11 May 2021 18:36:40 +0200
In-Reply-To: <53218944-7009-4BA7-AE3D-BF025EFD41AF@HIDDEN> (Howard Melman's
 message of "Tue, 11 May 2021 10:20:01 -0400")
Message-ID: <87mtt1kz1j.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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:  Howard Melman <hmelman@HIDDEN> writes: >> I'm sorry, I
 don't follow you. It this still about >> >> (text-property-search-forward
 'facet 'foo) >> >> ? That works as designed, as far as I can tell. (But not
 as documented >> in the Emacs 27.1 [...] 
 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: 48317
Cc: Eli Zaretskii <eliz@HIDDEN>, 48317 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Howard Melman <hmelman@HIDDEN> writes:

>> I'm sorry, I don't follow you.  It this still about
>> 
>>  (text-property-search-forward 'facet 'foo)
>> 
>> ?  That works as designed, as far as I can tell.  (But not as documented
>> in the Emacs 27.1 doc string.)
>
> Yes, Note that says "facet" and not "face"

Yes, that the text property you're looking for is called `facet'?

> To be more clear, I find when calling:
>
>   (text-property-search-forward 'unused-property 'my-package-face)
>
> when no text in the buffer has the property unused-property, that
> calling text-property-search-forward moves point to eob.
>
> Is this intended behavior?  If so I don't understand why. 

I'm not sure I understand what you're not understanding.  :-)  You're
using nil as the PREDICATE here (a missing parameter is nil), which
means that you're searching for areas in the buffer where the text
property `facet' is not equal to `foo'.  Which is the rest of the
buffer.

If you're looking for a portion of the buffer where `unused-property' is
`my-package-face', then you should say:

(text-property-search-forward 'unused-property 'my-package-face t)

or

(text-property-search-forward 'unused-property 'my-package-face #'eq)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48317; Package emacs. Full text available.

Message received at 48317 <at> debbugs.gnu.org:


Received: (at 48317) by debbugs.gnu.org; 11 May 2021 14:20:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 11 10:20:10 2021
Received: from localhost ([127.0.0.1]:37022 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lgTF4-0006Qb-8o
	for submit <at> debbugs.gnu.org; Tue, 11 May 2021 10:20:10 -0400
Received: from mail-qt1-f172.google.com ([209.85.160.172]:39547)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hmelman@HIDDEN>) id 1lgTF2-0006QK-Oj
 for 48317 <at> debbugs.gnu.org; Tue, 11 May 2021 10:20:09 -0400
Received: by mail-qt1-f172.google.com with SMTP id f8so10495005qth.6
 for <48317 <at> debbugs.gnu.org>; Tue, 11 May 2021 07:20:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=U0pSUKLLkQD9mJbxtjlxlmQf3PJgQQB1bRBpgkCqbF8=;
 b=Puwd3K9wnT6lM0fY+OUvNc/oIZASRbWNa9r72VSd4iEylp8ERJcvRn8wsQbZrev/2n
 1XlWw8B2lTfpn01N7Q2BTKGGhsyu81GhIHLf+RABZPzc/oTew1CCqk4ebURZWHW9j/Qd
 JSpQGO2cxgU0p/d8Spqe6bx93I2H0z9ckVcOfQjgpJfn29KfZS5BnsGGOp3In5BGTocj
 fQ4Vu98J1uWi5luYj58glXxmcv1knuIqODpaXjMy8Wl5L43FgPP8ynQIMNxiEVbmvaqB
 fn1iHeCZPXd5SZViTdkG1AOufacBCbC2CnOpUZuc37vyv3D5ySNYAHgcn+AI45s+/yt5
 BlMg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=U0pSUKLLkQD9mJbxtjlxlmQf3PJgQQB1bRBpgkCqbF8=;
 b=eiTSsnIMXwm34nMll9N+ulrkhPEHmynX5hUEXzQ/RUMheY7UEL/W2fq+qd8my9vXfY
 zUwsFoanVvGyZ3z0+cJoTeq+6FZr7wL+Aui0tVL/OwNe7Q8H3tr1Fng9SZtLqOVxH6TR
 i1OUVW8MO/z2uiBLGsZoXTp+37ITUV6l0mEIhep4U3U5WLXv6tO21JRPvdH+RwA+spce
 +T2tXT0yVzX9Qac2VFGY8dkMTR16CflEePigZnHY4Pf32/WCuGtp1BlbWx8BnIHPz8v+
 jnzfuBGCSa5cSrNjtHlceg6hVgxQWIrQV0QQV1YhI3wKpAvlUpujG101tyvGUU+xSoZY
 O5DA==
X-Gm-Message-State: AOAM532KSdKW6kBFDQQEGfd2eVA5LGv3htPbs/F+1gnDACcjT84RqB0w
 yYJIM0svXMamnp2zSCrWHoA=
X-Google-Smtp-Source: ABdhPJzy4N+FINs4sRMM/1+dSl2wrmOPNjuWdoD4204YDdsubpD+OiCczhGEEH7xqz0nLn/VEiJpKQ==
X-Received: by 2002:a05:622a:113:: with SMTP id
 u19mr5238177qtw.323.1620742803155; 
 Tue, 11 May 2021 07:20:03 -0700 (PDT)
Received: from lumet2.home (pool-108-26-204-101.bstnma.fios.verizon.net.
 [108.26.204.101])
 by smtp.gmail.com with ESMTPSA id g140sm12954243qke.32.2021.05.11.07.20.02
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 11 May 2021 07:20:02 -0700 (PDT)
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.6\))
Subject: Re: bug#48317: 27.1; text-property-search-forward moves point to end
 when not found
From: Howard Melman <hmelman@HIDDEN>
In-Reply-To: <87fsytpi1s.fsf@HIDDEN>
Date: Tue, 11 May 2021 10:20:01 -0400
Content-Transfer-Encoding: quoted-printable
Message-Id: <53218944-7009-4BA7-AE3D-BF025EFD41AF@HIDDEN>
References: <0ECAF0D9-7D8C-4BAA-AFFE-B76634BD0B28@HIDDEN>
 <83o8dj7s48.fsf@HIDDEN> <616F7732-ED83-40F0-A460-9298608EAD91@HIDDEN>
 <83lf8n7q8d.fsf@HIDDEN> <8877DDB9-7D2B-4DCC-8374-EB8391134EAC@HIDDEN>
 <83fsyv7o4y.fsf@HIDDEN> <87mtt3c62q.fsf@HIDDEN>
 <4E8819BD-AA07-4870-8A90-98FB1F3D45E4@HIDDEN> <87fsytpi1s.fsf@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
X-Mailer: Apple Mail (2.3608.120.23.2.6)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 48317
Cc: Eli Zaretskii <eliz@HIDDEN>, 48317 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On May 11, 2021, at 8:32 AM, Lars Ingebrigtsen <larsi@HIDDEN> wrote:
>=20
>> If no region has the named property I can't see how it can be found
>> and therefore point should not be moved.  In fact I don't see how =
predicate
>> even comes into play in this case.
>=20
> I'm sorry, I don't follow you.  It this still about
>=20
>  (text-property-search-forward 'facet 'foo)
>=20
> ?  That works as designed, as far as I can tell.  (But not as =
documented
> in the Emacs 27.1 doc string.)

Yes, Note that says "facet" and not "face"

To be more clear, I find when calling:

  (text-property-search-forward 'unused-property 'my-package-face)

when no text in the buffer has the property unused-property, that
calling text-property-search-forward moves point to eob.

Is this intended behavior?  If so I don't understand why.=20

If I set the predicate to t point is not moved which is what I want,
but I don't see why that should be the case.  Does Emacs check for
properties with equal?

I think the bug is in the test commented as "We're standing in the
property we're looking for, so find the end" because the test is
matched because

    (get-text-property (point) property)

returns nil and text-property--match-p is called with

    (my-package-face nil nil)=20

and returns non-nil.  I don't think this test should match
because point is not in the property unused-property.

Howard








Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48317; Package emacs. Full text available.

Message received at 48317 <at> debbugs.gnu.org:


Received: (at 48317) by debbugs.gnu.org; 11 May 2021 13:14:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 11 09:14:24 2021
Received: from localhost ([127.0.0.1]:35365 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lgSDQ-00043w-9P
	for submit <at> debbugs.gnu.org; Tue, 11 May 2021 09:14:24 -0400
Received: from quimby.gnus.org ([95.216.78.240]:46636)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1lgSDO-00043j-FW
 for 48317 <at> debbugs.gnu.org; Tue, 11 May 2021 09:14:23 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=rSMkiz5bPycLUfvAHnPElYfbEQjoTItTSJts1FDO5Hk=; b=HWdnTBGkqCIproLyCz2PnAGqvy
 8V2x4mnmxaJWyqvNW5/EgVX9khD6MNcwONyku54W1LZdyxecJjN1qjHQqZPB1zmeTggYPInIq8Wvh
 d61wBiBtq8WQSTTse65zQ9qBc8HLsukMFBD4dAY+0+ZzktlJJVWe9y6OM+mBIdMQ9SxU=;
Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1lgSDF-0005HU-FC; Tue, 11 May 2021 15:14:16 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#48317: 27.1; text-property-search-forward moves point to
 end when not found
References: <0ECAF0D9-7D8C-4BAA-AFFE-B76634BD0B28@HIDDEN>
 <83o8dj7s48.fsf@HIDDEN>
 <616F7732-ED83-40F0-A460-9298608EAD91@HIDDEN>
 <83lf8n7q8d.fsf@HIDDEN>
 <8877DDB9-7D2B-4DCC-8374-EB8391134EAC@HIDDEN>
 <83fsyv7o4y.fsf@HIDDEN> <87mtt3c62q.fsf@HIDDEN>
 <4E8819BD-AA07-4870-8A90-98FB1F3D45E4@HIDDEN>
 <87fsytpi1s.fsf@HIDDEN> <8335ut5tcu.fsf@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAGFBMVEUVERIrJihBPUBg
 XGCAfIGjn6Xv7vD////g1UvdAAAAAWJLR0QHFmGI6wAAAAd0SU1FB+UFCw0NO5nBLNoAAAG5SURB
 VDjLhZRBc7MgEIYXrT2jDt8ZtcnZinhO52s8mxo5tyHu//8JBcQklc50Z3Qcnn2Xd1cU4M8gJP1t
 OYU0Tekv6Wa5KmhYJC2LTDQhKCvRlO3/oBQp2+ncqjEEVatwwhBE4h1NfISexGTB63adgsRHQO+A
 OVCv+ubW9dMPIJVeAcFZjcg9eJe4VMsAcrpcDjTZIiaVMVxH8q2+uVR8BfGhQ81XkMxOnApz4x2i
 T9fwNLuHbLR343jZI0aeuD1Ibs2RQnkQoa7wYiu9aLue9d5uhDi6RtJK20K18g0S1BIdsKXK3VXh
 sIIYZ+f2CnDuZ8RPD06gFjABKDTgsvg9cugWoGoDTPjRkZHu3R6ZGqCzYPagpfvBNShr2DmJnyIb
 GHegMM9KGOCHlb/d3y7DYcLZK/L6DogajmpNZIeHA2Q6v9yyHs5XPBJ1Dc7bRImgZuzNFvQaeGTe
 YKCI1Qh572f4I55PsVgHcjdqJbXqcFuI2U8y1v1WAHtacEjGvt6CDkoOuzNCqIg4SKlDwM1JzOUp
 BAdgkZgOAfg3ACuO09YsgeQT2Ks8b/MpxF+QVFkbgiCI+VOQlH4DpZRdomXERJgAAAAldEVYdGRh
 dGU6Y3JlYXRlADIwMjEtMDUtMTFUMTM6MTM6NTkrMDA6MDDb9HeWAAAAJXRFWHRkYXRlOm1vZGlm
 eQAyMDIxLTA1LTExVDEzOjEzOjU5KzAwOjAwqqnPKgAAAABJRU5ErkJggg==
X-Now-Playing: Coil's _Love's Secret Domain (2)_: "Snow (demonic apollo a
 version)"
Date: Tue, 11 May 2021 15:14:12 +0200
In-Reply-To: <8335ut5tcu.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 11 May
 2021 15:48:33 +0300")
Message-ID: <87pmxxo1jv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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:  Eli Zaretskii <eliz@HIDDEN> writes: > Did you push that?
 I don't think I see the change. I keep forgetting to push, for some reason...
 now done. 
 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: 48317
Cc: 48317 <at> debbugs.gnu.org, hmelman@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

> Did you push that?  I don't think I see the change.

I keep forgetting to push, for some reason...  now done.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48317; Package emacs. Full text available.

Message received at 48317 <at> debbugs.gnu.org:


Received: (at 48317) by debbugs.gnu.org; 11 May 2021 12:48:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 11 08:48:37 2021
Received: from localhost ([127.0.0.1]:35294 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lgRoS-0001DX-WE
	for submit <at> debbugs.gnu.org; Tue, 11 May 2021 08:48:37 -0400
Received: from eggs.gnu.org ([209.51.188.92]:37508)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1lgRoR-0001DI-0j
 for 48317 <at> debbugs.gnu.org; Tue, 11 May 2021 08:48:35 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:47986)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1lgRoL-00013A-Au; Tue, 11 May 2021 08:48:29 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1162
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1lgRoK-0004ga-RZ; Tue, 11 May 2021 08:48:29 -0400
Date: Tue, 11 May 2021 15:48:33 +0300
Message-Id: <8335ut5tcu.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
In-Reply-To: <87fsytpi1s.fsf@HIDDEN> (message from Lars Ingebrigtsen on Tue, 
 11 May 2021 14:32:31 +0200)
Subject: Re: bug#48317: 27.1; text-property-search-forward moves point to
 end when not found
References: <0ECAF0D9-7D8C-4BAA-AFFE-B76634BD0B28@HIDDEN>
 <83o8dj7s48.fsf@HIDDEN>
 <616F7732-ED83-40F0-A460-9298608EAD91@HIDDEN>
 <83lf8n7q8d.fsf@HIDDEN>
 <8877DDB9-7D2B-4DCC-8374-EB8391134EAC@HIDDEN>
 <83fsyv7o4y.fsf@HIDDEN> <87mtt3c62q.fsf@HIDDEN>
 <4E8819BD-AA07-4870-8A90-98FB1F3D45E4@HIDDEN> <87fsytpi1s.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 48317
Cc: 48317 <at> debbugs.gnu.org, hmelman@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Lars Ingebrigtsen <larsi@HIDDEN>
> Cc: Eli Zaretskii <eliz@HIDDEN>,  48317 <at> debbugs.gnu.org
> Date: Tue, 11 May 2021 14:32:31 +0200
> 
> Howard Melman <hmelman@HIDDEN> writes:
> 
> > What threw me (and I still think is problematic) is this line from the docstring:
> >
> >     If not found, return nil and don't move point.
> >
> > And this line from the manual:
> >
> >      If the text property can’t be found, the function returns ‘nil’.
> 
> I've now fixed the doc string in Emacs 28.

Did you push that?  I don't think I see the change.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48317; Package emacs. Full text available.

Message received at 48317 <at> debbugs.gnu.org:


Received: (at 48317) by debbugs.gnu.org; 11 May 2021 12:32:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 11 08:32:48 2021
Received: from localhost ([127.0.0.1]:35272 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lgRZA-000778-8n
	for submit <at> debbugs.gnu.org; Tue, 11 May 2021 08:32:48 -0400
Received: from quimby.gnus.org ([95.216.78.240]:46142)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1lgRZ8-000734-6c
 for 48317 <at> debbugs.gnu.org; Tue, 11 May 2021 08:32:46 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID
 :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=l0z4nGXfUxtfpuMw3jWFYKpKW3dusWrtLU4O9B6RRII=; b=Ho9ReE9QfleDSQ1+DnSCBxnvZ3
 fHyBaBQyVy+mTWUPXcWsVCRGQxBNouGIvgywk+xrTSk2srDqmfLKOysCrYg8yCZz8v9m5nHtRM0RA
 PHiYUBIi/blWNeA0DLppt0cklReGxs9MRLSAkp+JuH5oLqIhBSEokDoH3gcN1rX0rhrQ=;
Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1lgRYu-0004lK-5D; Tue, 11 May 2021 14:32:34 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Howard Melman <hmelman@HIDDEN>
Subject: Re: bug#48317: 27.1; text-property-search-forward moves point to
 end when not found
References: <0ECAF0D9-7D8C-4BAA-AFFE-B76634BD0B28@HIDDEN>
 <83o8dj7s48.fsf@HIDDEN>
 <616F7732-ED83-40F0-A460-9298608EAD91@HIDDEN>
 <83lf8n7q8d.fsf@HIDDEN>
 <8877DDB9-7D2B-4DCC-8374-EB8391134EAC@HIDDEN>
 <83fsyv7o4y.fsf@HIDDEN> <87mtt3c62q.fsf@HIDDEN>
 <4E8819BD-AA07-4870-8A90-98FB1F3D45E4@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAJ1BMVEUxKihGNCpVRS9k
 NSVhVURsUC2KYSowOkd7ZTwwQVOMdU6niU7///8670f3AAAAAWJLR0QMgbNRYwAAAAd0SU1FB+UF
 CwwCOfGVOw4AAAGrSURBVDjLdVOxTsMwED27ChHbnUOYY4uUiomqYgfEBySh6cDGEMSYDbFWdGFC
 CKniT/g8zkna2C6c2lrJe3f37p0LMIRAIMEnH0bh8DLjZ34pRPdkFIxBzEHOEJbrAbsfm0kOwEwE
 ednVOrkhHJGuRNGTCBzARl32ALfygdUAQK9hjDSDIHoOyT2vdQGifQGn0uSeiHqKFxg1RNgR3b6C
 SDW7iYU7Nzcu9764Srkt9cfgwb5WVKSICHnNm/AslFYrospXmZfBUjV3zaiq/VpMJqtNNpkPsM8C
 WadqEP3maIcjTE0RmMh0+0k3IWALS1PKMlid1YXRU8klQyDSGG3m886P1gWUwaPHZHEIsNapZoD9
 iF0g5ouRJ4sr4ksYe4ti1jRbJDbjxWvO+aeaBI8Zb31l3y1vly9uvG19T+ItD5NwIb+SEPk5QJIA
 fpjljQfJqgWaAHzVd9eBX7H9bxx/hp5IiDUq/dqGV07O8rVOK6N1mPJgjJbV7PYAEN1XnXVTBO6n
 euzoplRv7wX+AcDz8uKnGBbqAYpoPSRnwa6cPXhGHqgZaQT/hOPHLysFLiUgmIu1AAAAJXRFWHRk
 YXRlOmNyZWF0ZQAyMDIxLTA1LTExVDEyOjAyOjU3KzAwOjAweBFhsAAAACV0RVh0ZGF0ZTptb2Rp
 ZnkAMjAyMS0wNS0xMVQxMjowMjo1NyswMDowMAlM2QwAAAAASUVORK5CYII=
X-Now-Playing: Coil's _Love's Secret Domain (1)_: "Teenage Lightning 2"
Date: Tue, 11 May 2021 14:32:31 +0200
In-Reply-To: <4E8819BD-AA07-4870-8A90-98FB1F3D45E4@HIDDEN> (Howard Melman's
 message of "Mon, 10 May 2021 09:06:08 -0400")
Message-ID: <87fsytpi1s.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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:  Howard Melman <hmelman@HIDDEN> writes: > What threw me
   (and I still think is problematic) is this line from the docstring: > > If
    not found, return nil and don't move point. > > And this line from the manual:
    > > If the text property can [...] 
 
 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: 48317
Cc: Eli Zaretskii <eliz@HIDDEN>, 48317 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Howard Melman <hmelman@HIDDEN> writes:

> What threw me (and I still think is problematic) is this line from the do=
cstring:
>
>     If not found, return nil and don't move point.
>
> And this line from the manual:
>
>      If the text property can=E2=80=99t be found, the function returns =
=E2=80=98nil=E2=80=99.

I've now fixed the doc string in Emacs 28.

> Which I assume also infers point is not moved. If no region has the
> named property I can't see how it can be found and therefore point
> should not be moved.  In fact I don't see how predicate even comes
> into play in this case.

I'm sorry, I don't follow you.  It this still about

  (text-property-search-forward 'facet 'foo)

?  That works as designed, as far as I can tell.  (But not as documented
in the Emacs 27.1 doc string.)

--=20
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48317; Package emacs. Full text available.

Message received at 48317 <at> debbugs.gnu.org:


Received: (at 48317) by debbugs.gnu.org; 10 May 2021 13:06:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 10 09:06:18 2021
Received: from localhost ([127.0.0.1]:57698 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lg5c1-0005C8-Jn
	for submit <at> debbugs.gnu.org; Mon, 10 May 2021 09:06:17 -0400
Received: from mail-qk1-f174.google.com ([209.85.222.174]:44898)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hmelman@HIDDEN>) id 1lg5bz-0005Bt-BM
 for 48317 <at> debbugs.gnu.org; Mon, 10 May 2021 09:06:15 -0400
Received: by mail-qk1-f174.google.com with SMTP id a2so15138711qkh.11
 for <48317 <at> debbugs.gnu.org>; Mon, 10 May 2021 06:06:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=qR9ZgmyFd5Zm2E100Lbysid1+KyYUjX6NH+4ynntHgs=;
 b=rQ1VHiwTQsEhohWxkPtriGotwC3T9X5Kt94lVADllO/hMXt9nLQsWUyNyLfQJIIiJT
 a03zETA8RAtz7Oy72E2TFy7z5ZP4GvjhODzlvzOo9zvnhM080pu5jv7BzXcufJ5CskYi
 yig+/63EQqbBNDEe4s7sdxKfWw5N84Xlh+QlBLS8CFY/6YhP6USR6jP/+s1KLddeKqEp
 cMkj02tNXtVIPwZnepkZDQYXdIkP/p8Bbglj0AaXPvod742qQj66z7TIIAAbTRW7DLhF
 O1xNiVTdGCDXD8ZhZGPwSxghJ5UkDrOJuZW1jZPKgtz71tgOYomTsVQ/8y+tFMWx99gF
 Io/w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=qR9ZgmyFd5Zm2E100Lbysid1+KyYUjX6NH+4ynntHgs=;
 b=fZ5zTQKFyUi6n/GwcrpB14kyttErpx7xiC2tRhNbThJKK5O+lscF1+v/2T9EliH1F2
 /WZ9DSxFojylJyIHCvvyCSPXN4yX0p56qan/2lNptYtjMBYPZHL0JGL9cmq1eRI07pYm
 zjY5UppuNm9v/DwfMxOi6SYXtO6rVPtyxWq/bxbiAXKl/mt73XuUSty82ScTik+EmIdK
 kC2aoUa9yN0ju/LdQQ+nq6+5PQyP9b4KpbJWhMhMavhwIoPxdhDGqi15LooQv+9JCV21
 gfAyAzKSXlxWG7mBDnstfTsOaTGXCnUw82p2MrJsEp01MXKfY4BKHJvPEoeTv5nHBgDZ
 DK/w==
X-Gm-Message-State: AOAM531PhOxmLzH124Hi3wSIFeDL2UwehKs9ZlssGUF4f1IyqBmQX/J0
 07yy9hw1MElvuhT3Dded3Ns=
X-Google-Smtp-Source: ABdhPJxdHswB2mno+tSsiOViEUikcCrZ6rsukKGoXqB5mv1zlFO5kS87O1CBFA0jgl6yf/kYgCW7Yg==
X-Received: by 2002:a05:620a:13d5:: with SMTP id
 g21mr5297645qkl.494.1620651969802; 
 Mon, 10 May 2021 06:06:09 -0700 (PDT)
Received: from lumet2.home (pool-108-26-204-101.bstnma.fios.verizon.net.
 [108.26.204.101])
 by smtp.gmail.com with ESMTPSA id b1sm9427192qtt.67.2021.05.10.06.06.08
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Mon, 10 May 2021 06:06:09 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.6\))
Subject: Re: bug#48317: 27.1; text-property-search-forward moves point to end
 when not found
From: Howard Melman <hmelman@HIDDEN>
In-Reply-To: <87mtt3c62q.fsf@HIDDEN>
Date: Mon, 10 May 2021 09:06:08 -0400
Content-Transfer-Encoding: quoted-printable
Message-Id: <4E8819BD-AA07-4870-8A90-98FB1F3D45E4@HIDDEN>
References: <0ECAF0D9-7D8C-4BAA-AFFE-B76634BD0B28@HIDDEN>
 <83o8dj7s48.fsf@HIDDEN> <616F7732-ED83-40F0-A460-9298608EAD91@HIDDEN>
 <83lf8n7q8d.fsf@HIDDEN> <8877DDB9-7D2B-4DCC-8374-EB8391134EAC@HIDDEN>
 <83fsyv7o4y.fsf@HIDDEN> <87mtt3c62q.fsf@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
X-Mailer: Apple Mail (2.3608.120.23.2.6)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 48317
Cc: Eli Zaretskii <eliz@HIDDEN>, 48317 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On May 10, 2021, at 5:05 AM, Lars Ingebrigtsen <larsi@HIDDEN> wrote:

> I think the doc string is wrong -- you rewrote it in 165890a and =
further
> in df05c26.  The original doc string was correct, I think:
>=20
> +Some convenience values for PREDICATE can also be used.  `t'
> +means the same as `equal'.  `nil' means almost the same as \"not
> +equal\", but will also end the match if the value of PROPERTY
> +changes.  See the manual for extensive examples.
>=20
> The code performs as originally documented in the test case from =
Howard,
> as far as I can tell.

Ok, setting property to t solves both of my cases.

What threw me (and I still think is problematic) is this line from the =
docstring:

    If not found, return nil and don't move point.

And this line from the manual:

     If the text property can=E2=80=99t be found, the function returns =
=E2=80=98nil=E2=80=99.

Which I assume also infers point is not moved. If no region has the =
named property I can't see how it can be found and therefore point =
should not be moved.  In fact I don't see how predicate even comes into =
play in this case. =20

I still think there's a bug here:

    ;; We're standing in the property we're looking for, so find the
    ;; end.
    ((and (text-property--match-p value (get-text-property (point) =
property)
                                  predicate)
          (not not-current))
     (text-property--find-end-forward (point) property value predicate))

Because this solves my problem:

    ((and (get-text-property (point) property)
          (text-property--match-p value (get-text-property (point) =
property)
                                  predicate)
          (not not-current))
     (text-property--find-end-forward (point) property value predicate))

Howard=




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48317; Package emacs. Full text available.

Message received at 48317 <at> debbugs.gnu.org:


Received: (at 48317) by debbugs.gnu.org; 10 May 2021 09:05:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 10 05:05:15 2021
Received: from localhost ([127.0.0.1]:57384 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lg1ql-0006X8-J2
	for submit <at> debbugs.gnu.org; Mon, 10 May 2021 05:05:15 -0400
Received: from quimby.gnus.org ([95.216.78.240]:32930)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1lg1qg-0006Wm-SG
 for 48317 <at> debbugs.gnu.org; Mon, 10 May 2021 05:05:13 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=Tqe3nBIUhBouup7xoX7o4ydBBcjiwSoWMKgiuIWJ9lE=; b=WWFMWKr23viO8FbjVGRar6YW+U
 Nix5xFCA26f+pq6M8JVY5YKLQmLPbPco6Ji2KwTJVXhyIGbCKQkSyLVLn+8TyRW8Wza5okmyMhRHh
 tRQyzXBXXGGoHhpTDIqhakesd40P4Nc96/XxWLxZwGewg8fvcnCwu6wYVSK7sj37u3Gw=;
Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1lg1qX-0005Aw-Jy; Mon, 10 May 2021 11:05:04 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#48317: 27.1; text-property-search-forward moves point to
 end when not found
References: <0ECAF0D9-7D8C-4BAA-AFFE-B76634BD0B28@HIDDEN>
 <83o8dj7s48.fsf@HIDDEN>
 <616F7732-ED83-40F0-A460-9298608EAD91@HIDDEN>
 <83lf8n7q8d.fsf@HIDDEN>
 <8877DDB9-7D2B-4DCC-8374-EB8391134EAC@HIDDEN>
 <83fsyv7o4y.fsf@HIDDEN>
X-Now-Playing: Alva Noto & Anne-James Chaton's _Alphabet_: "LUNE"
Date: Mon, 10 May 2021 11:05:01 +0200
In-Reply-To: <83fsyv7o4y.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 09 May
 2021 21:33:49 +0300")
Message-ID: <87mtt3c62q.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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:  Eli Zaretskii <eliz@HIDDEN> writes: > Lars, would you please
 chime in? Since you coded this stuff, I'm sure > you will be able to explain
 its workings much better. I think the doc string is wrong -- you rewrote
 it in 165890a and further in df05c26. The original doc string was correct,
 I think: 
 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: 48317
Cc: 48317 <at> debbugs.gnu.org, Howard Melman <hmelman@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

> Lars, would you please chime in?  Since you coded this stuff, I'm sure
> you will be able to explain its workings much better.

I think the doc string is wrong -- you rewrote it in 165890a and further
in df05c26.  The original doc string was correct, I think:

+Some convenience values for PREDICATE can also be used.  `t'
+means the same as `equal'.  `nil' means almost the same as \"not
+equal\", but will also end the match if the value of PROPERTY
+changes.  See the manual for extensive examples.

The code performs as originally documented in the test case from Howard,
as far as I can tell.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48317; Package emacs. Full text available.

Message received at 48317 <at> debbugs.gnu.org:


Received: (at 48317) by debbugs.gnu.org; 9 May 2021 19:48:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 09 15:48:53 2021
Received: from localhost ([127.0.0.1]:56654 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lfpQ5-0001D5-9p
	for submit <at> debbugs.gnu.org; Sun, 09 May 2021 15:48:53 -0400
Received: from mail-qv1-f45.google.com ([209.85.219.45]:38478)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hmelman@HIDDEN>) id 1lfpQ0-0001Co-2N
 for 48317 <at> debbugs.gnu.org; Sun, 09 May 2021 15:48:51 -0400
Received: by mail-qv1-f45.google.com with SMTP id jm10so7382184qvb.5
 for <48317 <at> debbugs.gnu.org>; Sun, 09 May 2021 12:48:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=aBBYrAGhpSBgyRXWc4E6VNQMtScvel6BqO5wXizd0Ig=;
 b=i7GoZuh3GjAlED1SPzBGZ5uMYOU7DsRycoz6ZwgNAQWVdHjQOnbYlXeLBeS2dG4jRO
 3Uo4YpC0jhvbdXrkwTVvqHrC9I6ogdqT0KJafPrGBoS4vw1nu+D//lj6cE49JJpcClEc
 xRF+qjILnWWYpmb8yOzEMa+kOAdu10wNt/uVNBYxKmGAvk1CLbsRURAbyyPtkfSU1zxW
 n9aEVoi0Qq+6czrbmYC5w5oGcTOHER7eYl4CyDT4H/z0evdv1KyKnFy6Ut+6/qJ2Rh5e
 rZ+WP+b+2wwh0Uqr1WaleQghvajIb9/qwlPDSVHfSX/d3P+mSBpqapCN3muKKqReEpb2
 u0XQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=aBBYrAGhpSBgyRXWc4E6VNQMtScvel6BqO5wXizd0Ig=;
 b=XyIq5rXlZwJOtTd2QrdRNEUJaR4ZTUgLA7GmqBBrv6cuBbMlS1ssAb0SnAz0vmXMVV
 AifeJNSmg8GkNykd77/o0I/NK1oKQAmGulz8wmocKGEheZ8d7zDPTqD1iYA/cfRCXejW
 pltEmemLtBPslupethD2GqGavexFJTvobOiRBCy6HVrH0yyTJMFonoLML1/YccBNQRWz
 GsqazyvhnxaC9AUEOw5BHxUCKnnNqa68Gb0pfDc3C2l5YJWinKAYz0PKFAfYrwMcD24p
 2DaU4LfXLBFBAwNndWb8yCaC3W5k2LAvj8glWHqNNfzTmvCCeWzxARTfRCelZn2r540Y
 wB+A==
X-Gm-Message-State: AOAM533vVXLQxMbAHmZHK2k3FxfcvAHUvpFHBSLvLrhXIb06lk7udchN
 787fRJPFbhOe2DSQ6tu5v5w=
X-Google-Smtp-Source: ABdhPJwyQJRvrVvrdCJ8T6X/G7xylOQCTdM24lOsFTh2Oq2WMLGR+ROimgwn7VSHPcIlVGojSPyxbA==
X-Received: by 2002:a05:6214:c2e:: with SMTP id
 a14mr20457450qvd.34.1620589722205; 
 Sun, 09 May 2021 12:48:42 -0700 (PDT)
Received: from lumet2.home (pool-108-26-232-211.bstnma.fios.verizon.net.
 [108.26.232.211])
 by smtp.gmail.com with ESMTPSA id v8sm8089332qkg.102.2021.05.09.12.48.41
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 09 May 2021 12:48:41 -0700 (PDT)
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.6\))
Subject: Re: bug#48317: 27.1; text-property-search-forward moves point to end
 when not found
From: Howard Melman <hmelman@HIDDEN>
In-Reply-To: <83fsyv7o4y.fsf@HIDDEN>
Date: Sun, 9 May 2021 15:48:41 -0400
Content-Transfer-Encoding: quoted-printable
Message-Id: <C01BCE05-C48B-4B26-AA8F-9C13C8673208@HIDDEN>
References: <0ECAF0D9-7D8C-4BAA-AFFE-B76634BD0B28@HIDDEN>
 <83o8dj7s48.fsf@HIDDEN> <616F7732-ED83-40F0-A460-9298608EAD91@HIDDEN>
 <83lf8n7q8d.fsf@HIDDEN> <8877DDB9-7D2B-4DCC-8374-EB8391134EAC@HIDDEN>
 <83fsyv7o4y.fsf@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
X-Mailer: Apple Mail (2.3608.120.23.2.6)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 48317
Cc: Lars Ingebrigtsen <larsi@HIDDEN>, 48317 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On May 9, 2021, at 2:33 PM, Eli Zaretskii <eliz@HIDDEN> wrote:
>=20
> [Please use Reply All to keep the bug address on the CC list.]

My apologies.

> What is the difference between "not having a property" and "having a
> property with a nil value"?

I don't think this function should move point in either case.

> I'm trying to establish whether this is a documentation bug or a code
> bug.  For now, I tend to think it's the former.

FWIW, I would have appreciated some less oblique confirmation that you =
could=20
in fact reproduce my problem, particularly since I explicitly asked if =
you could and
you declined to answer it.

I think it's the latter.  I now see the bug seems to be in the test =
commented as
"We're standing in the property we're looking for" which is not the =
case.

My actual use case is trying to find a region with a specific face =
property. =20

  (text-property-search-forward 'face 'my-package-face)

When there's a region with this face it works great.  In the cases where =
there=20
is no region with this face property it moves point and I don't see why =
it should.
Based on my reading of the manual this is the appropriate function for =
that use,=20
if not I'd appreciate a pointer to one.

In creating a small reproducible test case it turns out it also moves =
point when=20
searching for a non-existing property if passed a value.

Howard





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48317; Package emacs. Full text available.

Message received at 48317 <at> debbugs.gnu.org:


Received: (at 48317) by debbugs.gnu.org; 9 May 2021 18:33:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 09 14:33:55 2021
Received: from localhost ([127.0.0.1]:56603 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lfoFX-0007qt-DS
	for submit <at> debbugs.gnu.org; Sun, 09 May 2021 14:33:55 -0400
Received: from eggs.gnu.org ([209.51.188.92]:35196)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1lfoFV-0007qj-HI
 for 48317 <at> debbugs.gnu.org; Sun, 09 May 2021 14:33:53 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:40044)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1lfoFP-0000fd-IH; Sun, 09 May 2021 14:33:48 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1246
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1lfoFO-000693-Tu; Sun, 09 May 2021 14:33:47 -0400
Date: Sun, 09 May 2021 21:33:49 +0300
Message-Id: <83fsyv7o4y.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Howard Melman <hmelman@HIDDEN>,
    Lars Ingebrigtsen <larsi@HIDDEN>
In-Reply-To: <8877DDB9-7D2B-4DCC-8374-EB8391134EAC@HIDDEN> (message from
 Howard Melman on Sun, 9 May 2021 14:10:56 -0400)
Subject: Re: bug#48317: 27.1; text-property-search-forward moves point to end
 when not found
References: <0ECAF0D9-7D8C-4BAA-AFFE-B76634BD0B28@HIDDEN>
 <83o8dj7s48.fsf@HIDDEN> <616F7732-ED83-40F0-A460-9298608EAD91@HIDDEN>
 <83lf8n7q8d.fsf@HIDDEN> <8877DDB9-7D2B-4DCC-8374-EB8391134EAC@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 48317
Cc: 48317 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

[Please use Reply All to keep the bug address on the CC list.]

> From: Howard Melman <hmelman@HIDDEN>
> Date: Sun, 9 May 2021 14:10:56 -0400
> 
> >> #s(prop-match 77 224 nil)
> >> 
> >> If I change 'foo to nil it does not move point.
> > 
> > So in your original use case it _did_ find a match, which is why it
> > moved point.
> 
> I don't think any region in the buffer has the property 'ffffffff let alone 
> with the value 'foo so I don't know what it thinks it's found.

What is the difference between "not having a property" and "having a
property with a nil value"?

> I see in the docstring:
> 
> If PREDICATE is nil, a value will match if it is non-nil and
> is NOT equal to VALUE.
> 
> But I don't think this applies because no region in the buffer has this property.

I'm trying to establish whether this is a documentation bug or a code
bug.  For now, I tend to think it's the former.

> Can you reproduce my simple test case?  
> Did it find a region with a random property name?

I don't think I understand the question.

Lars, would you please chime in?  Since you coded this stuff, I'm sure
you will be able to explain its workings much better.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48317; Package emacs. Full text available.

Message received at 48317 <at> debbugs.gnu.org:


Received: (at 48317) by debbugs.gnu.org; 9 May 2021 17:48:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 09 13:48:44 2021
Received: from localhost ([127.0.0.1]:56533 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lfnXo-0006n2-K4
	for submit <at> debbugs.gnu.org; Sun, 09 May 2021 13:48:44 -0400
Received: from eggs.gnu.org ([209.51.188.92]:56396)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1lfnXk-0006mw-O9
 for 48317 <at> debbugs.gnu.org; Sun, 09 May 2021 13:48:43 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:38980)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1lfnXe-0006Xp-Uh; Sun, 09 May 2021 13:48:35 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2447
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1lfnXe-0002f0-G4; Sun, 09 May 2021 13:48:34 -0400
Date: Sun, 09 May 2021 20:48:34 +0300
Message-Id: <83lf8n7q8d.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Howard Melman <hmelman@HIDDEN>
In-Reply-To: <616F7732-ED83-40F0-A460-9298608EAD91@HIDDEN> (message from
 Howard Melman on Sun, 9 May 2021 13:28:09 -0400)
Subject: Re: bug#48317: 27.1; text-property-search-forward moves point to end
 when not found
References: <0ECAF0D9-7D8C-4BAA-AFFE-B76634BD0B28@HIDDEN>
 <83o8dj7s48.fsf@HIDDEN> <616F7732-ED83-40F0-A460-9298608EAD91@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 48317
Cc: 48317 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

[Please use Reply All to keep the bug address on the CC list.]

> From: Howard Melman <hmelman@HIDDEN>
> Date: Sun, 9 May 2021 13:28:09 -0400
> 
> > On May 9, 2021, at 1:07 PM, Eli Zaretskii <eliz@HIDDEN> wrote:
> > 
> >> To reproduce in emacs -Q, with point at beginning of *scratch* buffer with
> >> text in it, eval:
> >> 
> >> (require 'text-property-search)
> >> (text-property-search-forward 'facet 'foo)
> >> 
> >> point is moved to end of buffer.
> > 
> > How do you know it "didn't find" in this case? what was the value it
> > returned?
> 
> It returned (from *Messages*):
> 
> #s(prop-match 75 222 nil)
> 
> I tried again with an explicative-laden property name and the value 'foo and it returned:
> 
> #s(prop-match 77 224 nil)
> 
> If I change 'foo to nil it does not move point.

So in your original use case it _did_ find a match, which is why it
moved point.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48317; Package emacs. Full text available.

Message received at 48317 <at> debbugs.gnu.org:


Received: (at 48317) by debbugs.gnu.org; 9 May 2021 17:07:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 09 13:07:56 2021
Received: from localhost ([127.0.0.1]:56352 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lfmuK-00062B-QH
	for submit <at> debbugs.gnu.org; Sun, 09 May 2021 13:07:56 -0400
Received: from eggs.gnu.org ([209.51.188.92]:50706)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1lfmuJ-000624-Mn
 for 48317 <at> debbugs.gnu.org; Sun, 09 May 2021 13:07:55 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:38288)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1lfmuD-0007FE-Qu; Sun, 09 May 2021 13:07:49 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3904
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1lfmuC-0003iv-C7; Sun, 09 May 2021 13:07:49 -0400
Date: Sun, 09 May 2021 20:07:51 +0300
Message-Id: <83o8dj7s48.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Howard Melman <hmelman@HIDDEN>
In-Reply-To: <0ECAF0D9-7D8C-4BAA-AFFE-B76634BD0B28@HIDDEN> (message from
 Howard Melman on Sun, 9 May 2021 12:41:17 -0400)
Subject: Re: bug#48317: 27.1;
 text-property-search-forward moves point to end when not found
References: <0ECAF0D9-7D8C-4BAA-AFFE-B76634BD0B28@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 48317
Cc: 48317 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Howard Melman <hmelman@HIDDEN>
> Date: Sun, 9 May 2021 12:41:17 -0400
> 
> 
> The documentation of function text-property-search-forward says:
> 
>     If not found, return nil and don’t move point.
> 
> Yet I find it moves point to eob.
> 
> To reproduce in emacs -Q, with point at beginning of *scratch* buffer with
> text in it, eval:
> 
> (require 'text-property-search)
> (text-property-search-forward 'facet 'foo)
> 
> point is moved to end of buffer.

How do you know it "didn't find" in this case? what was the value it
returned?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48317; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 9 May 2021 16:41:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 09 12:41:33 2021
Received: from localhost ([127.0.0.1]:56191 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lfmUm-0001QC-V5
	for submit <at> debbugs.gnu.org; Sun, 09 May 2021 12:41:33 -0400
Received: from lists.gnu.org ([209.51.188.17]:44454)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hmelman@HIDDEN>) id 1lfmUk-0001Q6-Ez
 for submit <at> debbugs.gnu.org; Sun, 09 May 2021 12:41:31 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:56828)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <hmelman@HIDDEN>) id 1lfmUk-0006zo-2x
 for bug-gnu-emacs@HIDDEN; Sun, 09 May 2021 12:41:30 -0400
Received: from mail-qt1-x831.google.com ([2607:f8b0:4864:20::831]:40821)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <hmelman@HIDDEN>) id 1lfmUe-0007UZ-G1
 for bug-gnu-emacs@HIDDEN; Sun, 09 May 2021 12:41:29 -0400
Received: by mail-qt1-x831.google.com with SMTP id j19so10299440qtp.7
 for <bug-gnu-emacs@HIDDEN>; Sun, 09 May 2021 09:41:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:content-transfer-encoding:mime-version:subject:message-id:date
 :to; bh=+BEmNY5ANWwjbEi+zvfR5SNQrCSbrT1fN980OYR7+JA=;
 b=LYl9C57XLBAfhlTxgBJjPzaIehq88V4IjM2iIAgo2PqlOj/XCj8tVubMZBxxlY1tpP
 AF1M8nIx7z5tLalaxkmDVa83ecute3hiLqv47byUaTi3n/AoFF3c19g/Mvb2ELC+stYw
 47qkY7jOHjC9O2DKDczr+XV3Oao9rH21eMpDJUS5BDnrhHUT9lO80fqOndsI5LWi8HFk
 mlefY+/ua0e1eEU9MV2f73u/bvUYHOh8NZDG7n9XesbqVUL6l2KR1x8HIg/1zqEjI+Rm
 zksNaRJ7yWX4Xm8Xigmqi+vaE/jv+VGwXe/L1HiB8Z3dLPDhRrBZcV3/OfvXzYB0XoPf
 owsA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:content-transfer-encoding:mime-version
 :subject:message-id:date:to;
 bh=+BEmNY5ANWwjbEi+zvfR5SNQrCSbrT1fN980OYR7+JA=;
 b=nFORMGyAOvu3qH0lA7XL1RvfbVRRV92p4srXcSBJI/P8zix4VJ6kcRe+f+acdyUstk
 jR0Pz/hnd91lbUfOyU4Z4KXvgBMM4uuCG/PwEbgsdDo+KmcTgLxhrvCG8Nc26Jd30kVd
 TweM2epoEiPsUgjoKhFaMw3qlQpbZ1UfdLH4J/17Tev6jV6zxiaK8Bgaoj2c5jb4RTob
 wscZcmHeX5FJ4U3Pl6HohrGouqpNNqPLkWXuAjwbNyteMQNEH93deA7ErB8w2V6uv+g1
 VgjoDaC1sda3JDUmOcmEHIX+SVVKquiFXaGZND5mP/8+7TRjIQKovX7LD0khCatYyAPy
 Nzkg==
X-Gm-Message-State: AOAM532Sc1VQ1R2OhhKQttNNEwKt53hYVCMs9YQ1Z5xSJkMBoLWKAKA0
 n9Xl0QvqydByyeTFHYDwmmAjPW4UVIk=
X-Google-Smtp-Source: ABdhPJwMWUymg+cMS5npAR1pR5omymx3tkUC8PbVBX0ksvBUvia2PW1Z9AAG5ZCaSAzOLuhFDtuBQA==
X-Received: by 2002:ac8:57c5:: with SMTP id w5mr13592100qta.166.1620578479384; 
 Sun, 09 May 2021 09:41:19 -0700 (PDT)
Received: from lumet2.home (pool-108-26-232-211.bstnma.fios.verizon.net.
 [108.26.232.211])
 by smtp.gmail.com with ESMTPSA id v66sm9273711qkd.113.2021.05.09.09.41.18
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 09 May 2021 09:41:18 -0700 (PDT)
From: Howard Melman <hmelman@HIDDEN>
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.6\))
Subject: 27.1; text-property-search-forward moves point to end when not found
Message-Id: <0ECAF0D9-7D8C-4BAA-AFFE-B76634BD0B28@HIDDEN>
Date: Sun, 9 May 2021 12:41:17 -0400
To: bug-gnu-emacs@HIDDEN
X-Mailer: Apple Mail (2.3608.120.23.2.6)
Received-SPF: pass client-ip=2607:f8b0:4864:20::831;
 envelope-from=hmelman@HIDDEN; helo=mail-qt1-x831.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)


The documentation of function text-property-search-forward says:

    If not found, return nil and don=E2=80=99t move point.

Yet I find it moves point to eob.

To reproduce in emacs -Q, with point at beginning of *scratch* buffer =
with
text in it, eval:

(require 'text-property-search)
(text-property-search-forward 'facet 'foo)

point is moved to end of buffer.

I can reporoduce this in GNUS Emacs 27.1 and the macport of 27.2.

Howard

In GNU Emacs 27.1 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 =
Version 10.14.6 (Build 18G95))
 of 2020-08-12 built on builder10-14.porkrind.org
Windowing system distributor 'Apple', version 10.3.1894
System Description:  Mac OS X 10.15.7

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Entering debugger...
Back to top level
Entering debugger...
Back to top level
Type C-x 1 to delete the help window, C-M-v to scroll help.
#s(prop-match 54 201 nil)
Mark activated
read--expression: Command attempted to use minibuffer while in =
minibuffer
Quit
Quit
Configured using:
 'configure --with-ns '--enable-locallisppath=3D/Library/Application
 Support/Emacs/${version}/site-lisp:/Library/Application
 Support/Emacs/site-lisp' --with-modules'

Configured features:
NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES
THREADS JSON PDUMPER

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config
gnus-util rmail rmail-loaddefs time-date subr-x mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cl-extra seq
byte-opt gv bytecomp byte-compile cconv flyspell ispell
text-property-search thingatpt help-fns radix-tree cl-print debug
backtrace help-mode easymenu find-func cl-loaddefs cl-lib tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win
ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset
image regexp-opt fringe tabulated-list replace newcomment text-mode
elisp-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads kqueue cocoa ns
multi-tty make-network-process emacs)

Memory information:
((conses 16 58535 6154)
 (symbols 48 6797 1)
 (strings 32 20507 1782)
 (string-bytes 1 622865)
 (vectors 16 11726)
 (vector-slots 8 142380 15728)
 (floats 8 34 33)
 (intervals 56 320 3)
 (buffers 1000 14))






Acknowledgement sent to Howard Melman <hmelman@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#48317; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 12 May 2021 17:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.