From unknown Fri Jun 20 18:09:20 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#13174 <13174@debbugs.gnu.org> To: bug#13174 <13174@debbugs.gnu.org> Subject: Status: 24.1; comment-region incorrectly handling XML comments already present Reply-To: bug#13174 <13174@debbugs.gnu.org> Date: Sat, 21 Jun 2025 01:09:20 +0000 retitle 13174 24.1; comment-region incorrectly handling XML comments alread= y present reassign 13174 emacs submitter 13174 Louis-Dominique Dubeau severity 13174 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 13 11:57:51 2012 Received: (at submit) by debbugs.gnu.org; 13 Dec 2012 16:57:51 +0000 Received: from localhost ([127.0.0.1]:41156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TjC6Y-0005Mk-CC for submit@debbugs.gnu.org; Thu, 13 Dec 2012 11:57:51 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50805) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TjAII-0001eD-4t for submit@debbugs.gnu.org; Thu, 13 Dec 2012 10:01:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TjAHL-000330-5H for submit@debbugs.gnu.org; Thu, 13 Dec 2012 10:00:57 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:49860) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjAHK-00032w-SQ for submit@debbugs.gnu.org; Thu, 13 Dec 2012 10:00:51 -0500 Received: from eggs.gnu.org ([208.118.235.92]:33874) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjAH9-0003S5-8g for bug-gnu-emacs@gnu.org; Thu, 13 Dec 2012 10:00:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TjAGz-0002x8-19 for bug-gnu-emacs@gnu.org; Thu, 13 Dec 2012 10:00:39 -0500 Received: from lddubeau.com ([66.175.215.212]:56416 helo=bhumi.lddubeau.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjAGy-0002wF-Sf for bug-gnu-emacs@gnu.org; Thu, 13 Dec 2012 10:00:28 -0500 Received: from localhost (localhost [127.0.0.1]) by bhumi.lddubeau.com (Postfix) with ESMTP id 8ED7D37E48 for ; Thu, 13 Dec 2012 10:00:26 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at bhumi.lddubeau.com Received: from bhumi.lddubeau.com ([127.0.0.1]) by localhost (bhumi.lddubeau.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id voVsFLiHDgUd for ; Thu, 13 Dec 2012 10:00:18 -0500 (EST) Received: from [192.168.0.6] (c-69-244-69-62.hsd1.md.comcast.net [69.244.69.62]) (Authenticated sender: ldd@lddubeau.com) by bhumi.lddubeau.com (Postfix) with ESMTPSA id 77BB237E45 for ; Thu, 13 Dec 2012 10:00:18 -0500 (EST) Message-ID: <1355410815.4117.338.camel@karma> Subject: 24.1; comment-region incorrectly handling XML comments already present From: Louis-Dominique Dubeau To: bug-gnu-emacs@gnu.org Date: Thu, 13 Dec 2012 10:00:15 -0500 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.6.0-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 13 Dec 2012 11:57:49 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) 1. Execute: $ emacs -Q 2. M-x nxml-mode. 3. Emtpy the buffer. 4. Enter the following text: 5. Select that text and issue M-x comment-region. The text becomes: which is invalid XML. Josse van der Plaat has a solution at: http://emacswiki.org/emacs/mz-comment-fix.el Using his solution yields: which is is valid XML. This is a bug which has been circulating the internet since at least 2004. James Clark reported in 2004 having communicated with the maintainer of newcomment.el but apparently nothing happened. See this message: http://tech.groups.yahoo.com/group/emacs-nxml-mode/message/661 Please integrate Josse van der Plaat's solution to emacs. Thank you. In GNU Emacs 24.1.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2012-09-22 on batsu, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.11300000 Configured using: `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.1/site-lisp:/usr/share/emacs/site-lisp' '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes' '--with-x-toolkit=lucid' '--with-toolkit-scroll-bars' '--without-gconf' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -O2' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'' 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.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: nXML 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 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: M-x n x m l - m o C-SPC C-w < ! - - SPC B l a h SPC - - > C-SPC M-x C-k c o m m e n - r M-x e m a c b u r e e p o r Recent messages: Error during redisplay: (error "Invalid search bound (wrong side of point)") Mark set Illegal char in prolog byte-code: End of buffer [2 times] No document element [8 times] Mark activated goto-history-element: Beginning of history; no preceding item [2 times] kill-line: End of buffer No document element Making completion list... [2 times] Load-path shadows: /usr/share/emacs/24.1/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup /usr/share/emacs/24.1/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/24.1/lisp/textmodes/flyspell /usr/share/emacs/24.1/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/24.1/lisp/textmodes/ispell Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-mode view newcomment nxml-uchnm rng-xsd xsd-regexp rng-cmpct regexp-opt rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns easymenu nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd 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 dynamic-setting system-font-setting font-render-setting x-toolkit x multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 16 03:23:51 2019 Received: (at 13174) by debbugs.gnu.org; 16 Aug 2019 07:23:51 +0000 Received: from localhost ([127.0.0.1]:53004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyWaV-0000xP-F6 for submit@debbugs.gnu.org; Fri, 16 Aug 2019 03:23:51 -0400 Received: from quimby.gnus.org ([80.91.231.51]:55548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyWaT-0000xF-CN for 13174@debbugs.gnu.org; Fri, 16 Aug 2019 03:23:49 -0400 Received: from [50.225.213.182] (helo=sandy) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hyWaP-0003Nh-Ni; Fri, 16 Aug 2019 09:23:48 +0200 From: Lars Ingebrigtsen To: Louis-Dominique Dubeau Subject: Re: bug#13174: 24.1; comment-region incorrectly handling XML comments already present References: <1355410815.4117.338.camel@karma> Date: Fri, 16 Aug 2019 00:23:42 -0700 In-Reply-To: <1355410815.4117.338.camel@karma> (Louis-Dominique Dubeau's message of "Thu, 13 Dec 2012 10:00:15 -0500") Message-ID: <87y2ztpo8x.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Louis-Dominique Dubeau writes: > 1. Execute: > > $ emacs -Q > > 2. M-x nxml-mode. > > 3. Emtpy the buffer. > > 4. Enter the following text: > > > > 5. Select that text and issue M-x comment-region. > > The text become [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 13174 Cc: 13174@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Louis-Dominique Dubeau writes: > 1. Execute: > > $ emacs -Q > > 2. M-x nxml-mode. > > 3. Emtpy the buffer. > > 4. Enter the following text: > > > > 5. Select that text and issue M-x comment-region. > > The text becomes: > > > > which is invalid XML. Josse van der Plaat has a solution at: > > http://emacswiki.org/emacs/mz-comment-fix.el > > Using his solution yields: > > > > which is is valid XML. (I'm going through old bug reports that have unfortunately gotten no responses yet.) I tried your recipe in Emacs 27, and I got: So I'm going to go ahead and guess that this bug has been fixed at some point in the years since the report was filed, and 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 From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 16 03:24:03 2019 Received: (at control) by debbugs.gnu.org; 16 Aug 2019 07:24:04 +0000 Received: from localhost ([127.0.0.1]:53008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyWah-0000yF-Nx for submit@debbugs.gnu.org; Fri, 16 Aug 2019 03:24:03 -0400 Received: from quimby.gnus.org ([80.91.231.51]:55562) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyWaf-0000xg-DA for control@debbugs.gnu.org; Fri, 16 Aug 2019 03:24:01 -0400 Received: from [50.225.213.182] (helo=sandy) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hyWac-0003Nn-Dj for control@debbugs.gnu.org; Fri, 16 Aug 2019 09:24:00 +0200 Date: Fri, 16 Aug 2019 00:23:55 -0700 Message-Id: <87wofdpo8k.fsf@mouse.gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #13174 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 13174 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 13174 quit From unknown Fri Jun 20 18:09:20 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 13 Sep 2019 11:24:11 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator