Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration

From: Yuan Fu <[email-masked]>
Date: Mon, 26 Aug 2024 18:58:13 -0700

> On Aug 26, 2024, at 3:25 PM, Stefan Kangas <[email-masked]> wrote:
> 
> Alan Mackenzie <[email-masked]> writes:
> 
>> How about outputting a message looking something like this:
>> 
>>    Loading /home/acm/.emacs.d/tree-sitter/libtree-sitter.so ....Done
>> 
>> ..  This wouldn't get in the way, yet might well prevent some of the
>> problems I've been having over the last few days.
> 
> Makes sense to me, FWIW.  Perhaps we should have a knob to
> enable/disable such messages though.
> 
> I'm also not sure what should be the default.  Perhaps we should
> experiment with it and take a final decision when we have some
> experience with using it.

Yeah, that’ll be a very useful feature. To determining which grammar my Emacs instance loaded, I had to delete the object file and see if Emacs complains it can’t find any grammar. I think it’s fine to print this to message buffer by default, it’ll only happen once and we already do such things for loading a elisp file. 

I searched a bit and it seems ldaddr can find the location of a loaded shared library. Doesn’t seem hard to implement.

I also want a lisp function that can return the location of a loaded grammar file, would that be an overkill if we have the aforementioned printing?

Yuan