Subject: bug#16413: 24.3.50; Inconsistent behavior of text property functions in narrowed buffer

From: Nathan Trapuzzano <[email-masked]>
Date: Sat, 11 Jan 2014 07:20:10 -0500

Daniel Colascione <[email-masked]> writes:

> Which functions break, exactly? The following test passes.
>
> (ert-deftest text-property-narrowing ()
>   "Test that text properties outside narrowed buffer are invisible"
>   (with-temp-buffer
>     (insert "  ")
>     (put-text-property (1- (point-max)) (point-max) 'foo 'bar)
>     (should (eq (get-text-property (1- (point-max)) 'foo) 'bar))
>     (narrow-to-region (point-min) (1- (point-max)))
>     (should (null (get-text-property (1- (point-max)) 'foo)))))

Those tests are looking at (1- (point-max)).  I'm talking about
(point-max).  Functions that I know to be problematic include:

get-text-property
text-properties-at
previous-single-property-change

But I would geuss the problem extends to all text property fetch/search
functions.