Emacs doesnt seem to understand me.... I placed this in my .emacs rc
(defun babashka-connect ()
(cider-connect localhost 1667))
(define-key global-map "\C-cb" 'babashka-connect)
but typing CTRL-C then B, yields "Wrong type argument: commando, babashka-connect"does adding (interactive)
to the appropriate place in the defun help at all?
@bherrmann iiuc, to use a function with define-key
it's usually (always?) supposed to be a command. adding (interactive)
to the function should make it so.
from emacs lisp ref: > A command is usually a function; if the function is written in Lisp, it is made into a command by an interactive form in the function definition
https://www.gnu.org/software/emacs/manual/html_node/elisp/What-Is-a-Function.html#What-Is-a-Function
@sogaiu Thanks, this does the trick in my .emacs
(defun babashka-connect ()
(interactive)
(cider-connect '(:host "localhost" :port "1667"))
)
(define-key global-map "\C-cb" 'babashka-connect)
Announcing inf-clojure
3.0.0-snapshot on melpa.
- Revamps the internals of inf-clojure.
- Makes startup, and choosing a supported repl easier and more intuitive.
- (use-package inf-clojure)
(add-hook 'clojure-mode #'inf-clojure-minor-mode)
and then M-x inf-clojure
- supported clojure, lumo, planck, and joker repls. Now extended to support cljs and babashka
if you already have CIDER present and you want to try it out, (remove-hook 'clojure-mode #'cider-mode)
and then use the above. they fight over who gets to control the interactive maps
Inf-clojure aims to be very simple and offer tooling that the repl
itself exposes. A few commands are:
- eval last sexp C-x C-e
- show arglists for function C-c C-a
- show var documentation C-c C-v
- show source C-c C-s
- insert top level form into repl C-c C-j d
@dpsutton Awesome! I've been using it for lumo lately and it's been pretty good. If we have some issues to report where should we post them?
Create an issue on GitHub and tag me? I’m the same username on GitHub. I’ll own it