From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter 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:34:19 -0700 Message-ID: References: <877dhxp8wn.fsf@gmx.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2318"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 49518@debbugs.gnu.org To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 11 19:35:21 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 1m2dMP-0000QV-I5 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Jul 2021 19:35:21 +0200 Original-Received: from localhost ([::1]:42490 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2dML-0001gY-FV for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Jul 2021 13:35:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58868) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2dM7-0001gM-Nv for bug-gnu-emacs@gnu.org; Sun, 11 Jul 2021 13:35:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52506) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m2dM6-0004X3-5e for bug-gnu-emacs@gnu.org; Sun, 11 Jul 2021 13:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m2dM5-0007TO-Vu for bug-gnu-emacs@gnu.org; Sun, 11 Jul 2021 13:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Jul 2021 17:35: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.162602487528684 (code B ref 49518); Sun, 11 Jul 2021 17:35:01 +0000 Original-Received: (at 49518) by debbugs.gnu.org; 11 Jul 2021 17:34:35 +0000 Original-Received: from localhost ([127.0.0.1]:35819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2dLf-0007Sa-Dj for submit@debbugs.gnu.org; Sun, 11 Jul 2021 13:34:35 -0400 Original-Received: from mail-pf1-f180.google.com ([209.85.210.180]:44019) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2dLd-0007SM-Pl for 49518@debbugs.gnu.org; Sun, 11 Jul 2021 13:34:34 -0400 Original-Received: by mail-pf1-f180.google.com with SMTP id a127so13943634pfa.10 for <49518@debbugs.gnu.org>; Sun, 11 Jul 2021 10:34:33 -0700 (PDT) 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=wpH2Fvf8ysNpYLqsVNukl/tX+rhJk1vib4GNHuz8l0Y=; b=mPM7sB9B7Te8tL/Pl1BhDQxfxop/Vls7XuktzltE4rg0op8U/lqB2lKPr/FnoT7KtK tXQlFK1L8soDoYrGwG1QYSS3YMQUUC59INvrzQuTKMuXsN9gJMkskbGDbZItuWnRjGue TLz/UFcUf8Fzjdo2jSo6h2Hn0GwFT8kSOq9vco1rHdXQWwHFNyQerP4LbDttjXcIUrzQ 06Ia6WtW3N5oJdTwKikV2h+vuNPzkoIc4NZnlB/XkH6Gq0bqwK5Uq0KeLYza5Uo0tG2F tDOAHbly991XSXJmaVsuxvt99yYE7tLUyYxT+0/rGw6WqXI2wT6riiEQMiUaCdqiGJKQ 8xlw== 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=wpH2Fvf8ysNpYLqsVNukl/tX+rhJk1vib4GNHuz8l0Y=; b=iuxQIPKYtiODcpG/9UwMo2/Efdof3Bf67wpdh0+Lu3fVC0CtC4GFlH+X/nQFt3RqmX HgfMpdisy3x/xQkrGoETS+u1poX2yZD59Piq4j36zfhE4iCLoUJP9FfiYz/9vFzomAvi oIBtyPK9hlEPXEgATgA1+KN3HhCE2e7oFFpRd+azD8O5lGyq2uMR4MtS2OvUl+O3pKIC U0I0e+vkFUQ8LCBj19906xr9d1IJ7pnBfIDGSxan5STTR8je4/feMPC6GSXIy1zuimdO HWUXdylz+Wggdqe28laInG2pOArZU/te/G/JNX5Q+eu89k50Ypu2iQJ/Q0V7U5LRjDP6 LItw== X-Gm-Message-State: AOAM5337d+OtZyngTKfQ9pGYO9qT1TgReYB51MeBsfZoXgPsVUeqAK4K EzG/K1Lrm0INGMetVel9YhpYQXYgcuOw0oFbENE= X-Google-Smtp-Source: ABdhPJyMulh04CFT+fJnbKY/Dkodne0dQV9IOOu5lkwxBlomEj0/ox1o+HtEe5gjRwt4vsWSnuuIne4D57cRD6BqtJo= X-Received: by 2002:a65:41c6:: with SMTP id b6mr49843981pgq.206.1626024867653; Sun, 11 Jul 2021 10:34:27 -0700 (PDT) In-Reply-To: <877dhxp8wn.fsf@gmx.net> 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:209808 Archived-At: On Sun, Jul 11, 2021 at 1:11 AM Stephen Berman wrote: > > 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. That's true, and I've been working on a patch to make that behavior more robust. The code for that is in `python-electric-pair-string-delimiter', but I think an improved implementation of that would depend on how this bug is fixed. I have a local patch that works for me, but it depends on the other electric-pair settings I use, so it couldn't merge as-is. In particular, it would need to take into account the various possible settings for `electric-pair-skip-self', since with that set to nil, I'd generally expect `python-electric-pair-string-delimiter' to be a no-op (we should already have three quote characters after point, so no need to insert more).