GNU bug report logs - #61001
29.0.60; c-ts-mode: A recent update broke indent-according-to-mode

Previous Next

Package: emacs;

Reported by: Mohammed Sadiq <sadiq <at> sadiqpk.org>

Date: Sun, 22 Jan 2023 07:30:02 UTC

Severity: normal

Found in version 29.0.60

Fixed in version 30.1

Done: Theodor Thornhill <theo <at> thornhill.no>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 61001 <at> debbugs.gnu.org (full text, mbox):

From: Mohammed Sadiq <sadiq <at> sadiqpk.org>
To: Theodor Thornhill <theo <at> thornhill.no>
Cc: 61001 <at> debbugs.gnu.org
Subject: Re: bug#61001: 29.0.60; c-ts-mode: A recent update broke
 indent-according-to-mode
Date: Sun, 22 Jan 2023 15:31:43 +0530
On 2023-01-22 15:19, Theodor Thornhill wrote:
> Seems I missed one replace.  Better now?  Added a change to emacs-29
> branch.

I still get the following error:
Error: treesit-indent-error ("Couldn't find the preset corresponding to 
expression" c-ts-common--looking-at-star)
  mapbacktrace(#f(compiled-function (evald func args flags) #<bytecode 
0xcc3221d4fae87dc>))
  debug-early-backtrace()
  debug-early(error (treesit-indent-error "Couldn't find the preset 
corresponding to expression" c-ts-common--looking-at-star))
  signal(treesit-indent-error ("Couldn't find the preset corresponding 
to expression" c-ts-common--looking-at-star))
  treesit--simple-indent-eval(c-ts-common--looking-at-star)
  mapcar(treesit--simple-indent-eval ((parent-is "comment") 
c-ts-common--looking-at-star))
  treesit--simple-indent-eval((and (parent-is "comment") 
c-ts-common--looking-at-star))
  treesit--simple-indent-eval(((and (parent-is "comment") 
c-ts-common--looking-at-star) #<treesit-node "if" in 15-17> 
#<treesit-node ERROR in 1-17> 15))
  treesit-simple-indent(#<treesit-node "if" in 15-17> #<treesit-node 
ERROR in 1-17> 15)
  treesit--indent-1()
  treesit-indent()
  indent-according-to-mode()
  (save-current-buffer (set-buffer buffer) (c-ts-mode) (insert "int 
main() {\n if ") (indent-according-to-mode))
  (let ((buffer (generate-new-buffer "temp.c"))) (save-current-buffer 
(set-buffer buffer) (c-ts-mode) (insert "int main() {\n if ") 
(indent-according-to-mode)))
  eval-buffer(#<buffer  *load*> nil "/home/sadiq/test.el" nil t)
  load-with-code-conversion("/home/sadiq/test.el" "/home/sadiq/test.el" 
nil t)
  load("/home/sadiq/test.el" nil t)
  command-line-1(("-l" "test.el"))
  command-line()
  normal-top-level()
Generic tree-sitter indentation error: "Couldn't find the preset 
corresponding to expression", c-ts-common--looking-at-star




This bug report was last modified 2 years and 173 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.