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


Message #47 received at 16413 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Nathan Trapuzzano <nbtrap <at> nbtrap.com>
Cc: dancol <at> dancol.org, 16413 <at> debbugs.gnu.org
Subject: Re: bug#16413: 24.3.50;
 Inconsistent behavior of text property functions in narrowed buffer
Date: Sat, 11 Jan 2014 16:17:21 +0200
> From: Nathan Trapuzzano <nbtrap <at> nbtrap.com>
> Cc: dancol <at> dancol.org,  16413 <at> debbugs.gnu.org
> Date: Sat, 11 Jan 2014 08:52:23 -0500
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> Functions that I know to be problematic include:
> >> 
> >> get-text-property
> >> text-properties-at
> >> previous-single-property-change
> >
> > The first two are low-level primitives that explicitly ignore the
> > narrowing; don't use them if you want them to be limited to the
> > narrowed region.
> 
> 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.

> 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.




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

Previous Next


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