GNU bug report logs - #30750
25.3; New Python3.6 f-string syntax highlighting support (feature request)

Previous Next

Package: emacs;

Reported by: Campbell Barton <ideasman42 <at> gmail.com>

Date: Thu, 8 Mar 2018 12:10:02 UTC

Severity: wishlist

Tags: confirmed

Found in version 25.3

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Campbell Barton <ideasman42 <at> gmail.com>
Subject: bug#30750: closed (Re: bug#30750: 25.3; New Python3.6 f-string
 syntax highlighting support (feature request))
Date: Fri, 16 Oct 2020 18:10:01 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#30750: 25.3; New Python3.6 f-string syntax highlighting support (feature request)

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 30750 <at> debbugs.gnu.org.

-- 
30750: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=30750
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Campbell Barton <ideasman42 <at> gmail.com>
Cc: Valentin Ignatev <valentignatev <at> gmail.com>,
 Stefan Kangas <stefan <at> marxist.se>, 30750-done <at> debbugs.gnu.org,
 npostavs <at> gmail.com
Subject: Re: bug#30750: 25.3; New Python3.6 f-string syntax highlighting
 support (feature request)
Date: Fri, 16 Oct 2020 14:09:18 -0400
> It would be nice if python-mode would not syntax highlight the code in
> the f-string as a string, and instead use regular syntax highlighting.

I just pushed a change to the `master` branch of Emacs which should
do that.


        Stefan


[Message part 3 (message/rfc822, inline)]
From: Campbell Barton <ideasman42 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.3;
 New Python3.6 f-string syntax highlighting support (feature request)
Date: Thu, 8 Mar 2018 23:09:36 +1100
In python 3.6, code can be evaluated in a string, called an f-string,
see: https://www.python.org/dev/peps/pep-0498/

It would be nice if python-mode would not syntax highlight the code in
the f-string as a string, and instead use regular syntax highlighting.

eg:

    print(f'Test {} me!'.format(2 + 2))

can be written as:

    print(f'Test {2 + 2} me!')

I noticed php-mode (which had something like this for many years)
does for for PHP's strings, eg: "Test {$2 + 2} me!"

----

It was recommended I send in a feature request:
see: https://emacs.stackexchange.com/questions/39283

Thanks



This bug report was last modified 4 years and 216 days ago.

Previous Next


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