This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-10-13
Channels
- # admin-announcements (48)
- # alda (1)
- # aws (24)
- # beginners (4)
- # boot (103)
- # cider (69)
- # clojure (111)
- # clojure-art (5)
- # clojure-dev (35)
- # clojure-greece (2)
- # clojure-nl (3)
- # clojure-russia (1)
- # clojure-shanghai (1)
- # clojurescript (220)
- # clojurescript-ios (1)
- # clojurewerkz (3)
- # community-development (3)
- # core-logic (5)
- # cursive (5)
- # datomic (24)
- # devcards (21)
- # editors (3)
- # funcool (1)
- # hoplon (20)
- # ldnclj (47)
- # ldnproclodo (1)
- # liberator (1)
- # off-topic (7)
- # om (21)
- # onyx (36)
- # reagent (1)
- # ring-swagger (2)
- # spacemacs (38)
- # yada (17)
Is there any reason that cider can only eval the sexp immediately before the point? When outputting to minibuffer, that is. In vim-fireplace, I could just stand somewhere inside a sexp and have it be evaluated. I find it a bit awkward that, for example, for the last sexp in the file, I have to create whitespace immediately after, just to eval it.
Or does Cider have a different way to eval to minibuffer that I cannot find?
Something to eval the "parent" would be useful though, that's right - but you could write something in Elisp using Paredit+Cider for that
On your last point... I'm not sure why you'd need that, jumping to the end of the file will put point behind the last character, not over it, right?
let's say that this is the end of my file: (* 5 (+ 2 1))
If I bring the point to the very end, I will be standing on the last )
Now, if I eval to minibuffer here, I will receive the result "3", as I am evaluating the sexp before the point
When what I wanted was to eval the entire thing.
Nothing wrong with evaluating a nested sexp - I could do that the same way with vim-fireplace.
Guess it's a config thing, I've got Spacemacs installed
But (currently) I still find it a bit awkward. If I wanted to eval the entirety of ( 5 (+ 2 1)) with vim-fireplace, I could choose to do so if the point was on the first (, the , the space between * and 5, the 5, the space between the 5 and the second (, or on the last ).
Is it just me, or does that seem... easier? Than having to navigate to after the sexp.
Ah well, I found a way to do what I wanted to do after all - cider-eval-defun-at-point. My bad!
Well @chipf0rk , I am not sure - I haven't had the need yet. I'm just a newbie sparetime Clojure dabbler
Ah no. I don't think I meant that x)
my point is that it can be useful to depend directly on where point is and eval anything inside sexps, including things like just vars
All of the emacs/lisp terminology is perhaps a bit overwhelming for me at the moment Being new to both emacs and lisp, and having English as a second language. So I might misunderstand some things.
I see your point 😉 That's definitely handy.
Hm, but still - couldn't that be on the point rather than after?
Don't worry, I'm an Emacs noob too... The whole system of different terminology for things like cursor, window, ... certainly doesn't help
Sorry, *rather than before.
Or is it on the point in your configuration?
Hm. I bet I'll get used to it. It just seems weird that I can shoot stuff with my gun, I just have to remember to aim next to the thing that I want to shoot rather than right at it x)
I guess if you come from vim, it's a bit of a change that the cursor being "on" something is more like being "before" it
What's the command called? (I don't have Paredit, but perhaps I have an equivalent)
Can't find an equivalent as of now (using lisp mode)
Anyway, thank you
I'll have to experience more.
*experiment
I’m trying to get going with emacs and cider via spacemacs. When I try to send my buffer to cider in a clojurescript project, I get this error: No such var: clojure.core/require-macros
yeah, someone pointed out to me the limitations re: clojurescript
Well, this specifically is not really a limitation. You just didn't start the cljs repl :)
You need a cljs repl. There are many different ones, but if you have a look at the CIDER readme there are a couple of suggestions
thanks @malabarba, I’ll check that out
reefersleep: I guess the logic is that if you're navigating around, then placing the cursor after the sexp is no harder than placing it before. However, if you've just finished typing the sexp (which is a common case), then the cursor is already after it (and so the C-x C-e
behavior is more convenient).
Still, if it's a top-level sexp then you can just use eval-defun-at-point
anywhere (as you've already figured out)
@malabarba: I can see the point in evaluating something you've just finished typing
I’ve opted to keep the CIDER behaviour more or less consistent with the behaviour of Emacs for Emacs Lisp and SLIME for Common Lisp
obviously it’s easy to implement such commands, but there hasn’t been much interest in them
and as @malabarba said - it’s so easy to go to the beginning of a sexp...
This discussion makes me think that I should make a screencast about Vim-fireplace/sexp commands and motions
Might be useful for users of other editors to see how it works
Any input on this question I asked last night:
> A question came up on the EmacsLive mailing list about cider-browse-ns
since it seems not to exist, even tho’ EmacsLive bundles CIDER 0.9.1 now. Is there any documentation on how to use the namespace browser? Do you have to be in a particular mode or something?
Why was the change to run tests with clojure 1.8 reverted? I ask because I'm seeing some issues with the pprint ns in 1.8-beta1.