emacs-devel
[Top][All Lists]
Advanced

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

Re: xml-parse-region broken?


From: Stefan Monnier
Subject: Re: xml-parse-region broken?
Date: Fri, 01 Sep 2006 13:12:09 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>>>>> (require 'xml)
>>>>> (with-temp-buffer
>>>>> (insert "<a>\n</a>\n")
>>>>> (xml-parse-region 1 (point-max)))

>>>>> With 21.4.1, this gives ((a nil)).  With 22.0.50.1 (Debian version
>>>>> 1:20060824-1), it gives ((a nil "\n")).
>> I understood this part, but I don't know in what sense is the new
>> behavior broken.  The text bracketed by <a> ... </a> is indeed "\n",
>> isn't it?

> Hmm... yes, you're right.  As the comments in xml.el say

>> ;; Whitespace is preserved.  Fixme: There should be a tree-walker that
>> ;; can remove it.

> Fine, then, I'm coding for the new interface now.  What's the
> canonical way to detect at runtime which interface is implemented?

A user on this mailing-list earlier suggested to check the output of

    (with-temp-buffer
     (insert "<a>\n</a>\n")
     (xml-parse-region 1 (point-max)))


        Stefan ;-P


PS: I'd recommend to replace 1 with (point-min), tho.




reply via email to

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