Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Autocomplete on "clojure." causes debugger to pop up [fix included] #104

MHOOO opened this Issue · 2 comments

2 participants


The debugger constantly pops up when I try to autocomplete a namespace using swank. I can easily fix this though by compiling the following (in any file):

;;; FIX FOR SWANK on clojure 1.3
(in-ns 'swank.commands.basic)
(defn- maybe-resolve-sym [symbol-name]
     (let [mns (maybe-ns *current-package*)
           sym (symbol symbol-name)]
      (ns-resolve mns sym))
    (catch ClassNotFoundException e nil)
    ;; for some reason we get back a RuntimeException...
    (catch RuntimeException e nil)))

This happens only when using clojure 1.3 - mainly because the ns-resolve call throws a RuntimeException with a cause, instead of directly a ClassNotFoundException. I'm using swank-clojure-1.4.0


I'm curious what is the RuntimeException being thrown and which debugger is popping up (sldb or the emacs lisp debugger)? I'm not seeing this on 1.2 or 1.3.


SLDB is popping up with the following content:

  [Thrown class java.lang.ClassNotFoundException]

 0: [QUIT] Quit to the SLIME top level
 1: [ABORT] ABORT to SLIME level 2

  1: (Unknown Source)
  3: clojure.lang.DynamicClassLoader.findClass
  4: java.lang.ClassLoader.loadClass
  5: java.lang.ClassLoader.loadClass
  6: (Unknown Source) java.lang.Class.forName0
  7: java.lang.Class.forName
  8: clojure.lang.RT.classForName
  9: clojure.lang.Compiler.maybeResolveIn
 10:  core.clj:3859 clojure.core/ns-resolve
 11:  core.clj:3856 clojure.core/ns-resolve
 12:  basic.clj:196 swank.commands.basic/maybe-resolve-sym
 13:  basic.clj:239 swank.commands.basic/describe-symbol*
 14:  basic.clj:256 swank.commands.basic/eval1098[fn]
 15: clojure.lang.Var.invoke
 16: (Unknown Source) jMonkeyEngine.ai_monads$eval6442.invoke
 17: clojure.lang.Compiler.eval
 18: clojure.lang.Compiler.eval
 19:  core.clj:2745 clojure.core/eval
 20:   core.clj:100 swank.core/eval-in-emacs-package
 21:   core.clj:256 swank.core/eval-for-emacs
 22: clojure.lang.Var.invoke
 23: clojure.lang.AFn.applyToHelper
 24: clojure.lang.Var.applyTo
 25:   core.clj:600 clojure.core/apply
 26:   core.clj:107 swank.core/eval-from-control
 27:   core.clj:218 swank.core/sldb-loop[fn]
 28:   core.clj:215 swank.core/sldb-loop
 29:   core.clj:231 swank.core/invoke-debugger
 30:   core.clj:235 swank.core/sldb-debug
 31:   core.clj:301 swank.core/eval-for-emacs
 32: clojure.lang.Var.invoke
 33: clojure.lang.AFn.applyToHelper
 34: clojure.lang.Var.applyTo
 35:   core.clj:600 clojure.core/apply
 36:   core.clj:107 swank.core/eval-from-control
 37:   core.clj:218 swank.core/sldb-loop[fn]
 38:   core.clj:215 swank.core/sldb-loop
 39:   core.clj:231 swank.core/invoke-debugger
 40:   core.clj:235 swank.core/sldb-debug
 41:   core.clj:301 swank.core/eval-for-emacs
 42: clojure.lang.Var.invoke
 43: clojure.lang.AFn.applyToHelper
 44: clojure.lang.Var.applyTo
 45:   core.clj:600 clojure.core/apply
 46:   core.clj:107 swank.core/eval-from-control
 47:   core.clj:218 swank.core/sldb-loop[fn]
 48:   core.clj:215 swank.core/sldb-loop
 49:   core.clj:231 swank.core/invoke-debugger

@tavisrudd tavisrudd closed this in ba43f73
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.