GNU bug report logs -
#73557
c-ts-mode 'emacs-c broken with treesit-load-name-override-list
Previous Next
Reported by: Ship Mints <shipmints <at> gmail.com>
Date: Sun, 29 Sep 2024 19:10:02 UTC
Severity: normal
Done: Eli Zaretskii <eliz <at> gnu.org>
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 73557 in the body.
You can then email your comments to 73557 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73557
; Package
emacs
.
(Sun, 29 Sep 2024 19:10:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Ship Mints <shipmints <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 29 Sep 2024 19:10:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
The c-ts-mode "fake" emacs-c grammar does not work in the presence of a 'c
grammar provided in treesit-load-name-override-list.
For example, I set this override to point to my treesitter c grammar which
uses the file name "c.dylib" on Mac, not "tree_sitter_c.dylib":
(add-to-list 'treesit-load-name-override-list '(c "c" "tree_sitter_c"))
c-ts-mode says:
(define-derived-mode c-ts-mode c-ts-base-mode "C"
...
(setf (alist-get 'emacs-c treesit-load-name-override-list)
'("libtree-sitter-c" "tree_sitter_c"))
I think this code should first look for the 'c grammar in
'treesit-load-name-override-list before setting a hard-coded file name that
may not work for everyone.
I can get around this, temporarily, by setting a symlink from c.dylib to
libtree-sitter-c.dylib. It took a while to figure out what was going on,
though. This is surely going to confuse other people.
Thank you,
Stephane
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73557
; Package
emacs
.
(Sun, 29 Sep 2024 19:32:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 73557 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
This is on Emacs 29.4. Taking a quick look at master, it seems this hack is
gone.
On Sun, Sep 29, 2024 at 3:09 PM Ship Mints <shipmints <at> gmail.com> wrote:
> The c-ts-mode "fake" emacs-c grammar does not work in the presence of a 'c
> grammar provided in treesit-load-name-override-list.
>
> For example, I set this override to point to my treesitter c grammar which
> uses the file name "c.dylib" on Mac, not "tree_sitter_c.dylib":
>
> (add-to-list 'treesit-load-name-override-list '(c "c" "tree_sitter_c"))
>
> c-ts-mode says:
> (define-derived-mode c-ts-mode c-ts-base-mode "C"
> ...
> (setf (alist-get 'emacs-c treesit-load-name-override-list)
> '("libtree-sitter-c" "tree_sitter_c"))
>
> I think this code should first look for the 'c grammar in
> 'treesit-load-name-override-list before setting a hard-coded file name that
> may not work for everyone.
>
> I can get around this, temporarily, by setting a symlink from c.dylib to
> libtree-sitter-c.dylib. It took a while to figure out what was going on,
> though. This is surely going to confuse other people.
>
> Thank you,
>
> Stephane
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73557
; Package
emacs
.
(Mon, 30 Sep 2024 11:19:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 73557 <at> debbugs.gnu.org (full text, mbox):
> From: Ship Mints <shipmints <at> gmail.com>
> Date: Sun, 29 Sep 2024 15:29:25 -0400
>
> This is on Emacs 29.4. Taking a quick look at master, it seems this hack is gone.
So this bug can be closed now?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73557
; Package
emacs
.
(Mon, 30 Sep 2024 12:54:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 73557 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Please close. If this comes up for other Emacs 29 users, a workaround is as
I did: use a symlink.
On Mon, Sep 30, 2024 at 7:16 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Ship Mints <shipmints <at> gmail.com>
> > Date: Sun, 29 Sep 2024 15:29:25 -0400
> >
> > This is on Emacs 29.4. Taking a quick look at master, it seems this hack
> is gone.
>
> So this bug can be closed now?
>
[Message part 2 (text/html, inline)]
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Mon, 30 Sep 2024 14:11:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Ship Mints <shipmints <at> gmail.com>
:
bug acknowledged by developer.
(Mon, 30 Sep 2024 14:11:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 73557-done <at> debbugs.gnu.org (full text, mbox):
> From: Ship Mints <shipmints <at> gmail.com>
> Date: Mon, 30 Sep 2024 08:51:41 -0400
> Cc: 73557 <at> debbugs.gnu.org
>
> Please close. If this comes up for other Emacs 29 users, a workaround is as I did: use a symlink.
Thanks, closing.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 29 Oct 2024 11:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 231 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.