UPD:我的操作系统是 Win7 64 位
尝试使用 M- 跳转到符号的定义时出现以下错误。
Searching for program: permission denied, unzip
谷歌在这个问题上对我帮助不大。有人可以指出我正确的方向吗?
这是我与clojure相关的配置部分:
;; clojure
(require 'clojure-mode)
(add-hook 'clojure-mode-hook
(lambda ()
(setq buffer-save-without-query t)))
;;command to align let statements
;;To use: M-x align-cljlet
(require 'align-cljlet)
(setq auto-mode-alist (append '(("\\.cljs$" . clojure-mode))
auto-mode-alist))
(dolist (x '(scheme emacs-lisp lisp clojure))
(add-hook (intern (concat (symbol-name x) "-mode-hook")) 'rainbow-delimiters-mode))
;; nrepl
(require 'nrepl )
(defun live-windows-hide-eol ()
"Do not show ^M in files containing mixed UNIX and DOS line endings."
(interactive)
(setq buffer-display-table (make-display-table))
(aset buffer-display-table ?\^M []))
(when (eq system-type 'windows-nt)
(add-hook 'nrepl-mode-hook 'live-windows-hide-eol ))
(add-hook 'nrepl-interaction-mode-hook
(lambda ()
(nrepl-turn-on-eldoc-mode)))
(add-hook 'nrepl-mode-hook
(lambda ()
(nrepl-turn-on-eldoc-mode)))
(setq nrepl-popup-stacktraces nil)
(setq nrepl-popup-stacktraces-in-repl nil)
(add-to-list 'same-window-buffer-names "*nrepl*")
;;Auto Complete
(require 'ac-nrepl )
(add-hook 'nrepl-mode-hook 'ac-nrepl-setup)
(add-hook 'nrepl-interaction-mode-hook 'ac-nrepl-setup)
(add-hook 'clojure-nrepl-mode-hook 'ac-nrepl-setup)
(eval-after-load "auto-complete"
'(add-to-list 'ac-modes 'nrepl-mode))
;; specify the print length to be 100 to stop infinite sequences killing things.
(defun live-nrepl-set-print-length ()
(nrepl-send-string-sync "(set! *print-length* 100)" "clojure.core"))
(add-hook 'nrepl-connected-hook 'live-nrepl-set-print-length)
;;; Windows M-. navigation fix
;(defun nrepl-jump-to-def (var)
; "Jump to the definition of the var at point."
; (let ((form (format "((clojure.core/juxt
; (comp (fn [s] (if (clojure.core/re-find #\"[Ww]indows\" (System/getProperty \"os.name\"))
; (.replace s \"file:/\" \"file:\")
; s))
; clojure.core/str
; clojure.java.io/resource :file)
; (comp clojure.core/str clojure.java.io/file :file) :line)
; (clojure.core/meta (clojure.core/ns-resolve '%s '%s)))"
; (nrepl-current-ns) var)))
; (nrepl-send-string form
; (nrepl-jump-to-def-handler (current-buffer))
; (nrepl-current-ns)
; (nrepl-current-tooling-session))))
(setq nrepl-port "4555")