GNU bug report logs - #37488
27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward'

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Mon, 23 Sep 2019 06:04:01 UTC

Severity: normal

Found in version 27.0.50

Done: Juanma Barranquero <lekktu <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: michael_heerdegen <at> web.de, lekktu <at> gmail.com, 37488 <at> debbugs.gnu.org
Subject: Re: bug#37488: 27.0.50; Inconsistent naming of arg of
 `text-property-search-forward' and `-backward'
Date: Fri, 27 Sep 2019 16:15:47 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> But that's not what the code seems to do.  It just compares the value
> of property in the found region with that at point.  In this example,
> they both are "o", so the code will reject the "oo" region at the end,
> and try to find the next one (and fail, because there's none).

No.  Once again, you can test this behaviour with this simple code:

(insert "This is "
         (propertize "bold1" 'face 'bold)
         " and this is "
         (propertize "italic1" 'face 'italic)
         (propertize "bold2" 'face 'bold)
         (propertize "italic2" 'face 'italic)
         " at the end")

Put point inside the first bold text and see the difference between

(text-property-search-forward 'face 'bold t t)

(text-property-search-forward 'face 'bold t nil)

>> >> > I don't understand how this answers my questions.
>> >> 
>> >> Try (text-property-search-forward 'face) on the example.  It'll give you
>> >> all regions that has a face property.
>> >
>> > That's a weird way to get to the result, if someone wants it.
>> 
>> Seems like the obvious way to me.
>
> The obvious one would be to call next-single-property-change.

That doesn't give you the region matched.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 5 years and 294 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.