GNU bug report logs -
#59720
30.0.50; python-ts-mode: match/case is not fontified properly
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 59720 in the body.
You can then email your comments to 59720 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59720
; Package
emacs
.
(Wed, 30 Nov 2022 14:07:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Mickey Petersen <mickey <at> masteringemacs.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 30 Nov 2022 14:07:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
1. Visit a python file. It will use the regular python mode.
2. Write:
def foo():
match foo:
case 10:
pass
3. It is highlighted correctly: match and case are fontified with `font-lock-keyword-face'.
4. Type M-x python-ts-mode.
5. Highlighting is now off for match/case. Text properties for the `m' character are:
Character code properties: customize what to show
name: LATIN SMALL LETTER M
general-category: Ll (Letter, Lowercase)
decomposition: (109) ('m')
uppercase: 77 (M)
titlecase: 77 (M)
There are text properties here:
fontified t
In GNU Emacs 30.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version
3.24.20, cairo version 1.16.0) of 2022-11-29 built on mickey-work
Repository revision: 7939184f8e0370e7a3397d492812c6d202c2a193
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12013000
System Description: Ubuntu 20.04.3 LTS
Configured using:
'configure --with-native-compilation --with-json --with-mailutils
--without-compress-install --with-imagemagick CC=gcc-10'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ
IMAGEMAGICK JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2
M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP
SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11 XDBE
XIM XINPUT2 XPM GTK3 ZLIB
Important settings:
value of $LC_MONETARY: en_GB.UTF-8
value of $LC_NUMERIC: en_GB.UTF-8
value of $LC_TIME: en_GB.UTF-8
value of $LANG: en_GB.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
Major mode: EL
Memory information:
((conses 16 1470611 151650)
(symbols 48 83975 12)
(strings 32 412115 14879)
(string-bytes 1 12040593)
(vectors 16 146926)
(vector-slots 8 3669783 89353)
(floats 8 829 511)
(intervals 56 18032 4083)
(buffers 992 58))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59720
; Package
emacs
.
(Wed, 30 Nov 2022 15:17:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 59720 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Mickey Petersen <mickey <at> masteringemacs.org> writes:
> 1. Visit a python file. It will use the regular python mode.
> 2. Write:
>
> def foo():
> match foo:
> case 10:
> pass
>
> 3. It is highlighted correctly: match and case are fontified with `font-lock-keyword-face'.
> 4. Type M-x python-ts-mode.
> 5. Highlighting is now off for match/case. Text properties for the `m' character are:
>
> Character code properties: customize what to show
> name: LATIN SMALL LETTER M
> general-category: Ll (Letter, Lowercase)
> decomposition: (109) ('m')
> uppercase: 77 (M)
> titlecase: 77 (M)
>
> There are text properties here:
> fontified t
>
The following patch solves the issue by adding "case" and "match" to the
list of keywords that python-ts-mode recognizes.
[0001-Add-case-and-match-to-python-treesit-keywords.patch (text/x-patch, attachment)]
Added tag(s) patch.
Request was from
Stefan Kangas <stefankangas <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Wed, 30 Nov 2022 17:36:02 GMT)
Full text and
rfc822 format available.
Reply sent
to
Yuan Fu <casouri <at> gmail.com>
:
You have taken responsibility.
(Fri, 02 Dec 2022 03:41:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Mickey Petersen <mickey <at> masteringemacs.org>
:
bug acknowledged by developer.
(Fri, 02 Dec 2022 03:41:01 GMT)
Full text and
rfc822 format available.
Message #15 received at 59720-done <at> debbugs.gnu.org (full text, mbox):
Daniel Martín <mardani29 <at> yahoo.es> writes:
> Mickey Petersen <mickey <at> masteringemacs.org> writes:
>
>> 1. Visit a python file. It will use the regular python mode.
>> 2. Write:
>>
>> def foo():
>> match foo:
>> case 10:
>> pass
>>
>> 3. It is highlighted correctly: match and case are fontified with `font-lock-keyword-face'.
>> 4. Type M-x python-ts-mode.
>> 5. Highlighting is now off for match/case. Text properties for the `m' character are:
>>
>> Character code properties: customize what to show
>> name: LATIN SMALL LETTER M
>> general-category: Ll (Letter, Lowercase)
>> decomposition: (109) ('m')
>> uppercase: 77 (M)
>> titlecase: 77 (M)
>>
>> There are text properties here:
>> fontified t
>>
>
> The following patch solves the issue by adding "case" and "match" to the
> list of keywords that python-ts-mode recognizes.
Applied, thanks!
Yuan
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 30 Dec 2022 12:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 229 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.