From: Eli Zaretskii <eliz@gnu.org>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: text.texi - `buffer-substring'
Date: Fri, 23 Jun 2006 10:50:18 +0300 [thread overview]
Message-ID: <u3bdwb9ad.fsf@gnu.org> (raw)
In-Reply-To: <449B8E6A.5090007@online.de> (message from Andreas Roehler on Fri, 23 Jun 2006 08:47:06 +0200)
> Date: Fri, 23 Jun 2006 08:47:06 +0200
> From: Andreas Roehler <andreas.roehler@online.de>
> Cc: Richard Stallman <rms@gnu.org>
>
> Evaluation of the given example to `buffer-substring'
> produces a different result as shown in the manual.
>
> Whereas the manual demonstrates
>
> ---------- Buffer: foo ----------
> This is the contents of buffer foo
>
> ---------- Buffer: foo ----------
>
> (buffer-substring 1 10)
> => "This is t"
>
> I get
>
> (buffer-substring 1 10)#("This is t" 0 1 (fontified t) 1 9 (fontified t))
I cannot reproduce this. If the buffer `foo' is in Fundamental mode,
I get precisely what the manual says.
Your output suggests that the buffer with the text has font-lock
turned on. Please see how could that happen in Fundamental mode.
> ie text-properties are copied as a kind of comment
> behind, not solely `along' as the info says.
That is normal behavior.
> (setq baz (buffer-substring 1 10))
>
> baz --> #("This is t" 0 1 (fontified t) 1 9 (fontified t))
>
> Maybe it's a `buffer-substring' bug ?
No, it's expected behavior when the buffer was fontified.
next prev parent reply other threads:[~2006-06-23 7:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-23 6:47 text.texi - `buffer-substring' Andreas Roehler
2006-06-23 6:47 ` Miles Bader
2006-06-23 7:18 ` Andreas Roehler
2006-06-23 7:50 ` Eli Zaretskii [this message]
2006-06-24 8:31 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=u3bdwb9ad.fsf@gnu.org \
--to=eliz@gnu.org \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.