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


Message #19 received at 23387-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 23387-done <at> debbugs.gnu.org
Subject: Re: 25.0.93; Unicode quote inserted in Python mode outside of strings
Date: Mon, 2 May 2016 09:04:18 -0700
[Message part 1 (text/plain, inline)]
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 installed the attached patches into emacs-25 instead, as they should 
address this problem too. Please give it a try.
[0001-Don-t-electrically-quote-in-Python.patch (application/x-patch, attachment)]
[0002-Add-electric-quote-string-unit-test.patch (application/x-patch, attachment)]

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.