GNU bug report logs - #62086
29.0.60; ruby-ts-mode regressions

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Thu, 9 Mar 2023 17:28:02 UTC

Severity: normal

Fixed in version 29.0.60

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: Juri Linkov <juri <at> linkov.net>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 62086 <at> debbugs.gnu.org
Subject: bug#62086: 29.0.60; ruby-ts-mode regressions
Date: Fri, 10 Mar 2023 09:35:46 +0200
>> 'C-M-f' ('forward-sexp') commands currently are unusable in master
>> because they skip too much.
>
> I'm happy to discuss this sometime later, in a different report, preferably
> after Emacs 29's pre-release drops. We'd probably just need to tweak the
> relevant regexp.
>
> But from what I see, most of the possible confusion stems from it jumping
> over implicit parens, just like over explicit ones. The addition of binary
> operators and assignments might also have something to do with it.

That's the problem: some implicit parens are unexpected.
But let's adjust this later in another report.

>> So I relied on word motion commands like
>> 'M-f' ('forward-word') to move in ruby-ts-mode.  But unfortunately
>> some recent change broke even word motion in emacs-29, so no motion commands
>> can be used in ruby-ts-mode, only motion by characters can be used with
>> 'C-f' ('forward-char').  Here is a recipe for recent regression in emacs-29:
>> 0. emacs -Q
>> 1. C-x C-f test/lisp/progmodes/ruby-mode-resources/ruby-parenless-call-arguments-indent.rb RET
>> 2. M-x ruby-ts-mode RET
>> 3. move point to after the first letter 'c'
>> 4. type 'M-f' ('forward-word')
>> It skips two words in symbols.
>
> I might have been too eager in propertizing symbol contents with the
> "symbol" syntax. Now fixed in emacs-29, commit ecdfd584a52.

Thanks, I confirm this is fixed.

>> I don't know if the second bug is related to this, but while
>> in the same file, also type 'C-M-l' ('reposition-window').
>> It raises the error:
>>    Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p
>> nil)
>>      treesit-end-of-defun()
>>      end-of-defun(-1)
>>      reposition-window(nil nil)
>>      reposition-window(nil 89)
>>      funcall-interactively(reposition-window nil 89)
>>      command-execute(reposition-window)
>> This regression is also recent.
>
> I've managed to reproduce this, but only once. Do you see this every time?

I see it only in some files in test/lisp/progmodes/ruby-mode-resources/
e.g. ruby-parenless-call-arguments-indent.rb, ruby-method-call-indent.rb,
ruby-block-indent.rb.  But not in e.g. ruby-after-operator-indent.rb.
Also everywhere in test/lisp/progmodes/js-resources/js-indent-init-dynamic.js,
js-indent-init-t.js.  But not in e.g. js-chain.js.




This bug report was last modified 2 years and 95 days ago.

Previous Next


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