emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xml-parse-file and text properties


From: JD Smith
Subject: Re: xml-parse-file and text properties
Date: Fri, 21 Jul 2006 10:34:25 -0700
User-agent: Pan/0.14.2.91 (As She Crawled Across the Table)

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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]