GNU bug report logs -
#48317
27.1; text-property-search-forward moves point to end when not found
Previous Next
Reported by: Howard Melman <hmelman <at> gmail.com>
Date: Sun, 9 May 2021 16:42:02 UTC
Severity: normal
Found in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On May 9, 2021, at 2:33 PM, Eli Zaretskii <eliz <at> gnu.org> 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
This bug report was last modified 3 years and 7 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.