GNU bug report logs - #16413
24.3.50; Inconsistent behavior of text property functions in narrowed buffer

Previous Next

Package: emacs;

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

From: Nathan Trapuzzano <nbtrap <at> nbtrap.com>
To: Daniel Colascione <dancol <at> dancol.org>
Cc: 16413 <at> debbugs.gnu.org
Subject: bug#16413: 24.3.50; Inconsistent behavior of text property functions in narrowed buffer
Date: Sat, 11 Jan 2014 07:20:10 -0500
Daniel Colascione <dancol <at> dancol.org> 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.




This bug report was last modified 3 years and 24 days ago.

Previous Next


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