all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Simon Pugnet <simon@polaris64.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Tree sitter: allowing access to `ts_tree_get_changed_ranges()' from elisp
Date: Sat, 26 Nov 2022 16:53:23 +0100	[thread overview]
Message-ID: <87ilj1emkh.fsf@polaris64.net> (raw)
In-Reply-To: <83cz99spdc.fsf@gnu.org>

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

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Simon Pugnet <simon@polaris64.net>
>> Date: Sat, 26 Nov 2022 15:57:33 +0100
>> 
>> I've checked src/treesit.c and I can see that there is a 
>> `ts_tree_get_changed_ranges()' function, presumably from the 
>> underlying tree sitter library. However I don't think this is being 
>> exposed to elisp. Would it be possible to allow this information to 
>> be 
>> provided to elisp somehow?
>
> It's exposed to Lisp via the parser's after-change notifiers.  See
> treesit-parser-add-notifier.

Thank you; yes I can now see that `treesit-parser-add-notifier' should 
allow me to do what I need to do.

Kind regards,

-- 
Simon Pugnet
https://www.polaris64.net/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

      reply	other threads:[~2022-11-26 15:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-26 14:57 Tree sitter: allowing access to `ts_tree_get_changed_ranges()' from elisp Simon Pugnet
2022-11-26 15:32 ` Eli Zaretskii
2022-11-26 15:53   ` Simon Pugnet [this message]

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=87ilj1emkh.fsf@polaris64.net \
    --to=simon@polaris64.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.