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

Previous Next

Package: emacs;

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


Message #38 received at 48317 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Howard Melman <hmelman <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 48317 <at> debbugs.gnu.org
Subject: Re: bug#48317: 27.1; text-property-search-forward moves point to
 end when not found
Date: Tue, 11 May 2021 18:36:40 +0200
Howard Melman <hmelman <at> gmail.com> 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




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.