Cider error: cider-get-ns-name: Wrong number of arguments

Table of Contents

Error

The following was posted on github1

Expected behavior

cider starts/operates without issue

Actual behavior

Upon trying to access a Clojure file after cider-jack-in, I cannot proceed past the following error.

Steps to reproduce the problem

  1. cider-jack-in-clj
  2. cider-load-buffer (`C-c C-k`)

Error:

cider-get-ns-name: Wrong number of arguments: ((clojure-mode-abbrev-table paredit-mode paredit-version paredit-space-for-delimiter-predicates font-lock-end font-lock-beg calculate-lisp-indent-last-sexp t) nil "Return the namespace of the current Clojure buffer.
Return the namespace closest to point and above it.  If there are
no namespaces above point, return the first one in the buffer.

Environment & Version information

  • GNU Emacs 28.2 (build 1, x8664-pc-linux-gnu, GTK+ Version 3.24.37, cairo version 1.16.0)

CIDER version information

  • Cider 1.10.0 (Sant Cugat), but also tried the latest git pull
;; Connected to nREPL server - nrepl://localhost:44983
;; CIDER 1.10.0 (Sant Cugat), nREPL 1.0.0
;; Clojure 1.10.1, Java 19.0.2
;;     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: /home/torysa/.guix-profile/bin/lein update-in :dependencies conj \[nrepl/nrepl\ \"1.0.0\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.42.1\"\] -- repl :headless :host localhost

Lein / Clojure CLI version

Leiningen 2.10.0 on Java 19.0.2 OpenJDK 64-Bit Server VM

Emacs version

GNU Emacs 28.2 (build 1, x8664-pc-linux-gnu, GTK+ Version 3.24.37, cairo version 1.16.0)

Operating system

Linux GUIX

JDK distribution

openjdk version “19.0.2” 2023-01-17 OpenJDK Runtime Environment (build 19.0.2+-adhoc..source) OpenJDK 64-Bit Server VM (build 19.0.2+-adhoc..source, mixed mode, sharing)

Version: latest, but then tried to back-track and I’m still receiving it on CIDER 1.10.0 (Sant Cugat) #+endsrc

Fix

I upgraded my Cider, then downgraded back to 1.10 stable. I also upgraded my cider-nrepl. Then I removed all calls to CLJ-Refactor, which tends to get in the way or cause problems. Then I finally upgraded a dependency I had totally forgotten about – clojure-mode, also maintained by the maker of Cider. After that the system was happy, and so was I!

Footnotes

1 Posted – and quickly answered and resolved – at the Cider repo here: https://github.com/clojure-emacs/cider/issues/3566

Tory Anderson avatar
Tory Anderson
Full-time Web App Engineer, Digital Humanist, Researcher, Computer Psychologist