GNU bug report logs -
#16413
24.3.50; Inconsistent behavior of text property functions in narrowed buffer
Previous Next
Reported by: Nathan Trapuzzano <nbtrap <at> nbtrap.com>
Date: Sat, 11 Jan 2014 03:07:01 UTC
Severity: wishlist
Found in version 24.3.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Eli Zaretskii <eliz <at> gnu.org> writes:
>> char-after is a primitive, and it behaves intuitively at (point-max) on
>> narrowed buffers. Why shouldn't other functions behave consistently?
>
> I don't know. One reason could be that we might need a primitive that
> can report properties of characters that are not reachable. But I
> don't have any evidence to that effect.
Even if there were such a need, it could always be achieved with
`save-restriction', etc. On the other hand, users should be able to
expect that functions behave consistently with respect to narrowing, and
these clearly don't
>> Nevermind about the search functions. I was confused about the behavior
>> of previous-single-property-change. The problem lies in the functions
>> that fetch the properties.
>
> The usual paradigm is to search for a possible place where the you
> might have the property, then examine the properties at that point.
> With this paradigm, if you never look at the properties when the
> search hits the limit of the search, you will never have this problem.
I was confused by how `previous-single-property-change' actually
doesn't look at the property at POSITION. It starts looking at (1-
position) and then find the first difference from that point. It's not
intuitive, but it makes sense if you think about it.
This bug report was last modified 3 years and 23 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.