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#21293: 24.5; libxml-xml-parse-region and comments at end of file Date: Tue, 01 Mar 2016 17:09:47 +1100 Message-ID: <87vb56u3tg.fsf@gnus.org> References: <20150819092903.GH2340@rdorte.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1456841790 1743 80.91.229.3 (1 Mar 2016 14:16:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Mar 2016 14:16:30 +0000 (UTC) Cc: 21293@debbugs.gnu.org To: patrick mc allister Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 01 15:16:16 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 1aal5y-0008Gn-EZ for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Mar 2016 15:16:14 +0100 Original-Received: from localhost ([::1]:49900 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aal5x-0008DP-Pr for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Mar 2016 09:16:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40403) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aal5s-0008AJ-NU for bug-gnu-emacs@gnu.org; Tue, 01 Mar 2016 09:16:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aal5m-000847-Mw for bug-gnu-emacs@gnu.org; Tue, 01 Mar 2016 09:16:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57777) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aal5m-000841-Ji for bug-gnu-emacs@gnu.org; Tue, 01 Mar 2016 09:16:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aal5m-0001Bs-FW for bug-gnu-emacs@gnu.org; Tue, 01 Mar 2016 09:16:02 -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:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21293 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21293-submit@debbugs.gnu.org id=B21293.14568417322926 (code B ref 21293); Tue, 01 Mar 2016 14:16:02 +0000 Original-Received: (at 21293) by debbugs.gnu.org; 1 Mar 2016 14:15:32 +0000 Original-Received: from localhost ([127.0.0.1]:54903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aal5H-0000kl-LQ for submit@debbugs.gnu.org; Tue, 01 Mar 2016 09:15:31 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:59670) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aal5F-0000i9-M8 for 21293@debbugs.gnu.org; Tue, 01 Mar 2016 09:15:30 -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 1aal3Z-0005q0-08; Tue, 01 Mar 2016 15:13:46 +0100 In-Reply-To: <20150819092903.GH2340@rdorte.org> (patrick mc allister's message of "Wed, 19 Aug 2015 11:29:03 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-MailScanner-ID: 1aal3Z-0005q0-08 MailScanner-NULL-Check: 1457446427.03343@Y+Tj95aAzXl2XvLnopShQw 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:114232 Archived-At: patrick mc allister writes: > It seems something goes wrong with `libxml-parse-xml-region' when > there are comments at the end of the file: > > emacs -Q > > then run this function to see the problem: > > (defun setup-problem () > (let ((testBuffer (get-buffer-create "*a libxml parse problem"))) > (with-current-buffer testBuffer > (erase-buffer) > (insert " > > ") > (goto-char (point-min)) > (libxml-parse-xml-region (point-min) (point-max))))) > > (setup-problem) ;; (top nil (comment nil " a comment ") (comment nil " another comment ")) I'm unable to reproduce this problem with the current Emacs trunk. I get: (top nil (something nil) (comment nil " a comment ") (comment nil " another comment ")) > So it seems the "something" element does not make it into the list? > The problem only appears if there are more than two comments at the > end. If there's only one, the region gets parsed as expected, and the > last comment gets lost: > > (defun setup-problem-b () > (let ((testBuffer (get-buffer-create "*a libxml parse problem"))) > (with-current-buffer testBuffer > (erase-buffer) > (insert " > ") > (goto-char (point-min)) > (libxml-parse-xml-region (point-min) (point-max))))) > > (setup-problem-b) ;; (something nil) And this seems to work, too. This looks like it was fixed by Ulf Jasper a while ago, according to the git log, so I'm closing this bug report. If you're still seeing this, please reopen. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no