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: Juri Linkov
Subject: bug#60894: 30.0.50; [PATCH] Add treesit-forward-sexp
Date: Wed, 18 Jan 2023 19:09:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

> Consider HTML (or anything in SGML club of languages). I would expect
> sexp movement to move over a matched pair of tags. It currently does
> not; the reason why is understandable when you know how `syntax-ppss'
> does (or does not, as it were) work. (You can equally make an argument
> that it should simply go to the end of an opening/closing node and not
> the pair, but that is personal preference.)
>
> `nxml-mode' handles it properly; Combobulate handles it properly, too.
> But Combobulate also falls back to the classic sexp behaviour if it
> cannot find a suitable node in the direction of travel.

While ‘forward-sexp’ moves over the next tag, there is also ‘C-c C-f’
(‘sgml-skip-tag-forward’) that moves over the whole element to the end tag.
I'm not sure if sexp movement in nxml-mode is an improvement since
there is no way to move over the tag only.

To support both cases maybe ‘forward-sexp’ should move over the tag,
and ‘forward-sentence’ over the whole element?





reply via email to

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