From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#49518: 28.0.50; electric-pair-mode skip-self fails for single-quotes in python-mode Date: Sun, 11 Jul 2021 10:11:20 +0200 Message-ID: <877dhxp8wn.fsf@gmx.net> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37616"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 49518@debbugs.gnu.org To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 11 10:12:15 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m2UZT-0009TW-Iu for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Jul 2021 10:12:15 +0200 Original-Received: from localhost ([::1]:34954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2UZO-0006vT-19 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Jul 2021 04:12:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47444) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2UZG-0006q1-Jn for bug-gnu-emacs@gnu.org; Sun, 11 Jul 2021 04:12:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50517) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m2UZG-0000Zo-Cn for bug-gnu-emacs@gnu.org; Sun, 11 Jul 2021 04:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m2UZG-0007gu-0T for bug-gnu-emacs@gnu.org; Sun, 11 Jul 2021 04:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Jul 2021 08:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49518 X-GNU-PR-Package: emacs Original-Received: via spool by 49518-submit@debbugs.gnu.org id=B49518.162599109229528 (code B ref 49518); Sun, 11 Jul 2021 08:12:01 +0000 Original-Received: (at 49518) by debbugs.gnu.org; 11 Jul 2021 08:11:32 +0000 Original-Received: from localhost ([127.0.0.1]:33830 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2UYl-0007gC-V5 for submit@debbugs.gnu.org; Sun, 11 Jul 2021 04:11:32 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:53147) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2UYi-0007fw-Df for 49518@debbugs.gnu.org; Sun, 11 Jul 2021 04:11:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1625991081; bh=wzP5Kc/aRKAzGc9IDd4EgGfnVV72bvmX9TTit6zQBPg=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=QQ3o4YyaskieO/GacgBMoBW2qmardFjbekF62LQpj40Fohb++eNwsNlIXPIGzGDDP B0G03RRkAzjWOBRzJsWa1eGrYSJKaBTJKIySMQ72uIq0DVMp+r1hS+ebvikcU1l80I b0OxxTZwZpdwr0GySk6KgQ1zOQfj9PtCE0xd6msQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from strobelfs ([178.1.122.254]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N3se8-1l2nBR2Gi8-00zjWl; Sun, 11 Jul 2021 10:11:21 +0200 In-Reply-To: (Jim Porter's message of "Sat, 10 Jul 2021 18:32:34 -0700") X-Provags-ID: V03:K1:AHb9ii7XTFurPcH0ouo4T6TrYp3bwfI37B0KJKJEFBP9rK+YSVi Z5jxA31U1/kTNuMDGnXD39ZkKdyxw4E1CpRN41MzbiqdqHqZtHzab6Eh/eR7/Tgu/RMEGoo +7Y/6J4vWkJYbJEWfhMJe2/nGGWH9ej7eu70tQtbecGgQM7NOEcHLby5Y7O8lSxFMuGXen5 uI/KbD8hNRk1g6it3dgsw== X-UI-Out-Filterresults: notjunk:1;V03:K0:jJiP0H3P3nE=:GRe4QTLxJwoDFw/dbV0gmi Wbt9oJ336XYlkJ2owgdqdeHaDfgeFmsnf/yIRB+4lvm6Zd/WkAPrViGp40cEy6RXsiNsY9sQJ f7o/j9+sx2wjPF4nQGagS8FRIsAXxfQjOZWbuUiK1RsKfn60a188r0RKY6k3SQmj97WJwBE8x rdqHIsEUXzytbEXZ59ZPADrS4n6u1U5W5yNQjt8XqtCO6GtURoAY5g3nLwDnlBCK5NOY0idSc gzW4UY6c5/HUKDCqCLRe54+uUAQ2cPZR2/eEiQI/rXytErvwTY5FhJTaqPUo0UR2IcmxsD4SE hg5OWxZFy+hxfGxS9QuS9fuST5CgzzzKnUtSvqMvo8D7C8wDqFB/MDkf4VNJyCpe/4bsAIBYr AIgdEls10rM+f+0OF+jJphtXHtPWySRcLDTFyqduOvhHmn5N3KVcthR+Bt8JUa5/uZR/Z38aJ 3tcLd2N1amYs8vtXkZvsttAOjVViYZpwdUQ/akinAZ3nqQ+Kpvhf6Z+ONHc6LgfRjdQIi3lHu H5hOclypW2ztZiAU9BW+k8cqD12lK/KsTP+ROPnry5X5nfJNP53o41VehO9mEZGeAsVwhuqeN hzdcko4298N9xuEurluiWaXquOubzffgZyNbe0hOTlkLzLUp0iefkrpQyS+Ezw6NSfkL8FxAb 9rwy2gJ7Fa2RtXiLQtUhsrmdMeW6ladl8NiTMhzK8u9l6okSAOMiYn1ljNVWd3aHvi6i2sTLb NjdoyR2pjQVQNz3Af1WTjiENC5gflM6oQTWNNokfHgXoNhHLNnkARPXC6z4XIhllZVAGqvKH X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:209786 Archived-At: On Sat, 10 Jul 2021 18:32:34 -0700 Jim Porter wrote: > To reproduce this issue: > > 1. emacs -Q --eval '(electric-pair-mode)' foo.py > 2a. Type " (double-quote); result should be "|", where | is the point > 2b. Type " (double-quote); result should be ""| > (Note: This is the correct behavior, as I understand it.) > 3. Delete everything (optional) > 4a. Type ' (single-quote); result should be '|' > 4b. Type ' (single-quote); result is ''|', but (I think) it should be ''| [...] > One possible fix would be for `python-mode' to locally set > `electric-pair-text-syntax-table' to `python-mode-syntax-table'. This > seems to work for me after some basic testing, but I'm not confident > it's the right thing to do here; I don't see any examples of other > modes that do this, and I haven't thought over all the possible > problems with it. One thing that's kinda nice about the current behavior of typing single-quote in python-mode is that if you type it three times in a row you get '''|''', so it's ready for typing a multiple string. This doesn't happen with double-quote, and after setting electric-pair-text-syntax-table to python-mode-syntax-table it doesn't happen any more with single-quote. Steve Berman