all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#60223: 29.0.60; Improve how tree-sitter changes to treesit--font-lock-fast-mode
@ 2022-12-20 14:08 ronisbr via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-12-21  4:17 ` Yuan Fu
  2022-12-24  9:33 ` Yuan Fu
  0 siblings, 2 replies; 5+ messages in thread
From: ronisbr via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-12-20 14:08 UTC (permalink / raw)
  To: 60223

Hi!

First of all, this is my very first interaction with Emacs mailing list. 
I have
a problem in the tree-sitter module that leads to a bug (Emacs 29). 
Hence, I am
not even sure if this is the right place to report it.

treesit.el has a fast font-lock mode that is also used to avoid locking 
if some
a query is taking too long:

             ;; If for any query the query time is strangely long,
             ;; switch to fast mode (see comments above).
             (when (> (time-to-seconds (time-subtract end-time 
start-time))
                      0.01)
               (setq-local treesit--font-lock-fast-mode t))

When coding Julia major mode using tree-sitter
(https://github.com/ronisbr/julia-ts-mode/blob/main/julia-ts-mode.el), I 
found a
strange behavior in my setup (Doom Emacs) that is caused precisely by 
that
feature.

If I open this file together with Emacs (first initialization):

https://github.com/ronisbr/PrettyTables.jl/blob/master/src/print.jl

The file has almost no font decoration and 
`treesit--font-lock-fast-mode` is set
to t. If I manually set it to nil and recompute everything, the font 
locking
works perfectly again.

However, everything works as expected if I open any other Julia code 
before
opening that file (print.jl). In this case, 
`treesit--font-lock-fast-mode`
remains nil.

My guess is that due to something that might or might not be related to 
my
setup, the query is taking longer than the 0.01s if I open that file 
during the
initialization of Julia mode. It is caused by that enormous string used 
to
document the function that seems to slow down tree-sitter parsing. Thus, 
I think
it would be very important to have a variable to customize this time 
interval
depending on the situation.

Best regards,
Ronan Arraes

In GNU Emacs 29.0.60 (build 1, aarch64-apple-darwin22.2.0, NS
  appkit-2299.30 Version 13.1 (Build 22C65)) of 2022-12-19 built on
  Mac-Studio-de-Ronan.local
System Description:  macOS 13.1

Configured using:
  'configure --disable-dependency-tracking --disable-silent-rules
  --enable-locallisppath=/opt/homebrew/share/emacs/site-lisp
  --infodir=/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/info/emacs
  --prefix=/opt/homebrew/Cellar/emacs-plus@29/29.0.60 --with-xml2
  --with-gnutls --with-native-compilation --without-compress-install
  --without-dbus --with-imagemagick --with-modules --with-rsvg
  --with-xwidgets --with-ns --disable-ns-self-contained 'CFLAGS=-Os -w
  -pipe -mmacosx-version-min=13
  -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk
  -DFD_SETSIZE=10000 -DDARWIN_UNLIMITED_SELECT'
  'CPPFLAGS=-I/opt/homebrew/opt/zlib/include
  -I/opt/homebrew/opt/jpeg/include -I/opt/homebrew/opt/libomp/include
  -I/opt/homebrew/opt/icu4c/include
  -I/opt/homebrew/opt/openssl@1.1/include
  -I/opt/homebrew/opt/readline/include -isystem/opt/homebrew/include
  -F/opt/homebrew/Frameworks
  -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk'
  'LDFLAGS=-L/opt/homebrew/opt/zlib/lib -L/opt/homebrew/opt/jpeg/lib
  -L/opt/homebrew/opt/libomp/lib -L/opt/homebrew/opt/icu4c/lib
  -L/opt/homebrew/opt/openssl@1.1/lib -L/opt/homebrew/opt/readline/lib
  -L/opt/homebrew/lib -F/opt/homebrew/Frameworks
  -Wl,-headerpad_max_install_names
  -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk''

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

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

Major mode: DOOM v3.0.0-pre

Minor modes in effect:
   flyspell-lazy-mode: t
   which-key-mode: t
   savehist-mode: t
   better-jumper-mode: t
   better-jumper-local-mode: t
   global-company-mode: t
   company-mode: t
   vertico-mode: t
   marginalia-mode: t
   evil-goggles-mode: t
   evil-escape-mode: t
   evil-snipe-override-mode: t
   evil-snipe-mode: t
   evil-snipe-override-local-mode: t
   evil-snipe-local-mode: t
   gcmh-mode: t
   global-hl-line-mode: t
   hl-line-mode: t
   winner-mode: t
   smartparens-global-mode: t
   ws-butler-global-mode: t
   global-emojify-mode: t
   emojify-mode: t
   global-undo-fu-session-mode: t
   undo-fu-mode: t
   xterm-mouse-mode: t
   xclip-mode: t
   persp-mode: t
   doom-modeline-mode: t
   solaire-global-mode: t
   solaire-mode: t
   shell-dirtrack-mode: t
   evil-mode: t
   evil-local-mode: t
   windmove-mode: t
   +popup-mode: t
   override-global-mode: t
   general-override-mode: t
   global-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
   window-divider-mode: t
   buffer-read-only: t
   size-indication-mode: t
   column-number-mode: t
   line-number-mode: t
   transient-mark-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t

Load-path shadows:
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/cmake-mode/cmake-mode 
hides /opt/homebrew/share/emacs/site-lisp/cmake/cmake-mode
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/transient/transient 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/transient
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/use-package/use-package-jump 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/use-package/use-package-jump
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/use-package/use-package-diminish 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/use-package/use-package-diminish
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/use-package/use-package 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/use-package/use-package
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/use-package/use-package-delight 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/use-package/use-package-delight
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/use-package/use-package-lint 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/use-package/use-package-lint
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/bind-key/bind-key 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/use-package/bind-key
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/use-package/use-package-core 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/use-package/use-package-core
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/use-package/use-package-ensure 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/use-package/use-package-ensure
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/use-package/use-package-bind-key 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/use-package/use-package-bind-key
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/xref/xref 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/progmodes/xref
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/project/project 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/progmodes/project
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-comint 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-comint
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-exp 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-exp
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-ctags 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-ctags
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-emacs-lisp 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-emacs-lisp
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/oc hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/oc
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ox-texinfo 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ox-texinfo
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ol-irc 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ol-irc
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ol-doi 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ol-doi
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-refile 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-refile
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-version 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-version
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-num 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-num
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ol-mhe 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ol-mhe
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-shell 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-shell
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-attach 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-attach
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-C 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-C
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-macs 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-macs
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-entities 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-entities
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-dot 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-dot
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-sql 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-sql
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ol-eww 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ol-eww
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-datetree 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-datetree
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-macro 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-macro
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-eval 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-eval
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-haskell 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-haskell
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ox-org 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ox-org
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ol-rmail 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ol-rmail
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-awk 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-awk
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-groovy 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-groovy
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ox-icalendar 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ox-icalendar
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-octave 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-octave
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-scheme 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-scheme
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-mobile 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-mobile
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-processing 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-processing
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/oc-biblatex 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/oc-biblatex
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/oc-csl 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/oc-csl
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-colview 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-colview
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-R 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-R
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-table 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-table
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ox-html 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ox-html
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-fortran 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-fortran
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ol hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ol
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-plantuml 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-plantuml
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ol-docview 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ol-docview
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-perl 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-perl
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-sqlite 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-sqlite
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/oc-basic 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/oc-basic
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-sed 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-sed
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-fold-core 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-fold-core
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-ditaa 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-ditaa
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-ruby 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-ruby
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/oc-bibtex 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/oc-bibtex
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-habit 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-habit
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ol-gnus 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ol-gnus
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-screen 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-screen
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-mouse 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-mouse
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-css 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-css
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-inlinetask 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-inlinetask
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-lisp 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-lisp
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ol-eshell 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ol-eshell
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-pcomplete 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-pcomplete
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-lint 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-lint
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-id 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-id
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-capture 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-capture
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-sass 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-sass
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-tangle 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-tangle
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-calc 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-calc
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-java 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-java
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-compat 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-compat
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-attach-git 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-attach-git
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ox-beamer 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ox-beamer
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-protocol 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-protocol
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-element 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-element
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-lob 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-lob
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-tempo 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-tempo
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-python 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-python
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-latex 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-latex
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ol-w3m 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ol-w3m
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-agenda 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-agenda
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-persist 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-persist
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-ocaml 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-ocaml
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-ref 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-ref
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-fold 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-fold
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-julia 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-julia
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-lilypond 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-lilypond
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-table 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-table
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-clojure 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-clojure
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-indent 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-indent
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-plot 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-plot
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ox-latex 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ox-latex
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-src 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-src
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-duration 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-duration
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-makefile 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-makefile
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ol-info 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ol-info
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-clock 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-clock
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-forth 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-forth
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ox-odt 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ox-odt
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ol-man 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ol-man
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ox-publish 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ox-publish
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-archive 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-archive
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-org 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-org
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-lua 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-lua
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-keys 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-keys
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-eshell 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-eshell
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-faces 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-faces
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ox-man 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ox-man
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-list 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-list
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ox-md 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ox-md
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-goto 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-goto
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ol-bbdb 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ol-bbdb
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ol-bibtex 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ol-bibtex
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ox-koma-letter 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ox-koma-letter
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ox-ascii 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ox-ascii
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-matlab 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-matlab
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ox hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ox
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-timer 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-timer
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/oc-natbib 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/oc-natbib
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-core 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-core
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-feed 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-feed
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-gnuplot 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-gnuplot
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-js 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-js
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-footnote 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-footnote
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/ob-maxima 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/ob-maxima
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-cycle 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-cycle
/Users/ronan.arraes/.emacs.d/.local/straight/build-29.0.60/org/org-crypt 
hides 
/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.60/lisp/org/org-crypt

Features:
(shadow sort disp-table whitespace vc-hg evil-collection-vc-git vc-git
evil-collection-diff-mode diff-mode vc-svn vc vc-dispatcher project
flyspell-lazy ispell flyspell vi-tilde-fringe display-line-numbers
highlight-indent-guides adaptive-wrap mail-extr recentf tree-widget
emacsbug message mailcap yank-media puny evil-collection-dired dired
dired-loaddefs rfc822 mml mml-sec password-cache evil-collection-epa epa
epg rfc6068 epg-config gnus-util mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date cursor-sensor
vertico-repeat evil-collection-which-key which-key savehist
better-jumper company-capf company evil-collection-vertico vertico
orderless marginalia evil-goggles pulse evil-easymotion evil-escape
evil-snipe autorevert filenotify gcmh hl-line winner smartparens-config
smartparens-text smartparens ws-butler emojify evil-collection-apropos
apropos evil-collection-tar-mode tar-mode evil-collection-arc-mode
evil-collection-custom cus-edit cus-start cus-load wid-edit
evil-collection-comint evil-collection annalist arc-mode archive-mode
json map ht undo-fu-session undo-fu xt-mouse xclip
evil-terminal-cursor-changer color term/xterm xterm persp-mode
doom-modeline doom-modeline-segments doom-modeline-env
doom-modeline-core all-the-icons all-the-icons-faces data-material
data-weathericons data-octicons data-fileicons data-faicons
data-alltheicons shrink-path f f-shortdoc shortdoc text-property-search
s dash compat dtrt-indent doom-themes-ext-treemacs doom-themes-ext-org
solaire-mode face-remap doom-one-theme doom-themes doom-themes-base
text-align julia-local fill-line comment-align setup-vterm
setup-treemacs setup-spell setup-prog-mode setup-org-mode setup-menu-bar
setup-keybindings setup-evil setup-emojify setup-company setup-auctex
let-alist ob-core org-cycle org-fold org-fold-core org-compat ob-eval
org-version org-macs format-spec evil evil-integration evil-maps
evil-commands reveal evil-jumps evil-command-window evil-search shell
pcomplete comint ansi-osc ansi-color evil-types evil-macros evil-repeat
evil-states evil-core comp comp-cstr warnings icons rx byte-opt advice
evil-common windmove calc calc-loaddefs calc-macs thingatpt rect
evil-digraphs evil-vars ring derived edmacro kmacro use-package-bind-key
bind-key doom-editor doom-projects doom-ui easy-mmode doom-keybinds pp
cl-extra help-mode use-package-core bytecomp byte-compile general
tex-site doom-start doom-modules cl-seq doom doom-lib cl-macs
cl-loaddefs cl-lib pcase gv jansson dynamic-modules subr-x rmc
iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type 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 nadvice seq simple cl-generic indonesian philippine
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 abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads xwidget-internal kqueue cocoa ns lcms2 multi-tty
make-network-process native-compile emacs)

Memory information:
((conses 16 438407 415086)
  (symbols 48 29692 10)
  (strings 32 132168 31357)
  (string-bytes 1 3229232)
  (vectors 16 67829)
  (vector-slots 8 2682837 236595)
  (floats 8 997 798)
  (intervals 56 843 120)
  (buffers 984 13))





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

* bug#60223: 29.0.60; Improve how tree-sitter changes to  treesit--font-lock-fast-mode
  2022-12-20 14:08 bug#60223: 29.0.60; Improve how tree-sitter changes to treesit--font-lock-fast-mode ronisbr via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-12-21  4:17 ` Yuan Fu
  2022-12-21 15:59   ` ronisbr via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-12-24  9:33 ` Yuan Fu
  1 sibling, 1 reply; 5+ messages in thread
From: Yuan Fu @ 2022-12-21  4:17 UTC (permalink / raw)
  To: ronisbr; +Cc: 60223


ronisbr <ronisbr@ronanarraes.com> writes:

> Hi!
>
> First of all, this is my very first interaction with Emacs mailing
> list. I have
> a problem in the tree-sitter module that leads to a bug (Emacs 29).
> Hence, I am
> not even sure if this is the right place to report it.
>
> treesit.el has a fast font-lock mode that is also used to avoid
> locking if some
> a query is taking too long:
>
>             ;; If for any query the query time is strangely long,
>             ;; switch to fast mode (see comments above).
>             (when (> (time-to-seconds (time-subtract end-time
>             start-time))
>                      0.01)
>               (setq-local treesit--font-lock-fast-mode t))
>
> When coding Julia major mode using tree-sitter
> (https://github.com/ronisbr/julia-ts-mode/blob/main/julia-ts-mode.el),
> I found a
> strange behavior in my setup (Doom Emacs) that is caused precisely by
> that
> feature.
>
> If I open this file together with Emacs (first initialization):
>
> https://github.com/ronisbr/PrettyTables.jl/blob/master/src/print.jl
>
> The file has almost no font decoration and
> `treesit--font-lock-fast-mode` is set
> to t. If I manually set it to nil and recompute everything, the font
> locking
> works perfectly again.
>
> However, everything works as expected if I open any other Julia code
> before
> opening that file (print.jl). In this case,
> `treesit--font-lock-fast-mode`
> remains nil.
>
> My guess is that due to something that might or might not be related
> to my
> setup, the query is taking longer than the 0.01s if I open that file
> during the
> initialization of Julia mode. It is caused by that enormous string
> used to
> document the function that seems to slow down tree-sitter parsing.
> Thus, I think
> it would be very important to have a variable to customize this time
> interval
> depending on the situation.
>
> Best regards,
> Ronan Arraes
>

Thanks for the report!

The "fast mode" should be buffer-local, so that particular file
shouldn’t affect other buffers. Just to make sure, you said that if you
open print.jl first, all other files are affected?

And I agree that the 0.01 second criterion is a crude one, but a long
string shouldn’t affect the _query_ time, and that string is not long at
all, far from enough to make tree-sitter query to slow down. Let me
investigate and see what’s the real cause, and if this can be solved by
better solutions than making the threshold customizable. We can’t expect
everyone to be able to pinpoint the culprit like you did :-)

Yuan





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

* bug#60223: 29.0.60; Improve how tree-sitter changes to treesit--font-lock-fast-mode
  2022-12-21  4:17 ` Yuan Fu
@ 2022-12-21 15:59   ` ronisbr via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 5+ messages in thread
From: ronisbr via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-12-21 15:59 UTC (permalink / raw)
  To: Yuan Fu; +Cc: 60223

Hi Yuan!

Em 2022-12-21 01:17, Yuan Fu escreveu:
> Thanks for the report!
> 
> The "fast mode" should be buffer-local, so that particular file
> shouldn’t affect other buffers. Just to make sure, you said that if you
> open print.jl first, all other files are affected?

Sorry for the misunderstanding. Indeed, only print.jl is affected.

The behavior is:

     1. If I open `print.jl` as the first file, the fast mode is 
activated,
        and the buffer shows a very strange font lock. All other buffers
        (including Julia files) work as expected.
     2. If I open any other Julia file and then I open `print.jl`, the 
fast
        mode is not activated, and everything works as expected.

> And I agree that the 0.01 second criterion is a crude one, but a long
> string shouldn’t affect the _query_ time, and that string is not long 
> at
> all, far from enough to make tree-sitter query to slow down. Let me
> investigate and see what’s the real cause, and if this can be solved by
> better solutions than making the threshold customizable. We can’t 
> expect
> everyone to be able to pinpoint the culprit like you did :-)
> 
> Yuan

Thanks! Let me know if I can help debugging :)

Best regards,
Ronan Arraes





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

* bug#60223: 29.0.60; Improve how tree-sitter changes to  treesit--font-lock-fast-mode
  2022-12-20 14:08 bug#60223: 29.0.60; Improve how tree-sitter changes to treesit--font-lock-fast-mode ronisbr via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-12-21  4:17 ` Yuan Fu
@ 2022-12-24  9:33 ` Yuan Fu
  2022-12-27  3:16   ` ronisbr via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 5+ messages in thread
From: Yuan Fu @ 2022-12-24  9:33 UTC (permalink / raw)
  To: ronisbr; +Cc: 60223


ronisbr <ronisbr@ronanarraes.com> writes:

> Hi Yuan!
>
> Em 2022-12-21 01:17, Yuan Fu escreveu:
>> Thanks for the report!
>> The "fast mode" should be buffer-local, so that particular file
>> shouldn’t affect other buffers. Just to make sure, you said that if you
>> open print.jl first, all other files are affected?
>
> Sorry for the misunderstanding. Indeed, only print.jl is affected.
>
> The behavior is:
>
>     1. If I open `print.jl` as the first file, the fast mode is
>     activated,
>        and the buffer shows a very strange font lock. All other buffers
>        (including Julia files) work as expected.
>     2. If I open any other Julia file and then I open `print.jl`, the
>     fast
>        mode is not activated, and everything works as expected.

Cool, that makes much more sence.

>> And I agree that the 0.01 second criterion is a crude one, but a long
>> string shouldn’t affect the _query_ time, and that string is not
>> long at
>> all, far from enough to make tree-sitter query to slow down. Let me
>> investigate and see what’s the real cause, and if this can be solved by
>> better solutions than making the threshold customizable. We can’t
>> expect
>> everyone to be able to pinpoint the culprit like you did :-)
>> Yuan
>
> Thanks! Let me know if I can help debugging :)

Which julia parser are you using? I installed the "official" one at
here: https://github.com/tree-sitter/tree-sitter-julia

but some queries in julia-ts-mode.el are not accepted by it, like the
(true) pattern: the parser I downloaded wants "true" instead.

Also julia-ts-mode has this code

(set-electric! 'julia-ts-mode
    :words '("catch"
             "else"
             "elseif"
             "finally"
             "end"))

which seems like a doom macro or something, since I don’t have doom
Emacs complains about undefined function. I commented it out so no
biggy, just FYI.

Yuan





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

* bug#60223: 29.0.60; Improve how tree-sitter changes to  treesit--font-lock-fast-mode
  2022-12-24  9:33 ` Yuan Fu
@ 2022-12-27  3:16   ` ronisbr via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 5+ messages in thread
From: ronisbr via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-12-27  3:16 UTC (permalink / raw)
  To: Yuan Fu; +Cc: 60223

Hi Yuan!

Em 2022-12-24 06:33, Yuan Fu escreveu:
> Which julia parser are you using? I installed the "official" one at
> here: https://github.com/tree-sitter/tree-sitter-julia
> 
> but some queries in julia-ts-mode.el are not accepted by it, like the
> (true) pattern: the parser I downloaded wants "true" instead.

Yes! I am using that parser. However, this modification happened in a
commit 4 days ago, and I have not updated `julia-ts-mode` yet.

> Also julia-ts-mode has this code
> 
> (set-electric! 'julia-ts-mode
>     :words '("catch"
>              "else"
>              "elseif"
>              "finally"
>              "end"))
> 
> which seems like a doom macro or something, since I don’t have doom
> Emacs complains about undefined function. I commented it out so no
> biggy, just FYI.

Oops, sorry about that! Yes, I am using Doom Emacs and this is
probably a macro for it.

Best regards,
Ronan Arraes





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

end of thread, other threads:[~2022-12-27  3:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-20 14:08 bug#60223: 29.0.60; Improve how tree-sitter changes to treesit--font-lock-fast-mode ronisbr via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-21  4:17 ` Yuan Fu
2022-12-21 15:59   ` ronisbr via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-24  9:33 ` Yuan Fu
2022-12-27  3:16   ` ronisbr via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.