bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#48317: 27.1; text-property-search-forward moves point to end when no


From: Lars Ingebrigtsen
Subject: bug#48317: 27.1; text-property-search-forward moves point to end when not found
Date: Tue, 11 May 2021 18:36:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Howard Melman <hmelman@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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]