Fork me on GitHub
#emacs
<
2018-10-13
>
plexus07:10:49

@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)

zalky14:10:24

@plexus, awesome, that works great, thanks!

Chase17:10:09

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.

dpsutton19:10:11

there are insert commands. check out

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

Chase20:10:36

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!

dpsutton20:10:36

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

dpsutton20:10:55

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

Chase20:10:22

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

dpsutton20:10:00

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

dpsutton20:10:02

There's the pr for it

Chase21:10:05

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!!!