GNU bug report logs - #37938
electric-pair-mode vs. U+0027 APOSTROPHE in mixed modes like HTML

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: 積丹尼 Dan Jacobson <jidanni@HIDDEN>; dated Sun, 27 Oct 2019 03:23:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 37938 <at> debbugs.gnu.org:


Received: (at 37938) by debbugs.gnu.org; 29 Oct 2019 21:24:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 29 17:24:22 2019
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>
To: Dmitry Gutov <dgutov@HIDDEN>
Subject: Re: bug#37938: electric-pair-mode vs. U+0027 APOSTROPHE in mixed
 modes like HTML
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-Debbugs-Envelope-To: 37938
Cc: 37938 <at> debbugs.gnu.org,
 =?utf-8?B?56mN5Li55bC8?= Dan Jacobson <jidanni@HIDDEN>
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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#37938; Package emacs. Full text available.

Message received at 37938 <at> debbugs.gnu.org:


Received: (at 37938) by debbugs.gnu.org; 29 Oct 2019 13:56:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 29 09:56:53 2019
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)
Subject: Re: bug#37938: electric-pair-mode vs. U+0027 APOSTROPHE in mixed
 modes like HTML
To: Lars Ingebrigtsen <larsi@HIDDEN>, =?UTF-8?B?56mN5Li55bC8IERhbiBKYWNv?=
 =?UTF-8?Q?bson?= <jidanni@HIDDEN>
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-Debbugs-Envelope-To: 37938
Cc: 37938 <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: -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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#37938; Package emacs. Full text available.

Message received at 37938 <at> debbugs.gnu.org:


Received: (at 37938) by debbugs.gnu.org; 29 Oct 2019 11:54:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 29 07:54:24 2019
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>
To: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson <jidanni@HIDDEN>
Subject: Re: bug#37938: electric-pair-mode vs. U+0027 APOSTROPHE in mixed
 modes like HTML
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?B?IuepjeS4ueWwvA==?=
 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:  積丹尼 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-Debbugs-Envelope-To: 37938
Cc: 37938 <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: -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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#37938; Package emacs. Full text available.

Message received at 37938 <at> debbugs.gnu.org:


Received: (at 37938) by debbugs.gnu.org; 29 Oct 2019 01:03:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 28 21:03:14 2019
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?B?56mN5Li55bC8?= Dan Jacobson <jidanni@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#37938: electric-pair-mode vs. U+0027 APOSTROPHE in mixed
 modes like HTML
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-Debbugs-Envelope-To: 37938
Cc: 37938 <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: -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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#37938; Package emacs. Full text available.

Message received at 37938 <at> debbugs.gnu.org:


Received: (at 37938) by debbugs.gnu.org; 28 Oct 2019 15:36:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 28 11:36:06 2019
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>
To: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson <jidanni@HIDDEN>
Subject: Re: bug#37938: electric-pair-mode vs. U+0027 APOSTROPHE in mixed
 modes like HTML
References: <87sgnfm4dk.5.fsf@HIDDEN>
Date: Mon, 28 Oct 2019 16:35:56 +0100
In-Reply-To: <87sgnfm4dk.5.fsf@HIDDEN> (=?utf-8?B?IuepjeS4ueWwvA==?=
 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:  積丹尼 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-Debbugs-Envelope-To: 37938
Cc: 37938 <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: -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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#37938; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 27 Oct 2019 03:22:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 26 23:22:26 2019
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?B?56mN5Li55bC8?= Dan Jacobson <jidanni@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: electric-pair-mode vs. U+0027 APOSTROPHE in mixed modes like HTML
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-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 (-)

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"




Acknowledgement sent to 積丹尼 Dan Jacobson <jidanni@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#37938; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 29 Oct 2019 21:30:02 UTC

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