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 10:34:25 -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 1153503303 4814 80.91.229.2 (21 Jul 2006 17:35:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 21 Jul 2006 17:35:03 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 21 19:35:00 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 1G3ytp-0003u2-JS for ged-emacs-devel@m.gmane.org; Fri, 21 Jul 2006 19:34:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G3ytp-0002rh-5E for ged-emacs-devel@m.gmane.org; Fri, 21 Jul 2006 13:34:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G3ytd-0002qK-EF for emacs-devel@gnu.org; Fri, 21 Jul 2006 13:34:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G3ytc-0002p8-LJ for emacs-devel@gnu.org; Fri, 21 Jul 2006 13:34:40 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G3ytc-0002ov-8G for emacs-devel@gnu.org; Fri, 21 Jul 2006 13:34:40 -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 1G3yu4-0003Ir-GP for emacs-devel@gnu.org; Fri, 21 Jul 2006 13:35:08 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1G3ytT-0003qy-OC for emacs-devel@gnu.org; Fri, 21 Jul 2006 19:34:31 +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 19:34:31 +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 19:34:31 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 32 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:57434 Archived-At: On Fri, 21 Jul 2006 08:55:57 -0400, Stefan Monnier wrote: >> xml-parse-file now includes text properties in its returned list, ala: > >> ((name . #("WV_APPLET" 0 9 (fontified nil))) (link . #("WV_APPLET.html" >> 0 14 (fontified nil)))) > >> when global-font-lock-mode is on, whereas before it did not. Was this >> intended? Any way to temporarily avoid fontification on loaded buffers >> (aside from turning global-font-lock-mode off prior to xml-parse-file)? > > Could you explain why the text properties cause problems? I'm parsing a very large XML file (a document link and calling syntax catalog for IDLWAVE), trimming it and making slight modifications, and then writing it out to file as a big set of sexp's for later recovery, primarily for reasons of speed. This file is read whenever IDLWAVE mode is first entered. With text properties (amounting simply to #(" " 0 5 (fontified nil))' constructs), the file is almost three times as large, erasing much of the speed advantage of translating to a LISP form in the first place. I use `prin1' to write the lists. I suppose I could spin through the list first and remove any text properties on strings, but it seems silly that parsing an XML file never loaded into an active buffer should be laden with inert properties like '(fontified nil). If there were a simple way to prevent that (other than turning global-font-lock off), that would suffice for my purposes, though not of course address the larger issue of text properties in XML parsed lists in general. JD