Eli Zaretskii <eliz@HIDDEN>
to control <at> debbugs.gnu.org.
Full text available.Received: (at 80771) by debbugs.gnu.org; 9 Apr 2026 06:02:50 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 09 02:02:50 2026 Received: from localhost ([127.0.0.1]:36340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1wAiTZ-00018h-IH for submit <at> debbugs.gnu.org; Thu, 09 Apr 2026 02:02:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43104) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1wAiTX-00018E-Fq; Thu, 09 Apr 2026 02:02:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1wAiTQ-000711-QH; Thu, 09 Apr 2026 02:02:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=IYR7vWiTgJKiTf15ZJyXa3ZpmsZIRn+hS1DmZyVWFiM=; b=Tig8hg1n4FVeW03qLDIs qMfFdUwSi5qrhI2m9kxzbNkf7hJo2RzQOIcyefQeG26o0dtZlQvFKWXwxx03jM2aX/4l+tfQ1fs/u rhhB6u3KQSB5wUeEvWgNiS4Gq+mgEU1wVgO0YRef9tycYywaDhB252se/n+aBOAgiRlGKRb4ufCLE JiDDb5hbsBu30KWZDdqQ3G0EL2YOSxplC1z/tjBNUXmJkGz5HXhICXzS3CGfFf/u33TvTJuiMyidP Hbu7Hb8p2RTkOo3j9Mv5DjhZdh2hZugFpgWE8W0Csp2qs/zI2rZ2dQNlByStFPBUxJLdv1tRSDBBq Lv8Chm0HPVZsCQ==; Date: Thu, 09 Apr 2026 09:02:24 +0300 Message-Id: <865x60wu1b.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Dan Jacobson <jidanni@HIDDEN> In-Reply-To: <87cy0acom3.3.fsf@HIDDEN> (message from Dan Jacobson on Wed, 08 Apr 2026 07:55:16 +0800) Subject: Re: bug#80771: "C-c C-o code" mistakenly injects newlines into HTML References: <87cy0acom3.3.fsf@HIDDEN> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 80771 Cc: 80771 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.2 (---) severity 80771 wishlist thanks > From: Dan Jacobson <jidanni@HIDDEN> > Date: Wed, 08 Apr 2026 07:55:16 +0800 > > $ emacs -Q file.html > > C-c C-o runs the command sgml-tag (found in mhtml-mode-map), which is > an interactive native-comp-function in ‘sgml-mode.el’. > > It has a problem: > If the user does "C-c C-o c o d e" > it inserts newlines, neglecting that people <code>sometimes<code> also > put code in-line. > > It shoud act just like > "C-c C-o s t r o n g" and > "C-c C-o e m" > do. > > Because unlike <blockquote>, those added newlines are just lulling the > user into a false sense of how their HTML will be rendered. I disagree, adding a newline for <code> is a better default than not adding a newline. But patches to add an optional feature to avoid the newline will be welcome.
bug-gnu-emacs@HIDDEN:bug#80771; Package emacs.
Full text available.
Received: (at submit) by debbugs.gnu.org; 8 Apr 2026 18:29:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 08 14:29:52 2026
Received: from localhost ([127.0.0.1]:54180 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1wAXey-0001JV-07
for submit <at> debbugs.gnu.org; Wed, 08 Apr 2026 14:29:52 -0400
Received: from [2001:470:142::17] (port=56726 helo=lists.gnu.org)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <jidanni@HIDDEN>)
id 1wAXeu-0001IU-S3
for submit <at> debbugs.gnu.org; Wed, 08 Apr 2026 14:29:49 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <jidanni@HIDDEN>)
id 1wAXep-00056N-1M
for bug-gnu-emacs@HIDDEN; Wed, 08 Apr 2026 14:29:43 -0400
Received: from cyan.elm.relay.mailchannels.net ([23.83.212.47])
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <jidanni@HIDDEN>)
id 1wARyT-0005kY-Vn
for bug-gnu-emacs@HIDDEN; Wed, 08 Apr 2026 08:25:40 -0400
X-Sender-Id: dreamhost|x-authsender|jidanni@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
by relay.mailchannels.net (Postfix) with ESMTP id C90604C2364
for <bug-gnu-emacs@HIDDEN>; Wed, 08 Apr 2026 12:23:34 +0000 (UTC)
Received: from pdx1-sub0-mail-a229.dreamhost.com
(trex-green-1.trex.outbound.svc.cluster.local [100.100.127.191])
(Authenticated sender: dreamhost)
by relay.mailchannels.net (Postfix) with ESMTPA id 183FB4C274D
for <bug-gnu-emacs@HIDDEN>; Wed, 08 Apr 2026 12:23:34 +0000 (UTC)
ARC-Seal: i=1; a=rsa-sha256; d=mailchannels.net; s=arc-2022; cv=none;
t=1775651014;
b=b8//chg9jlwd96MdMQcHj+aiwzGm9Vco5n5jr1fkYhatf3tODCdKIGR8giQ09m7wcOi+aO
lxf2Ef9XGRNbOnvUjafyK10A08P3149mZRZO3+kHnrSZe7Ea5RVbNfyaIHGcMBnpPlVJ6D
YU/f69EG1bIZBB9UKJ+C3cdhTx1J18hZ/lHFnwjvHrNfE9mFvbopi3a6TA21Hy0jCej6+u
mC9CxSAFLRTCA9Vlv4ySn/mRFAYsAED6GRoNAYGwS6z5i2Gyxd8zi+qn15vscyaAXAtt7/
d1nHg/XVjzzi8EQSDLAel0fq4sUXnHYnTYenDsydAM0vXLeZhrj4BSfOm/yZxQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
d=mailchannels.net; s=arc-2022; t=1775651014;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:dkim-signature;
bh=s41oFtadmyUP5nkshOSKf8qjWZ7uJSze9YwYPOCNzHA=;
b=6J+OTcpNpBoEBfNBFwB8PJAoLG+h9V6dYBOupZCfAsw9kSP/K1Yvk1mc7bB2QndaA+IjzH
kVEshydtBULatUqomd5d61ZJ9hWtgeOe85gBbt/9FbOcCHtSTZ/qxfG50b/3b6eJJcYDAh
nwvlOuNMiWQ3VJAELakrqqGfUfdf2OlZll76sQww10y8kL9lgubdcjbygsOhUIMlxUYb5k
Uc0oMsYeVHVKr3JPVW8av8mxGW7pgI1X9EOwluMj3ipPRlTGgXRCbfIXqa0o+Rwj+QijAk
mstxTbI6KaBtqfI56BMPRum0JHCb36/QWGYfI16XrUkoNOK/rnJKJ4mD3cz+0w==
ARC-Authentication-Results: i=1; rspamd-bd48b9d95-6jkxd;
auth=pass smtp.auth=dreamhost smtp.mailfrom=jidanni@HIDDEN
X-Sender-Id: dreamhost|x-authsender|jidanni@HIDDEN
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jidanni@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Exultant-Robust: 66ab01981afb937f_1775651014438_1158601524
X-MC-Loop-Signature: 1775651014438:3241546938
X-MC-Ingress-Time: 1775651014424
Received: from pdx1-sub0-mail-a229.dreamhost.com (pop.dreamhost.com
[64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384)
by 100.100.127.191 (trex/7.1.5); Wed, 08 Apr 2026 12:23:34 +0000
Received: from jidanni.org (36-233-205-171.dynamic-ip.hinet.net
[36.233.205.171])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest
SHA256) (No client certificate requested)
(Authenticated sender: jidanni@HIDDEN)
by pdx1-sub0-mail-a229.dreamhost.com (Postfix) with ESMTPSA id 4frMfs6bxyz3k
for <bug-gnu-emacs@HIDDEN>; Wed, 8 Apr 2026 05:23:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jidanni.org;
s=dreamhost; t=1775651013;
bh=s41oFtadmyUP5nkshOSKf8qjWZ7uJSze9YwYPOCNzHA=;
h=From:To:Subject:Date:Content-Type:Content-Transfer-Encoding;
b=SRD4l3i6oVzqRmD/P4thUvkwuPsNBTZtSPQ8nKA9bbdZWLXhp94OebikIExxnct1+
kbz/P0t3vmL6rkTFZU0MrQ460cvzHpxFn5Be2LemoUI/o0GLDKoZOsLLyVkGaDrGal
6ex5PhBZEEhZv3we7YbUvVXHIXmFAuj9619RlAT9g44dte7puW55L+MGCkzdelYIIS
t9zBqSGxwl/LOpMrb+FgtHHXKGBdfPkpJwjw+c9+QiJfigze+TYkc0Wwae9VkLV9wE
S1lSeWN31731iQFQo2P44+iXTqITKlLo4Giy1VpSWAXn7AQ+2ihtmlzOuWY+Ta+ymK
U7xH3VBNzGYuQ==
Received: from jidanni by jidanni.org with local (Exim 4.98.2)
(envelope-from <jidanni@HIDDEN>) id 1wAGGL-000000000JC-0EWT
for bug-gnu-emacs@HIDDEN; Wed, 08 Apr 2026 07:55:17 +0800
From: Dan Jacobson <jidanni@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: "C-c C-o code" mistakenly injects newlines into HTML
Date: Wed, 08 Apr 2026 07:55:16 +0800
Message-ID: <87cy0acom3.3.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=23.83.212.47; envelope-from=jidanni@HIDDEN;
helo=cyan.elm.relay.mailchannels.net
X-Spam_score_int: -19
X-Spam_score: -2.0
X-Spam_bar: --
X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, GAPPY_SUBJECT=0.1,
RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001,
RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,
SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 2.3 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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
the administrator of that system for details.
Content preview: $ emacs -Q file.html C-c C-o runs the command sgml-tag (found
in mhtml-mode-map), which is an interactive native-comp-function in ‘sgml-mode.el’.
It has a problem: If the user does "C-c C-o c o d e" it inserts newlines,
neglecting that people <code>sometimes<code> also put code in-line.
Content analysis details: (2.3 points, 10.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/,
no trust
[2001:470:142:0:0:0:0:17 listed in]
[list.dnswl.org]
0.9 SPF_FAIL SPF: sender does not match SPF record (fail)
[SPF failed: Please see http://www.openspf.org/Why?s=mfrom;id=jidanni%40jidanni.org;ip=2001%3A470%3A142%3A%3A17;r=debbugs.gnu.org]
-0.0 SPF_HELO_PASS SPF: HELO matches SPF record
0.1 GAPPY_SUBJECT Subject: contains G.a.p.p.y-T.e.x.t
1.3 RDNS_NONE Delivered to internal network by a host with no rDNS
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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
the administrator of that system for details.
Content preview: $ emacs -Q file.html C-c C-o runs the command sgml-tag (found
in mhtml-mode-map), which is an interactive native-comp-function in ‘sgml-mode.el’.
It has a problem: If the user does "C-c C-o c o d e" it inserts newlines,
neglecting that people <code>sometimes<code> also put code in-line.
Content analysis details: (1.3 points, 10.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/,
no trust
[2001:470:142:0:0:0:0:17 listed in]
[list.dnswl.org]
0.9 SPF_FAIL SPF: sender does not match SPF record (fail)
[SPF failed: Please see http://www.openspf.org/Why?s=mfrom;id=jidanni%40jidanni.org;ip=2001%3A470%3A142%3A%3A17;r=debbugs.gnu.org]
-0.0 SPF_HELO_PASS SPF: HELO matches SPF record
0.1 GAPPY_SUBJECT Subject: contains G.a.p.p.y-T.e.x.t
1.3 RDNS_NONE Delivered to internal network by a host with no rDNS
-1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list
manager
$ emacs -Q file.html
C-c C-o runs the command sgml-tag (found in mhtml-mode-map), which is
an interactive native-comp-function in ‘sgml-mode.el’.
It has a problem:
If the user does "C-c C-o c o d e"
it inserts newlines, neglecting that people <code>sometimes<code> also
put code in-line.
It shoud act just like
"C-c C-o s t r o n g" and
"C-c C-o e m"
do.
Because unlike <blockquote>, those added newlines are just lulling the
user into a false sense of how their HTML will be rendered.
This kind of thing leads to major disasters where one's document looks
garbled as the audience laughs.
emacs-version "30.1"
Dan Jacobson <jidanni@HIDDEN>:bug-gnu-emacs@HIDDEN.
Full text available.bug-gnu-emacs@HIDDEN:bug#80771; Package emacs.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.