all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#60427: Emacs-29, c++-ts-mode: typing "char" into an empty buffer causes an exception in redisplay.
@ 2022-12-30 12:24 Alan Mackenzie
  2022-12-31  1:02 ` Yuan Fu
  0 siblings, 1 reply; 13+ messages in thread
From: Alan Mackenzie @ 2022-12-30 12:24 UTC (permalink / raw)
  To: 60427

Hello, Emacs.

In the emacs-29 branch, with the latest commit being:

commit 558b59d81b938fc434e62523106360b9704c88e2 (HEAD -> emacs-29, origin/emacs-29, origin/HEAD)
Author: Yuan Fu <casouri@gmail.com>
Date:   Thu Dec 29 11:52:06 2022 -0800

    Add color fontification in css-ts-mode (bug#60405)

:
(i) emacs -Q
(ii) (setq backtrace-on-redisplay-error t)
(iii) C-x b string.cc <RET>
(iv) M-x c++-ts-mode <RET>
(v) Type "char" (without the quote marks).

This throws an exception in the redisplay code.  The backtrace in the
*Redisplay-trace* buffer is:

Error: treesit-query-error ("Node type error at" 195 "Debug the query with `treesit-query-validate'")
  debug-early-backtrace()
  debug-early(error (treesit-query-error "Node type error at" 195 "Debug the query with `treesit-query-validate'"))
  treesit-font-lock-fontify-region(1 5 nil)
  font-lock-default-fontify-region(1 5 nil)
  font-lock-fontify-region(1 5)
  #f(compiled-function (fun) #<bytecode -0x156ee3e72a1d5e83>)(font-lock-fontify-region)
  jit-lock--run-functions(1 5)
  jit-lock-fontify-now(1 5)
  jit-lock-function(1)
  redisplay_internal\ \(C\ function\)()

..  That this insertion causes an exception is clearly a bug.

But the contents of the backtrace seem to me to be less helpful than they
might be.  What does the "the" in "the query" refer to?  There is no
referent yet established.  What does the 195 refer to?  It clearly isn't
a buffer position, which is what it would mean in lots of other Emacs
error messages.

Just as a matter of interest, in c-ts-mode, the above actions run without
problem.

-- 
Alan Mackenzie (Nuremberg, Germany).





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

end of thread, other threads:[~2023-01-01 20:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-30 12:24 bug#60427: Emacs-29, c++-ts-mode: typing "char" into an empty buffer causes an exception in redisplay Alan Mackenzie
2022-12-31  1:02 ` Yuan Fu
2022-12-31  6:42   ` Eli Zaretskii
2022-12-31  6:55     ` Yuan Fu
2022-12-31 10:29       ` Alan Mackenzie
2022-12-31 11:02         ` Eli Zaretskii
2023-01-01 19:31           ` Alan Mackenzie
2023-01-01 20:20             ` Eli Zaretskii
2022-12-31 11:05         ` Eli Zaretskii
2022-12-31 22:06           ` Yuan Fu
2023-01-01  6:26             ` Eli Zaretskii
2022-12-31 22:11         ` Yuan Fu
2023-01-01  6:22           ` Eli Zaretskii

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.