unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* xml-parse-region broken?
@ 2006-09-01  0:16 Juliusz Chroboczek
  2006-09-01  2:17 ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Juliusz Chroboczek @ 2006-09-01  0:16 UTC (permalink / raw)


Try doing:

  (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")).

                                        Juliusz Chroboczek

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: xml-parse-region broken?
  2006-09-01  0:16 xml-parse-region broken? Juliusz Chroboczek
@ 2006-09-01  2:17 ` Stefan Monnier
  2006-09-01  2:23   ` Juliusz Chroboczek
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2006-09-01  2:17 UTC (permalink / raw)
  Cc: emacs-devel

> Try doing:
>   (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")).

In what way is that "broken"?


        Stefan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: xml-parse-region broken?
  2006-09-01  2:17 ` Stefan Monnier
@ 2006-09-01  2:23   ` Juliusz Chroboczek
  2006-09-01  2:35     ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Juliusz Chroboczek @ 2006-09-01  2:23 UTC (permalink / raw)
  Cc: emacs-devel

>> Try doing:
>>   (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")).

> In what way is that "broken"?

The result with 21.4.1 is correct.  The one with 22.0.50.1 is broken.

Sorry for not being explicit.

                                        Juliusz

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: xml-parse-region broken?
  2006-09-01  2:23   ` Juliusz Chroboczek
@ 2006-09-01  2:35     ` Stefan Monnier
  2006-09-01 13:50       ` Juliusz Chroboczek
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2006-09-01  2:35 UTC (permalink / raw)
  Cc: emacs-devel

>>> Try doing:
>>> (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")).

>> In what way is that "broken"?

> The result with 21.4.1 is correct.  The one with 22.0.50.1 is broken.

> Sorry for not being explicit.

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?


        Stefan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: xml-parse-region broken?
  2006-09-01  2:35     ` Stefan Monnier
@ 2006-09-01 13:50       ` Juliusz Chroboczek
  2006-09-01 17:12         ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Juliusz Chroboczek @ 2006-09-01 13:50 UTC (permalink / raw)
  Cc: emacs-devel

>>>> (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?

Thanks,

                                        Juliusz

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: xml-parse-region broken?
  2006-09-01 13:50       ` Juliusz Chroboczek
@ 2006-09-01 17:12         ` Stefan Monnier
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2006-09-01 17:12 UTC (permalink / raw)
  Cc: emacs-devel

>>>>> (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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-09-01 17:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-01  0:16 xml-parse-region broken? Juliusz Chroboczek
2006-09-01  2:17 ` Stefan Monnier
2006-09-01  2:23   ` Juliusz Chroboczek
2006-09-01  2:35     ` Stefan Monnier
2006-09-01 13:50       ` Juliusz Chroboczek
2006-09-01 17:12         ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).