bug-gnu-emacs
[Top][All Lists]
Advanced

[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: Eli Zaretskii
Subject: bug#16413: 24.3.50; Inconsistent behavior of text property functions in narrowed buffer
Date: Sat, 11 Jan 2014 10:01:59 +0200

> Date: Fri, 10 Jan 2014 20:05:33 -0800
> From: Daniel Colascione <address@hidden>
> 
> On 01/10/2014 07:05 PM, Nathan Trapuzzano wrote:
> > The various functions for examining text properties behave unintuitively
> > and incosistently at (point-max) on narrowed buffers.  Rather than
> > returning `nil', they return the prop(s) of the text at (point-max),
> > even though the text is not actually visible in the buffer, due to
> > narrowing.  By contrast, `char-after' always returns `nil' when passed
> > (point-max).  It seems to me the text property functions should also
> > return `nil', as they do at (eobp) on widened buffers.
> 
> I agree that this behavior is unintuitive, but I wonder whether we can 
> fix this bug without breaking existing elisp.

I don't even agree it's not intuitive: in the eob case there's nothing
at point-max, while in a narrowed buffer there's a character there.
Narrowing is not documented to make the text outside the region to
magically disappear, it just prevents point from moving there.

Nathan, could you show an example where this hurts anything besides
intuition?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]