From: Jeff Spencer <jeffspencerd@gmail.com>
To: Stefan Kangas <stefan@marxist.se>
Cc: 51362@debbugs.gnu.org
Subject: bug#51362: python font-lock-mode in emacs 28 seems broken
Date: Sun, 24 Oct 2021 17:40:44 -0500 [thread overview]
Message-ID: <CALmFPZ2-V+JAttpSmFpOqQRAsvmeVZgMYDjA4nMB3-SpJ+ybaQ@mail.gmail.com> (raw)
In-Reply-To: <CALmFPZ0tj1jtOXmOPZrvayYfXZjt0ekpk=bEzw9A3ydy=FL+4A@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1686 bytes --]
Also, the snapshot_spec when colored is `font-lock-function-name-face`, but
when not it has no face property.
On Sun, Oct 24, 2021 at 5:37 PM Jeff Spencer <jeffspencerd@gmail.com> wrote:
> Here is a somewhat minimal example. What is weird is it is inconsistent.
> If I save this as `test.py` and load it none of the `snapshot_spec` are
> colored, but they are just normal text. If on the line where snapshot_spec
> is defined I delete the tuple part of input_tuple it will be highlighted
> correctly and remains that way. Then if I go back up and I for example
> delete `| datetime` then it goes back to no color.
>
> ```
> from __future__ import annotations
>
> from datetime import datetime
>
> import pandas as pd
>
>
> def make_snapshot_temp(input_tuple: tuple, window: int, date: str |
> datetime) -> None:
>
> snapshot_spec = pd.DataFrame(input_tuple, columns=["lead_id"])
> snapshot_spec["snapshot_to_date"] = pd.to_datetime(date)
>
> if window == 0:
> snapshot_spec["snapshot_from_date"] = pd.to_datetime("2017-04-01")
> snapshot_spec["snapshot_window"] = "all-time"
>
> return snapshot_spec
> ```
>
> On Sun, Oct 24, 2021 at 7:45 AM Stefan Kangas <stefan@marxist.se> wrote:
>
>> Jeff Spencer <jeffspencerd@gmail.com> writes:
>>
>> > If you look at the link below it doesn't highlight the `post_split_...`
>> > variable but it does highlight the `df_train` variable below it
>> > correctly. The link shows my settings, but this happens when starting
>> > with emacs -Q as well. It seems the syntax highlighting got messed up
>> > with the addition of the f-strings code.
>>
>> Do you have an example file or snippet where font-lock fails?
>>
>
[-- Attachment #2: Type: text/html, Size: 2486 bytes --]
next prev parent reply other threads:[~2021-10-24 22:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-23 20:06 bug#51362: python font-lock-mode in emacs 28 seems broken Jeff Spencer
2021-10-24 12:45 ` Stefan Kangas
2021-10-24 22:37 ` Jeff Spencer
2021-10-24 22:40 ` Jeff Spencer [this message]
2021-10-31 9:34 ` Kévin Le Gouguec
2021-11-11 8:04 ` Dario Gjorgjevski
2021-11-11 8:48 ` Stefan Kangas
2021-11-11 12:37 ` Lars Ingebrigtsen
2022-04-17 23:32 ` kobarity
2022-04-18 9:50 ` Lars Ingebrigtsen
2022-04-18 12:34 ` kobarity
2022-04-18 12:36 ` Lars Ingebrigtsen
2022-05-16 13:40 ` Lars Ingebrigtsen
2022-05-16 14:21 ` kobarity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CALmFPZ2-V+JAttpSmFpOqQRAsvmeVZgMYDjA4nMB3-SpJ+ybaQ@mail.gmail.com \
--to=jeffspencerd@gmail.com \
--cc=51362@debbugs.gnu.org \
--cc=stefan@marxist.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).