unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#51362: python font-lock-mode in emacs 28 seems broken
@ 2021-10-23 20:06 Jeff Spencer
  2021-10-24 12:45 ` Stefan Kangas
  2022-04-17 23:32 ` kobarity
  0 siblings, 2 replies; 14+ messages in thread
From: Jeff Spencer @ 2021-10-23 20:06 UTC (permalink / raw)
  To: 51362

[-- Attachment #1: Type: text/plain, Size: 35696 bytes --]

I wanted to upgrade to emacs 28 for f-strings support, but it seems
something is off with font-lock-mode or at least isn't backward
compatible with past emacs versions.

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.

https://emacs.stackexchange.com/questions/69049/emacs-28-and-python-mode-the-syntax-font-lock-mode-seems-all-off

In GNU Emacs 28.0.60 (build 1, x86_64-apple-darwin19.6.0, NS appkit-1894.60
Version 10.15.7 (Build 19H1419))
 of 2021-10-20 built on MBP.local
Windowing system distributor 'Apple', version 10.3.1894
System Description:  Mac OS X 10.15.7

Configured using:
 'configure --disable-dependency-tracking --disable-silent-rules
 --enable-locallisppath=/usr/local/share/emacs/site-lisp
 --infodir=/usr/local/Cellar/emacs-plus@28/28.0.50/share/info/emacs
 --prefix=/usr/local/Cellar/emacs-plus@28/28.0.50 --with-xml2
 --with-gnutls --with-native-compilation --without-dbus
 --with-imagemagick --with-modules --with-rsvg --with-ns
 --disable-ns-self-contained 'CFLAGS=-I/usr/local/opt/gcc/include
 -I/usr/local/opt/libgccjit/include -I/usr/local/opt/gmp/include
 -I/usr/local/opt/jpeg/include' 'LDFLAGS=-L/usr/local/lib/gcc/11
 -I/usr/local/opt/gcc/include -I/usr/local/opt/libgccjit/include
 -I/usr/local/opt/gmp/include -I/usr/local/opt/jpeg/include''

Configured features:
ACL GIF GLIB GMP GNUTLS IMAGEMAGICK JPEG JSON LCMS2 LIBXML2 MODULES
NATIVE_COMP NOTIFY KQUEUE NS PDUMPER PNG RSVG THREADS TIFF
TOOLKIT_SCROLL_BARS XIM ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: π

Minor modes in effect:
  display-line-numbers-mode: t
  bug-reference-prog-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  eyebrowse-mode: t
  keyfreq-autosave-mode: t
  keyfreq-mode: t
  winner-mode: t
  global-hl-todo-mode: t
  hl-todo-mode: t
  save-place-mode: t
  all-the-icons-ivy-rich-mode: t
  ivy-rich-project-root-cache-mode: t
  ivy-rich-mode: t
  global-auto-revert-mode: t
  pdf-occur-global-minor-mode: t
  which-key-mode: t
  highlight-numbers-mode: t
  beacon-mode: t
  back-button-mode: t
  cyphejor-mode: t
  whitespace-cleanup-mode: t
  clean-aindent-mode: t
  dtrt-indent-mode: t
  smartparens-strict-mode: t
  smartparens-mode: t
  evil-local-mode: t
  windmove-mode: t
  desktop-save-mode: t
  global-visible-mark-mode: t
  visible-mark-mode: t
  openwith-mode: t
  savehist-mode: t
  scimax-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  async-bytecomp-package-mode: t
  google-this-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  highlight-indentation-mode: t
  company-mode: t
  elpy-mode: t
  pyvenv-mode: t
  shell-dirtrack-mode: t
  recentf-mode: t
  counsel-projectile-mode: t
  projectile-mode: t
  counsel-mode: t
  ivy-mode: t
  TeX-PDF-mode: t
  TeX-source-correlate-mode: t
  global-flycheck-mode: t
  flycheck-mode: t
  global-auto-complete-mode: t
  override-global-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  global-visual-line-mode: t
  visual-line-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Load-path shadows:
/Users/spence/Programs/scimax/ob-ipython-upstream/ob-ipython hides
/Users/spence/Programs/scimax/elpa/ob-ipython-20180224.953/ob-ipython
/Users/spence/Programs/scimax/elpa/lispy-20211020.907/elpa hides
/Users/spence/Programs/scimax/elpa/ivy-20210930.1450/elpa
/Users/spence/Programs/scimax/user/custom hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/custom
/Users/spence/Programs/scimax/elpa/transient-20211013.2148/transient hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/transient
/Users/spence/Programs/scimax/user/bindings hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/bindings
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-exp hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ob-exp
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-emacs-lisp
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ob-emacs-lisp
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-css hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ob-css
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-lob hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ob-lob
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ol-irc hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ol-irc
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-forth hides
/usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ob-forth
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-macs hides
/usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-macs
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ob
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-version
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-version
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-scheme
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ob-scheme
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ox hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ox
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-C hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ob-C
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-capture
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-capture
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-ref hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ob-ref
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-clojure
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ob-clojure
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-mouse
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-mouse
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-ctags
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-ctags
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-entities
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-entities
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-archive
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-archive
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-screen
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ob-screen
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ol-bibtex
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ol-bibtex
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-haskell
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ob-haskell
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-table
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-table
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ol-eww hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ol-eww
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ol-man hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ol-man
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ox-org hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ox-org
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-num hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/org-num
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-plot hides
/usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-plot
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ol-rmail hides
/usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ol-rmail
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-awk hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ob-awk
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-groovy
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ob-groovy
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-octave
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ob-octave
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-faces
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-faces
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-colview
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-colview
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-R hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ob-R
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-refile
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-refile
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-timer
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-timer
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-mobile
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-mobile
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-fortran
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ob-fortran
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-shell hides
/usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ob-shell
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-perl hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ob-perl
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-sqlite
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ob-sqlite
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-sed hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ob-sed
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-list hides
/usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-list
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-ruby hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ob-ruby
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-eval hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ob-eval
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-habit
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-habit
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-clock
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-clock
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-goto hides
/usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-goto
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ox-html hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ox-html
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-src hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/org-src
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-lisp hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ob-lisp
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ol-eshell
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ol-eshell
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-ditaa hides
/usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ob-ditaa
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-pcomplete
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-pcomplete
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-lint hides
/usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-lint
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ox-latex hides
/usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ox-latex
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-sass hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ob-sass
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-tangle
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ob-tangle
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-calc hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ob-calc
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-java hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ob-java
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ox-icalendar
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ox-icalendar
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ol-mhe hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ol-mhe
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-attach-git
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-attach-git
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ox-md hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ox-md
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ox-beamer
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ox-beamer
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-element
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-element
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-protocol
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-protocol
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-gnuplot
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ob-gnuplot
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-tempo
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-tempo
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-latex hides
/usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ob-latex
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ol-w3m hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ol-w3m
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-id hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/org-id
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ox-man hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ox-man
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-feed hides
/usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-feed
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-julia hides
/usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ob-julia
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-lua hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ob-lua
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-table hides
/usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ob-table
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-ocaml hides
/usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ob-ocaml
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ol-gnus hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ol-gnus
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-indent
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-indent
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-lilypond
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ob-lilypond
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-matlab
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ob-matlab
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-datetree
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-datetree
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ol-docview
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ol-docview
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-python
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ob-python
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-makefile
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ob-makefile
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-duration
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-duration
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-agenda
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-agenda
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-dot hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ob-dot
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-js hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ob-js
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ox-publish
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ox-publish
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-inlinetask
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-inlinetask
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-org hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ob-org
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-keys hides
/usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-keys
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-core hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ob-core
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-compat
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-compat
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ol hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ol
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ox-odt hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ox-odt
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ol-info hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ol-info
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-plantuml
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ob-plantuml
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-eshell
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ob-eshell
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ox-ascii hides
/usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ox-ascii
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-loaddefs
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-loaddefs
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ox-koma-letter
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ox-koma-letter
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-maxima
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ob-maxima
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/org
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ol-bbdb hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ol-bbdb
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-macro
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-macro
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-sql hides
/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.60/lisp/org/ob-sql
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-attach
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-attach
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-processing
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ob-processing
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ox-texinfo
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ox-texinfo
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-crypt
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-crypt
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-footnote
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-footnote
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/org-install
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/org-install
/Users/spence/Programs/scimax/elpa/org-plus-contrib-20210920/ob-comint
hides /usr/local/Cellar/emacs-plus@28
/28.0.50/share/emacs/28.0.60/lisp/org/ob-comint

Features:
(mailalias mailclient qp shadow sort mail-extr emacsbug sendmail
org-goto magit-patch magit-subtree magit-gitignore magit-ediff ediff
ediff-merg ediff-mult ediff-wind ediff-diff ediff-help ediff-init
ediff-util ace-window descr-text tabify wdired company-oddmuse
company-keywords company-etags company-gtags company-dabbrev-code
company-dabbrev company-files company-clang company-template
company-cmake company-bbdb display-line-numbers xah-lookup darkroom
magit-extras vc magit-todos pcre2el rxt re-builder github-review a
forge-list forge-commands forge-semi forge-bitbucket buck forge-gogs
gogs forge-gitea gtea forge-gitlab forge-github forge-notify
forge-revnote forge-pullreq forge-issue forge-topic yaml bug-reference
forge-post markdown-mode edit-indirect forge-repo forge forge-core
forge-db closql magit-bookmark magit-submodule magit-obsolete
magit-popup magit-blame magit-stash magit-reflog magit-bisect magit-push
magit-pull magit-fetch magit-clone magit-remote magit-commit
magit-sequence magit-notes magit-worktree magit-tag magit-merge
magit-branch magit-reset magit-files magit-refs magit-status magit
magit-repos magit-apply magit-wip magit-log magit-diff smerge-mode
git-commit log-edit pcvs-util add-log magit-core magit-autorevert
magit-margin magit-transient magit-process with-editor magit-mode
magit-git magit-section magit-utils face-remap eyebrowse loadhist server
epa-file dired+ image-dired init packages python-black reformatter
flycheck-yamllint org-indent appt diary-lib diary-loaddefs keyfreq
winner emacs-lock smart-mode-line-dark-theme
sanityinc-tomorrow-eighties-theme hl-todo saveplace
all-the-icons-ivy-rich ivy-rich all-the-icons-dired org-gcal persist
org-generic-id org-clock org-archive request-deferred request autorevert
alert log4e gntp ox-jekyll-lite ox-md wgrep-ag wgrep helm-chronos
chronos notifications pdf-occur tablist tablist-filter
semantic/wisent/comp semantic/wisent semantic/wisent/wisent
semantic/util-modes semantic/util semantic semantic/tag semantic/lex
semantic/fw cedet pdf-isearch pdf-misc doom-todo-ivy vlf-setup vlf
vlf-base vlf-tune ibuf-macs which-key powershell realgud-ipdb
realgud--ipdb-track-mode realgud--ipdb-init realgud--ipdb-core realgud
realgud-zshdb realgud:zshdb-track-mode realgud:zshdb-core
realgud:zshdb-init realgud-trepan3k realgud:trepan3k-track-mode
realgud:trepan3k-core realgud:trepan3k-init realgud-trepan2
realgud:trepan2-track-mode realgud:trepan2-core realgud:trepan2-init
realgud-trepanpl realgud:trepanpl-track-mode realgud:trepanpl-core
realgud:trepanpl-init realgud-trepanjs realgud:trepanjs-track-mode
realgud:trepanjs-core realgud:trepanjs-init realgud-lang-js
realgud-trepan realgud:trepan-track-mode realgud:trepan-core
realgud:trepan-init realgud-remake realgud:remake-track-mode
realgud:remake-core realgud:remake-init realgud-rdebug
realgud-rdebug-track-mode realgud-rdebug-core realgud-rdebug-init
realgud-lang-ruby realgud-perldb realgud:perldb-track-mode
realgud:perldb-core realgud:perldb-init realgud-lang-perl realgud-pdb
realgud:pdb-track-mode realgud:pdb-core realgud:pdb-init
realgud-lang-python realgud-kshdb realgud:kshdb-track-mode
realgud:kshdb-core realgud:kshdb-init realgud-gub realgud:gub-track-mode
realgud:gub-core realgud:gub-init realgud-gdb realgud:gdb-track-mode
realgud:gdb-init realgud:gdb-core realgud-bashdb
realgud:bashdb-track-mode realgud:bashdb-core realgud:bashdb-init
realgud-lang-posix-shell realgud:run realgud-locals-mode
realgud-breakpoint-mode realgud-backtrack-mode realgud-track-mode
realgud-backtrace-mode realgud-attach realgud-lang-java realgud-track
realgud-shortkey realgud-menu realgud-eval realgud-cmds realgud-send
realgud-window realgud-utils realgud-init realgud-file realgud-core
realgud-reset realgud-buffer-helper realgud-buffer-breakpoint
realgud-buffer-backtrace realgud-locals realgud-buffer-locals
realgud-buffer-command realgud-buffer-info realgud-lochist realgud-bp
realgud-bp-image-data realgud-lang esh-mode realgud-loc
realgud-buffer-source realgud-key key realgud-follow realgud-fringe
realgud-helper loc-changes realgud-regexp realgud-custom load-relative
dotenv-mode k8s-mode kubel yaml-mode-expansions yaml-mode
dockerfile-mode sh-script smie executable company-quickhelp pos-tip
company-terraform company-terraform-data terraform-mode hcl-mode
org-sidebar org-ql-search org-ql-view transient org-super-agenda
isend-mode term disp-table ehelp counsel-pydoc highlight-numbers
parent-mode auctex-latexmk tex-buf latex-mode-expansions latex
latex-flymake tex-ispell tex-style visual-fill-column
git-commit-insert-issue glab ghub-graphql treepy gsexp ghub
evil-nerd-commenter evil-nerd-commenter-operator evil-nerd-commenter-sdk
html-mode-expansions sgml-mode facemenu jupyter jupyter-repl
jupyter-kernel-manager jupyter-channel jupyter-widget-client websocket
bindat simple-httpd jupyter-kernelspec jupyter-env jupyter-client
jupyter-mime jupyter-comm-layer jupyter-messages hmac-def jupyter-base
eieio-base color-theme-sanityinc-tomorrow beacon osx-trash
easy-kill-extras easy-kill-line-edge easy-kill-buffer easy-kill-to-char
back-button find-file-in-project find-lisp helm-gtags pulse which-func
imenu helm-ag helm-rg dumb-jump org-download org-attach cyphejor
whitespace-cleanup-mode whitespace clean-aindent-mode dtrt-indent
smartparens man evil evil-keybindings evil-integration evil-maps
evil-commands reveal evil-jumps evil-command-window evil-search evil-ex
evil-types evil-macros evil-repeat evil-states evil-core evil-common
windmove calc calc-loaddefs calc-macs evil-digraphs evil-vars frame-cmds
frame-fns avoid wttrin backup-each-save dired-filter dired-narrow
dired-ranger dired-hacks-utils peep-dired dired-x tiny desktop frameset
transpose-frame visual-regexp-steroids visual-regexp visible-mark
ace-jump-zap easy-kill-aj ace-jump-mode ivy-dired-history dired-aux
openwith expand-region text-mode-expansions cc-mode-expansions
the-org-mode-expansions python-el-fgallina-expansions
er-basic-expansions expand-region-core expand-region-custom todotxt
savehist scimax-editmarks kitchingroup cal-iso gitter scimax-journal
scimax-autoformat-abbrev scimax-yas scimax-lob vc-git vc-dispatcher
org-eldoc flyspell-correct flyspell ispell image-file image-converter
ol-eww eww mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect
gnus-search eieio-opt speedbar ezimage dframe gnus-art mm-uu mml2015
mm-view mml-smime smime dig gnus-sum gnus-group gnus-undo gnus-start
gnus-dbus dbus gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo
gnus-spec gnus-int gnus-range gnus-win gnus nnheader ol-docview doc-view
ol-bbdb ol-w3m scimax-ivy org-show animate ox-manuscript bibtex-hotkeys
scimax-notebook ivy-xref scimax-apps org-ql peg ts org-habit ag vc-svn
find-dired ibuffer-projectile ggtags ewoc scimax-spellcheck scimax-email
scimax-contacts pretty-hydra org-db emacsql-sqlite emacsql
emacsql-compiler scimax-org scimax-org-src-blocks ob-C ob-fortran
cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs ob-R ob-plantuml ob-dot ob-org ob-perl ob-ruby ob-sqlite
ob-matlab ob-octave ob-shell ob-latex scimax-org-images scimax-org-latex
scimax-org-radio-checkbox scimax-org-babel-python org-id org-agenda
org-mouse org-inlinetask scimax-mode scimax-utils scimax leuven-theme
ws-butler undo-tree diff smex smart-mode-line-light-theme
smart-mode-line rich-minority rainbow-mode xterm-color pydoc goto-addr
org-ref-wos org-ref-scopus org-ref-arxiv org-ref org-ref-helm-bibtex
org-ref-helm helm-config org-ref-core reftex-cite reftex reftex-loaddefs
reftex-vars org-ref-glossary ox-odt rng-loc rng-uri rng-parse rng-match
rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util
ox-latex ox-icalendar ox-html table ox-ascii ox-publish ox
org-ref-bibtex org-ref-citeproc org-element doi-utils org-ref-utils
org-ref-pdf url-http url-auth url-gw nsm ol-bibtex ivy-bibtex
helm-bibtex bibtex-completion org-capture org-refile biblio
biblio-download biblio-dissemin biblio-ieee biblio-hal biblio-dblp
biblio-crossref biblio-arxiv timezone biblio-doi biblio-core let-alist
hl-line helm-files filenotify helm-buffers helm-occur helm-tags
helm-locate helm-grep helm-regexp helm-utils helm-types helm-net
helm-help helm async-bytecomp helm-global-bindings helm-easymenu
helm-source helm-multi-match helm-lib async parsebib bibtex org-mime
pdf-tools pdf-view jka-compr pdf-cache pdf-info tq pdf-util pdf-macs
image-mode exif ov scimax-ob ob-ipython dash-functional ob-python
mustache lispy lispy-inline edebug backtrace lispy-tags mode-local
jedi-direx direx eieio-compat jedi jedi-core python-environment epc
ctable concurrent deferred ivy-hydra hydra-ox org ob ob-tangle ob-ref
ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint
org-pcomplete org-list org-faces org-entities noutline outline
org-version ob-emacs-lisp ob-core ob-eval org-table ol org-keys
org-compat org-macs org-loaddefs cal-menu calendar cal-loaddefs hydra lv
hy-mode hy-jedhy hy-shell hy-font-lock hy-base htmlize ht help-fns+ cl
google-this f esup esup-child benchmark yasnippet-snippets yasnippet
highlight-indentation company-capf company help-fns radix-tree elpy
elpy-rpc pyvenv eshell esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg
esh-module esh-groups esh-util elpy-shell elpy-profile elpy-django s
elpy-refactor diff-mode python tramp-sh docker-tramp tramp-cache tramp
tramp-loaddefs trampver tramp-integration tramp-compat shell pcomplete
parse-time iso8601 ls-lisp format-spec ido files-x etags fileloop
cus-edit cus-start cus-load elfeed-show elfeed-search message rmc rfc822
mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail
rmail-loaddefs mm-decode mm-bodies mm-encode mailabbrev mail-utils
gmm-utils mailheader shr kinsoku svg dom elfeed-csv elfeed elfeed-curl
elfeed-log elfeed-db elfeed-lib time-date avl-tree generator url-queue
xml-query xml dashboard dashboard-widgets all-the-icons
all-the-icons-faces data-material data-weathericons data-octicons
data-fileicons data-faicons data-alltheicons recentf tree-widget
wid-edit counsel-projectile projectile grep ibuf-ext ibuffer
ibuffer-loaddefs counsel xdg xref dired dired-loaddefs swiper ivy flx
delsel ivy-faces ivy-overlay colir color easy-kill-mc easy-kill pcase
multiple-cursors mc-separate-operations rectangular-region-mode
mc-mark-pop mc-edit-lines mc-hide-unmatched-lines-mode mc-mark-more
mc-cycle-cursors multiple-cursors-core comp comp-cstr rect drag-stuff
button-lock bookmark pp tex crm texmathp avy flycheck find-func dash
flymake-proc flymake project compile text-property-search comint
ansi-color ring warnings thingatpt auto-complete-config auto-complete
popup aggressive-indent lisp-mnt mail-parse rfc2231 rfc2047 rfc2045
mm-util ietf-drums mail-prsvr cl-extra help-mode bootstrap diminish
use-package use-package-ensure use-package-delight use-package-diminish
use-package-bind-key bind-key easy-mmode use-package-core gnutls puny
finder-inf tex-site rx realgud-recursive-autoloads advice info edmacro
kmacro package browse-url url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf url-util mailcap
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc
paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode
mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads kqueue
cocoa ns lcms2 multi-tty make-network-process native-compile emacs)

Memory information:
((conses 16 2043216 228309)
 (symbols 48 105694 65)
 (strings 32 512167 18150)
 (string-bytes 1 20837768)
 (vectors 16 199867)
 (vector-slots 8 5179121 222825)
 (floats 8 2849 1058)
 (intervals 56 35353 8745)
 (buffers 992 61))

[-- Attachment #2: Type: text/html, Size: 36591 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#51362: python font-lock-mode in emacs 28 seems broken
  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-31  9:34   ` Kévin Le Gouguec
  2022-04-17 23:32 ` kobarity
  1 sibling, 2 replies; 14+ messages in thread
From: Stefan Kangas @ 2021-10-24 12:45 UTC (permalink / raw)
  To: Jeff Spencer; +Cc: 51362

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?





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#51362: python font-lock-mode in emacs 28 seems broken
  2021-10-24 12:45 ` Stefan Kangas
@ 2021-10-24 22:37   ` Jeff Spencer
  2021-10-24 22:40     ` Jeff Spencer
  2021-10-31  9:34   ` Kévin Le Gouguec
  1 sibling, 1 reply; 14+ messages in thread
From: Jeff Spencer @ 2021-10-24 22:37 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 51362

[-- Attachment #1: Type: text/plain, Size: 1435 bytes --]

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: 1999 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#51362: python font-lock-mode in emacs 28 seems broken
  2021-10-24 22:37   ` Jeff Spencer
@ 2021-10-24 22:40     ` Jeff Spencer
  0 siblings, 0 replies; 14+ messages in thread
From: Jeff Spencer @ 2021-10-24 22:40 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 51362

[-- 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 --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#51362: python font-lock-mode in emacs 28 seems broken
  2021-10-24 12:45 ` Stefan Kangas
  2021-10-24 22:37   ` Jeff Spencer
@ 2021-10-31  9:34   ` Kévin Le Gouguec
  2021-11-11  8:04     ` Dario Gjorgjevski
  1 sibling, 1 reply; 14+ messages in thread
From: Kévin Le Gouguec @ 2021-10-31  9:34 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Jeff Spencer, 51362, Dario Gjorgjevski

[-- Attachment #1: Type: text/plain, Size: 468 bytes --]

Stefan Kangas <stefan@marxist.se> writes:

> Do you have an example file or snippet where font-lock fails?

I've tried to come up with a minimal reproducer; see attached file, and
screenshots.  In Emacs 28, the second assignment is not fontified until
the user starts editing the buffer.

I glanced at python.el's font-lock rules and tried to revert recent
changes, but tripped over conflicts.  I'm speculatively CC'ing Dario, in
case the issue looks obvious to him?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: repro.py --]
[-- Type: text/x-python, Size: 27 bytes --]

a = foo(x='a')
b = a.bar()

[-- Attachment #3: Screenshot_20211031_103332.png --]
[-- Type: image/png, Size: 132814 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#51362: python font-lock-mode in emacs 28 seems broken
  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
  0 siblings, 2 replies; 14+ messages in thread
From: Dario Gjorgjevski @ 2021-11-11  8:04 UTC (permalink / raw)
  To: Kévin Le Gouguec; +Cc: Jeff Spencer, 51362, Stefan Kangas

[-- Attachment #1: Type: text/plain, Size: 1853 bytes --]

Hi,

Thanks a lot for the report and the reproducer, and sorry for the
regression that my patch introduced.
It has been a while since I wrote any Python, so I did not notice it.

What seems to be happening is that python-font-lock-assignment-matcher is
giving up too early.
Replacing its definition by
(defun python-font-lock-assignment-matcher (regexp)
  "Font lock matcher for assignments based on REGEXP.
Return nil if REGEXP matched within a `paren' context (to avoid,
e.g., default values for arguments or passing arguments by name
being treated as assignments) or is followed by an '=' sign (to
avoid '==' being treated as an assignment."
  (lambda (limit)
    (let ((res nil))
      (while (and (setq res (re-search-forward regexp limit t))
                  (or (python-syntax-context 'paren)
                      (equal (char-after (point)) ?=))))
      res)))
should fix the issue.
Would you be able to give it a try?

Unfortunately some issues still remain, all of which can be illustrated by
a file containing the following code:
CustomInt = int

def f(x: CustomInt) -> CustomInt:
    y = x + 1
    ys: Sequence[CustomInt] = [y, y + 1]
    res: CustomInt = sum(ys) + 1
    return res
When such a file is first opened:

   - The y in y = x + 1 is not highlighted — this is fixed by subsequent
   edits
   - The CustomInt in -> CustomInt is highlighted — this is fixed by
   subsequent edits
   - The CustomInt in Sequence[CustomInt] is highlighted — this is *not*
   fixed by subsequent edits

These are caused by the type hints (in the case of 1. — by the type hints
in the function's signature).
I am not sure how one would fix them.

Regarding reverting the patch: It can be done easily, but the previous code
had even more bugs happening around type hints.

Best regards,
Dario

[-- Attachment #2: Type: text/html, Size: 3101 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#51362: python font-lock-mode in emacs 28 seems broken
  2021-11-11  8:04     ` Dario Gjorgjevski
@ 2021-11-11  8:48       ` Stefan Kangas
  2021-11-11 12:37       ` Lars Ingebrigtsen
  1 sibling, 0 replies; 14+ messages in thread
From: Stefan Kangas @ 2021-11-11  8:48 UTC (permalink / raw)
  To: Dario Gjorgjevski, Kévin Le Gouguec; +Cc: Jeff Spencer, 51362

Dario Gjorgjevski <dario.gjorgjevski@gmail.com> writes:

> Thanks a lot for the report and the reproducer, and sorry for the
> regression that my patch introduced.

Thanks for looking into it!

> Unfortunately some issues still remain,

Are these regressions, or old bugs?

Could you report these issues as separate bug reports?  I guess it would
be three separate bugs, unless you happen to think otherwise.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#51362: python font-lock-mode in emacs 28 seems broken
  2021-11-11  8:04     ` Dario Gjorgjevski
  2021-11-11  8:48       ` Stefan Kangas
@ 2021-11-11 12:37       ` Lars Ingebrigtsen
  1 sibling, 0 replies; 14+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-11 12:37 UTC (permalink / raw)
  To: Dario Gjorgjevski
  Cc: Jeff Spencer, 51362, Stefan Kangas, Kévin Le Gouguec

Dario Gjorgjevski <dario.gjorgjevski@gmail.com> writes:

> Would you be able to give it a try?

Or if it's easier in patch form:

diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index b12b22e992..eebc9055bf 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -606,10 +606,11 @@ python-font-lock-assignment-matcher
 being treated as assignments) or is followed by an '=' sign (to
 avoid '==' being treated as an assignment."
   (lambda (limit)
-    (let ((res (re-search-forward regexp limit t)))
-      (unless (or (python-syntax-context 'paren)
-                  (equal (char-after (point)) ?=))
-        res))))
+    (let ((res nil))
+      (while (and (setq res (re-search-forward regexp limit t))
+                  (or (python-syntax-context 'paren)
+                      (equal (char-after (point)) ?=))))
+      res)))
 
 (defvar python-font-lock-keywords-maximum-decoration
   `((python--font-lock-f-strings)


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





^ permalink raw reply related	[flat|nested] 14+ messages in thread

* bug#51362: python font-lock-mode in emacs 28 seems broken
  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
@ 2022-04-17 23:32 ` kobarity
  2022-04-18  9:50   ` Lars Ingebrigtsen
  1 sibling, 1 reply; 14+ messages in thread
From: kobarity @ 2022-04-17 23:32 UTC (permalink / raw)
  To: 51362

[-- Attachment #1: Type: text/plain, Size: 3095 bytes --]

Hi,

I reported a new Bug #54992 for the following bug mentioned in Message #24:

- The CustomInt in Sequence[CustomInt] is highlighted — this is *not*
  fixed by subsequent edits

Remaining two following bugs mentioned in Message #24 and Bug #45679
are the same:

- The y in y = x + 1 is not highlighted — this is fixed by subsequent
  edits
- The CustomInt in -> CustomInt is highlighted — this is fixed by
  subsequent edits

Is it better to discuss in Bug #45679?

These bugs are caused by not-simple-operator matching characters
including EOLs. So rx '(+ not-simple-operator)' may span multiple
lines.

This problem can be fixed with the following patch. Behavior of
python-font-lock-assignment-matcher is same as Dario's patch, but I'm
just showing another option using cl-loop. I also modified docstring.

diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index c4d8b123a8..d31861dd83 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -394,7 +394,7 @@ python-rx
             (open-paren        (or "{" "[" "("))
             (close-paren       (or "}" "]" ")"))
             (simple-operator   (any ?+ ?- ?/ ?& ?^ ?~ ?| ?* ?< ?> ?= ?%))
-            (not-simple-operator (not simple-operator))
+            (not-simple-operator (not (or simple-operator ?\n)))
             (operator          (or "==" ">=" "is" "not"
                                    "**" "//" "<<" ">>" "<=" "!="
                                    "+" "-" "/" "&" "^" "~" "|" "*" "<" ">"
@@ -603,15 +603,15 @@ python-font-lock-keywords-level-2

 (defun python-font-lock-assignment-matcher (regexp)
   "Font lock matcher for assignments based on REGEXP.
-Return nil if REGEXP matched within a `paren' context (to avoid,
-e.g., default values for arguments or passing arguments by name
-being treated as assignments) or is followed by an '=' sign (to
-avoid '==' being treated as an assignment."
+Search for next occurrence if REGEXP matched within a `paren'
+context (to avoid, e.g., default values for arguments or passing
+arguments by name being treated as assignments) or is followed by
+an '=' sign (to avoid '==' being treated as an assignment."
   (lambda (limit)
-    (let ((res (re-search-forward regexp limit t)))
-      (unless (or (python-syntax-context 'paren)
-                  (equal (char-after (point)) ?=))
-        res))))
+    (cl-loop while (re-search-forward regexp limit t)
+             unless (or (python-syntax-context 'paren)
+                        (equal (char-after) ?=))
+               return t)))

 (defvar python-font-lock-keywords-maximum-decoration
   `((python--font-lock-f-strings)


Please note that not-simple-operator is also used in
python-info-assignment-statement-p, but the patch does not affect it.
Because python-info-assignment-statement-p calls re-search-forward
with BOUND argument set to (line-end-position).

I wrote some tests as the attached patch. Both the above patch and the
patch shown in Bug #54992 are necessary for all of the tests to pass.

[-- Attachment #2: python-font-lock-tests.patch --]
[-- Type: application/x-patch, Size: 6266 bytes --]

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* bug#51362: python font-lock-mode in emacs 28 seems broken
  2022-04-17 23:32 ` kobarity
@ 2022-04-18  9:50   ` Lars Ingebrigtsen
  2022-04-18 12:34     ` kobarity
  0 siblings, 1 reply; 14+ messages in thread
From: Lars Ingebrigtsen @ 2022-04-18  9:50 UTC (permalink / raw)
  To: kobarity; +Cc: 51362

kobarity <kobarity@gmail.com> writes:

> Remaining two following bugs mentioned in Message #24 and Bug #45679
> are the same:
>
> - The y in y = x + 1 is not highlighted — this is fixed by subsequent
>   edits
> - The CustomInt in -> CustomInt is highlighted — this is fixed by
>   subsequent edits
>
> Is it better to discuss in Bug #45679?

Either is fine, I think.

> These bugs are caused by not-simple-operator matching characters
> including EOLs. So rx '(+ not-simple-operator)' may span multiple
> lines.
>
> This problem can be fixed with the following patch. Behavior of
> python-font-lock-assignment-matcher is same as Dario's patch, but I'm
> just showing another option using cl-loop. I also modified docstring.

Looks good to me.

> I wrote some tests as the attached patch. Both the above patch and the
> patch shown in Bug #54992 are necessary for all of the tests to pass.

The two functional patches are small enough to include without a
copyright assignment, but the tests are over the limit, size-wise.
Would you be willing to assign copyright to the FSF for this code?

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





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#51362: python font-lock-mode in emacs 28 seems broken
  2022-04-18  9:50   ` Lars Ingebrigtsen
@ 2022-04-18 12:34     ` kobarity
  2022-04-18 12:36       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 14+ messages in thread
From: kobarity @ 2022-04-18 12:34 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 51362

Lars,

Thank you for reviewing my patches.

> Would you be willing to assign copyright to the FSF for this code?

Yes, I'm willing to assign copyright to the FSF. Actually, I once
assigned copyright to the FSF for another project with a different
email address in 2007. I'm going to ask how to process assignments
this time. Sorry for the inconvenience.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#51362: python font-lock-mode in emacs 28 seems broken
  2022-04-18 12:34     ` kobarity
@ 2022-04-18 12:36       ` Lars Ingebrigtsen
  2022-05-16 13:40         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 14+ messages in thread
From: Lars Ingebrigtsen @ 2022-04-18 12:36 UTC (permalink / raw)
  To: kobarity; +Cc: 51362

kobarity <kobarity@gmail.com> writes:

> Yes, I'm willing to assign copyright to the FSF. Actually, I once
> assigned copyright to the FSF for another project with a different
> email address in 2007.

What was the address?  

> I'm going to ask how to process assignments this time. Sorry for the
> inconvenience.

Here's the form to get started:

Please email the following information to assign@gnu.org, and we
will send you the assignment form for your past and future changes.

Please use your full legal name (in ASCII characters) as the subject
line of the message.
----------------------------------------------------------------------
REQUEST: SEND FORM FOR PAST AND FUTURE CHANGES

[What is the name of the program or package you're contributing to?]
Emacs

[Did you copy any files or text written by someone else in these changes?
Even if that material is free software, we need to know about it.]

[Do you have an employer who might have a basis to claim to own
your changes?  Do you attend a school which might make such a claim?]

[For the copyright registration, what country are you a citizen of?]

[What year were you born?]

[Please write your email address here.]

[Please write your postal address here.]

[Which files have you changed so far, and which new files have you written
so far?]





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#51362: python font-lock-mode in emacs 28 seems broken
  2022-04-18 12:36       ` Lars Ingebrigtsen
@ 2022-05-16 13:40         ` Lars Ingebrigtsen
  2022-05-16 14:21           ` kobarity
  0 siblings, 1 reply; 14+ messages in thread
From: Lars Ingebrigtsen @ 2022-05-16 13:40 UTC (permalink / raw)
  To: kobarity; +Cc: 51362

The copyright paperwork is now on file, so I've applied your patch and
am therefore closing this bug report.

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






^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#51362: python font-lock-mode in emacs 28 seems broken
  2022-05-16 13:40         ` Lars Ingebrigtsen
@ 2022-05-16 14:21           ` kobarity
  0 siblings, 0 replies; 14+ messages in thread
From: kobarity @ 2022-05-16 14:21 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 51362

Lars,

Yes, I could complete the assignment process. Thank you for your
assistance, and thanks again for applying the patch.

2022年5月16日(月) 22:41 Lars Ingebrigtsen <larsi@gnus.org>:
>
> The copyright paperwork is now on file, so I've applied your patch and
> am therefore closing this bug report.
>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no
>





^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-05-16 14:21 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).