For probably the fourth time in the past six months, I am unable to access the cider REPL history (Ctrl-C, Meta-P). The mini-buffer displays Unmatched bracket or quote ... and nothing else.
Why does the problem keep happening? Am I doing something wrong?
How can I recover other than deleting the history file? It is exasperating to lose months of history, but in the past I have had to resort to that extreme to recover.
There are plenty of threads here that talk around the problem, but nothing authoritative or comprehensive. It would be great for this to find its way into the help.
Some interesting observations...
1. If I quit emacs, come back in and restart cider, I can see the history until I issue my first command, even if that "command" is simply evaluating 1. History also fails if I enter it more than once even without issuing any REPL commands.
2. I was hitting the default max history size (500). Increasing to 1000 does not solve the problem.
3. Using the cider-repl-previous-input (Meta-P) works ... at least as far as I have been able to work back.
4. When I quit cider, I get a slightly different error message: error in process sentinel: Unmatched bracket or quote.
Some more debugging info:
;; Connected to nREPL server -
;; CIDER 1.21.0 (Gràcia), nREPL 1.5.2
;; Clojure 1.11.4, Java 17.0.8
;; Docs: (doc function-name)
;; (find-doc part-of-name)
;; Source: (source function-name)
;; Javadoc: (javadoc java-object-or-class)
;; Exit: <C-c C-q>
;; Results: Stored in vars *1, *2, *3, an exception in *e;
;; Startup: /Users/cch1/.asdf/shims/clojure -Sdeps \{\:deps\ \{nrepl/nrepl\ \{\:mvn/version\ \"1.5.2\"\}\ cider/cider-nrepl\ \{\:mvn/version\ \"0.58.0\"\}\}\ \:aliases\ \{\:cider/nrepl\ \{\:main-opts\ \[\"-m\"\ \"nrepl.cmdline\"\ \"--middleware\"\ \"\[cider.nrepl/cider-middleware\]\"\]\}\}\} -M:dev:test:cch1:cider/nrepl Is it possible that running the emacs daemon could contribute to this corruption?
@cch1 Can you summarize all of this in a GH issue, so I won’t forget to look deeper into it? Some sample corrupted file would help the investigation a lot, but I assume most people probably have their logs they wouldn’t want to share.
Done. And my history file has been uploaded.