[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs-tree-sitter and Emacs
From: |
Stephen Leake |
Subject: |
Re: emacs-tree-sitter and Emacs |
Date: |
Fri, 03 Apr 2020 09:27:47 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (windows-nt) |
Eli Zaretskii <address@hidden> writes:
>> From: 조성빈 <address@hidden>
>> Date: Fri, 3 Apr 2020 04:39:08 +0900
>> Cc: Michael Welsh Duggan <address@hidden>, address@hidden,
>> address@hidden, address@hidden
>>
>> > Yes, with one correction: ideally, it should be unnecessary to start
>> > from point-min (which could be a long way away). Most languages
>> > should do well enough with starting from the beginning of the
>> > outermost function or class that affects the displayed text.
>>
>> AFAIU, determining that starting point is a non-trivial task, and if
>> Emacs wants to present the user an exact representation, the text
>> from point-min is still needed: just a hypothetical case would be
>> having a file with all code commented out.
>
> The decision whether there's a need to go to the beginning should be
> made by the parser, not by the infrastructure that invokes it. If the
> parser needs access to earlier parts of the buffer, it should do that;
> but the fontification infrastructure should not force it to do that.
Yes. wisi provides wisi-parse-expand-region to do just that; it
dispatches on the parser.
--
-- Stephe
- Re: emacs-tree-sitter and Emacs, (continued)
- Re: emacs-tree-sitter and Emacs, Eli Zaretskii, 2020/04/02
- Re: emacs-tree-sitter and Emacs, Eli Zaretskii, 2020/04/02
- Re: emacs-tree-sitter and Emacs, Michael Welsh Duggan, 2020/04/02
- Re: emacs-tree-sitter and Emacs, Eli Zaretskii, 2020/04/02
- Re: emacs-tree-sitter and Emacs, 조성빈, 2020/04/02
- Re: emacs-tree-sitter and Emacs, Eli Zaretskii, 2020/04/03
- Re: emacs-tree-sitter and Emacs,
Stephen Leake <=
- Re: emacs-tree-sitter and Emacs, Stefan Monnier, 2020/04/02
- Re: emacs-tree-sitter and Emacs, Stephen Leake, 2020/04/02
- Re: emacs-tree-sitter and Emacs, Eli Zaretskii, 2020/04/03
- Re: emacs-tree-sitter and Emacs, Stephen Leake, 2020/04/03
- Re: emacs-tree-sitter and Emacs, Eli Zaretskii, 2020/04/03
- Re: emacs-tree-sitter and Emacs, martin rudalics, 2020/04/02
- Re: emacs-tree-sitter and Emacs, Stephen Leake, 2020/04/02
- Re: emacs-tree-sitter and Emacs, Jorge Javier Araya Navarro, 2020/04/03
- Re: emacs-tree-sitter and Emacs, Eli Zaretskii, 2020/04/03
- Re: emacs-tree-sitter and Emacs, Stephen Leake, 2020/04/03