Basically, I get a error when I try to follow the directions at
http://ianeslick.com/2013/05/17/clojure-debugging-13-emacs-nrepl-and-ritz/ .
In my init.el, I get a error when evaluating:
*(require 'nrepl-ritz) ;;after (require 'nrepl)*
the error is:
*Debugger entered--Lisp error: (void-variable nrepl-mode-map)*
* byte-code("\302 \303\304#\210\302 \305\304#\207"
[nrepl-interaction-mode-map nrepl-mode-map define-key [3 134217844]
nrepl-ritz-threads [3 134217844]] 4)*
* require(nrepl-ritz)*
* eval((require (quote nrepl-ritz)) nil)*
* eval-last-sexp-1(nil)*
* eval-last-sexp(nil)*
* call-interactively(eval-last-sexp nil nil)*
clearly, it has no idea what nrepl-mode-map is. Why this is I do not know.
The rest of this message is just all the things I could think of that you
might ask, and the contents of my init.el and profiles.clj file. If you
know what problem I am having already, there is no reason to read it. I am
just trying to preemptively guess what you will ask.
This is the warning when I start up emacs:
*Warning (initialization): An error occurred while loading
`/home/stephen/.emacs.d/init.el':*
*
*
*Symbol's value as variable is void: nrepl-mode-map*
*
*
*To ensure normal operation, you should investigate and remove the*
*cause of the error in your initialization file. Start Emacs with*
*the `--debug-init' option to view a complete error backtrace.*
My emacs version is:
M-x emacs-version => *GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version
3.6.4) of 2013-08-22 on menkib, modified by Debian*
I have the following in my ~/.lein/profile.clj
*{:user {:plugins [;; [lein-marginalia "0.7.1"]*
* ;; [lein-try "0.3.1"]*
* ;; [lein-pprint "1.1.1"]*
* ;; [lein-ancient "0.4.4"]*
* ;; [lein-bikeshed "0.1.3"]*
* ;; [lein-cljsbuild "0.3.3"]*
* ;; [lein-ring "0.8.7"]*
* ;; [com.keminglabs/cljx "0.3.0"]*
* [lein-ritz "0.7.0"]]*
* :dependencies [[nrepl-inspect "0.3.0"]*
* [ritz/ritz-nrepl-middleware "0.7.0"]]*
* :repl-options {:nrepl-middleware*
* [inspector.middleware/wrap-inspect*
* ritz.nrepl.middleware.javadoc/wrap-javadoc*
*
ritz.nrepl.middleware.simple-complete/wrap-simple-complete]}}}*
*
*
and the folowing ~/.emacs.d/init.el file:
*
*
*;;;-----------------------------------------------------------------*
*; From http://clojure.roboloco.net/?tag=paredit*
*
*
*(setq inhibit-startup-message t) ;; No splash screen*
*;; (setq initial-scratch-message nil) ;; No scratch message*
*;; (tool-bar-mode nil) ;; No toolbars*
*;; Create backup files in .emacs-backup instead of everywhere*
*(defvar user-temporary-file-directory "~/.emacs-backup")*
*(make-directory user-temporary-file-directory t)*
*(setq backup-by-copying t)*
*(setq backup-directory-alist*
* `(("." . ,user-temporary-file-directory)*
* (,tramp-file-name-regexp nil)))*
*(setq auto-save-list-file-prefix*
* (concat user-temporary-file-directory ".auto-saves-"))*
*(setq auto-save-file-name-transforms*
* `((".*" ,user-temporary-file-directory t)))*
*
*
*(set-face-attribute 'default nil :height 110)*
*; http://www.emacswiki.org/emacs/ShowParenMode*
*(require 'paren)*
*(set-face-background 'show-paren-match-face (face-background 'default))*
*(set-face-foreground 'show-paren-match-face "#0f0")*
*(set-face-attribute 'show-paren-match-face nil :weight 'extra-bold)*
*(show-paren-mode 1)*
*
*
*;;;-----------------------------------------------------------------*
*
*
*(require 'package)*
*(add-to-list 'package-archives*
* '("marmalade" . "http://marmalade-repo.org/packages/")*
* '("melpa" . "http://melpa.milkbox.net/packages/"))*
*(package-initialize)*
*
*
*(defvar my-packages '(;starter-kit*
* ;starter-kit-lisp*
* ;starter-kit-bindings*
* ;starter-kit-eshell*
* ac-nrepl*
* clojure-mode*
* clojure-test-mode*
*
*
* nrepl*
* nrepl-ritz*
* rainbow-delimiters*
* paredit*
* ))*
*
*
*(dolist (p my-packages)*
* (when (not (package-installed-p p))*
* (package-install p)))*
*
*
*; from
http://ianeslick.com/2013/05/17/clojure-debugging-13-emacs-nrepl-and-ritz/*
*(require 'nrepl)*
*
*
*;; Configure nrepl.el*
*(setq nrepl-hide-special-buffers t)*
*(setq nrepl-popup-stacktraces-in-repl t)*
*(setq nrepl-history-file "~/.emacs.d/nrepl-history")*
* *
*;; Some default eldoc facilities*
*(add-hook 'nrepl-connected-hook*
* (defun pnh-clojure-mode-eldoc-hook ()*
* (add-hook 'clojure-mode-hook 'turn-on-eldoc-mode)*
* (add-hook 'nrepl-interaction-mode-hook 'nrepl-turn-on-eldoc-mode)*
* (nrepl-enable-on-existing-clojure-buffers)))*
* *
*;; Repl mode hook*
*(add-hook 'nrepl-mode-hook 'subword-mode)*
* *
*;; Auto completion for NREPL*
*(require 'ac-nrepl)*
*(eval-after-load "auto-complete"*
* '(add-to-list 'ac-modes 'nrepl-mode))*
*(add-hook 'nrepl-mode-hook 'ac-nrepl-setup)*
*
*
*
*
*; nrepl inspect*
*(load-file "~/nrepl-inspect/nrepl-inspect.el")*
*(define-key nrepl-mode-map (kbd "C-c C-i") 'nrepl-inspect)*
*
*
*; nrepl-ritz*
*(require 'nrepl-ritz) ;; after (require 'nrepl)*
* *
*;; Ritz middleware*
*(define-key nrepl-interaction-mode-map (kbd "C-c C-j") 'nrepl-javadoc)*
*(define-key nrepl-mode-map (kbd "C-c C-j") 'nrepl-javadoc)*
*(define-key nrepl-interaction-mode-map (kbd "C-c C-a") 'nrepl-apropos)*
*(define-key nrepl-mode-map (kbd "C-c C-a") 'nrepl-apropos)*
*
*
*; paredit*
*(require 'paredit)*
*(add-hook 'clojure-mode-hook *
* (lambda () *
* (paredit-mode)*
* (rainbow-delimiters-mode)*
* (highlight-parentheses-mode t)))*
If I run "lein ritz-nrepl" in my project, I get no particular errors, it
says:
*nREPL server started on port 50129*
After doing the above, if I go to emacs and try to nrepl to 127.0.0.1:50129,
it just hangs and the ritz-nrepl terminal prints:
*[WARNING] No nREPL middleware descriptor in metadata of
clojure.core$comp$fn__4154@7e090a0a, see
clojure.tools.middleware/set-descriptor![WARNING] No nREPL middleware
descriptor in metadata of clojure.core$comp$fn__4154@47b8c9d1, see
clojure.tools.middleware/set-descriptor![WARNING] No nREPL middleware
descriptor in metadata of clojure.core$comp$fn__4154@34c9dd20, see
clojure.tools.middleware/set-descriptor![WARNING] No nREPL middleware
descriptor in metadata of clojure.core$comp$fn__4154@30d47af3, see
clojure.tools.middleware/set-descriptor![WARNING] No nREPL middleware
descriptor in metadata of clojure.core$comp$fn__4154@4dd40090, see
clojure.tools.middleware/set-descriptor!ERROR: Unhandled REPL handler
exception processing message {:id 2, :op clone}*
*java.lang.NullPointerException*
* at clojure.core$deref_future.invoke(core.clj:2108)*
* at clojure.core$deref.invoke(core.clj:2129)*
* at cljx.repl_middleware$wrap_cljx$fn__9054.invoke(repl_middleware.clj:11)*
* at
clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__410.invoke(middleware.clj:17)
*
* at
clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__410.invoke(middleware.clj:17)
*
* at
ritz.nrepl.middleware.simple_complete$wrap_simple_complete$fn__1621.invoke(simple_complete.clj:27)
*
* at
clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__410.invoke(middleware.clj:17)
*
* at clojure.tools.nrepl.server$handle_STAR_.invoke(server.clj:18)*
* at ritz.nrepl.exec$exec.invoke(exec.clj:36)*
* at clojure.core$eval9089$fn__9090.invoke(NO_SOURCE_FILE:0)*
* at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)*
* at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
*
* at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
*
* at java.lang.reflect.Method.invoke(Method.java:606)*
* at classlojure.core$eval_in_STAR_.doInvoke(core.clj:86)*
* at clojure.lang.RestFn.applyTo(RestFn.java:142)*
* at clojure.core$apply.invoke(core.clj:621)*
* at classlojure.core$eval_in.doInvoke(core.clj:100)*
* at clojure.lang.RestFn.applyTo(RestFn.java:142)*
* at clojure.core$apply.invoke(core.clj:621)*
* at
ritz.repl_utils.classloader$eval_clojure_in.doInvoke(classloader.clj:115)*
* at clojure.lang.RestFn.applyTo(RestFn.java:142)*
* at clojure.core$apply.invoke(core.clj:621)*
* at ritz.repl_utils.classloader$eval_clojure.doInvoke(classloader.clj:121)*
* at clojure.lang.RestFn.invoke(RestFn.java:423)*
* at ritz.nrepl.exec$exec_using_classloader.invoke(exec.clj:61)*
* at clojure.core$eval2238.invoke(NO_SOURCE_FILE)*
* at clojure.lang.Compiler.eval(Compiler.java:6619)*
* at clojure.lang.Compiler.eval(Compiler.java:6582)*
* at clojure.lang.Util.sneakyThrow0(Util.java:242)*
* at clojure.lang.Util.sneakyThrow(Util.java:236)*
* at clojure.lang.AFn.run(AFn.java:28)*
* at java.lang.Thread.run(Thread.java:724)*
*ERROR: Unhandled REPL handler exception processing message {:id 1, :op
clone}*
*java.lang.NullPointerException*
* at clojure.core$deref_future.invoke(core.clj:2108)*
* at clojure.core$deref.invoke(core.clj:2129)*
* at cljx.repl_middleware$wrap_cljx$fn__9054.invoke(repl_middleware.clj:11)*
* at
clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__410.invoke(middleware.clj:17)
*
* at
clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__410.invoke(middleware.clj:17)
*
* at
ritz.nrepl.middleware.simple_complete$wrap_simple_complete$fn__1621.invoke(simple_complete.clj:27)
*
* at
clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__410.invoke(middleware.clj:17)
*
* at clojure.tools.nrepl.server$handle_STAR_.invoke(server.clj:18)*
* at ritz.nrepl.exec$exec.invoke(exec.clj:36)*
* at clojure.core$eval9095$fn__9096.invoke(NO_SOURCE_FILE:0)*
* at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)*
* at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
*
* at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
*
* at java.lang.reflect.Method.invoke(Method.java:606)*
* at classlojure.core$eval_in_STAR_.doInvoke(core.clj:86)*
* at clojure.lang.RestFn.applyTo(RestFn.java:142)*
* at clojure.core$apply.invoke(core.clj:621)*
* at classlojure.core$eval_in.doInvoke(core.clj:100)*
* at clojure.lang.RestFn.applyTo(RestFn.java:142)*
* at clojure.core$apply.invoke(core.clj:621)*
* at
ritz.repl_utils.classloader$eval_clojure_in.doInvoke(classloader.clj:115)*
* at clojure.lang.RestFn.applyTo(RestFn.java:142)*
* at clojure.core$apply.invoke(core.clj:621)*
* at ritz.repl_utils.classloader$eval_clojure.doInvoke(classloader.clj:121)*
* at clojure.lang.RestFn.invoke(RestFn.java:423)*
* at ritz.nrepl.exec$exec_using_classloader.invoke(exec.clj:61)*
* at clojure.core$eval2240.invoke(NO_SOURCE_FILE)*
* at clojure.lang.Compiler.eval(Compiler.java:6619)*
* at clojure.lang.Compiler.eval(Compiler.java:6582)*
* at clojure.lang.Util.sneakyThrow0(Util.java:242)*
* at clojure.lang.Util.sneakyThrow(Util.java:236)*
* at clojure.lang.AFn.run(AFn.java:28)*
* at java.lang.Thread.run(Thread.java:724)*
*ERROR: Unhandled REPL handler exception processing message {:op describe,
:id 3, :descriptors #<PersistentArrayMap {"jpda" {:requires {"code" "A
boolean true or false"}, :returns {"status" "done"}, :doc "Evaluate code in
the debugger's own VM."}, "disassemble-frame" {:requires {"frame-number"
"The stack frame to disassemble.", "thread-id" "The thread executing the
code to disassemble."}, :returns {"status" "done"}, :doc "Disassemble the
code associated with the specified frame."}, "frame-locals" {:requires
{"frame-number" "The stack frame to return locals for.", "thread-id" "The
thread executing the code to disassemble."}, :returns {"status" "done"},
:doc "List the local variables visible in the specified frame. Each local
is presented in a list with name and value components."}, "frame-source"
{:requires {"frame-number" "The stack frame to return locals for.",
"thread-id" "The thread executing the code to disassemble."}, :returns
{"status" "done"}, :doc "Locate the source code for the specified frame.
The location is passed back in a name value list specifying file, zip, and
line number."}, "frame-eval" {:requires {"frame-number" "The stack frame to
return locals for.", "code" "The expression to evaluate", "thread-id" "The
thread executing the code to disassemble."}, :returns {"status" "done"},
:optional {"pprint" "Flag to specify pretty-printing of the result"}, :doc
"Evaluate code with in the locals environment of the specified frame."},
"invoke-restart" {:requires {"restart-number" "The (ordinal) number of the
restart to invoke", "restart-name" "The name of the restart to invoke.",
"thread-id" "The thread executing the code to disassemble."}, :returns
{"status" "done"}, :doc "Invoke the specified restart number or name for
the specified thread."}, "break-on-exception" {:requires {"flag" "A boolean
true or false"}, :returns {"status" "done"}, :doc "Flag to control whether
exceptions break into the debugger."}, "source-forms" {:doc "Query or reset
source forms.", :optional {"source-id" "A message ID identifying the source
form to return", "reset" "A flag to reset the source forms"}, :returns
{}}}>}*
*java.lang.NullPointerException*
* at clojure.core$deref_future.invoke(core.clj:2108)*
* at clojure.core$deref.invoke(core.clj:2129)*
* at cljx.repl_middleware$wrap_cljx$fn__9054.invoke(repl_middleware.clj:11)*
* at
clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__410.invoke(middleware.clj:17)
*
* at
clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__410.invoke(middleware.clj:17)
*
* at
ritz.nrepl.middleware.simple_complete$wrap_simple_complete$fn__1621.invoke(simple_complete.clj:27)
*
* at
clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__410.invoke(middleware.clj:17)
*
* at clojure.tools.nrepl.server$handle_STAR_.invoke(server.clj:18)*
* at ritz.nrepl.exec$exec.invoke(exec.clj:36)*
* at clojure.core$eval9101$fn__9102.invoke(NO_SOURCE_FILE:0)*
* at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)*
* at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
*
* at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
*
* at java.lang.reflect.Method.invoke(Method.java:606)*
* at classlojure.core$eval_in_STAR_.doInvoke(core.clj:86)*
* at clojure.lang.RestFn.applyTo(RestFn.java:142)*
* at clojure.core$apply.invoke(core*
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.