From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#10405: 24.0.92; XML parser -- problem handling comments Date: Mon, 09 Jan 2012 16:47:18 +0100 Message-ID: <87fwfovpx5.fsf@gmx.de> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1326124085 32462 80.91.229.12 (9 Jan 2012 15:48:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 9 Jan 2012 15:48:05 +0000 (UTC) Cc: Alex Harsanyi , 10405@debbugs.gnu.org To: Mark A. Hershberger Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 09 16:48:01 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RkHS5-0004FU-2H for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Jan 2012 16:48:01 +0100 Original-Received: from localhost ([::1]:56906 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkHS4-0001pq-Jk for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Jan 2012 10:48:00 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:58171) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkHRw-0001pS-Hc for bug-gnu-emacs@gnu.org; Mon, 09 Jan 2012 10:47:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RkHRr-0007QZ-I5 for bug-gnu-emacs@gnu.org; Mon, 09 Jan 2012 10:47:52 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56508) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkHRr-0007QU-GM for bug-gnu-emacs@gnu.org; Mon, 09 Jan 2012 10:47:47 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RkHS5-0002On-I4 for bug-gnu-emacs@gnu.org; Mon, 09 Jan 2012 10:48:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Jan 2012 15:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10405 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 10405-submit@debbugs.gnu.org id=B10405.13261240799212 (code B ref 10405); Mon, 09 Jan 2012 15:48:01 +0000 Original-Received: (at 10405) by debbugs.gnu.org; 9 Jan 2012 15:47:59 +0000 Original-Received: from localhost ([127.0.0.1]:51181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkHS2-0002OW-NI for submit@debbugs.gnu.org; Mon, 09 Jan 2012 10:47:59 -0500 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:53466) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1RkHRz-0002OJ-Hm for 10405@debbugs.gnu.org; Mon, 09 Jan 2012 10:47:56 -0500 Original-Received: (qmail invoked by alias); 09 Jan 2012 15:47:32 -0000 Original-Received: from p57BB967B.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.150.123] by mail.gmx.net (mp009) with SMTP; 09 Jan 2012 16:47:32 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX192QKUNA2J2jDTxu2cE0GS3ukq2CRiS+2i7bukNvM FZj/am3mDdlveI In-Reply-To: (Alex Harsanyi's message of "Fri, 30 Dec 2011 08:44:13 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.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:55574 Archived-At: Hi Mark, I don't know whether you still care about xml.el. If yes, yould you please go through this bug report? For my eyes, the proposed patch from Alex looks OK, but you might know it better. Thanks, and best regards, Michael. Alex Harsanyi writes: > There seems to be a bug in `xml-parse-tag' when handling comments. To > reproduce it, create a buffer containing the following text on a single line: > > > > Trying to parse this using > > M-: (xml-parse-region (point-min) (point-max)) > > will return: > > ((inner nil)) > > instead of: > > ((outer nil (inner nil))) > > Inserting a space or newline after the end comment tag (-->) seems to > avoid this bug. > > The patch below fixes the problem, but I'm not sure if it is the correct > fix (I just copied the code from the part that handles processing > instructions, that start with > === modified file 'lisp/xml.el' > *** lisp/xml.el 2011-11-20 03:48:53 +0000 > --- lisp/xml.el 2011-12-30 00:39:42 +0000 > *************** > *** 421,427 **** > ;; skip comments > ((looking-at "") > ! nil) > ;; end tag > ((looking-at " '()) > --- 421,428 ---- > ;; skip comments > ((looking-at "") > ! (skip-syntax-forward " ") > ! (xml-parse-tag parse-dtd xml-ns)) > ;; end tag > ((looking-at " '()) > > > > > In GNU Emacs 24.0.92.1 (x86_64-apple-darwin10.8.0, NS apple-appkit-1038.36) > of 2011-12-30 on karinji-2.local > Windowing system distributor `Apple', version 10.3.1038 > configured using `configure '--with-ns'' > > Important settings: > value of $LC_ALL: nil > value of $LC_COLLATE: nil > value of $LC_CTYPE: nil > value of $LC_MESSAGES: nil > value of $LC_MONETARY: nil > value of $LC_NUMERIC: nil > value of $LC_TIME: nil > value of $LANG: en_AU.UTF-8 > value of $XMODIFIERS: nil > locale-coding-system: utf-8-unix > default enable-multibyte-characters: t > > Major mode: Fundamental > > Minor modes in effect: > tooltip-mode: t > mouse-wheel-mode: t > tool-bar-mode: t > menu-bar-mode: t > file-name-shadow-mode: t > global-font-lock-mode: t > blink-cursor-mode: t > auto-composition-mode: t > auto-encryption-mode: t > auto-compression-mode: t > line-number-mode: t > transient-mark-mode: t > > Recent input: > C-x b * x m l * < ! - - SPC h e l l o SPC > - - > < o u t e r > < i n n e r > < / i n n e r > / > < / o u t e r > s-: s-( s-: > s-: M-: e x ( x m o > l - p a s e r s e - r e g i > o n SPC ( p o i n t - m i n ) SPC ( p o i n t ) > - m a x ) ) > > M-: > SPC M-: > M-: > M-x r e p o > r t > > Recent messages: > For information about GNU Emacs and the GNU system, type C-h C-a. > Starting new Ispell process [default] ... > Spell-checking *xml* using aspell with default dictionary...done > Spell-checking *xml* using aspell with default dictionary...done > Spell-checking *xml* using aspell with default dictionary...done > ((inner nil)) > ((outer nil (inner nil))) [2 times] > goto-history-element: End of history; no default available > ((inner nil)) > Making completion list... > > Load-path shadows: > None found. > > Features: > (shadow sort gnus-util mail-extr message format-spec rfc822 mml mml-sec > mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 > ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader > emacsbug help-mode easymenu view xml regexp-opt ispell time-date tooltip > ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset > image fringe lisp-mode register page menu-bar rfn-eshadow timer select > scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham > georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao > korean japanese hebrew greek romanian slovak czech european ethiopic > indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple > abbrev minibuffer loaddefs button faces cus-face files text-properties > overlay sha1 md5 base64 format env code-pages mule custom widget > hashtable-print-readable backquote make-network-process dbusbind ns > multi-tty emacs)