GNU bug report logs - #73404
30.0.50; [forward/kill/etc]-sexp commands do not behave as expected in tree-sitter modes

Previous Next

Package: emacs;

Reported by: Mickey Petersen <mickey <at> masteringemacs.org>

Date: Sat, 21 Sep 2024 05:13:01 UTC

Severity: normal

Merged with 74366

Found in version 30.0.50

Fixed in version 31.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #181 received at 73404 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Theodor Thornhill <theo <at> thornhill.no>
Cc: casouri <at> gmail.com, mickey <at> masteringemacs.org, 73404 <at> debbugs.gnu.org,
 monnier <at> iro.umontreal.ca, juri <at> linkov.net
Subject: Re: bug#73404: 30.0.50; [forward/kill/etc]-sexp commands do not
 behave as expected in tree-sitter modes
Date: Sun, 05 Jan 2025 14:18:17 +0200
> X-Spam-Status: No, score=-1 tagged_above=-10 required=5 tests=[ALL_TRUSTED=-1]
>  autolearn=ham autolearn_force=no
> From: Theodor Thornhill <theo <at> thornhill.no>
> Cc: casouri <at> gmail.com, mickey <at> masteringemacs.org, 73404 <at> debbugs.gnu.org,
>  monnier <at> iro.umontreal.ca
> Date: Sun, 05 Jan 2025 12:46:03 +0100
> 
> Juri Linkov <juri <at> linkov.net> writes:
> 
> > The command is 'forward-list'.  With 'list' it will do in ts-modes
> > the same that 'forward-list' already does in non-ts modes.
> 
> One issue I've had when exploring these things earlier is that I don't
> know the "spec" for how navigation in programming languages should work
> in Emacs. I mean, there are lots of examples in the source code, but no
> true specification. Should we possibly try to define some sane defaults
> here, so that it will be simpler to deal with idiosyncrasies of the tree
> sitter parsers? Lisp isn't in my experience the best language to define
> this, as it is just too simple. Also, many of the functions are related
> to word processing, like sentence, word, paragraph etc, which aren't
> really useful in programming, imo. What is a sentence in java, lisp, or
> python, for example? Also, maybe sexp is too lisp/ast-like of a term, so
> much so that it is hard to reason about what a sexp is or isn't.

Is this goal achievable in practice,l given the sometimes radical
differences between languages?  Maybe we only can have examples and
some dwim-ish behavior in most cases?




This bug report was last modified 131 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.