all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: Re: Tree-sitter introduction documentation
@ 2022-12-18  6:32 Pedro Andres Aranda Gutierrez
  2022-12-18  8:07 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2022-12-18  6:32 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1480 bytes --]

Ken writes:

> I wonder how well known this is among distro Emacs maintainers.  I did a
quick
> internet search and didn't find any indication that any distros have done
it
> yet.  Can anyone point me to an example?
>
> Ken

+1

I'm compiling emacs quite often in a container inside a VM, in order to
keep the number of libraries in my 'real' system under control. Using
containers, I'm able to generate .deb packages for different distros, which
is cool and I do mainly to test concepts I use in other contexts. So in a
sense, I'm packaging Emacs for myself.

Adding tree-sitter was straightforward for some bleeding-edge Debian based
distros, but not as easy for mainstream (e.g. Ubuntu focal, which is the
previous LTS). But that was only adding the library and compiling emacs
with the library.

I'm still struggling with the plug-ins... Questions I have are
1.- where will they sit at the end of the day?
2.- should I include *all* plug-ins or just the plug-ins I use (mainly
Python to get used to it)

The whole thing doesn't get better, because I'm also "playing" with Emacs
on macOS and there I'm still struggling with native compilation...

Anyhow, this is what makes things interesting and keeps my brain active.

/PA

-- 
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

[-- Attachment #2: Type: text/html, Size: 2049 bytes --]

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

* Re: Tree-sitter introduction documentation
  2022-12-18  6:32 Re: Tree-sitter introduction documentation Pedro Andres Aranda Gutierrez
@ 2022-12-18  8:07 ` Eli Zaretskii
  2022-12-18 10:39   ` Pedro Andres Aranda Gutierrez
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2022-12-18  8:07 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: emacs-devel

> From: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
> Date: Sun, 18 Dec 2022 07:32:50 +0100
> 
> 1.- where will they sit at the end of the day? 

It is IMO best to put them in the same place where you have the rest
of the shared libraries loaded by Emacs.  There's also the special
path treesit-extra-load-path, but my recommendation is to use that
only if you cannot place the grammar libraries together with the rest
of your shared libraries.

> 2.- should I include *all* plug-ins or just the plug-ins I use (mainly Python to get used to it)

Each grammar library is only loaded when the corresponding Emacs mode
is activated.  So if you never turn on some treesit-based mode, you
don't need to have the corresponding grammar library available.



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

* Re: Tree-sitter introduction documentation
  2022-12-18  8:07 ` Eli Zaretskii
@ 2022-12-18 10:39   ` Pedro Andres Aranda Gutierrez
  2022-12-18 11:44     ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2022-12-18 10:39 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1456 bytes --]

Hi Eli,

thanks a lot for confirming :-)

I'm keeping them in treesit-extra-load-path for my experiments and will
follow whatever comes out of this experiment in the sense of
1) hopefully seeing the parser compilation integrated in the general
compilation process
2) same for packaging.

BTW, your answer may be good for a FAQ ;-)

Thanks again, /PA

On Sun, 18 Dec 2022 at 09:07, Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
> > Date: Sun, 18 Dec 2022 07:32:50 +0100
> >
> > 1.- where will they sit at the end of the day?
>
> It is IMO best to put them in the same place where you have the rest
> of the shared libraries loaded by Emacs.  There's also the special
> path treesit-extra-load-path, but my recommendation is to use that
> only if you cannot place the grammar libraries together with the rest
> of your shared libraries.
>
> > 2.- should I include *all* plug-ins or just the plug-ins I use (mainly
> Python to get used to it)
>
> Each grammar library is only loaded when the corresponding Emacs mode
> is activated.  So if you never turn on some treesit-based mode, you
> don't need to have the corresponding grammar library available.
>


-- 
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

[-- Attachment #2: Type: text/html, Size: 2209 bytes --]

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

* Re: Tree-sitter introduction documentation
  2022-12-18 10:39   ` Pedro Andres Aranda Gutierrez
@ 2022-12-18 11:44     ` Eli Zaretskii
  0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2022-12-18 11:44 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: emacs-devel

> From: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
> Date: Sun, 18 Dec 2022 11:39:10 +0100
> Cc: emacs-devel@gnu.org
> 
> I'm keeping them in treesit-extra-load-path for my experiments and will follow whatever comes out of this
> experiment in the sense of 
> 1) hopefully seeing the parser compilation integrated in the general compilation process

I don't think we should compile these libraries as part of building
Emacs, no.

> BTW, your answer may be good for a FAQ ;-)

IME, no one reads the Emacs FAQ.

But I have added this to NEWS.



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

* Re: Re: Tree-sitter introduction documentation
@ 2022-12-31  6:59 Pedro Andres Aranda Gutierrez
  0 siblings, 0 replies; 5+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2022-12-31  6:59 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1485 bytes --]

Philip Kaludercic <philipk@posteo.net> writes:

> My main worry with these changes, along with the popularity of LSP is
> that while they are technological improvements, they all happen at the
> deterioration of Emacs' introspectability, increasing the effort it
> takes for the user to make changes.  IIUC you can't reload a .el file or
> just a singular expression if you want to change how completion via
> Eglot or how imenu works via Tree Sitter.  A simple hack becomes a
> weekend project.  This is not an unconditional good.

That's a very good point. My .02 cents of experience with eglot/treesit:

while I'm happy it works now on my multi-OS setup and I can seamlessly
switch computers, it took me a lot of time to understand and duck-duck-go
and set up. On top of that, there are some things I still don't completely
understand and can't explore on the *scratch* buffer and/or slime.

And yes, I've also tried tree-sitter for Python on my Linux and it makes me
wonder what the real gain is, because I'm using the plain python-mode on
the other systems and I can't feel a compelling argument to switch.

At least that was the case with eglot ;-) and this is why I've stayed with
it.

Happy new year (the 365 days of it)
/PA

-- 
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

[-- Attachment #2: Type: text/html, Size: 2055 bytes --]

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

end of thread, other threads:[~2022-12-31  6:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-18  6:32 Re: Tree-sitter introduction documentation Pedro Andres Aranda Gutierrez
2022-12-18  8:07 ` Eli Zaretskii
2022-12-18 10:39   ` Pedro Andres Aranda Gutierrez
2022-12-18 11:44     ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2022-12-31  6:59 Pedro Andres Aranda Gutierrez

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.