From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: JD Smith Newsgroups: gmane.emacs.devel Subject: Re: xml-parse-file and text properties Date: Fri, 21 Jul 2006 14:45:27 -0700 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1153518373 16154 80.91.229.2 (21 Jul 2006 21:46:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 21 Jul 2006 21:46:13 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 21 23:46:11 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 1G42oq-0008In-WE for ged-emacs-devel@m.gmane.org; Fri, 21 Jul 2006 23:46:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G42oq-000170-IL for ged-emacs-devel@m.gmane.org; Fri, 21 Jul 2006 17:46:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G42oc-00015n-TG for emacs-devel@gnu.org; Fri, 21 Jul 2006 17:45:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G42ob-00015K-Dw for emacs-devel@gnu.org; Fri, 21 Jul 2006 17:45:46 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G42ob-00015H-7n for emacs-devel@gnu.org; Fri, 21 Jul 2006 17:45:45 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1G42p5-0007Ah-Tr for emacs-devel@gnu.org; Fri, 21 Jul 2006 17:46:16 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1G42oR-0008D9-2d for emacs-devel@gnu.org; Fri, 21 Jul 2006 23:45:35 +0200 Original-Received: from turtle.as.arizona.edu ([128.196.208.207]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 21 Jul 2006 23:45:35 +0200 Original-Received: from jdsmith by turtle.as.arizona.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 21 Jul 2006 23:45:35 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 22 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: turtle.as.arizona.edu User-Agent: Pan/0.14.2.91 (As She Crawled Across the Table) 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:57450 Archived-At: On Fri, 21 Jul 2006 16:52:37 -0400, Thien-Thi Nguyen wrote: > JD Smith writes: > >> I'm parsing a very large XML file >> [...] >> never loaded into an active buffer > > do you use `xml-parse-file' w/ a FILE that refers to a file not currently > visited (in a buffer)? looks like `xml-parse-file' uses `find-file' to > handle that case. maybe something like the following would give better > results? This is similar to the improved method Richard proposed yesterday (insert-file-contents using a temporary buffer). Remarkably enough (and highly surprising to me), even inserting the XML file contents in a temporary buffer is enough to get '(fontified nil) text properties added all over, which xml-parse-file dutifully returns (unless modified with *-no-properties). JD