all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Madhu <enometh@meer.net>
To: eliz@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: Questions about tree-sitter
Date: Mon, 27 Nov 2023 12:46:40 +0530 (IST)	[thread overview]
Message-ID: <20231127.124640.1023945671413633372.enometh@meer.net> (raw)
In-Reply-To: <83zg26b1nz.fsf@gnu.org>

*  Eli Zaretskii  <83zg26b1nz.fsf @gnu.org>
Wrote on Fri, 01 Sep 2023 13:58:24 +0300
>> Date: Fri, 01 Sep 2023 14:45:31 +0530 (IST)
>> Cc: emacs-devel@gnu.org
>> From: Madhu <enometh @meer.net>
>> *  Eli Zaretskii <834jkecrl1.fsf @gnu.org>
>> Wrote on Fri, 01 Sep 2023 09:53:14 +0300
>> >> From: Madhu <enometh @meer.net>
>> >> Date: Fri, 01 Sep 2023 08:09:27 +0530
>> >> * Yuan Fu <C3EFD02D-F02F-4BE8-A6F4-A2506A9EFC90 @gmail.com> :
>> >> Wrote on Wed, 30 Aug 2023 00:03:03 -0700:
>> >> >> On Aug 29, 2023, at 2:26 PM, Augustin Chéneau (BTuin) <btuin @mailo.com> wrote:
>> >> >> 1. Is there a way to reload a grammar?  Emacs is pretty nice
>> >> >> as a playground for testing grammars, but once a grammar is
>> >> >> loaded, it won't be loaded again until Emacs restarts (as far
>> >> >> as I know).  Is it possible to reload a grammar after
>> >> >> modifying it?
>> >> >
>> >> > No, and it’s probably not easy to implement either, since unloading
>> >> > the grammar would require Emacs to purge/invalid all the
>> >> > node/query/parsers using that grammar.

I ran into this, when a "wrong" tressitter dll got loaded, and had an
undefined symbol.  In this situation there is no invalid state to
purge, and all I needed was a way to call dlclose from Elisp. The
shared library loading and unloading mechanism could have been exposed
to the user, in the spirit of the lisp machine.

[There may be an argument of not letting the user shoot himself in the
foot but in context it would not apply, but the security argument only
covers a locking down on freedoms of the user -- retaining control
with developers that consolidates power in a particular direction]

> It is not a change, no.  See above: we already use quite a few of
> libraries for specific jobs related to important Emacs
> functionalities.  For example, good support for sophisticated text
> display and shaping features is unimaginable without HarfBuzz, and
> some scripts cannot even be displayed in a reasonably legible way
> without it.

[But there is a fundamental sense in which the use of treesitter
modules ( "plugins" which are designed to be loaded and unloaded) that
different from the base library examples you give, which I hope you
can appreciate.



  reply	other threads:[~2023-11-27  7:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-29 21:26 Questions about tree-sitter Augustin Chéneau (BTuin)
2023-08-30  7:03 ` Yuan Fu
2023-08-30 11:28   ` Augustin Chéneau (BTuin)
2023-09-06  4:07     ` Yuan Fu
2023-09-08 11:53       ` Augustin Chéneau (BTuin)
2023-09-08 16:43         ` Yuan Fu
2023-09-09 16:39           ` Augustin Chéneau (BTuin)
2023-09-12  0:22             ` Yuan Fu
2023-09-13 12:43               ` Augustin Chéneau (BTuin)
2023-09-14  4:11                 ` Yuan Fu
2023-09-18 17:04                   ` Augustin Chéneau (BTuin)
2023-09-19  4:00                     ` Yuan Fu
2023-09-01  2:39   ` Madhu
2023-09-01  6:53     ` Eli Zaretskii
2023-09-01  9:15       ` Madhu
2023-09-01 10:45         ` Dmitry Gutov
2023-09-01 10:58         ` Eli Zaretskii
2023-11-27  7:16           ` Madhu [this message]
2023-09-06 16:11   ` Lynn Winebarger
2023-09-07 23:42     ` Yuan Fu
2023-09-08  0:11       ` Lynn Winebarger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231127.124640.1023945671413633372.enometh@meer.net \
    --to=enometh@meer.net \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.