This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
Is anyone else suffering from indent-region
failing in some buffers sometime after startup? When I start Emacs it works correctly, but sometime later (I assume a hook runs?) I start getting this error in some modes:
Indenting region...
apply: Wrong number of arguments: #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_16>, 2
I have not seen the problem in emacs lisp modes. I thought I had it narrowed down to modes where Eglot was enabled, but I'm no longer confident in that.
(Indenting a single line at a time works, it appears only indent-region
is affected.)
that error looks familiar , but i can't remember what I did if anything to fix it. I use https://github.com/radian-software/apheleia to indent on save anyways, maybe that's a workaround for your issue.
I actually packaged up clojure-mode into a script, where the 'shbang' line is emacs, and call it from apheleia on-save, i can send it if you want it, but cljfmt, zstyle, etc much better options.
you might also want to try clojure-ts-mode, since it's a completely different indent engine / implementation of 'indent-region'
For unrelated reasons I did try clojure-ts-mode earlier, but reverted as there were some things I couldn't get to work properly. (Sadly my git history does not have good notes on why. I shall try again soon.) I'm doubtful that it will help, however, as the issue is not specific to Clojure mode, but also affects YAML mode and others. (Though not yet seen it in Emacs Lisp mode.)
never a bad time to switch to yaml-ts-mode too 😝 but yah, it’s not a root cause solution :)
ISTR the issue I had was around automatically running eglot
in these buffers?
Am willing to try the ts-modes, but haven't been able to apply yet. Need to schedule some time for that.