Fork me on GitHub
#cider
<
2016-08-01
>
ccann14:08:21

@shader thanks! this is what I came up with

(defun ccann/forward-clj-def nil
  (interactive)
  (search-forward-regexp "\n([s/]*def[n]*")
  (recenter)
  (move-beginning-of-line 1))

(defun ccann/backward-clj-def nil
  (interactive)
  (search-backward-regexp "\n([s/]*def[n]*" nil 'noerror)
  (recenter)
  (next-line))

ccann14:08:37

bound to C-S-n and C-S-p respectively

shader15:08:19

@ccann: thanks for sharing!

radon15:08:40

Personally I would just use C-M-f and C-M-b, which jump between top-level forms (presuming that you’re at the top level; you can iterate C-M-u or C-M-n to get there).

radon15:08:49

These are built in to Paredit.

ccann15:08:55

good to know! I’m using smartparens, maybe there are similar bindings there

radon15:08:24

There almost assuredly are; I can’t imagine a paren-managing plugin without structural navigation keybindings.

ccann15:08:37

just tried em, awesome

danmidwood16:08:16

Nice link 😆

otfrom17:08:58

hmm... anyone know how to run expectations test in latest stable cider?

otfrom17:08:07

(googling didn't find me anything solid)

otfrom17:08:25

s/test/tests/

shader18:08:02

any ideas why we might be seeing "error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: The system cannot find the path specified."?

shader18:08:20

this is on windows

shader18:08:33

emacs 24.3.1

shader21:08:41

what's the right way to load a new file into an nrepl session?

seancorfield21:08:07

@otfrom: I have a key binding that dumps (expectations/run-tests [*ns*]) into the REPL for that.

malabarba22:08:47

@otfrom there's an open issue for that. Clojure.test exposes a pretty generic API (which Cider fully supports), but expectations simply don't use it.

malabarba22:08:29

If someone added support for that in expectations, it would immediately work with the cider commands.

malabarba22:08:14

Until then, we're limited to solutions like @seancorfield's

malabarba22:08:11

@shader: C-c C-k loads a file. There's a menu bar listing most eval commands and the or keybinds.

seancorfield23:08:36

@malabarba: Where would I go (in the CIDER code) to find the clojure.test API elements that CIDER leverages? I’d be happy to submit a PR to Jay for Expectations to expose appropriate functionality.

seancorfield23:08:16

Just bear in mind that Expectations gensyms the function names so you can’t just run a single test function 🙂