Fork me on GitHub

@zalky you're looking for (derived-mode-p 'lisp-mode), but note that clojure-mode doesn't derive from lisp-mode, but clojurescript-mode does derive from clojure-mode, so this should work: (derived-mode-p 'lisp-mode 'clojure-mode)


@plexus, awesome, that works great, thanks!


i think i'm confusing myself on workflow. what i would like to do is be in the source file and have the repl opened in a split window. then at the end of an expression i want to send it to the repl, evaluate it, but stay in my source file. i can't seem to find the right command to do that. i can send to the repl but it doesn't evaluate so if i send something else it tacks it on to the end of the last thing I sent.


there are insert commands. check out

(setq cider-invert-insert-eval-p t)
(setq cider-switch-to-repl-after-insert-p nil)


awesome stuff. I put that in my config and now C-c M-p does exactly as I wanted. you are my emacs guru, man. Thanks a lot!


Oh I think there's a map at c-c m-j that includes d,e, and r for defun expression and region just like the eval map


I'm not at a computer so I'm trying to query my muscle memory for the chords


C-c M-j is what i use for cider jack-in. not sure what you mean in the 2nd part of that sentence. eval map? I assume these are some cool new tricks for me though


You're right. Maybe c-c c-j.


There's the pr for it


ahh, ok. I think I am getting it. C-c M-p like I discovered above runs cider-insert-last-sexp-in-repl just like C-c C-j e does. So I do need to keep those config changes in my file for it to still have the behavior I want of eval-ing in the repl but keeping me in my source file. C-h k was so useful for just now exploring that. Emacs is so cool!!!