bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#60894: 30.0.50; [PATCH] Add treesit-forward-sexp


From: Eli Zaretskii
Subject: bug#60894: 30.0.50; [PATCH] Add treesit-forward-sexp
Date: Thu, 19 Jan 2023 08:24:01 +0200

> Cc: 60894@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Thu, 19 Jan 2023 00:06:22 +0200
> From: Dmitry Gutov <dgutov@yandex.ru>
> 
> In my intuition, sexps are expressions which can be nested (a lot).
> 
> Sentences are "flat" expressions. I would probably say that in 
> tree-sitter modes sentences should be equivalent to "statements".
> 
> So, sexps could be small, and they could be large. For them various list 
> navigation operations make sense (like the previously mentioned ones).
> 
> Sentences stand somewhere in the middle, and they're more like 
> sequential. A operation like backward-up-statement wouldn't make a lot 
> of sense, however.

Intuitively, the above SGTM wrt programming languages.

> Note quite sure what would correspond to statement in html-mode, but I 
> would put separate tag elements in the category of word, or symbols, or, 
> okay, statements, rather than sexps. A sexp is the tag opener, plus tag 
> contents, plus its closer.

If we could find HTML equivalents of the above notions, that would be
very good for consistent UX.  But if that turns out to be hard or
far-fetched or impossible, we could alternatively come up with
HTML-specific interpretation of these abstract notions.  As long as
the result makes sense to users who edit or view HTML files, it would
still be okay, I think, even if the relation to programming language
construct is more remote.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]