On Thu, Apr 12, 2012 at 2:55 PM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> I like this.  Gnus uses text properties extensively, and searching for
> them using the standard functions (`next-property-change' and friends)
> is a hassle.
> `search-property' looks like what I have needed in the past.

text-property-any (and t-p-not-all) seems to do the same, except it only
searches forward.  Is there some other difference I'm missing (other
than the `cycle' which doesn't seem tremendously useful)?

Differences compared to text-property-any:

 - Includes helper functions 'search-property-forward' and 'search-property-backward' which move point and closely match the interface and behavior of 'search-forward' and 'search-backward'.  (Except for 'count'.)  The interactive use is nice: when you need it, you really need it.

 - I don't remember what the original use case was for 'cycle'.  Possibly to emulate the effect of hitting TAB in Emacs Muse to go to the next URL (behavior that I would remove if I was starting again from scratch).

 - In the initial release of the file to gnu.emacs.sources, I wrote this blurb.  Maybe there was a related shortcoming in text-property-any at the time.

Blurb: "It should work perfectly well both in the case where consecutive
characters have the property, and in that where a single character has
the property."

--
Michael Olson  |  http://mwolson.org/