[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reliable after-change-functions (via: Using incremental parsing in E
From: |
Eli Zaretskii |
Subject: |
Re: Reliable after-change-functions (via: Using incremental parsing in Emacs) |
Date: |
Wed, 01 Apr 2020 16:26:59 +0300 |
> From: Tuấn Anh Nguyễn <address@hidden>
> Date: Wed, 1 Apr 2020 13:17:42 +0700
> Cc: address@hidden
>
> Real usage with "xdisp.c":
>
> (define-advice tree-sitter--do-parse (:around (f &rest args) benchmark)
> (message "%s" (benchmark-run (apply f args))))
>
> (0.257998 1 0.13326100000000096)
And that is even without encoding the buffer text, IIUC what the
package does.
> So yes, direct access to buffer's text from dynamic modules would be nice.
Did you consider using the API where an application can provide a
function to return text at a given offset? Such a function could be
relatively easily implemented for Emacs.
Btw, what do you do with the tree returned by the tree-sitter parser?
store it in some buffer-local variable? If so, how much memory does
such a tree take, and when, if ever, is that memory released?
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), (continued)
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Dmitry Gutov, 2020/04/04
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/04/04
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Dmitry Gutov, 2020/04/04
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Stefan Monnier, 2020/04/04
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Yuan Fu, 2020/04/06
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Jorge Javier Araya Navarro, 2020/04/06
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Dmitry Gutov, 2020/04/04
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/04/04
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Dmitry Gutov, 2020/04/04
Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Tuấn Anh Nguyễn, 2020/04/01
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs),
Eli Zaretskii <=
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Tuấn-Anh Nguyễn, 2020/04/01
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/04/01
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Stephen Leake, 2020/04/01
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Stephen Leake, 2020/04/01
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Stefan Monnier, 2020/04/01
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Tuấn-Anh Nguyễn, 2020/04/02
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/04/02
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Stefan Monnier, 2020/04/02