unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: rms@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: get-text-property error if narrowed
Date: Sat, 29 Dec 2007 16:14:42 +0100	[thread overview]
Message-ID: <47766462.6000707@gmail.com> (raw)
In-Reply-To: <E1J8c6H-0003Dh-Bp@fencepost.gnu.org>

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	other threads:[~2007-12-29 15:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-28 20:24 get-text-property error if narrowed Lennart Borgman (gmail)
2007-12-29 13:51 ` Richard Stallman
2007-12-29 15:14   ` Lennart Borgman (gmail) [this message]
2007-12-30  1:37     ` Richard Stallman
2007-12-30  1:47       ` Lennart Borgman (gmail)
2007-12-30 14:02         ` Richard Stallman
2007-12-29 17:47 ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47766462.6000707@gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).