GNU bug report logs - #6853
python font-lock and empty triple-quoted strings

Previous Next

Package: emacs;

Reported by: Thomas Riccardi <riccardi.thomas <at> gmail.com>

Date: Fri, 13 Aug 2010 23:21:01 UTC

Severity: minor

Found in versions 24.0.50, 24.1

Done: Fabián Ezequiel Gallina <fabian <at> anue.biz>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6853 in the body.
You can then email your comments to 6853 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6853; Package emacs. (Fri, 13 Aug 2010 23:21:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thomas Riccardi <riccardi.thomas <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 13 Aug 2010 23:21:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Thomas Riccardi <riccardi.thomas <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.50; python mode coloring broke
Date: Sat, 14 Aug 2010 01:05:48 +0200
[Message part 1 (text/plain, inline)]
emacs trunk revno: 101071


How to reproduce:
1/ emacs -Q test.py
2/ coloring is wrong starting L96


The test.py file is joint to this email.


I tried to remove as many lines as possible:

If you remove any line above L25 from the test.py file, the bug
disappears...

If you add or remove lines below L25, the line where the bug starts will
still be L96.

[test.py (text/x-python, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6853; Package emacs. (Mon, 18 Jun 2012 23:10:01 GMT) Full text and rfc822 format available.

Message #8 received at 6853 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Thomas Riccardi <riccardi.thomas <at> gmail.com>
Cc: 6853 <at> debbugs.gnu.org
Subject: Re: bug#6853: 24.0.50; python mode coloring broke
Date: Mon, 18 Jun 2012 19:06:16 -0400
Thomas Riccardi wrote:

> emacs trunk revno: 101071
>
>
> How to reproduce:
> 1/ emacs -Q test.py
> 2/ coloring is wrong starting L96
>
>
> The test.py file is joint to this email.

Thanks for the report; sorry no-one ever replied.

It looks like a complicated example file, and I don't know what I am
supposed to be seeing. Line 96 looks the same to me as line 95. Do you
still see this issue, and if so could you say exactly what is wrong?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6853; Package emacs. (Sat, 23 Jun 2012 22:03:02 GMT) Full text and rfc822 format available.

Message #11 received at 6853 <at> debbugs.gnu.org (full text, mbox):

From: Thomas Riccardi <riccardi.thomas <at> gmail.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 6853 <at> debbugs.gnu.org
Subject: Re: bug#6853: 24.0.50; python mode coloring broke
Date: Sat, 23 Jun 2012 23:58:21 +0200
[Message part 1 (text/plain, inline)]
On Tue, Jun 19, 2012 at 1:06 AM, Glenn Morris <rgm <at> gnu.org> wrote:
> Thomas Riccardi wrote:
>
>> emacs trunk revno: 101071
>>
>>
>> How to reproduce:
>> 1/ emacs -Q test.py
>> 2/ coloring is wrong starting L96
>>
>>
>> The test.py file is joint to this email.
>
> Thanks for the report; sorry no-one ever replied.
>
> It looks like a complicated example file, and I don't know what I am
> supposed to be seeing. Line 96 looks the same to me as line 95. Do you
> still see this issue, and if so could you say exactly what is wrong?


The test.py file is indeed an unnecessary complicated example.

Here is a simpler file reproducing the issue:

def test():
	""""""
	return None
	
The issue is the following:
All the lines after the empty triple-quoted string are colored with
the 'font-lock-string-face' face.

This seems to be a legit python code:
http://docs.python.org/reference/lexical_analysis.html#string-literals
	
There is the same issue with triple-quoted strings using simple quotes '.
[test2.py (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6853; Package emacs. (Sun, 24 Jun 2012 23:44:02 GMT) Full text and rfc822 format available.

Message #14 received at 6853 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Thomas Riccardi <riccardi.thomas <at> gmail.com>
Cc: 6853 <at> debbugs.gnu.org
Subject: Re: bug#6853: 24.0.50; python mode coloring broke
Date: Sun, 24 Jun 2012 19:39:25 -0400
Thomas Riccardi wrote:

> def test():
> 	""""""
> 	return None
> 	
> The issue is the following:
> All the lines after the empty triple-quoted string are colored with
> the 'font-lock-string-face' face.

Thanks, that's much clearer. This issue still occurs with the latest
python.el in the Emacs trunk.




bug Marked as found in versions 24.1. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 24 Jun 2012 23:44:03 GMT) Full text and rfc822 format available.

Changed bug title to 'python font-lock and empty triple-quoted strings' from '24.0.50; python mode coloring broke' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 24 Jun 2012 23:45:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6853; Package emacs. (Mon, 24 Sep 2012 18:47:02 GMT) Full text and rfc822 format available.

Message #21 received at 6853 <at> debbugs.gnu.org (full text, mbox):

From: Fabián Ezequiel Gallina <fabian <at> anue.biz>
To: 6853 <at> debbugs.gnu.org
Subject: python font-lock and empty triple-quoted strings
Date: Mon, 24 Sep 2012 15:44:48 -0300
I tried this and the current trunk's python.el seems to be working well 
on the given test file.




bug closed, send any further explanations to 6853 <at> debbugs.gnu.org and Thomas Riccardi <riccardi.thomas <at> gmail.com> Request was from Fabián Ezequiel Gallina <fabian <at> anue.biz> to control <at> debbugs.gnu.org. (Mon, 24 Sep 2012 18:47:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 23 Oct 2012 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 301 days ago.

Previous Next


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