* bug#20411: 24.3; Docstring of `next-single-property-change'
@ 2015-04-23 14:08 Eli Barzilay
2015-04-23 15:31 ` Eli Zaretskii
0 siblings, 1 reply; 5+ messages in thread
From: Eli Barzilay @ 2015-04-23 14:08 UTC (permalink / raw)
To: 20411
The documentation for `next-single-property-change' has:
Return nil if the property is constant all the way to the end of
object. If the value is non-nil, it is a position greater than
position, never equal.
Both of these are wrong when a bound is given.
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#20411: 24.3; Docstring of `next-single-property-change'
2015-04-23 14:08 bug#20411: 24.3; Docstring of `next-single-property-change' Eli Barzilay
@ 2015-04-23 15:31 ` Eli Zaretskii
2015-04-23 20:29 ` Eli Barzilay
0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2015-04-23 15:31 UTC (permalink / raw)
To: Eli Barzilay; +Cc: 20411
> From: Eli Barzilay <eli@barzilay.org>
> Date: Thu, 23 Apr 2015 10:08:01 -0400
>
> The documentation for `next-single-property-change' has:
>
> Return nil if the property is constant all the way to the end of
> object. If the value is non-nil, it is a position greater than
> position, never equal.
>
> Both of these are wrong when a bound is given.
Which is why the doc string says, right after the text you cited:
If the optional fourth argument LIMIT is non-nil, don't search
past position LIMIT; return LIMIT if nothing is found before LIMIT.
Isn't this exactly what you were looking for?
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#20411: 24.3; Docstring of `next-single-property-change'
2015-04-23 15:31 ` Eli Zaretskii
@ 2015-04-23 20:29 ` Eli Barzilay
2015-04-24 8:28 ` Eli Zaretskii
0 siblings, 1 reply; 5+ messages in thread
From: Eli Barzilay @ 2015-04-23 20:29 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 20411
Bah. Yes, I completely missed that. Looking at it again, I think that
it's that "never equal" that threw me off and write code that assumes
that. To make it worse, it reads like an interface very similar to
`re-search-forward' up to that paragraph, and that "helped" me miss the
last sentence.
So I still think that it's confusing -- maybe "except when LIMIT is
non-nil" and possibly a warning that this is different from the
searching functions?
On Thu, Apr 23, 2015 at 11:31 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Eli Barzilay <eli@barzilay.org>
>> Date: Thu, 23 Apr 2015 10:08:01 -0400
>>
>> The documentation for `next-single-property-change' has:
>>
>> Return nil if the property is constant all the way to the end of
>> object. If the value is non-nil, it is a position greater than
>> position, never equal.
>>
>> Both of these are wrong when a bound is given.
>
> Which is why the doc string says, right after the text you cited:
>
> If the optional fourth argument LIMIT is non-nil, don't search
> past position LIMIT; return LIMIT if nothing is found before LIMIT.
>
> Isn't this exactly what you were looking for?
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#20411: 24.3; Docstring of `next-single-property-change'
2015-04-23 20:29 ` Eli Barzilay
@ 2015-04-24 8:28 ` Eli Zaretskii
2015-04-24 16:32 ` Eli Barzilay
0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2015-04-24 8:28 UTC (permalink / raw)
To: Eli Barzilay; +Cc: 20411-done
> Date: Thu, 23 Apr 2015 16:29:55 -0400
> From: Eli Barzilay <eli@barzilay.org>
> Cc: 20411@debbugs.gnu.org
>
> So I still think that it's confusing -- maybe "except when LIMIT is
> non-nil" and possibly a warning that this is different from the
> searching functions?
Thanks, I clarified the doc strings of this and similar functions in
this respect.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-04-24 16:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-23 14:08 bug#20411: 24.3; Docstring of `next-single-property-change' Eli Barzilay
2015-04-23 15:31 ` Eli Zaretskii
2015-04-23 20:29 ` Eli Barzilay
2015-04-24 8:28 ` Eli Zaretskii
2015-04-24 16:32 ` Eli Barzilay
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).