From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#17964: 24.3; xml-print inserts spurious whitespace Date: Tue, 01 Mar 2016 17:14:52 +1100 Message-ID: <87oaayu3kz.fsf@gnus.org> References: <87fvidba7t.wl-jch@pps.univ-paris-diderot.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1456841840 2780 80.91.229.3 (1 Mar 2016 14:17:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Mar 2016 14:17:20 +0000 (UTC) Cc: 17964@debbugs.gnu.org To: Juliusz Chroboczek Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 01 15:17:10 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aal6s-0000Nb-DA for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Mar 2016 15:17:10 +0100 Original-Received: from localhost ([::1]:49910 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aal6r-0000hM-RY for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Mar 2016 09:17:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41111) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aal6n-0000f4-CV for bug-gnu-emacs@gnu.org; Tue, 01 Mar 2016 09:17:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aal6k-0008Tv-33 for bug-gnu-emacs@gnu.org; Tue, 01 Mar 2016 09:17:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57787) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aal6k-0008Tr-0X for bug-gnu-emacs@gnu.org; Tue, 01 Mar 2016 09:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aal6j-0001yJ-SX for bug-gnu-emacs@gnu.org; Tue, 01 Mar 2016 09:17:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Mar 2016 14:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17964 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix confirmed Original-Received: via spool by 17964-submit@debbugs.gnu.org id=B17964.14568417654768 (code B ref 17964); Tue, 01 Mar 2016 14:17:01 +0000 Original-Received: (at 17964) by debbugs.gnu.org; 1 Mar 2016 14:16:05 +0000 Original-Received: from localhost ([127.0.0.1]:54911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aal5p-0001Ee-0j for submit@debbugs.gnu.org; Tue, 01 Mar 2016 09:16:05 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:59694) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aal5l-00019q-Q9 for 17964@debbugs.gnu.org; Tue, 01 Mar 2016 09:16:03 -0500 Original-Received: from 2.151.173.136.tmi.telenormobil.no ([2.151.173.136] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aal3o-0005r5-6u; Tue, 01 Mar 2016 15:14:00 +0100 In-Reply-To: <87fvidba7t.wl-jch@pps.univ-paris-diderot.fr> (Juliusz Chroboczek's message of "Mon, 07 Jul 2014 14:54:30 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-MailScanner-ID: 1aal3o-0005r5-6u MailScanner-NULL-Check: 1457446440.82735@BJFG56RviFrc8L/dxK1RAw X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:114233 Archived-At: Juliusz Chroboczek writes: > I'm trying to use Emacs' XML parser to parse Atom feeds, and I'm finding > that xml-print inserts spurious whitespace in the XHTML content, which > breaks formatting. Here's a pretty minimal example: > > (require 'xml) > > (defun xml-parse-from-string (s) > (with-temp-buffer > (insert s) > (xml-parse-region (point-min) (point-max)))) > > (defun xml-print-to-string (x) > (with-temp-buffer > (xml-print x) > (buffer-substring (point-min) (point-max)))) > > (xml-print-to-string (xml-parse-from-string "

[foo]

")) > "

[ > foo] >

" I can confirm that this is still an issue on the Emacs trunk. However, our XML reader does not retain information about whitespace (or the lack of it). And

[ foo]

is perfectly valid XML. I don't really think there's a way to "fix" this, if it's considered a bug, which is kinda isn't. So I'm closing this as "wontfix". -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no