This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-10
Channels
- # ai (2)
- # beginners (3)
- # boot (113)
- # bristol-clojurians (2)
- # cider (77)
- # clara (43)
- # cljs-dev (48)
- # cljsrn (9)
- # clojure (319)
- # clojure-austin (2)
- # clojure-czech (4)
- # clojure-denmark (4)
- # clojure-france (4)
- # clojure-italy (4)
- # clojure-russia (2)
- # clojure-serbia (10)
- # clojure-spec (79)
- # clojure-uk (64)
- # clojurescript (109)
- # clr (3)
- # conf-proposals (21)
- # core-async (19)
- # cursive (26)
- # datascript (11)
- # datomic (19)
- # devcards (1)
- # emacs (25)
- # figwheel (9)
- # hoplon (31)
- # jobs (7)
- # jobs-discuss (14)
- # leiningen (10)
- # lumo (11)
- # off-topic (37)
- # om (40)
- # onyx (4)
- # perun (8)
- # planck (3)
- # rdf (4)
- # re-frame (40)
- # ring (11)
- # ring-swagger (2)
- # rum (21)
- # spacemacs (2)
- # specter (50)
- # untangled (93)
- # yada (13)
@richiardiandrea sorry for not following up the lein-cljs-repl issue, someone else dug in a little bit, and there’s more context here: https://github.com/clojure-emacs/cider/issues/1938
thanks, I commented there 😄
@dpsutton just because you are probably on the topic, why don't we have/add a simple function like this in cider
?
(defun cider--get-repl-buffer ()
(-when-let (repl-buffers (cider-repl-buffers))
(if (= (length repl-buffers) 1)
(car repl-buffers)
(completing-read "Choose REPL buffer: "
(mapcar #'buffer-name repl-buffers)
nil t))))
yeah I thought the same, but I could not find it and all the functions in cider-interaction.el
are actually taking the connection directly
I have a simple:
(defun cider-eval-sexp-at-point-in-repl ()
(interactive)
(let ((form (cider-sexp-at-point)))
;; Strip excess whitespace
(while (string-match "\\`\s+\\|\n+\\'" form)
(setq form (replace-match "" t t form)))
(set-buffer (cider--get-repl-buffer))
(goto-char (point-max))
(insert form)
(cider-repl-return)))
was about to say that
and all of a sudden it was broken becasue cider-get-repl-buffer
got removed
usually bound to C-c C-z
oh ok, so I might have missed that one
don't worry 😄
it's a custom function
tell me about it 😄
hi! im just trying to install cider as recommended on https://github.com/clojure-emacs/cider/ and http://www.braveclojure.com/basic-emacs/
M-x package-install [RET] cider [RET]
but i only see the following packages:
{cider-decompile | cider-profile | cider-spy | ac-cider | ac-cider-compliment}
what am i missing?
i've got some SSL error message for
, so i guess i dont have a complete latest package list?
i've installed my emacs from https://emacsformacosx.com and added the configuration recommended by the mentioned braveclojure chapter.interestingly i can find cider in the list now, but if i say M-x package-install, then i cant see just cider
;; 00-packages.el
(require 'package)
(require 'cl)
(add-to-list 'load-path "~/.emacs.d/local")
(setq package-archives
'(
("gnu" . " ")
("marmalade" . " ")
("melpa-stable" . " ")
("melpa" . " ")
; ("org" . " ")
))
(package-initialize)
(add-to-list 'package-pinned-packages '(cider . "melpa-stable") t)
(add-to-list 'package-pinned-packages '(clj-refactor . "melpa-stable") t)
(defun arrdem:require (req &optional pkg)
"A wrapper for ensuring that a package is installed, and requiring it.
Enables me to modularize the previously monolithic installation
of packages."
(let ((pkg (or pkg req)))
(package-install pkg)
(require req)))
if you’ve changed package-archives
you’ll want to list-packages
, and maybe press g
in the package list buffer.
interesting, in the braveclojure's example config init.el
looks like this:
;; Define package repositories
(require 'package)
(add-to-list 'package-archives
'("marmalade" . " ") t)
(add-to-list 'package-archives
'("tromey" . " ") t)
(add-to-list 'package-archives
'("melpa" . " ") t)
;; (setq package-archives '(("gnu" . " ")
;; ("marmalade" . " ")
;; ("melpa" . " ")))
i will nag the author to remedy this situation. i feel a bit embarrassed because im recommending the braveclojure book usually as a good starting point... 😕
talking about setup, I found emacs-live's approach the best, packages organized with git submodule
actually the git submodule
part is something I would like to improve
but I can go in any subfolder and checkout a specific commit
or work on the fix that break and use it right away
needless to say that I have a fork of emacs live
@onetom if you're looking for an up-to-date emacs config, checkout https://github.com/bbatsov/prelude
btw, i started clojure with sublime text ~2.5 yrs ago, tried light table, emacs 24, atom, vs code, night code and ended up using cursive, but i would like to keep an eye on the alternatives...
@onetom yes, I keep my branch super up to date and don't follow emacs-live
too much anymore apart from merging upstream every now and then
we just had a poll at the clojure remote 2017 conference yesterday and emacs was still the number one editor
@onetom just to show you some magic, today I was working on this, I hope it is pretty readable):
(defun cider--eval-bindings (bindings)
"Sends a (def bound-name expr) form to the cider repl for each
binding in bindings."
(let ((bound-name (pop bindings))
(init-expr (pop bindings)))
(when bound-name
(let ((form (concat "(def " bound-name " " init-expr ")")))
(set-buffer (cider--get-repl-buffer))
(insert form)
(cider-repl-return)
(cider--eval-bindings bindings)))))
it deffes all the let bindings