all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Juri Linkov <juri@linkov.net>,
	Mickey Petersen <mickey@masteringemacs.org>
Cc: 60894@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#60894: 30.0.50; [PATCH] Add treesit-forward-sexp
Date: Wed, 18 Jan 2023 19:27:34 +0100	[thread overview]
Message-ID: <CD749C32-43B9-44DB-B27D-1585FB65608C@thornhill.no> (raw)
In-Reply-To: <86bkmw6m92.fsf@mail.linkov.net>



On 18 January 2023 18:09:29 CET, Juri Linkov <juri@linkov.net> wrote:
>> 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?

Yes! This is what I find intuitive, and have tried to explain in my docstrings of the two.

But I'm new in town and want all to at least discuss:)

I can extract a forward-sexp-default-function to amend some of the damage?

Theo





  reply	other threads:[~2023-01-18 18:27 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-17 20:44 bug#60894: 30.0.50; [PATCH] Add treesit-forward-sexp Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-17 20:53 ` Dmitry Gutov
2023-01-17 21:07   ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-18  1:50     ` Dmitry Gutov
2023-01-18  5:35       ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-18 12:21         ` Eli Zaretskii
2023-01-18 13:39         ` Dmitry Gutov
2023-01-18 18:28           ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-18 19:01           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-18 21:59             ` Dmitry Gutov
2023-01-19  2:43               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-19  3:30                 ` Dmitry Gutov
2023-01-19  3:58                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-19 18:44                     ` Dmitry Gutov
2023-01-19 19:03                       ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-18 17:16         ` Juri Linkov
2023-01-18 18:27           ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-17 21:13 ` Mickey Petersen
2023-01-18 13:31   ` Dmitry Gutov
2023-01-18 17:09   ` Juri Linkov
2023-01-18 18:27     ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-01-18 18:55       ` Juri Linkov
2023-01-18 22:06       ` Dmitry Gutov
2023-01-19  6:24         ` Eli Zaretskii
2023-01-19  7:58         ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CD749C32-43B9-44DB-B27D-1585FB65608C@thornhill.no \
    --to=bug-gnu-emacs@gnu.org \
    --cc=60894@debbugs.gnu.org \
    --cc=juri@linkov.net \
    --cc=mickey@masteringemacs.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=theo@thornhill.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.