Fork me on GitHub
Drew Verlee13:08:53

Can anyone advice on what these errors mean and how to fix them?

error in process filter: forward-sexp: Scan error: "Containing expression ends prematurely", 5, 6
error in process filter: Scan error: "Containing expression ends prematurely", 5, 6
Error in 'cider-repl--state-handler': (scan-error Containing expression ends prematurely 5 6)


no idea what these could mean Can you provide some information on how to replicate these errors?


Is the error caused by the Clojure code or by the code in the Cider package? Try run your code in a terminal REPL without Cider to identify


My guess is that there is something wrong on the Cider code, or the compiled .el files. You could try the scorched earth approach and delete the Cider package or just it's .el files and restart Emacs to download them again


Or it could code be the Clojure code with unbalanced parents somewhere...


If this error is happening over multiple Clojure projects, then it's probably a Cider package. If it happens just in one and also in the terminal REPL, then it's the Clojure code unbalanced (or wrong in some other way).

Drew Verlee20:08:53

It is happening over multiple clojure projects.

Drew Verlee20:08:22

actually it seems to happen related to other tools: File mode specification error: (scan-error Containing expression ends prematurely 5 6) [persp-mode] Error: Can not autoresume perspectives -- (scan-error Containing expression ends prematurely 5 6) command-execute: Buffer is read-only: #<buffer spacemacs>


these errors seem so erratic it leads me to believe it could be one of two things 1. There’s a missing parenthesis somewhere in your config 2. Your spacemacs installation is corrupted In this case I would check your config to make sure there were not breaking changes. If your config looks alright, then reinstalling spacemacs usually does the trick.


If you’re on emacs-28 with gccemacs a.k.a native-comp, then you can delete some packages and force them to recompile.

Drew Verlee20:08:32

I reinstalled emacs seems to work

Drew Verlee20:08:08

I was going to do a fresh config next and just layer in my changes but it seems I didn't need to


Probably a bad package or a corrupted .elc file