GNU bug report logs - #46233
28.0.50; python-mode font-lock assignment issues

Previous Next

Package: emacs;

Reported by: Михаил Панарин <mykhailopanarin <at> gmail.com>

Date: Mon, 1 Feb 2021 12:11:01 UTC

Severity: normal

Found in version 28.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

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 46233 in the body.
You can then email your comments to 46233 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 bug-gnu-emacs <at> gnu.org:
bug#46233; Package emacs. (Mon, 01 Feb 2021 12:11:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Михаил Панарин <mykhailopanarin <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 01 Feb 2021 12:11:01 GMT) Full text and rfc822 format available.

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

From: Михаил Панарин
 <mykhailopanarin <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; python-mode font-lock assignment issues
Date: Mon, 1 Feb 2021 13:55:01 +0200
[Message part 1 (text/plain, inline)]
emacs-version: "GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+
Version 3.24.24, cairo version 1.17.4)
 of 2021-01-22"

Sometimes assignments are not fontified or fontified incorrectly.
Steps to reproduce:
1. Create a python file with contents
> def foo(bar: int) -> str:
>     spam = bar
>     eggs = f'lkjahsd {spam}'
>     return eggs
>
>
> def foo2(bar: int):
>     spam = bar
>     eggs = f'lkjahsd {spam}'
>     return eggs
>
>
> def foo3(bar):
>     spam = bar
>     eggs = f'lkjahsd {spam}'
>     return eggs

2. Open the file with emacs -Q

You will see that variables `spam` and `bar` are highlighted differently
in all 3 cases.
`spam`:
  not highlighted at all in cases `foo` and `foo2`
`bar`:
  not highlighted correctly in cases `foo` and `foo3`

Best regards,
Mykhailo
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46233; Package emacs. (Mon, 01 Feb 2021 13:03:02 GMT) Full text and rfc822 format available.

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

From: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
To: Михаил Панарин
 <mykhailopanarin <at> gmail.com>
Cc: 46233 <at> debbugs.gnu.org
Subject: Re: bug#46233: 28.0.50; python-mode font-lock assignment issues
Date: Mon, 01 Feb 2021 15:01:52 +0200
Михаил Панарин <mykhailopanarin <at> gmail.com> writes:

> Sometimes assignments are not fontified or fontified incorrectly.

Is this the same bug as in Bug#45679?
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45679




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46233; Package emacs. (Mon, 01 Feb 2021 15:02:02 GMT) Full text and rfc822 format available.

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

From: Михаил Панарин
 <mykhailopanarin <at> gmail.com>
To: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
Cc: 46233 <at> debbugs.gnu.org
Subject: Re: bug#46233: 28.0.50; python-mode font-lock assignment issues
Date: Mon, 1 Feb 2021 15:14:38 +0200
[Message part 1 (text/plain, inline)]
> Is this the same bug as in Bug#45679?

It certainly can be, yes.
Fixing one will probably fix the other. But I decided not to guess and file
this report as well, as the described case is a bit different

пн, 1 лют. 2021 о 15:01 Andrii Kolomoiets <andreyk.mad <at> gmail.com> пише:

> Михаил Панарин <mykhailopanarin <at> gmail.com> writes:
>
> > Sometimes assignments are not fontified or fontified incorrectly.
>
> Is this the same bug as in Bug#45679?
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45679
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46233; Package emacs. (Mon, 01 Feb 2021 15:02:03 GMT) Full text and rfc822 format available.

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

From: Михаил Панарин
 <mykhailopanarin <at> gmail.com>
Cc: 46233 <at> debbugs.gnu.org
Subject: Re: bug#46233: 28.0.50; python-mode font-lock assignment issues
Date: Mon, 1 Feb 2021 16:01:59 +0200
[Message part 1 (text/plain, inline)]
> Is this the same bug as in Bug#45679?

It certainly can be, yes.
Fixing one will probably fix the other. But I decided not to guess and file
this report as well, as the described case is a bit different
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46233; Package emacs. (Mon, 01 Feb 2021 15:02:03 GMT) Full text and rfc822 format available.

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

From: Михаил Панарин
 <mykhailopanarin <at> gmail.com>
To: 46233 <at> debbugs.gnu.org
Subject: Re: bug#46233: 28.0.50; python-mode font-lock assignment issues
Date: Mon, 1 Feb 2021 16:17:55 +0200
[Message part 1 (text/plain, inline)]
> Is this the same bug as in Bug#45679?

It certainly can be, yes.
Fixing one will probably fix the other. But I decided not to guess and file
this report as well, as the described case is a bit different

>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46233; Package emacs. (Tue, 14 Jun 2022 13:44:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Михаил Панарин
 <mykhailopanarin <at> gmail.com>
Cc: 46233 <at> debbugs.gnu.org
Subject: Re: bug#46233: 28.0.50; python-mode font-lock assignment issues
Date: Tue, 14 Jun 2022 15:43:06 +0200
Михаил Панарин <mykhailopanarin <at> gmail.com> writes:

> 2. Open the file with emacs -Q
>
> You will see that variables `spam` and `bar` are highlighted differently
> in all 3 cases.
> `spam`:
>   not highlighted at all in cases `foo` and `foo2`
> `bar`:
>   not highlighted correctly in cases `foo` and `foo3`

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

I can reproduce this in Emacs 28, but not in Emacs 29, so it seems like
this has been fixed in the time since this was reported, and I'm
therefore closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 29.1, send any further explanations to 46233 <at> debbugs.gnu.org and Михаил Панарин <mykhailopanarin <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 14 Jun 2022 13:44: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. (Wed, 13 Jul 2022 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 288 days ago.

Previous Next


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