From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: text.texi - `buffer-substring' Date: Fri, 23 Jun 2006 10:50:18 +0300 Message-ID: References: <449B8E6A.5090007@online.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1151049047 26888 80.91.229.2 (23 Jun 2006 07:50:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 23 Jun 2006 07:50:47 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 23 09:50:45 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FtgR7-0002om-0D for ged-emacs-devel@m.gmane.org; Fri, 23 Jun 2006 09:50:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FtgR6-0004Zl-It for ged-emacs-devel@m.gmane.org; Fri, 23 Jun 2006 03:50:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FtgQq-0004Xx-Mv for emacs-devel@gnu.org; Fri, 23 Jun 2006 03:50:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FtgQo-0004X3-Cx for emacs-devel@gnu.org; Fri, 23 Jun 2006 03:50:23 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FtgQo-0004Wy-1r for emacs-devel@gnu.org; Fri, 23 Jun 2006 03:50:22 -0400 Original-Received: from [192.114.186.20] (helo=nitzan.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Ftgbw-0000qh-FC; Fri, 23 Jun 2006 04:01:52 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-84-228-239-250.inter.net.il [84.228.239.250]) by nitzan.inter.net.il (MOS 3.7.3-GA) with ESMTP id DVM45213 (AUTH halo1); Fri, 23 Jun 2006 10:50:18 +0300 (IDT) Original-To: Andreas Roehler In-reply-to: <449B8E6A.5090007@online.de> (message from Andreas Roehler on Fri, 23 Jun 2006 08:47:06 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:56110 Archived-At: > Date: Fri, 23 Jun 2006 08:47:06 +0200 > From: Andreas Roehler > Cc: Richard Stallman > > 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.