[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#16413: 24.3.50; Inconsistent behavior of text property functions in
From: |
Nathan Trapuzzano |
Subject: |
bug#16413: 24.3.50; Inconsistent behavior of text property functions in narrowed buffer |
Date: |
Sat, 11 Jan 2014 14:43:11 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Eli Zaretskii <eliz@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.
bug#16413: 24.3.50; Inconsistent behavior of text property functions in narrowed buffer, Eli Zaretskii, 2014/01/11
bug#16413: 24.3.50; Inconsistent behavior of text property functions in narrowed buffer, Stefan Monnier, 2014/01/11
bug#16413: 24.3.50; Inconsistent behavior of text property functions in narrowed buffer, Daniel Colascione, 2014/01/11
bug#16413: 24.3.50; Inconsistent behavior of text property functions in narrowed buffer, Eli Zaretskii, 2014/01/12
bug#16413: 24.3.50; Inconsistent behavior of text property functions in narrowed buffer, Stefan Monnier, 2014/01/12
bug#16413: 24.3.50; Inconsistent behavior of text property functions in narrowed buffer, Nathan Trapuzzano, 2014/01/12