Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I was experimenting with integrated tools.namespace reloading in elisp as well, and I found a slightly nicer way to send commands to nrepl:

  (defun nrepl-reset ()
    (interactive)
    (nrepl-interactive-eval "(user/reset)"))

The original elisp function:

  (defun nrepl-reset ()
    (interactive)
    (set-buffer "*nrepl*")
    (goto-char (point-max))
    (insert "(user/reset)")
    (nrepl-return))


Note the former technique will display the output in the minibuffer, the latter will display it in the repl.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: