GNU bug report logs - #6267
23.1; invalid XML in nested comments produced by comment-region

Previous Next

Package: emacs;

Reported by: Patrik Hägglund H <patrik.h.hagglund <at> ericsson.com>

Date: Tue, 25 May 2010 12:34:01 UTC

Severity: normal

Found in version 23.1

Fixed in version 25.1

Done: Ivan Andrus <darthandrus <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Patrik Hägglund H <patrik.h.hagglund <at> ericsson.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 23.1; invalid XML in nested comments produced by comment-region
Date: Tue, 25 May 2010 10:46:24 +0200
[Message part 1 (text/plain, inline)]
In xml mode, mark the following:

  <!-- foo -->
  <bar/>

and execute comment-region:

  <!-- <\!-- foo -\-> -->
  <!-- <bar/> -->

This is invalid XML because '--' is not allowed inside comments. See http://www.w3.org/TR/REC-xml/#sec-comments. (This is enforced by for example XML::Simple in perl 5.10.)

For example, as an alternative, the following is valid:

  <!-- <!-\- foo -\-> -->
  <!-- <bar/> -->

The offending code seems to be comment-quote-nested in newcomment.el. Should this code be changed, or the code for the xml mode, or both?


In GNU Emacs 23.1.1 (i686-pc-linux-gnu, GTK+ Version 2.8.11)
 of 2009-09-08 on deacxl001
Windowing system distributor `The Cygwin/X Project', version 11.0.10800000
configured using `configure  '--prefix=/app/emacs/23.1/LMWP2''

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_US
  value of $XMODIFIERS: nil
  locale-coding-system: iso-latin-1-unix
  default-enable-multibyte-characters: t

Major mode: XML

Minor modes in effect:
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-g g 3 0 6 <return> <down> C-SPC <down> <down> M-;
<up> <up> <right> <right> <right> <right> <backspace>
C-a C-SPC <down> <down> M-; C-x C-s M-x r e p o r t
- b u g <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Mark set [2 times]
Mark activated
Saving file /vobs/radio_testbeds_adv/platform/testapps/build/template/dul_a/ulma_1/make/template.xml...
Wrote /vobs/radio_testbeds_adv/platform/testapps/build/template/dul_a/ulma_1/make/template.xml

[Message part 2 (text/html, inline)]

This bug report was last modified 9 years and 244 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.