unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* `M-q' uses tree-sitter now?
@ 2022-12-18 13:44 Eduardo Ochs
  2022-12-18 14:53 ` Theodor Thornhill
  2022-12-18 17:15 ` Eli Zaretskii
  0 siblings, 2 replies; 7+ messages in thread
From: Eduardo Ochs @ 2022-12-18 13:44 UTC (permalink / raw)
  To: Emacs developers

Hi list,

I am running an Emacs30 that I git-pulled and compiled a few hours ago
- its emacs-repository-version is

  "5a344d90c53d681ed98ab03ad3e218a3c6561108"

and I noticed that if I type `M-q' (`fill-paragraph') in a buffer in
emacs-lisp-mode I get this error:

  prog-fill-reindent-defun: Symbol's function definition is void:
  treesit-parser-list

I grepped the Lisp sources and `treesit-parser-list' is only mentioned
in two files: "treesit.el" and "progmodes/prog-mode.el". I tried

  (require 'prog-mode)
  (require 'treesit)

and `M-q' to see if the error would go away... but nah, same thing.
So I thought that this would be worth reporting...

  Cheers =/,
    Eduardo Ochs
    http://angg.twu.net/eepitch.html



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

* Re: `M-q' uses tree-sitter now?
  2022-12-18 13:44 `M-q' uses tree-sitter now? Eduardo Ochs
@ 2022-12-18 14:53 ` Theodor Thornhill
  2022-12-18 17:16   ` Eli Zaretskii
  2022-12-18 17:15 ` Eli Zaretskii
  1 sibling, 1 reply; 7+ messages in thread
From: Theodor Thornhill @ 2022-12-18 14:53 UTC (permalink / raw)
  To: emacs-devel, Eduardo Ochs, Emacs developers



On 18 December 2022 14:44:25 CET, Eduardo Ochs <eduardoochs@gmail.com> wrote:
>Hi list,
>
>I am running an Emacs30 that I git-pulled and compiled a few hours ago
>- its emacs-repository-version is
>
>  "5a344d90c53d681ed98ab03ad3e218a3c6561108"
>
>and I noticed that if I type `M-q' (`fill-paragraph') in a buffer in
>emacs-lisp-mode I get this error:
>
>  prog-fill-reindent-defun: Symbol's function definition is void:
>  treesit-parser-list
>
>I grepped the Lisp sources and `treesit-parser-list' is only mentioned
>in two files: "treesit.el" and "progmodes/prog-mode.el". I tried
>
>  (require 'prog-mode)
>  (require 'treesit)
>
>and `M-q' to see if the error would go away... but nah, same thing.
>So I thought that this would be worth reporting...
>
>  Cheers =/,
>    Eduardo Ochs
>    http://angg.twu.net/eepitch.html
>

Strange. Shouldn't it be enough to put the require in the eval-when-compile? Is anything else needed for the function to be picked up?



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

* Re: `M-q' uses tree-sitter now?
  2022-12-18 13:44 `M-q' uses tree-sitter now? Eduardo Ochs
  2022-12-18 14:53 ` Theodor Thornhill
@ 2022-12-18 17:15 ` Eli Zaretskii
  2022-12-18 22:37   ` Eduardo Ochs
  1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2022-12-18 17:15 UTC (permalink / raw)
  To: Eduardo Ochs; +Cc: emacs-devel

> From: Eduardo Ochs <eduardoochs@gmail.com>
> Date: Sun, 18 Dec 2022 10:44:25 -0300
> 
> Hi list,
> 
> I am running an Emacs30 that I git-pulled and compiled a few hours ago
> - its emacs-repository-version is
> 
>   "5a344d90c53d681ed98ab03ad3e218a3c6561108"
> 
> and I noticed that if I type `M-q' (`fill-paragraph') in a buffer in
> emacs-lisp-mode I get this error:
> 
>   prog-fill-reindent-defun: Symbol's function definition is void:
>   treesit-parser-list

Thanks, I tried to fix this now.  Please test.

P.S. And _please_ always report unexpected signals and other obvious
problems as bugs to the bug tracker, not here.



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

* Re: `M-q' uses tree-sitter now?
  2022-12-18 14:53 ` Theodor Thornhill
@ 2022-12-18 17:16   ` Eli Zaretskii
  2022-12-18 18:08     ` Theodor Thornhill
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2022-12-18 17:16 UTC (permalink / raw)
  To: Theodor Thornhill; +Cc: emacs-devel, eduardoochs

> Date: Sun, 18 Dec 2022 15:53:29 +0100
> From: Theodor Thornhill <theo@thornhill.no>
> 
> Strange. Shouldn't it be enough to put the require in the eval-when-compile? Is anything else needed for the function to be picked up?

His Emacs was built without tree-sitter, would be my guess.  We need
to call treesit-available-p when this can happen, before calling any
treesit functions that might not be fboundp.



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

* Re: `M-q' uses tree-sitter now?
  2022-12-18 17:16   ` Eli Zaretskii
@ 2022-12-18 18:08     ` Theodor Thornhill
  2022-12-18 18:37       ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Theodor Thornhill @ 2022-12-18 18:08 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel, eduardoochs



On 18 December 2022 18:16:57 CET, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Sun, 18 Dec 2022 15:53:29 +0100
>> From: Theodor Thornhill <theo@thornhill.no>
>> 
>> Strange. Shouldn't it be enough to put the require in the eval-when-compile? Is anything else needed for the function to be picked up?
>
>His Emacs was built without tree-sitter, would be my guess.  We need
>to call treesit-available-p when this can happen, before calling any
>treesit functions that might not be fboundp.

Right, makes sense. I guess this can occur other places as well. I can look around and see if it's needed other places.

Theo



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

* Re: `M-q' uses tree-sitter now?
  2022-12-18 18:08     ` Theodor Thornhill
@ 2022-12-18 18:37       ` Eli Zaretskii
  0 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2022-12-18 18:37 UTC (permalink / raw)
  To: Theodor Thornhill; +Cc: emacs-devel, eduardoochs

> Date: Sun, 18 Dec 2022 19:08:30 +0100
> From: Theodor Thornhill <theo@thornhill.no>
> CC: emacs-devel@gnu.org, eduardoochs@gmail.com
> 
> 
> 
> On 18 December 2022 18:16:57 CET, Eli Zaretskii <eliz@gnu.org> wrote:
> >> Date: Sun, 18 Dec 2022 15:53:29 +0100
> >> From: Theodor Thornhill <theo@thornhill.no>
> >> 
> >> Strange. Shouldn't it be enough to put the require in the eval-when-compile? Is anything else needed for the function to be picked up?
> >
> >His Emacs was built without tree-sitter, would be my guess.  We need
> >to call treesit-available-p when this can happen, before calling any
> >treesit functions that might not be fboundp.
> 
> Right, makes sense. I guess this can occur other places as well. I can look around and see if it's needed other places.

Please do, and thanks.



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

* Re: `M-q' uses tree-sitter now?
  2022-12-18 17:15 ` Eli Zaretskii
@ 2022-12-18 22:37   ` Eduardo Ochs
  0 siblings, 0 replies; 7+ messages in thread
From: Eduardo Ochs @ 2022-12-18 22:37 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

On Sun, 18 Dec 2022 at 14:15, Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Eduardo Ochs <eduardoochs@gmail.com>
> > Date: Sun, 18 Dec 2022 10:44:25 -0300
> >
> > Hi list,
> >
> > I am running an Emacs30 that I git-pulled and compiled a few hours ago
> > - its emacs-repository-version is
> >
> >   "5a344d90c53d681ed98ab03ad3e218a3c6561108"
> >
> > and I noticed that if I type `M-q' (`fill-paragraph') in a buffer in
> > emacs-lisp-mode I get this error:
> >
> >   prog-fill-reindent-defun: Symbol's function definition is void:
> >   treesit-parser-list
>
> Thanks, I tried to fix this now.  Please test.
>
> P.S. And _please_ always report unexpected signals and other obvious
> problems as bugs to the bug tracker, not here.

The error is gone!
Sure, I will use the bug tracker the next time...
Sorry for the noise in emacs-devel!
Thanks,
  Eduardo



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

end of thread, other threads:[~2022-12-18 22:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-18 13:44 `M-q' uses tree-sitter now? Eduardo Ochs
2022-12-18 14:53 ` Theodor Thornhill
2022-12-18 17:16   ` Eli Zaretskii
2022-12-18 18:08     ` Theodor Thornhill
2022-12-18 18:37       ` Eli Zaretskii
2022-12-18 17:15 ` Eli Zaretskii
2022-12-18 22:37   ` Eduardo Ochs

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