From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.bugs Subject: bug#29812: 27.0.50; electric-quote-replace-double misbehaves in Lisp strings Date: Sat, 30 Dec 2017 22:07:16 +0000 Message-ID: References: <837etenanf.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a113a870a77f652056195f9ab" X-Trace: blaine.gmane.org 1514671584 21345 195.159.176.226 (30 Dec 2017 22:06:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 30 Dec 2017 22:06:24 +0000 (UTC) Cc: 29812@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 30 23:06:20 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVPGc-0004hG-H6 for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Dec 2017 23:06:10 +0100 Original-Received: from localhost ([::1]:41921 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVPIb-0004Up-9i for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Dec 2017 17:08:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVPIU-0004T3-UK for bug-gnu-emacs@gnu.org; Sat, 30 Dec 2017 17:08:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eVPIQ-0000d7-RT for bug-gnu-emacs@gnu.org; Sat, 30 Dec 2017 17:08:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49518) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eVPIQ-0000cV-OJ for bug-gnu-emacs@gnu.org; Sat, 30 Dec 2017 17:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eVPIQ-0001G7-CE for bug-gnu-emacs@gnu.org; Sat, 30 Dec 2017 17:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Dec 2017 22:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29812 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29812-submit@debbugs.gnu.org id=B29812.15146716544801 (code B ref 29812); Sat, 30 Dec 2017 22:08:02 +0000 Original-Received: (at 29812) by debbugs.gnu.org; 30 Dec 2017 22:07:34 +0000 Original-Received: from localhost ([127.0.0.1]:58199 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVPHy-0001FM-2z for submit@debbugs.gnu.org; Sat, 30 Dec 2017 17:07:34 -0500 Original-Received: from mail-qt0-f175.google.com ([209.85.216.175]:46287) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVPHw-0001F9-Fl for 29812@debbugs.gnu.org; Sat, 30 Dec 2017 17:07:32 -0500 Original-Received: by mail-qt0-f175.google.com with SMTP id r39so57499634qtr.13 for <29812@debbugs.gnu.org>; Sat, 30 Dec 2017 14:07:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VKmj/cIVV1WbuUSdspRkghwe2tm3Kcoin1kjJTPiWys=; b=fjvLkjvlnfDMgvG97bXFrVCqUVOuKjOkR0wZprDl3Q7YOLtEyt9b2IEMUCYhMv0tCC ro65x2li+s4zXcMBL87igMlZy9MIGiGSifeywKn93hYrx/oVbnr4yV87f5wnzkWN4PLT nu2bnVCgX7yHcsQr5PavNdOYnH0NLa8iduBzfijfBD++8L6r+SK3ymiDFPY2RWbNhzHN 8TvlFZspvedi9G36BynKt60PCAHCEPqeqVwiYRmsSp7q0wLg1g/OVQEB59BrFajHl/1I LfuE+WrzAB9IfXYAe9jI08AVDKMmglaAdq9aZoKSy+ETNQZzGub0BgA/aUKsFAM2482L jWaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VKmj/cIVV1WbuUSdspRkghwe2tm3Kcoin1kjJTPiWys=; b=CNtABzKr9smibrz3JQb7vcDn7Q7+csvpyP2a8h3idMTiplqqtn/zPKm7cnfzwSofVR xNc95NkKptWabWC6T7lDQhJnffNXSXnZjZBdMGYbea6k65T1Lkwc8qOabBPkj2Fr1n94 XZWKOExLJSO1XfihIVw0c4TB8lOXHBEUQpxrv6I+ZfKdk5FHQg7zhm2vLIzjJ8wuFZx6 FuSNL3p5VRPvxVafWyeSHh/F3Frnu0O+Ah/QnOw9iv0gw9MPQWnWXEWHU2iKmuoScIJ2 mab+F5NbdPWH13hieqvCPdvLWotv2K/RjGt5ulocu7vxT4b+31Ruzla4Rn5JgeqbNsvG Xtlg== X-Gm-Message-State: AKGB3mJeb035KN5rmc01w7jjIUfBy5eOcBfppMw/wPeg06XAy2WwskDF ny8ZklGmnXheana44d47gnn4ojyX2OjnF49OIyk= X-Google-Smtp-Source: ACJfBouhRbIm/vJ80I0aktl73z2m1rN5/8SXudc6zXfAaZr0Awo6dlyKDv4Ss/G7Qg7nYcsYvj23b0p+cfcmBF/q+2Y= X-Received: by 10.200.35.28 with SMTP id a28mr55682994qta.51.1514671646961; Sat, 30 Dec 2017 14:07:26 -0800 (PST) In-Reply-To: <837etenanf.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:141633 Archived-At: --001a113a870a77f652056195f9ab Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Eli Zaretskii schrieb am Fr., 22. Dez. 2017 um 14:41 Uhr: > To reproduce: > > emacs -Q > M-x electric-quote-mode RET > M-x set-variable RET electric-quote-replace-double RET t RET > > Type: > > "foo \"foo\"" > > You get this in the buffer: > > "foo \=E2=80=9Dfoo\=E2=80=9D" > > I expected "foo \=E2=80=9Cfoo\=E2=80=9D" instead. > > I think it's not completely clear what to expect here. After all, electric quote is for human-language text, which normally doesn't contain backslashes. At least in the context of Emacs Lisp strings, I'd expect "foo \"foo\"" here, i.e., ASCII quotes. The non-ASCII quotes don't need to be escaped, so presumably escaping means that the user intended to type an ASCII quote. --001a113a870a77f652056195f9ab Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Eli Za= retskii <eliz@gnu.org> schrieb am= Fr., 22. Dez. 2017 um 14:41=C2=A0Uhr:
To reproduce:

=C2=A0 emacs -Q
=C2=A0 M-x electric-quote-mode RET
=C2=A0 M-x set-variable RET electric-quote-replace-double RET t RET

Type:

=C2=A0 "foo \"foo\""

You get this in the buffer:

=C2=A0 "foo \=E2=80=9Dfoo\=E2=80=9D"

I expected "foo \=E2=80=9Cfoo\=E2=80=9D" instead.


I think it's not completely clear what= to expect here. After all, electric quote is for human-language text, whic= h normally doesn't contain backslashes.
At least in the conte= xt of Emacs Lisp strings, I'd expect "foo \"foo\"" = here, i.e., ASCII quotes. The non-ASCII quotes don't need to be escaped= , so presumably escaping means that the user intended to type an ASCII quot= e.
--001a113a870a77f652056195f9ab--