GNU bug report logs - #71048
The manual should have an example for treesit-language-at-point-function

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dmitry <at> gutov.dev>

Date: Sat, 18 May 2024 23:01:02 UTC

Severity: normal

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 71048 in the body.
You can then email your comments to 71048 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#71048; Package emacs. (Sat, 18 May 2024 23:01:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dmitry Gutov <dmitry <at> gutov.dev>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 18 May 2024 23:01:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: bug-gnu-emacs <at> gnu.org
Subject: The manual should have an example for
 treesit-language-at-point-function
Date: Sun, 19 May 2024 02:00:23 +0300
https://www.gnu.org/software/emacs/manual/html_node/elisp/Multiple-Languages.html 
has code examples for multiple-language setup (with tree-sitter modes), 
and it more-or-less says that treesit-language-at-point-function should 
be set.

But there is a default behavior for when it's not set, and the code 
snippets in the second half of the page don't set it, so it seems prone 
to mistakes.

I think the examples should include a setting for 
treesit-language-at-point-function.

Inspired by https://github.com/dgutov/mmm-mode/issues/142




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71048; Package emacs. (Sun, 19 May 2024 05:57:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dmitry <at> gutov.dev>, Yuan Fu <casouri <at> gmail.com>
Cc: 71048 <at> debbugs.gnu.org
Subject: Re: bug#71048: The manual should have an example for
 treesit-language-at-point-function
Date: Sun, 19 May 2024 08:56:32 +0300
> Date: Sun, 19 May 2024 02:00:23 +0300
> From: Dmitry Gutov <dmitry <at> gutov.dev>
> 
> https://www.gnu.org/software/emacs/manual/html_node/elisp/Multiple-Languages.html 
> has code examples for multiple-language setup (with tree-sitter modes), 
> and it more-or-less says that treesit-language-at-point-function should 
> be set.
> 
> But there is a default behavior for when it's not set, and the code 
> snippets in the second half of the page don't set it, so it seems prone 
> to mistakes.
> 
> I think the examples should include a setting for 
> treesit-language-at-point-function.
> 
> Inspired by https://github.com/dgutov/mmm-mode/issues/142

Yuan, could you please add such examples?




Reply sent to Yuan Fu <casouri <at> gmail.com>:
You have taken responsibility. (Wed, 22 May 2024 06:25:03 GMT) Full text and rfc822 format available.

Notification sent to Dmitry Gutov <dmitry <at> gutov.dev>:
bug acknowledged by developer. (Wed, 22 May 2024 06:25:03 GMT) Full text and rfc822 format available.

Message #13 received at 71048-done <at> debbugs.gnu.org (full text, mbox):

From: Yuan Fu <casouri <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Dmitry Gutov <dmitry <at> gutov.dev>, 71048-done <at> debbugs.gnu.org
Subject: Re: bug#71048: The manual should have an example for
 treesit-language-at-point-function
Date: Tue, 21 May 2024 23:23:32 -0700

> On May 18, 2024, at 10:56 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> 
>> Date: Sun, 19 May 2024 02:00:23 +0300
>> From: Dmitry Gutov <dmitry <at> gutov.dev>
>> 
>> https://www.gnu.org/software/emacs/manual/html_node/elisp/Multiple-Languages.html 
>> has code examples for multiple-language setup (with tree-sitter modes), 
>> and it more-or-less says that treesit-language-at-point-function should 
>> be set.
>> 
>> But there is a default behavior for when it's not set, and the code 
>> snippets in the second half of the page don't set it, so it seems prone 
>> to mistakes.
>> 
>> I think the examples should include a setting for 
>> treesit-language-at-point-function.
>> 
>> Inspired by https://github.com/dgutov/mmm-mode/issues/142
> 
> Yuan, could you please add such examples?

Yes, I think that’s a good suggestion, and I just did that.

Yuan



bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 19 Jun 2024 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 93 days ago.

Previous Next


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