Subject: Re: bug#48317: 27.1; text-property-search-forward moves point to end when not found

From: Howard Melman <[email-masked]>
Date: Sun, 9 May 2021 15:48:41 -0400

On May 9, 2021, at 2:33 PM, Eli Zaretskii <[email-masked]> wrote:
> 
> [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 
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.  

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

When there's a region with this face it works great.  In the cases where there 
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, 
if not I'd appreciate a pointer to one.

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

Howard