* bug#73557: c-ts-mode 'emacs-c broken with treesit-load-name-override-list
@ 2024-09-29 19:08 Ship Mints
2024-09-29 19:29 ` Ship Mints
0 siblings, 1 reply; 5+ messages in thread
From: Ship Mints @ 2024-09-29 19:08 UTC (permalink / raw)
To: 73557
[-- Attachment #1: Type: text/plain, Size: 909 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 2334 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#73557: c-ts-mode 'emacs-c broken with treesit-load-name-override-list
2024-09-29 19:08 bug#73557: c-ts-mode 'emacs-c broken with treesit-load-name-override-list Ship Mints
@ 2024-09-29 19:29 ` Ship Mints
2024-09-30 11:15 ` Eli Zaretskii
0 siblings, 1 reply; 5+ messages in thread
From: Ship Mints @ 2024-09-29 19:29 UTC (permalink / raw)
To: 73557
[-- Attachment #1: Type: text/plain, Size: 1143 bytes --]
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@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
>
[-- Attachment #2: Type: text/html, Size: 2681 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#73557: c-ts-mode 'emacs-c broken with treesit-load-name-override-list
2024-09-29 19:29 ` Ship Mints
@ 2024-09-30 11:15 ` Eli Zaretskii
2024-09-30 12:51 ` Ship Mints
0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2024-09-30 11:15 UTC (permalink / raw)
To: Ship Mints; +Cc: 73557
> From: Ship Mints <shipmints@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?
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#73557: c-ts-mode 'emacs-c broken with treesit-load-name-override-list
2024-09-30 11:15 ` Eli Zaretskii
@ 2024-09-30 12:51 ` Ship Mints
2024-09-30 14:10 ` Eli Zaretskii
0 siblings, 1 reply; 5+ messages in thread
From: Ship Mints @ 2024-09-30 12:51 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 73557
[-- Attachment #1: Type: text/plain, Size: 397 bytes --]
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@gnu.org> wrote:
> > From: Ship Mints <shipmints@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?
>
[-- Attachment #2: Type: text/html, Size: 811 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#73557: c-ts-mode 'emacs-c broken with treesit-load-name-override-list
2024-09-30 12:51 ` Ship Mints
@ 2024-09-30 14:10 ` Eli Zaretskii
0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2024-09-30 14:10 UTC (permalink / raw)
To: Ship Mints; +Cc: 73557-done
> From: Ship Mints <shipmints@gmail.com>
> Date: Mon, 30 Sep 2024 08:51:41 -0400
> Cc: 73557@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.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-09-30 14:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-29 19:08 bug#73557: c-ts-mode 'emacs-c broken with treesit-load-name-override-list Ship Mints
2024-09-29 19:29 ` Ship Mints
2024-09-30 11:15 ` Eli Zaretskii
2024-09-30 12:51 ` Ship Mints
2024-09-30 14:10 ` Eli Zaretskii
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).