From: Stephen Berman <stephen.berman@gmx.net>
To: Jim Porter <jporterbugs@gmail.com>
Cc: 49518@debbugs.gnu.org
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 [thread overview]
Message-ID: <877dhxp8wn.fsf@gmx.net> (raw)
In-Reply-To: <CANh=_JGcPbwKW-L7wxFJv5du20-Cy21q_avx6RxZZVoai1DgMA@mail.gmail.com> (Jim Porter's message of "Sat, 10 Jul 2021 18:32:34 -0700")
On Sat, 10 Jul 2021 18:32:34 -0700 Jim Porter <jporterbugs@gmail.com> 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
next prev parent reply other threads:[~2021-07-11 8:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-11 1:32 bug#49518: 28.0.50; electric-pair-mode skip-self fails for single-quotes in python-mode Jim Porter
2021-07-11 8:11 ` Stephen Berman [this message]
2021-07-11 17:34 ` Jim Porter
2021-09-18 12:55 ` Daniel Fleischer
2021-09-18 16:56 ` Jim Porter
2021-09-18 23:43 ` João Távora
2021-09-19 0:20 ` João Távora
2021-09-19 1:55 ` Jim Porter
2021-09-19 10:44 ` João Távora
2021-09-19 16:35 ` João Távora
2021-09-21 9:59 ` João Távora
2021-09-22 20:04 ` Jim Porter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877dhxp8wn.fsf@gmx.net \
--to=stephen.berman@gmx.net \
--cc=49518@debbugs.gnu.org \
--cc=jporterbugs@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).