technomancy/swank-clojure — Issue #104: Autocomplete on "clojure." causes debugger to pop up [fix included]
Author: MHOOO
Created: 2012-02-14 18:01:18+00:00
State: open

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]
(try
(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