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


View this message in rfc822 format

From: Yuan Fu <casouri <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: Mickey Petersen <mickey <at> masteringemacs.org>, Eli Zaretskii <eliz <at> gnu.org>, Theodor Thornhill <theo <at> thornhill.no>, Stefan Monnier <monnier <at> iro.umontreal.ca>, 73404 <at> debbugs.gnu.org
Subject: bug#73404: 30.0.50; [forward/kill/etc]-sexp commands do not behave as expected in tree-sitter modes
Date: Mon, 6 Jan 2025 10:04:24 -0800
>> 
>> I think these should be oblivious to the syntax (i.e. line `forward-line`
>> and `forward-char`).
>> 
>> Your list missed the "defun" unit of navigation.
> 
> Because there is no `forward-defun` ;-)
> 
> But strange that "defun" still is defined by `treesit-defun-type-regexp`
> instead of a "defun" thing in `treesit-thing-settings`.

treesit-defun-type-regexp is shipped in Emacs 29, so we can’t just remove it. Defun navigation functions in treesit.el does support the defun thing, but I made treesit-defun-type-regexp an override of the defun thing. OTOH treesit-sexp/sentence-type-regexp wasn’t shipped in Emacs 29 so I removed them, preferring the thing definition.

Yuan



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.