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: Sun, 31 Dec 2017 16:49:31 +0000 Message-ID: References: <837etenanf.fsf@gnu.org> <83efnaew0p.fsf@gnu.org> <83a7xyetud.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a11481742f2f1e40561a5a6ca" X-Trace: blaine.gmane.org 1514738900 31935 195.159.176.226 (31 Dec 2017 16:48:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 31 Dec 2017 16:48:20 +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 Sun Dec 31 17:48:16 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 1eVgmU-0007pM-D9 for geb-bug-gnu-emacs@m.gmane.org; Sun, 31 Dec 2017 17:48:14 +0100 Original-Received: from localhost ([::1]:44917 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVgoS-0000As-OV for geb-bug-gnu-emacs@m.gmane.org; Sun, 31 Dec 2017 11:50:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47609) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVgoJ-0000AP-ES for bug-gnu-emacs@gnu.org; Sun, 31 Dec 2017 11:50:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eVgoE-0008Rm-Eb for bug-gnu-emacs@gnu.org; Sun, 31 Dec 2017 11:50:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50239) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eVgoE-0008RK-Bw for bug-gnu-emacs@gnu.org; Sun, 31 Dec 2017 11:50:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eVgoD-00025P-UH for bug-gnu-emacs@gnu.org; Sun, 31 Dec 2017 11:50:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 31 Dec 2017 16:50:01 +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.15147389897995 (code B ref 29812); Sun, 31 Dec 2017 16:50:01 +0000 Original-Received: (at 29812) by debbugs.gnu.org; 31 Dec 2017 16:49:49 +0000 Original-Received: from localhost ([127.0.0.1]:58920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVgo0-00024t-SK for submit@debbugs.gnu.org; Sun, 31 Dec 2017 11:49:49 -0500 Original-Received: from mail-qt0-f182.google.com ([209.85.216.182]:34364) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVgnz-00024h-K6 for 29812@debbugs.gnu.org; Sun, 31 Dec 2017 11:49:47 -0500 Original-Received: by mail-qt0-f182.google.com with SMTP id 33so58861318qtv.1 for <29812@debbugs.gnu.org>; Sun, 31 Dec 2017 08:49:47 -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=eVGYPZ/7UeZKO6Se6NpNPVJXbNs7G1hOpj/fbdQMrzU=; b=UT4fl1k7z6q51a6+yUpQ/SMCyo5Z83C6vyTAoEHlv8o4FzBX3wLxs1fD89dgORU7gE tbhNvKXfnn2ETQ7e6McKHmmgZvLx7HxGWy20fWRHhevsB122eNF8f1ZBDnF4eaRRMrAM 1W40kJWM3+iOdCX8tgihnzPBrSePPo/BSNQ+M+PsZYaebepDFHniR7+KWZVtV28kIshH Qu1Ak49vpkVRpywoBpP0Y1/aKEo+sI3sns/p+yTdDK0GOTZaYeVCqCdT/u05Y+ysHHHa VYQSkpAA8oq2acPz6Vgk5KDmFhWlOMhyOHmnov+3tyT/0oIEAARYAJLFMMZQfQgk2KkI XhqA== 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=eVGYPZ/7UeZKO6Se6NpNPVJXbNs7G1hOpj/fbdQMrzU=; b=FZ3FZqiqSrm0Bou2SoHlBB8SdFoSaEaomW4IkRvvCkw4TKPmVQkLXDC5xxq3AqB+lb y9t1GuhJ/Np+fe2z8RQllNm0+ISIbe+Z4lxf0i2xU6ZIJglD8opdzZ72BEIH+BzU8Yap FXoeGDFRC0TZLjlLH+RyeueGmQmdWXAAi6KO+AILE28CQj3KkM3yzWjb+aIxyrUI4aUl NFMeSDaUXFmK5t87tlrUrFWwnVTtJF44FM7SlQHo/qt8IF4vEWJ9qbyLo3MQnnA6JCeX oZtVcl04FPgty1E8M/YKzm7cqtiwCZUumjpimDmhzItbXOf/3f+QTgijVZS+e+LTOP1+ S78Q== X-Gm-Message-State: AKGB3mKJ1Bxg29exihSac1baO6ptpEwbH5Nk/jqVdgqNHKmQeNjgCfWz X93yrxoWgOX/8Qc3ngd5NwaBXlshkbml+CsSaQuphg== X-Google-Smtp-Source: ACJfBossoWJGlYjFBgcdf92L+w1fJDdESxrkMsTohmTExztJJBqn/zaivj9Iz44VTkB2aNGRGrlk45QdbqVG5m9iRVc= X-Received: by 10.200.23.20 with SMTP id w20mr54187293qtj.210.1514738981989; Sun, 31 Dec 2017 08:49:41 -0800 (PST) In-Reply-To: <83a7xyetud.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:141648 Archived-At: --001a11481742f2f1e40561a5a6ca Content-Type: text/plain; charset="UTF-8" Eli Zaretskii schrieb am So., 31. Dez. 2017 um 17:38 Uhr: > > From: Philipp Stephani > > Date: Sun, 31 Dec 2017 16:16:02 +0000 > > Cc: 29812@debbugs.gnu.org > > > > AFAIK, electric-quote-replace-double is supposed to work in comments > > and strings in buffers under programming language modes, not only in > > text modes. And it works correctly for me in C modes and also in Lisp > > comments, so why not in Lisp strings? > > > > Does it work as expected for you in C strings? I see the same behavior > in C strings as in Lisp. > > In C, "\"foo\"" produces ASCII quotes. > Did you enable electric-quote-string? > > > Anyway, if this feature is not supposed to work reliably in > > programming language strings, perhaps we shouldn't try? Having it > > sometimes work and sometimes not is IMO confusing. > > > > It should work in comments and strings, yes. However, given that the > behavior is heuristic in all cases it's hard > > to define what the correct behavior should be. > > Well, can you give an example where it does work in strings? Maybe > I'm missing something, because it looked to me as if it never works in > that case. > Depends on what you mean with "work". A bare " should always close the string; after a \ it currently inserts an opening quote because it only looks back one character. --001a11481742f2f1e40561a5a6ca Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Eli Za= retskii <eliz@gnu.org> schrieb am= So., 31. Dez. 2017 um 17:38=C2=A0Uhr:
> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Sun, 31 Dec 2017 16:16:02 +0000
> Cc: 29812@d= ebbugs.gnu.org
>
>=C2=A0 AFAIK, electric-quote-replace-double is supposed to work in comm= ents
>=C2=A0 and strings in buffers under programming language modes, not onl= y in
>=C2=A0 text modes.=C2=A0 And it works correctly for me in C modes and a= lso in Lisp
>=C2=A0 comments, so why not in Lisp strings?
>
> Does it work as expected for you in C strings? I see the same behavior= in C strings as in Lisp.

In C, "\"foo\"" produces ASCII quotes.
=

Did you enable electric-quote-string?
=C2=A0<= /div>

>=C2=A0 Anyway, if this feature is not supposed to work reliably in
>=C2=A0 programming language strings, perhaps we shouldn't try?=C2= =A0 Having it
>=C2=A0 sometimes work and sometimes not is IMO confusing.
>
> It should work in comments and strings, yes. However, given that the b= ehavior is heuristic in all cases it's hard
> to define what the correct behavior should be.

Well, can you give an example where it does work in strings?=C2=A0 Maybe I'm missing something, because it looked to me as if it never works in<= br> that case.

Depends on what you mean wit= h "work". A bare " should always close the string; after a \= it currently inserts an opening quote because it only looks back one chara= cter.=C2=A0
--001a11481742f2f1e40561a5a6ca--