GNU bug report logs - #23387
25.0.93; Unicode quote inserted in Python mode outside of strings

Previous Next

Package: emacs;

Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>

Date: Wed, 27 Apr 2016 14:16:01 UTC

Severity: normal

Found in version 25.0.93

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: 23387 <at> debbugs.gnu.org, eggert <at> cs.ucla.edu
Cc: 23387-done <at> debbugs.gnu.org
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 part 1 (text/plain, inline)]
Paul Eggert <eggert <at> cs.ucla.edu> 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’
>
> 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.
[Message part 2 (text/html, inline)]

This bug report was last modified 9 years and 19 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.