[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: get-text-property error if narrowed

From: Lennart Borgman (gmail)
Subject: Re: get-text-property error if narrowed
Date: Sat, 29 Dec 2007 16:14:42 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20071031 Thunderbird/ Mnenhy/

Richard Stallman wrote:
get-text-property signals an error if the position argument is outside a narrowed region. That is very inconvenient. It would be much better if it behaved like get-char-property which does not do this.

I just tried (get-char-property 1 'face) in my Rmail buffer and got an
error, so I think the two functions are alike in this regard.
I think that an error is the correct result in that case.
(buffer-substring also gives an error when the positions are out of range.)
Why do you think otherwise?

Is there a case in which get-char-property fails to give this error?

I think it happens when there is a property on an overlay. get-char-property finds that and returns it. If there is no overlay with the tested property then I get an error. (Note that I am using a CVS version from 2007-06-04.)

reply via email to

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