smartparens icon indicating copy to clipboard operation
smartparens copied to clipboard

Ruby `def` no longer completes `end` for me

Open vemv opened this issue 9 months ago • 4 comments

Using ruby-mode, typing def SPC no longer inserts end for me.

I'm at a loss as to why this happened. I tried going back N months back per Git history.

My smartparens setup is vanilla/minimalistic; I've been a user for some 5 years (as I've hacked on Emacs for 10+).

What are some measures to debug this? Can I trigger the completion by hand? Or otherwise inspect the ruby- / smartparens-related environment?

Maybe there's some sort of cross-package interference?

Steps to reproduce the problem

May be provided on request

Environment & version information

  • smartparens version: 20231024.1804
  • Active major-mode: ruby-mode
  • Smartparens strict mode: nil
  • Emacs version (M-x emacs-version): GNU Emacs 27.2 (build 1, x86_64-apple-darwin20.6.0, NS appkit-2022.60 Version 11.6 (Build 20G165)) of 2023-09-26
  • Starterkit/Distribution: Vanilla
  • OS: darwin

Thanks - V

vemv avatar Nov 12 '23 23:11 vemv

...I use Emacs 27 (as it's good enough, and some packages I use break on 28). I see that the CI has:

          - '25.1'
          - '25.2'
          - '25.3'
          - '26.1'
          - '26.2'
          - '26.3'
          - 'snapshot'

which surely means that 27 is getting skipped.


Update: I went back to 26, made no difference.

vemv avatar Nov 12 '23 23:11 vemv

I also started seeing this recently. I tried the following steps:

  • Started Emacs with the -Q option.
  • Opened a new buffer.
  • M-x ruby-mode
  • M-x smartparens-mode
  • Typed def .

No end was inserted.

Not only that, but sexp-based motion commands have stopped working properly, probably at the same time. For example, when point is after the end at the end of a function and I invoke sp-backward-sexp, point used to move to start of the corresponding def. Now it just moves to the start of the end. sp-backward-up-sexp does nothing at all anymore, as far as I can tell.

grimnebulin avatar Dec 13 '23 19:12 grimnebulin

FWIW, I never got to diagnose this and am using https://github.com/rejeep/ruby-end.el for now

vemv avatar Dec 13 '23 20:12 vemv

I updated to from Emacs 27 to Emacs 29 and this functionality now works as I'm used to. Emacs 28 didn't cut it.

grimnebulin avatar Jan 25 '24 21:01 grimnebulin

It probably got broken in this commit 4e3ca735aadc570a5b4b456519000d6048785bf4 . I reverted some changes and made the config load in the legacy mode as well.

Fuco1 avatar Mar 17 '24 21:03 Fuco1

Thanks much!

Looking forward to revert ruby-end.el out of my config :) it worked but obviously it's far less capable.

vemv avatar Mar 17 '24 21:03 vemv