GNU bug report logs -
#76784
31.0.50; up-list works incorrectly on emacs-30 if forward-sexp-function is set to treesit-forward-sexp
Previous Next
Reported by: Roman Rudakov <rrudakov <at> fastmail.com>
Date: Thu, 6 Mar 2025 16:52:02 UTC
Severity: normal
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
Juri Linkov <juri <at> linkov.net> writes:
>> The bug is reproducible for clojure-ts-mode. If "sexp" thing is
>> defined for
>> tree-sitter mode, forward-sexp-function is set to
>> treesit-forward-sexp
>> (https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/treesit.el?h=emacs-30#n3147)
>>
>> This setting triggers condition in the up-list function
>> (https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/emacs-lisp/lisp.el?h=emacs-30#n258)
>>
>> If point is outside of a top-level sexp, up-list function calls
>> forward-list until point position reaches the bottom of the buffer.
>>
>> Expected behavior: point stays at the end of sexp and message "At
>> the top
>> level" is shown in the echo area.
>>
>> On master branch this issue can be fixed by setting
>> up-list-function to
>> treesit-up-list, but on emacs-30 up-list-function doesn't exist.
>
> Thanks for the bug report. This can be fixed for Emacs 31
> (i.e. current
> master) by such patch. Also please note that
> treesit-transpose-sexps
> is working again on Emacs 31.
>
Thank you for the patch Juri! I tried it locally and it works well for
Emacs 31. I'll suggest to apply it to clojure-ts-mode.
>> Would it be possible to fix the issue in the next bugfix release
>> (if it's
>> planned)?
>
> You could try to convince our maintainers to consider backporting
> the fix
> from master to the release branch.
>
--
Best regards, Roman
This bug report was last modified 166 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.