From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.bugs Subject: bug#23387: 25.0.93; Unicode quote inserted in Python mode outside of strings Date: Tue, 03 May 2016 20:44:27 +0000 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113fb2ec6d5ccc0531f62dcb X-Trace: ger.gmane.org 1462308343 20234 80.91.229.3 (3 May 2016 20:45:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 May 2016 20:45:43 +0000 (UTC) Cc: 23387-done@debbugs.gnu.org To: 23387@debbugs.gnu.org, eggert@cs.ucla.edu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 03 22:45:34 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1axhCG-0000TR-ER for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 May 2016 22:45:32 +0200 Original-Received: from localhost ([::1]:43310 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axhCC-0002MU-Ni for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 May 2016 16:45:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axhC2-00027y-Vk for bug-gnu-emacs@gnu.org; Tue, 03 May 2016 16:45:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1axhBq-0006Mz-Sf for bug-gnu-emacs@gnu.org; Tue, 03 May 2016 16:45:13 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51728) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axhBp-0006IX-N3 for bug-gnu-emacs@gnu.org; Tue, 03 May 2016 16:45:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1axhBm-00039b-7l for bug-gnu-emacs@gnu.org; Tue, 03 May 2016 16:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 May 2016 20:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23387-submit@debbugs.gnu.org id=B23387.146230828512085 (code B ref 23387); Tue, 03 May 2016 20:45:02 +0000 Original-Received: (at 23387) by debbugs.gnu.org; 3 May 2016 20:44:45 +0000 Original-Received: from localhost ([127.0.0.1]:35832 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1axhBV-00038n-4X for submit@debbugs.gnu.org; Tue, 03 May 2016 16:44:45 -0400 Original-Received: from mail-lf0-f47.google.com ([209.85.215.47]:34968) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1axhBT-00038U-8f; Tue, 03 May 2016 16:44:43 -0400 Original-Received: by mail-lf0-f47.google.com with SMTP id j8so36517687lfd.2; Tue, 03 May 2016 13:44:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dOJtGPhXZGXG8i9zgKzFjTrrvknXARY7n0v600in8B0=; b=M7aXDUi2QfzjugHiGVjEcz47w369UqRyupXl1bAM7NJ2HeDfM5A8HRm4/+By2K8AL4 jKetpWqLf3etARilEAupbx7GBMngP6KGwiFmO3uQXt+JLc8ng0gJU7RBGO+lmYx4Hbyi M6gFFMK2L3knxpJUPL5eWSVpp1NBRyHqHdHkQAV4aE6PPk/NRAJHMpdN4hlNMCZ8TI+d yN2Y+Nms866nZ4Es8VTIu2g5BkTffM1cSMmg6jJgBL9BJVsIFKtEg4UlL/jfcCcl3JuI ouw6BgEyr8Y0ARrldsoFRf66Jpz0nZZgGO6c8q4Zbib6IGJMQwiuqZgnECo2nNx55mlu 4MyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dOJtGPhXZGXG8i9zgKzFjTrrvknXARY7n0v600in8B0=; b=CkYQWL8iAtPo+umeKYep3x3ZCtsNcavuzuDK9DyQOPO66CvMBWfHY8ZqJRhYkKlv3J cgMn3rnAsTF+jKcnAQTki1BeH/Nh5L6l3ZpfvGMjeXHSkF4ogv0fXPdcpL1icQPUEc/g IQfIHy+O8j4f17N+2oV1q6uKfswppm4WMZV7fyg8Kq1gsV+v31imUsJEpfG2USzqJpzd Jxlhxg2HMSBX+6km4h3mkCTaQogPQwzw9oL3IXU4hUV2MqE/5jhAazp5YK/XJb5B9yjt tTSXfezrTAa2FHnN+lKod63tRG9LCN7ObdcOkAy/wBtPQL7j/BwTNbyHZpYFoOmSPojd lh1Q== X-Gm-Message-State: AOPr4FVCam+7BkQsGvvn2F5BidAT5TvyTAEI+Q76SQ+qgbkT5oyU/qLYn4HXJSBZlosuwAirTku/xg7mcOfGeg== X-Received: by 10.25.18.102 with SMTP id h99mr2223081lfi.127.1462308277409; Tue, 03 May 2016 13:44:37 -0700 (PDT) In-Reply-To: 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:117689 Archived-At: --001a113fb2ec6d5ccc0531f62dcb Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Paul Eggert schrieb am Mo., 2. Mai 2016 um 18:05 Uhr: > Thanks for the bug report and patch, but I ran into a problem with the > patch. Suppose I do this: > > emacs -Q > M-x electric-quote-mode > M-x customize-variable RET electric-quote-string, set it to t, save > M-x python-mode > 'abc' > > That is, I type apostrophe-a-b-c-apostrophe in Python mode. With the > patch, the buffer will contain: > > 'abc=E2=80=99 > > The opening apostrophe is OK, but the closing apostrophe is considered > to be inside a string so it is transmogrified into a right single > quotation mark. A Python programmer would want both to be apostrophes. > I'm not sure, I think if a user has electric-quote-string enabled, that's the behavior they want, because it's inside a string. However, I can see that both approaches are valid. There is probably no good way that would work in all circumstances. --001a113fb2ec6d5ccc0531f62dcb Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Paul E= ggert <eggert@cs.ucla.edu> = schrieb am Mo., 2. Mai 2016 um 18:05=C2=A0Uhr:
Thanks for the bug report and patch, but I ran into a problem= with the
patch. Suppose I do this:

emacs -Q
M-x electric-quote-mode
M-x customize-variable RET electric-quote-string, set it to t, save
M-x python-mode
'abc'

That is, I type apostrophe-a-b-c-apostrophe in Python mode. With the
patch, the buffer will contain:

'abc=E2=80=99

The opening apostrophe is OK, but the closing apostrophe is considered
to be inside a string so it is transmogrified into a right single
quotation mark. A Python programmer would want both to be apostrophes.
<= /blockquote>

I'm not sure, I think if a user has ele= ctric-quote-string enabled, that's the behavior they want, because it&#= 39;s inside a string. However, I can see that both approaches are valid. Th= ere is probably no good way that would work in all circumstances.
--001a113fb2ec6d5ccc0531f62dcb--