Skip to content

Instantly share code, notes, and snippets.

@dbushenko
Created April 7, 2014 19:08
Show Gist options
  • Save dbushenko/10032197 to your computer and use it in GitHub Desktop.
Save dbushenko/10032197 to your computer and use it in GitHub Desktop.
(defun my-send-to-nrepl ()
(interactive)
(let ((p (point)))
(cider-eval-last-sexp 't)
(goto-char p)
(insert " ;;=> ")))
(defun my-send-to-nrepl2 ()
(interactive)
(let ((p (point)))
(cider-eval-last-sexp 't)
(goto-char p)
(insert "\n;;=> ")))
(defun my-send-to-nrepl3 ()
(interactive)
(let* ((s (cider-last-sexp))
(data (cider-eval-sync s))
(v (plist-get data :value))
(e (plist-get data :stderr)))
(popup-tip (format "%s" (or e v)) :truncate 't)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment