[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to add pseudo vector types
From: |
Eli Zaretskii |
Subject: |
Re: How to add pseudo vector types |
Date: |
Fri, 30 Jul 2021 09:00:39 +0300 |
> From: Stephen Leake <stephen_leake@stephe-leake.org>
> Cc: Yuan Fu <casouri@gmail.com>, emacs-devel@gnu.org,
> cpitclaudel@gmail.com, monnier@iro.umontreal.ca
> Date: Thu, 29 Jul 2021 15:58:39 -0700
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> From: Yuan Fu <casouri@gmail.com>
> >> Date: Wed, 28 Jul 2021 12:36:33 -0400
> >> Cc: Eli Zaretskii <eliz@gnu.org>,
> >> emacs-devel <emacs-devel@gnu.org>,
> >> Clément Pit-Claudel <cpitclaudel@gmail.com>,
> >> monnier@iro.umontreal.ca
> >>
> >> > So don't send a change that deletes the hidden text; just send changes
> >> > in the visible part of the text (that's the only place the user can make
> >> > changes). tree-sitter will only run the scanner on the change regions,
> >> > so it will only request text from the visible part of the buffer;
> >> > all the requests will succeed.
> >>
> >> Then we are not hiding the hidden text from tree-sitter. The
> >> implementation you described, IIUC, is essentially do nothing
> >> special when the buffer is narrowed.
> >
> > If the TS parser is called while the narrowing is in effect, it will
> > be unable to access text beyond BEGV..ZV. So in that case the
> > narrowing _will_ affect TS.
>
> Please read again; TS is affected in principle, but in practice, in the
> absence of programming errors, it will never try to access text outside
> the narrowing, so it won't notice.
Sorry, I don't understand what you wanted me to re-read. As the
subsequent discussions revealed, Yuan had in mind a scenario where the
text outside of the restriction was changed.
- Re: How to add pseudo vector types, (continued)
- Re: How to add pseudo vector types, Stephen Leake, 2021/07/27
- Re: How to add pseudo vector types, Yuan Fu, 2021/07/27
- Re: How to add pseudo vector types, Stephen Leake, 2021/07/27
- Re: How to add pseudo vector types, Yuan Fu, 2021/07/28
- Re: How to add pseudo vector types, Eli Zaretskii, 2021/07/28
- Re: How to add pseudo vector types, Stephen Leake, 2021/07/29
- Re: How to add pseudo vector types,
Eli Zaretskii <=
- Re: How to add pseudo vector types, Eli Zaretskii, 2021/07/28
- Re: How to add pseudo vector types, Yuan Fu, 2021/07/28
- Re: How to add pseudo vector types, Eli Zaretskii, 2021/07/28
- Re: How to add pseudo vector types, Yuan Fu, 2021/07/28
- Re: How to add pseudo vector types, Eli Zaretskii, 2021/07/28
- Re: How to add pseudo vector types, Yuan Fu, 2021/07/29
- Re: How to add pseudo vector types, Eli Zaretskii, 2021/07/29
- Re: How to add pseudo vector types, Yuan Fu, 2021/07/29
- Re: How to add pseudo vector types, Eli Zaretskii, 2021/07/29
- Re: How to add pseudo vector types, Yuan Fu, 2021/07/29