GNU logs - #37938, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#37938: electric-pair-mode vs. U+0027 APOSTROPHE in mixed modes like HTML
Resent-From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson <jidanni@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 27 Oct 2019 03:23:02 +0000
Resent-Message-ID: <handler.37938.B.157214654610282 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 37938
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 37938 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.157214654610282
          (code B ref -1); Sun, 27 Oct 2019 03:23:02 +0000
Received: (at submit) by debbugs.gnu.org; 27 Oct 2019 03:22:26 +0000
Received: from localhost ([127.0.0.1]:41595 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iOZ8L-0002fm-Pw
	for submit <at> debbugs.gnu.org; Sat, 26 Oct 2019 23:22:26 -0400
Received: from lists.gnu.org ([209.51.188.17]:42534)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jidanni@HIDDEN>) id 1iOZ8K-0002fe-1B
 for submit <at> debbugs.gnu.org; Sat, 26 Oct 2019 23:22:24 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:53914)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <jidanni@HIDDEN>) id 1iOZ8I-0006yk-Np
 for bug-gnu-emacs@HIDDEN; Sat, 26 Oct 2019 23:22:23 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: **
X-Spam-Status: No, score=2.4 required=5.0 tests=BAYES_50,DATE_IN_PAST_03_06,
 URIBL_BLOCKED autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <jidanni@HIDDEN>) id 1iOZ8H-0006C6-7e
 for bug-gnu-emacs@HIDDEN; Sat, 26 Oct 2019 23:22:22 -0400
Received: from elephant.ash.relay.mailchannels.net ([23.83.222.57]:8915)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <jidanni@HIDDEN>) id 1iOZ8G-0006Bu-9a
 for bug-gnu-emacs@HIDDEN; Sat, 26 Oct 2019 23:22:21 -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 B055A8C1049
 for <bug-gnu-emacs@HIDDEN>; Sun, 27 Oct 2019 03:22:15 +0000 (UTC)
Received: from pdx1-sub0-mail-a1.g.dreamhost.com
 (100-96-8-64.trex.outbound.svc.cluster.local [100.96.8.64])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 3C8AA8C0DA5
 for <bug-gnu-emacs@HIDDEN>; Sun, 27 Oct 2019 03:22:15 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jidanni@HIDDEN
Received: from pdx1-sub0-mail-a1.g.dreamhost.com ([TEMPUNAVAIL].
 [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384)
 by 0.0.0.0:2500 (trex/5.18.5); Sun, 27 Oct 2019 03:22:15 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jidanni@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Industry-Irritate: 027f26f60e5ca22a_1572146535444_1592404459
X-MC-Loop-Signature: 1572146535444:1771026833
X-MC-Ingress-Time: 1572146535443
Received: from pdx1-sub0-mail-a1.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a1.g.dreamhost.com (Postfix) with ESMTP id EF5E57FBF6
 for <bug-gnu-emacs@HIDDEN>; Sat, 26 Oct 2019 20:22:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to
 :subject:date:message-id:mime-version:content-type; s=
 jidanni.org; bh=+igfOXxR3UX6+8I2Doj+x1pi4Yg=; b=d2s1hULlggsK5YUT
 q5SeIdlLlYPWr4YdGmRj6CxYB9FvEvMZPgmWwkszbm5mI5YgqK2qHcf9JJJ7v/PD
 Nt/xEc8K2LyvbxCBCJefEGSwCM5V3mjCJBVNlZOtj9DlRnEaa597NHkqKCsLYURj
 zMNLwf6BtInFNSCjkLRhr5CUwos=
Received: from jidanni.org (1-170-87-252.dynamic-ip.hinet.net [1.170.87.252])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256
 bits)) (No client certificate requested)
 (Authenticated sender: jidanni@HIDDEN)
 by pdx1-sub0-mail-a1.g.dreamhost.com (Postfix) with ESMTPSA id 5B7027FBAB
 for <bug-gnu-emacs@HIDDEN>; Sat, 26 Oct 2019 20:22:09 -0700 (PDT)
X-DH-BACKEND: pdx1-sub0-mail-a1
From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson <jidanni@HIDDEN>
Date: Sun, 27 Oct 2019 08:14:15 +0800
Message-ID: <87sgnfm4dk.5.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-Received-From: 23.83.222.57
X-Spam-Score: -0.3 (/)
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 (-)

No wonder my web pages are getting filled with:

Let's go to Bob's house.''

But my email replies are thankfully still just:

Let's go to Bob's house.

Compare typing that into

$ emacs -nw -Q -f electric-pair-mode /tmp/e.html vs.
$ emacs -nw -Q -f electric-pair-mode /tmp/e.txt

Anyway, sure, within HTML angle brackets we want the automatic paring
for attributes. But most of the time we are typing content... So the
program is not smart enough.

Neither electric-pair-mode's docsrting nor (info "(emacs) Matching")
mention how to tell it 'hands off' for .html modes like it already knows
for .txt modes.

Anyways, these days you've got to double check what you typed. (And then
sometimes with some programs even then you can't be sure...)

(The back apostrophe(s) "hides" in the block cursor, so the user doesn't
realize it, getting shoved along, parked behind the newline.)

My testing shows the problem only occurs with U+0027 APOSTROPHE. All the
other pairs act great. (E.g., a welcomed paired U+0022 QUOTATION MARK in
all modes.)

So, U+0027 APOSTROPHE currently doesn't pair in text mode. Good. It should
also not pair in HTML mode. Or at least the documentation should say...

emacs-version "26.3"




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson <jidanni@HIDDEN>
Subject: bug#37938: Acknowledgement (electric-pair-mode vs. U+0027
 APOSTROPHE in mixed modes like HTML)
Message-ID: <handler.37938.B.157214654610282.ack <at> debbugs.gnu.org>
References: <87sgnfm4dk.5.fsf@HIDDEN>
X-Gnu-PR-Message: ack 37938
X-Gnu-PR-Package: emacs
Reply-To: 37938 <at> debbugs.gnu.org
Date: Sun, 27 Oct 2019 03:23:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 37938 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
37938: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D37938
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#37938: electric-pair-mode vs. U+0027 APOSTROPHE in mixed modes like HTML
Resent-From: Lars Ingebrigtsen <larsi@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 28 Oct 2019 15:37:02 +0000
Resent-Message-ID: <handler.37938.B37938.15722769678936 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 37938
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson <jidanni@HIDDEN>
Cc: 37938 <at> debbugs.gnu.org
Received: via spool by 37938-submit <at> debbugs.gnu.org id=B37938.15722769678936
          (code B ref 37938); Mon, 28 Oct 2019 15:37:02 +0000
Received: (at 37938) by debbugs.gnu.org; 28 Oct 2019 15:36:07 +0000
Received: from localhost ([127.0.0.1]:46215 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iP73u-0002K4-L3
	for submit <at> debbugs.gnu.org; Mon, 28 Oct 2019 11:36:06 -0400
Received: from quimby.gnus.org ([80.91.231.51]:42176)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1iP73q-0002JW-1U
 for 37938 <at> debbugs.gnu.org; Mon, 28 Oct 2019 11:36:05 -0400
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie)
 by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.89) (envelope-from <larsi@HIDDEN>)
 id 1iP73k-0000gg-SP; Mon, 28 Oct 2019 16:35:59 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
References: <87sgnfm4dk.5.fsf@HIDDEN>
Date: Mon, 28 Oct 2019 16:35:56 +0100
In-Reply-To: <87sgnfm4dk.5.fsf@HIDDEN> ("=?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?=
 Dan Jacobson"'s message of "Sun, 27 Oct 2019 08:14:15 +0800")
Message-ID: <87v9s8992b.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
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:  =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson <jidanni@HIDDEN> writes: > No
   wonder my web pages are getting filled with: > > Let's go to Bob's house.''
    > > But my email replies are thankfully still just: > > Let's go to Bob's
    house. > > Compare typing that into > > $ ema [...] 
 
 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-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.0 (-)

=E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacobson <jidanni@HIDDEN> writes:

> No wonder my web pages are getting filled with:
>
> Let's go to Bob's house.''
>
> But my email replies are thankfully still just:
>
> Let's go to Bob's house.
>
> Compare typing that into
>
> $ emacs -nw -Q -f electric-pair-mode /tmp/e.html vs.
> $ emacs -nw -Q -f electric-pair-mode /tmp/e.txt

When I try this I get the following backtrace:

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  sgml--syntax-propertize-ppss(18)
  mhtml-syntax-propertize(7 19)
  syntax-propertize(19)
  syntax-ppss(19)
  electric-pair-syntax-info(39)
  electric-pair-post-self-insert-function()
  self-insert-command(1 39)
  funcall-interactively(self-insert-command 1 39)
  call-interactively(self-insert-command nil nil)
  command-execute(self-insert-command)

To reproduce

Open /tmp/e.html

M-x electric-pair-mode

Type

Foo'

Anybody know what's that about?

Anyway, to Dan's request:

> Neither electric-pair-mode's docsrting nor (info "(emacs) Matching")
> mention how to tell it 'hands off' for .html modes like it already knows
> for .txt modes.

I'm not quite sure, but I think Dan is saying that the ' character
shouldn't be a paired character in html-mode since it isn't in
text-mode.  And that sounds reasonable.  Does anybody object to making
that change?

--=20
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#37938: electric-pair-mode vs. U+0027 APOSTROPHE in mixed modes like HTML
In-Reply-To: <87sgnfm4dk.5.fsf@HIDDEN>
Resent-From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson <jidanni@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 29 Oct 2019 01:04:01 +0000
Resent-Message-ID: <handler.37938.B37938.15723109944479 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 37938
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Lars Ingebrigtsen <larsi@HIDDEN>
Cc: 37938 <at> debbugs.gnu.org
Received: via spool by 37938-submit <at> debbugs.gnu.org id=B37938.15723109944479
          (code B ref 37938); Tue, 29 Oct 2019 01:04:01 +0000
Received: (at 37938) by debbugs.gnu.org; 29 Oct 2019 01:03:14 +0000
Received: from localhost ([127.0.0.1]:46626 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iPFuk-0001AB-Fz
	for submit <at> debbugs.gnu.org; Mon, 28 Oct 2019 21:03:14 -0400
Received: from cyan.ash.relay.mailchannels.net ([23.83.222.47]:53990)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jidanni@HIDDEN>) id 1iPFug-00019x-EU
 for 37938 <at> debbugs.gnu.org; Mon, 28 Oct 2019 21:03:13 -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 757B62C02DB;
 Tue, 29 Oct 2019 01:03:06 +0000 (UTC)
Received: from pdx1-sub0-mail-a22.g.dreamhost.com
 (100-96-85-194.trex.outbound.svc.cluster.local [100.96.85.194])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id D77382C0441;
 Tue, 29 Oct 2019 01:03:05 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jidanni@HIDDEN
Received: from pdx1-sub0-mail-a22.g.dreamhost.com ([TEMPUNAVAIL].
 [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384)
 by 0.0.0.0:2500 (trex/5.18.5); Tue, 29 Oct 2019 01:03:06 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jidanni@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Share-Whispering: 05ac78a3676a00db_1572310986279_1642425850
X-MC-Loop-Signature: 1572310986279:1185302858
X-MC-Ingress-Time: 1572310986279
Received: from pdx1-sub0-mail-a22.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a22.g.dreamhost.com (Postfix) with ESMTP id 84BC395C68;
 Mon, 28 Oct 2019 18:03:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to:cc
 :subject:references:date:message-id:mime-version:content-type;
 s=jidanni.org; bh=a2sGWso0dJY8PrDq0DbXMMovIxQ=; b=cK7ROZQ0ncBxN
 COAY4CcTWpfYvSpuFtIqeom+fTPYFpqj65dccq/ujAKaev9no+daJ4TrN4L8nC+g
 p1brHqU4U5+Yel8ThxpyxjMTwzaKuNLwBJB463RwlEUNqVDLWHC5lJD1rSzQEPgx
 VDCtUvZogcYpgIiuZlDZi/VzTKmBy4=
Received: from jidanni.org (1-170-85-252.dynamic-ip.hinet.net [1.170.85.252])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256
 bits)) (No client certificate requested)
 (Authenticated sender: jidanni@HIDDEN)
 by pdx1-sub0-mail-a22.g.dreamhost.com (Postfix) with ESMTPSA id E78E595CB4;
 Mon, 28 Oct 2019 18:02:59 -0700 (PDT)
X-DH-BACKEND: pdx1-sub0-mail-a22
From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson <jidanni@HIDDEN>
References: <87sgnfm4dk.5.fsf@HIDDEN> <87v9s8992b.fsf@HIDDEN>
Date: Tue, 29 Oct 2019 09:02:53 +0800
Message-ID: <87r22w8ite.5.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
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.0 (-)

>>>>> "LI" == Lars Ingebrigtsen <larsi@HIDDEN> writes:

LI> Anybody know what's that about?

In emacs-version "26.3" I get Foo'', no error.

LI> I'm not quite sure, but I think Dan is saying that the ' character
LI> shouldn't be a paired character in html-mode since it isn't in
LI> text-mode.  And that sounds reasonable.  Does anybody object to making
LI> that change?

Sounds good.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#37938: electric-pair-mode vs. U+0027 APOSTROPHE in mixed modes like HTML
Resent-From: Lars Ingebrigtsen <larsi@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 29 Oct 2019 11:55:02 +0000
Resent-Message-ID: <handler.37938.B37938.157235006426045 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 37938
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson <jidanni@HIDDEN>
Cc: 37938 <at> debbugs.gnu.org
Received: via spool by 37938-submit <at> debbugs.gnu.org id=B37938.157235006426045
          (code B ref 37938); Tue, 29 Oct 2019 11:55:02 +0000
Received: (at 37938) by debbugs.gnu.org; 29 Oct 2019 11:54:24 +0000
Received: from localhost ([127.0.0.1]:46967 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iPQ4t-0006m1-R2
	for submit <at> debbugs.gnu.org; Tue, 29 Oct 2019 07:54:24 -0400
Received: from quimby.gnus.org ([80.91.231.51]:55326)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1iPQ4r-0006ls-G8
 for 37938 <at> debbugs.gnu.org; Tue, 29 Oct 2019 07:54:22 -0400
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie)
 by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.89) (envelope-from <larsi@HIDDEN>)
 id 1iPQ4l-0008JY-Op; Tue, 29 Oct 2019 12:54:19 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
References: <87sgnfm4dk.5.fsf@HIDDEN> <87v9s8992b.fsf@HIDDEN>
 <87r22w8ite.5.fsf@HIDDEN>
Date: Tue, 29 Oct 2019 12:54:15 +0100
In-Reply-To: <87r22w8ite.5.fsf@HIDDEN> ("=?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?=
 Dan Jacobson"'s message of "Tue, 29 Oct 2019 09:02:53 +0800")
Message-ID: <87ftjb22e0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
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:  =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson <jidanni@HIDDEN> writes: >>>>>>
    "LI" == Lars Ingebrigtsen <larsi@HIDDEN> writes: > > LI> Anybody know what's
    that about? > > In emacs-version "26.3" I get Foo'', no error. > > LI> I'm
    not quite sure, but I think Dan is sayi [...] 
 
 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-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.0 (-)

=E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacobson <jidanni@HIDDEN> writes:

>>>>>> "LI" =3D=3D Lars Ingebrigtsen <larsi@HIDDEN> writes:
>
> LI> Anybody know what's that about?
>
> In emacs-version "26.3" I get Foo'', no error.
>
> LI> I'm not quite sure, but I think Dan is saying that the ' character
> LI> shouldn't be a paired character in html-mode since it isn't in
> LI> text-mode.  And that sounds reasonable.  Does anybody object to making
> LI> that change?
>
> Sounds good.

I know nothing about electric pair mode, but it seems that the behaviour
is down to the syntax class of the ' character.

(elt (syntax-table) ?\')
=3D> (7 . 39)

And

7              string quote           15             generic string

which makes sense, because you can have

<a foo=3D'bar'>

and in that context it's definitely a quote character.  But when you're
typing text in HTML, then it's not.

mhtml already has support for different syntaxes in CSS/JS/HTML -- is
there a way to switch the syntax table when in tags and when not?

--=20
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#37938: electric-pair-mode vs. U+0027 APOSTROPHE in mixed modes like HTML
Resent-From: Dmitry Gutov <dgutov@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 29 Oct 2019 13:57:02 +0000
Resent-Message-ID: <handler.37938.B37938.15723574136632 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 37938
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Lars Ingebrigtsen <larsi@HIDDEN>, =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson <jidanni@HIDDEN>
Cc: 37938 <at> debbugs.gnu.org
Received: via spool by 37938-submit <at> debbugs.gnu.org id=B37938.15723574136632
          (code B ref 37938); Tue, 29 Oct 2019 13:57:02 +0000
Received: (at 37938) by debbugs.gnu.org; 29 Oct 2019 13:56:53 +0000
Received: from localhost ([127.0.0.1]:48405 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iPRzR-0001iu-J1
	for submit <at> debbugs.gnu.org; Tue, 29 Oct 2019 09:56:53 -0400
Received: from mail-ed1-f44.google.com ([209.85.208.44]:36056)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1iPRzM-0001ik-8L
 for 37938 <at> debbugs.gnu.org; Tue, 29 Oct 2019 09:56:48 -0400
Received: by mail-ed1-f44.google.com with SMTP id bm15so10809355edb.3
 for <37938 <at> debbugs.gnu.org>; Tue, 29 Oct 2019 06:56:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=YwHsmGhj20ukptHyBrOwpus8lUGFTK5eBevsMC6wjOQ=;
 b=ftWfB48tQRYsfCuy89I66pR9uyWB9r12XWCULS0rw7/r4Ht6v4bxmyFgFppKQNQaWA
 sSVlvqsvkARSMR46vq4DY6jl8yPr20ygcOfwT9IEajrbWIkSy9aJURN50k9734CEROp5
 85hwLa6/rUV9Eda+41UVJnwV2f3hlDb4eJNBSgd6hhndT97byKl2yILuEo1eNAxC9w7C
 33+tQaFsTOB9ZRx98fhZo7OMcLe9CgGVhD85W0i4xZUzemsOLM1giFIbKDFf2eMbmOYz
 3scrQdIhunpw2j7G8Y+xxVGQEf6MILr4o7uQnOYGEdF4qSSgLp1BfKY2lIPpkV9xYFxD
 ojcg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=YwHsmGhj20ukptHyBrOwpus8lUGFTK5eBevsMC6wjOQ=;
 b=QlAbkqMQ9gpXGwjVhlXcDz2FtK1PPsVDxa6k1ABmnrleuzY5Q5ICoxxfKD61ej72+I
 Tr4xEw2njwLoVARueOOt5R9Cl/tfJxzMkqhBN6d9jnphhIW0+PB16yXlpVAXy6vEEhvd
 w23SbKsOOYupJIVPoilK5q4J62rNTBarMVyeHSIFXrlcMNIg2n1xKBPKpA0u2LNW2dlH
 inEC8VVZauDhYD6kLAQScd8AgQyQ/gopg4iLFzFjsnACIIcN0LUE4ikILfVgM3R1yAgG
 VG2Nd3keio2zDmhJAZhyrHudFczkzzUotA4OvRzQNWgb4LhozStmiK5Tj0Yr94wTTvBO
 UfgQ==
X-Gm-Message-State: APjAAAV5V+AAqKHWB8r4+wx4wg15TsawCShxwdaFQJtCUjdsPg469lkY
 yF15nyj5bKCen42jj7L98Zys6WSkOIo=
X-Google-Smtp-Source: APXvYqxVnSMSUzRHAyYEr+XKEjbugIs51g8MJo6DSj+A1LLkQpZtWMl+cL+OGFhaIVD5frrvIid6Yw==
X-Received: by 2002:a17:906:f48:: with SMTP id
 h8mr3491318ejj.106.1572357400983; 
 Tue, 29 Oct 2019 06:56:40 -0700 (PDT)
Received: from [192.168.0.140] ([109.110.245.170])
 by smtp.googlemail.com with ESMTPSA id d8sm622715edb.18.2019.10.29.06.56.39
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 29 Oct 2019 06:56:39 -0700 (PDT)
References: <87sgnfm4dk.5.fsf@HIDDEN> <87v9s8992b.fsf@HIDDEN>
 <87r22w8ite.5.fsf@HIDDEN> <87ftjb22e0.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <2d99370c-9ad7-7166-aa24-7067ba65a99e@HIDDEN>
Date: Tue, 29 Oct 2019 15:56:38 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.9.0
MIME-Version: 1.0
In-Reply-To: <87ftjb22e0.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.2 (/)
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: -0.8 (/)

On 29.10.2019 13:54, Lars Ingebrigtsen wrote:
 > and in that context it's definitely a quote character.  But when
 > you're
 > typing text in HTML, then it's not.
 >
 > mhtml already has support for different syntaxes in CSS/JS/HTML -- is
 > there a way to switch the syntax table when in tags and when not?

I'm not sure we need to go that far. sgml-syntax-propertize-rules 
already changes syntax on quotes typed outside of tags.

It's probably up to electric-pair-mode to respect that.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#37938: electric-pair-mode vs. U+0027 APOSTROPHE in mixed modes like HTML
Resent-From: Lars Ingebrigtsen <larsi@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 29 Oct 2019 21:25:02 +0000
Resent-Message-ID: <handler.37938.B37938.157238426210480 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 37938
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Dmitry Gutov <dgutov@HIDDEN>
Cc: 37938 <at> debbugs.gnu.org, =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson <jidanni@HIDDEN>
Received: via spool by 37938-submit <at> debbugs.gnu.org id=B37938.157238426210480
          (code B ref 37938); Tue, 29 Oct 2019 21:25:02 +0000
Received: (at 37938) by debbugs.gnu.org; 29 Oct 2019 21:24:22 +0000
Received: from localhost ([127.0.0.1]:48695 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iPYyU-0002iy-1b
	for submit <at> debbugs.gnu.org; Tue, 29 Oct 2019 17:24:22 -0400
Received: from quimby.gnus.org ([80.91.231.51]:44770)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1iPYyR-0002ip-0h
 for 37938 <at> debbugs.gnu.org; Tue, 29 Oct 2019 17:24:20 -0400
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie)
 by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.89) (envelope-from <larsi@HIDDEN>)
 id 1iPYyN-0001XP-59; Tue, 29 Oct 2019 22:24:17 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
References: <87sgnfm4dk.5.fsf@HIDDEN> <87v9s8992b.fsf@HIDDEN>
 <87r22w8ite.5.fsf@HIDDEN> <87ftjb22e0.fsf@HIDDEN>
 <2d99370c-9ad7-7166-aa24-7067ba65a99e@HIDDEN>
Date: Tue, 29 Oct 2019 22:24:14 +0100
In-Reply-To: <2d99370c-9ad7-7166-aa24-7067ba65a99e@HIDDEN> (Dmitry Gutov's
 message of "Tue, 29 Oct 2019 15:56:38 +0200")
Message-ID: <875zk7z1mp.fsf@HIDDEN>
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:  Dmitry Gutov <dgutov@HIDDEN> writes: > I'm not sure we
 need to go that far. sgml-syntax-propertize-rules > already changes syntax
 on quotes typed outside of tags. > > It's probably up to electric-pair-mode
 to respect that. 
 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-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.0 (-)

Dmitry Gutov <dgutov@HIDDEN> writes:

> I'm not sure we need to go that far. sgml-syntax-propertize-rules
> already changes syntax on quotes typed outside of tags.
>
> It's probably up to electric-pair-mode to respect that.

Makes sense to me.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





Last modified: Mon, 25 Nov 2019 12:00:02 UTC

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