Fork me on GitHub
#cider
<
2016-02-07
>
bozhidar07:02:52

@malabarba: cider-mode is not enabled in cider-repl-mode, because many of the commands are pointless in the REPL

bozhidar07:02:02

+ we have another another mode map anyways

bozhidar07:02:09

and we stuff whatever’s relevant there

bozhidar07:02:07

guess I didn’t think anyone would want to run the tests from the REPL

bozhidar07:02:17

but to some extent this makes sense

delaguardo07:02:25

hi there! with new cider and clj-refactor i get error Need package "spinner-1.5", but only 1.4 is available and i can't find spinner-1.5 in elpa.

bozhidar08:02:37

elpa or melpa? simple_smile

bozhidar08:02:54

I’m guessing @malabarba released the new spinner quite recently

bozhidar08:02:06

you might have to do package-refresh-packages

bozhidar08:02:13

or there might be some issue with melpa

bozhidar08:02:32

btw, I’ve just added the test commands to the REPL keymap

bozhidar08:02:07

ah, it’s on elpa actually

bozhidar08:02:17

yeah, elpa updates take a while to propagate

bozhidar08:02:25

probably this one hasn’t happened yet

delaguardo08:02:38

melpa, right, but refreshing packages dosn't solve the problem (

delaguardo08:02:55

ok, will wait for update ) thanks

bozhidar08:02:06

yes, I see the current version is still at 1.4

bozhidar08:02:32

I’m guessing this is a matter of waiting

bozhidar08:02:06

@malabarba: you should start tagging the releases - right now it’s hard to figure out which release is which

bozhidar08:02:18

tagging them in git I mean

malabarba10:02:27

@bozhidar sorry. I wasn't going to bump the dependency just yet. That's what I get for coding late.

delaguardo10:02:52

nice, thanks

malabarba10:02:04

Anyway, 1.5 is up now. :-)

anmonteiro16:02:00

is there a way to run lein clean inside cider somehow?

anmonteiro16:02:20

or inside emacs for that case, I just don't want to switch windows to a terminal

pandeiro16:02:03

@anmonteiro: if you use projectile it would be pretty easy

pandeiro16:02:52

C-c p ! + "lein clean", or you could write a elisp fn to do that and bind to some key combo

anmonteiro16:02:54

@pandeiro: I sure have it installed, but I'm still rather new to emacs

anmonteiro16:02:13

let me try that

pandeiro16:02:22

projectile helps there b/c it ensures the command is executed from the project root

anmonteiro16:02:33

I understand

anmonteiro16:02:35

it works, thanks!

anmonteiro16:02:53

I'll have to look into other projectile features for sure

pandeiro16:02:18

yeah it is one of the most useful emacs libs imo

pandeiro16:02:47

I use C-c p f and C-c s g constantly

anmonteiro16:02:03

C-c s g doesn't seem to be defined in my setup

pandeiro16:02:46

sorry, C-c p s g

pandeiro16:02:45

one more snippet that I use constantly:

pandeiro16:02:21

(defun instashell (pre)
  "Opens a shell buffer based in the current directory and auto-named
to prevent buffer name clashing on the *shell* buffer name.

With a prefix argument, uses projectile to navigate to the project
root and open the shell buffer from there."
  (interactive "P")
  (if pre
      (let* ((default-directory (projectile-project-root))
             (project-name (nth 1 (reverse
                                   (s-split "/" (projectile-project-root))))))
        (shell (concat "*shell:" project-name "*")))
      (shell (concat "*shell:" default-directory "*"))))

(global-set-key (kbd "C-c s") 'instashell)

anmonteiro16:02:38

I can't execute that

anmonteiro16:02:18

because I have mapped RET to 'paredit-newline. now I have to figure out whats the default command for pressing RET in the minibuffer

anmonteiro21:02:30

@pandeiro: curious how you'd call that with a "prefix" ?

pandeiro21:02:30

(i just realized that the function depends on the s library being present)

anmonteiro21:02:25

I'll make sure to add that to my packages

anmonteiro21:02:40

that keybinding doesn't do anything for me though, I might be missing yet another package?

pandeiro21:02:43

you can check keybindings with C-h k

pandeiro21:02:12

you will have needed to eval the function and global-set-key expression of course in your current emacs session after adding it

anmonteiro21:02:05

ah you meant you bound that key binding to call the function

pandeiro21:02:41

yes the snippet above binds it to C-c s

pandeiro21:02:00

while C-u is a universal emacs way to specify a prefix argument to a command

anmonteiro21:02:30

Ah. I knew about C-u but not the nomenclature, that's what a prefix is then

anmonteiro21:02:37

that answers my question

anmonteiro21:02:35

you've been really helpful, thanks!

pandeiro21:02:45

@anmonteiro: my pleasure, good luck

malabarba22:02:33

@anmonteiro: I noticed you've been having problems because you've bound RET to something else

malabarba22:02:40

Try this instead:

malabarba22:02:43

(define-key paredit-mode-map [remap newline] #'paredit-newline)

malabarba22:02:41

This way, RET should only invoke paredit-newline in situations where it would normally invoke newline. So it won't override things like repl input or minibuffer input

anmonteiro22:02:17

@malabarba: I'll try that and let you know. thanks!

anmonteiro23:02:23

@malabarba: it throws Symbol's value as variable is void: paredit-mode-map

anmonteiro23:02:05

@malabarba: hrm, this worked:

(eval-after-load 'paredit
  #'(define-key paredit-mode-map [remap newline-and-indent] 'paredit-newline))

anmonteiro23:02:14

pretty cool, thanks