all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Where to get language definition for bash tree-sitter?
@ 2022-12-27 10:21 Jean Louis
  2022-12-27 11:43 ` Emanuel Berg
  2022-12-27 12:43 ` Eli Zaretskii
  0 siblings, 2 replies; 11+ messages in thread
From: Jean Louis @ 2022-12-27 10:21 UTC (permalink / raw)
  To: Help GNU Emacs

When I do:

M-x bash-ts-mode

I get this warning:

⛔ Warning (treesit): Cannot activate tree-sitter, because language definition for bash is unavailable (not-found): (libtree-sitter-bash libtree-sitter-bash.so) No such file or directory

Where to get language definition for bash tree-sitter?


--
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



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

* Re: Where to get language definition for bash tree-sitter?
  2022-12-27 10:21 Where to get language definition for bash tree-sitter? Jean Louis
@ 2022-12-27 11:43 ` Emanuel Berg
  2022-12-27 12:43 ` Eli Zaretskii
  1 sibling, 0 replies; 11+ messages in thread
From: Emanuel Berg @ 2022-12-27 11:43 UTC (permalink / raw)
  To: help-gnu-emacs

Jean Louis wrote:

> When I do:
>
> M-x bash-ts-mode
>
> I get this warning:
>
> ⛔ Warning (treesit): Cannot activate tree-sitter, because language
> definition for bash is unavailable (not-found): (libtree-sitter-bash
> libtree-sitter-bash.so) No such file or directory
>
> Where to get language definition for bash tree-sitter?

Here, maybe?

https://github.com/tree-sitter/tree-sitter-bash

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Where to get language definition for bash tree-sitter?
  2022-12-27 10:21 Where to get language definition for bash tree-sitter? Jean Louis
  2022-12-27 11:43 ` Emanuel Berg
@ 2022-12-27 12:43 ` Eli Zaretskii
  2022-12-27 13:35   ` Jean Louis
  1 sibling, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2022-12-27 12:43 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Tue, 27 Dec 2022 13:21:30 +0300
> From: Jean Louis <bugs@gnu.support>
> 
> Where to get language definition for bash tree-sitter?

Here:

  https://github.com/tree-sitter/tree-sitter-bash.git

(You can always find it by just typing "tree-sitter grammar for Bash"
into a Web search.)



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

* Re: Where to get language definition for bash tree-sitter?
  2022-12-27 12:43 ` Eli Zaretskii
@ 2022-12-27 13:35   ` Jean Louis
  2022-12-27 14:02     ` Emanuel Berg
  2022-12-27 14:14     ` Eli Zaretskii
  0 siblings, 2 replies; 11+ messages in thread
From: Jean Louis @ 2022-12-27 13:35 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

* Eli Zaretskii <eliz@gnu.org> [2022-12-27 15:45]:
> > Date: Tue, 27 Dec 2022 13:21:30 +0300
> > From: Jean Louis <bugs@gnu.support>
> > 
> > Where to get language definition for bash tree-sitter?
> 
> Here:
> 
>   https://github.com/tree-sitter/tree-sitter-bash.git
> 
> (You can always find it by just typing "tree-sitter grammar for Bash"
> into a Web search.)

Alright and where do I install it?

I have built it, though I have not found instruction where and how to install it.

--
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/




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

* Re: Where to get language definition for bash tree-sitter?
  2022-12-27 13:35   ` Jean Louis
@ 2022-12-27 14:02     ` Emanuel Berg
  2022-12-27 14:14     ` Eli Zaretskii
  1 sibling, 0 replies; 11+ messages in thread
From: Emanuel Berg @ 2022-12-27 14:02 UTC (permalink / raw)
  To: help-gnu-emacs

Jean Louis wrote:

>> Here:
>> 
>>   https://github.com/tree-sitter/tree-sitter-bash.git
>> 
>> (You can always find it by just typing "tree-sitter grammar for
>> Bash" into a Web search.)
>
> Alright and where do I install it?
>
> I have built it, though I have not found instruction where and how
> to install it.

Should be a Makefile and README?

You need the dynamic library (shared object) file, then look for
where it is looked for, normally /lib/ or /usr/lib/.

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Where to get language definition for bash tree-sitter?
  2022-12-27 13:35   ` Jean Louis
  2022-12-27 14:02     ` Emanuel Berg
@ 2022-12-27 14:14     ` Eli Zaretskii
  2022-12-27 17:08       ` Jean Louis
  1 sibling, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2022-12-27 14:14 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Tue, 27 Dec 2022 16:35:31 +0300
> From: Jean Louis <bugs@gnu.support>
> Cc: help-gnu-emacs@gnu.org
> 
> * Eli Zaretskii <eliz@gnu.org> [2022-12-27 15:45]:
> > > Date: Tue, 27 Dec 2022 13:21:30 +0300
> > > From: Jean Louis <bugs@gnu.support>
> > > 
> > > Where to get language definition for bash tree-sitter?
> > 
> > Here:
> > 
> >   https://github.com/tree-sitter/tree-sitter-bash.git
> > 
> > (You can always find it by just typing "tree-sitter grammar for Bash"
> > into a Web search.)
> 
> Alright and where do I install it?
> 
> I have built it, though I have not found instruction where and how to install it.

Please see NEWS in the emacs-29 branch of the Emacs Git repository, I
believe it answers this (and other related) questions.  Search for
"tree-sitter" there (there's more than one entry).



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

* Re: Where to get language definition for bash tree-sitter?
  2022-12-27 14:14     ` Eli Zaretskii
@ 2022-12-27 17:08       ` Jean Louis
  2022-12-27 18:10         ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Jean Louis @ 2022-12-27 17:08 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

* Eli Zaretskii <eliz@gnu.org> [2022-12-27 17:15]:
> > Date: Tue, 27 Dec 2022 16:35:31 +0300
> > From: Jean Louis <bugs@gnu.support>
> > Cc: help-gnu-emacs@gnu.org
> > 
> > * Eli Zaretskii <eliz@gnu.org> [2022-12-27 15:45]:
> > > > Date: Tue, 27 Dec 2022 13:21:30 +0300
> > > > From: Jean Louis <bugs@gnu.support>
> > > > 
> > > > Where to get language definition for bash tree-sitter?
> > > 
> > > Here:
> > > 
> > >   https://github.com/tree-sitter/tree-sitter-bash.git
> > > 
> > > (You can always find it by just typing "tree-sitter grammar for Bash"
> > > into a Web search.)
> > 
> > Alright and where do I install it?
> > 
> > I have built it, though I have not found instruction where and how to install it.
> 
> Please see NEWS in the emacs-29 branch of the Emacs Git repository, I
> believe it answers this (and other related) questions.  Search for
> "tree-sitter" there (there's more than one entry).

I use url = git://git.sv.gnu.org/emacs.git for git and pull it
regularly by thinking that is the one. Is it the right one?

I can't find the word "tree" in etc/NEWS


--
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



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

* Re: Where to get language definition for bash tree-sitter?
  2022-12-27 17:08       ` Jean Louis
@ 2022-12-27 18:10         ` Eli Zaretskii
  2022-12-28  9:05           ` Jean Louis
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2022-12-27 18:10 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Tue, 27 Dec 2022 20:08:17 +0300
> From: Jean Louis <bugs@gnu.support>
> Cc: help-gnu-emacs@gnu.org
> 
> > Please see NEWS in the emacs-29 branch of the Emacs Git repository, I
> > believe it answers this (and other related) questions.  Search for
> > "tree-sitter" there (there's more than one entry).
> 
> I use url = git://git.sv.gnu.org/emacs.git for git and pull it
> regularly by thinking that is the one. Is it the right one?

Maybe, maybe not; not enough information.  You haven't said which
branch of the Git repository you are tracking when you pull from Git.

> I can't find the word "tree" in etc/NEWS

Try NEWS.29, if your clone of the Git repository has such a file
(which would mean you are tracking the master branch).



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

* Re: Where to get language definition for bash tree-sitter?
  2022-12-27 18:10         ` Eli Zaretskii
@ 2022-12-28  9:05           ` Jean Louis
  2022-12-28 17:11             ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Jean Louis @ 2022-12-28  9:05 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

* Eli Zaretskii <eliz@gnu.org> [2022-12-27 21:12]:
> Try NEWS.29, if your clone of the Git repository has such a file
> (which would mean you are tracking the master branch).

I do not use branches, only master.

Thanks. I understand instruction is for people who know how to link
it, but I don't.

> To compile such a library, compile the files "scanner.c" and "parser.c"
> (sometimes named "scanner.cc" and "parser.cc") in the "src" subdirectory
> of the library's source tree using the C or C++ compiler, then link
> these two files into a shared library named "libtree-sitter-LANG.so",
> where LANG is the name of the language supported by the grammar as it
> is expected by the Emacs major mode (for example, "c" for 'c-ts-mode',
> "cpp" for 'c++-ts-mode', "python" for 'python-ts-mode', etc.).  Then place
> the shared library you've built in the same directory where you keep
> the other shared libraries used by Emacs, or in the "tree-sitter"
> subdirectory of your 'user-emacs-directory', or in a directory
> mentioned in the variable 'treesit-extra-load-path'.

I got these after compiling:

  -rw-r--r-- 1 476K Dec 28 11:32 parser.o
  -rw-r--r-- 1 6.7K Dec 28 11:32 scanner.o

How do I link them?

gcc -shared maybe, but I know gcc just like you know Org.

--
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/





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

* Re: Where to get language definition for bash tree-sitter?
  2022-12-28  9:05           ` Jean Louis
@ 2022-12-28 17:11             ` Eli Zaretskii
  2022-12-30  5:23               ` Jean Louis
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2022-12-28 17:11 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Wed, 28 Dec 2022 12:05:11 +0300
> From: Jean Louis <bugs@gnu.support>
> Cc: help-gnu-emacs@gnu.org
> 
> I got these after compiling:
> 
>   -rw-r--r-- 1 476K Dec 28 11:32 parser.o
>   -rw-r--r-- 1 6.7K Dec 28 11:32 scanner.o
> 
> How do I link them?
> 
> gcc -shared maybe, but I know gcc just like you know Org.

I don't know exactly how to do that on your system, and don't want to
get you in trouble with stuff you aren't familiar with.  Sorry.
Perhaps someone else will be able to help.

(In general, if you don't know how to build a shared library on your
system, my recommendation would be to wait for your distro to offer
these grammar libraries ready to install.  No disaster will happen if
you delay experiencing tree-sitter and the features it supports until
your distro provides that.)



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

* Re: Where to get language definition for bash tree-sitter?
  2022-12-28 17:11             ` Eli Zaretskii
@ 2022-12-30  5:23               ` Jean Louis
  0 siblings, 0 replies; 11+ messages in thread
From: Jean Louis @ 2022-12-30  5:23 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

* Eli Zaretskii <eliz@gnu.org> [2022-12-28 20:12]:
> > Date: Wed, 28 Dec 2022 12:05:11 +0300
> > From: Jean Louis <bugs@gnu.support>
> > Cc: help-gnu-emacs@gnu.org
> > 
> > I got these after compiling:
> > 
> >   -rw-r--r-- 1 476K Dec 28 11:32 parser.o
> >   -rw-r--r-- 1 6.7K Dec 28 11:32 scanner.o
> > 
> > How do I link them?
> > 
> > gcc -shared maybe, but I know gcc just like you know Org.
> 
> I don't know exactly how to do that on your system, and don't want to
> get you in trouble with stuff you aren't familiar with.  Sorry.
> Perhaps someone else will be able to help.
> 
> (In general, if you don't know how to build a shared library on your
> system, my recommendation would be to wait for your distro to offer
> these grammar libraries ready to install.  No disaster will happen if
> you delay experiencing tree-sitter and the features it supports until
> your distro provides that.)

Of course I will not wait, it would defeat purpose of the question.

I will find way.

--
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/




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

end of thread, other threads:[~2022-12-30  5:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-27 10:21 Where to get language definition for bash tree-sitter? Jean Louis
2022-12-27 11:43 ` Emanuel Berg
2022-12-27 12:43 ` Eli Zaretskii
2022-12-27 13:35   ` Jean Louis
2022-12-27 14:02     ` Emanuel Berg
2022-12-27 14:14     ` Eli Zaretskii
2022-12-27 17:08       ` Jean Louis
2022-12-27 18:10         ` Eli Zaretskii
2022-12-28  9:05           ` Jean Louis
2022-12-28 17:11             ` Eli Zaretskii
2022-12-30  5:23               ` Jean Louis

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.