Fork me on GitHub
#cider
<
2018-01-14
>
bozhidar09:01:49

> then, @bozhidar will implement it cleanly 🙂

bozhidar09:01:17

I’m afraid this happens rather infrequently, but I do like the workflow.

bozhidar09:01:30

> the problem I was running into with spec ... was that it was showing me all types of specs from clojure core + external libraries

bozhidar09:01:09

@qqq Yeah, that totally makes sense. We should add some filtering for the specs that come outside the project. Please, file a ticket for this. Should be easy to do IMO.

dpsutton15:01:22

the other day yall were looking for a function that would close all delimiters. it's already written in CIDER apparently

(defun cider-repl-closing-return ()
  "Evaluate the current input string after closing all open parenthesized or bracketed expressions."
  (interactive)
  (goto-char (point-max))
  (save-restriction
    (narrow-to-region cider-repl-input-start-mark (point))
    (let ((matching-delimiter nil))
      (while (ignore-errors (save-excursion
                              (backward-up-list 1)
                              (setq matching-delimiter (cdr (syntax-after (point))))) t)
        (insert-char matching-delimiter))))
  (cider-repl-return))

bozhidar16:01:21

@dpsutton Yeah, what I ended up implementing for cider-eval-defun-to-point is similar, but a bit more generic.

dpsutton16:01:53

i only discovered that because i messed with enter in a repl. I've really been enjoying changing it so that enter gives a new line and control enter sends for evaluation. makes the repl more easy to play with before evaluating

dpsutton16:01:20

(define-key cider-repl-mode-map (kbd "RET") #'cider-repl-newline-and-indent)
(define-key cider-repl-mode-map (kbd "C-<return>") #'cider-repl-return)

bozhidar16:01:20

@dpsutton I think you might want to add this to the manual. It’s an useful tip for many people.

dpsutton16:01:42

can do. it really changed my interaction with the repl

bozhidar17:01:18

Thanks! Merged.

bozhidar19:01:00

@qqq cider-eval-defun-to-point is live. I’ve also added a couple of more commands you might find useful - cider-eval-last-sexp-in-context and cider-eval-sexp-at-point-in-context.