branch: elpa/cider commit 3e238465a0bb85082bec8db57d7c4d95cc9b0a77 Author: yuhan0 <qyth...@gmail.com> Commit: Bozhidar Batsov <bozhi...@batsov.dev>
Add command for saving last eval to kill ring --- cider-eval.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cider-eval.el b/cider-eval.el index 7c86321625..fdc58fbc2f 100644 --- a/cider-eval.el +++ b/cider-eval.el @@ -1310,6 +1310,12 @@ passing arguments." (form (format "(%s)" fn-name))) (cider-read-and-eval (cons form (length form))))) +(defun cider-kill-last-result () + "Save the last evaluated result into the kill ring." + (interactive) + (kill-new + (nrepl-dict-get (cider-nrepl-sync-request:eval "*1") "value"))) + ;; Eval keymaps (defvar cider-eval-pprint-commands-map (let ((map (define-prefix-command 'cider-eval-pprint-commands-map)))