Fork me on GitHub
#cider
<
2019-12-03
>
mkeller0222:12:23

Is there a convenient way to use cider-load-buffer without having an associated file? I just have a scratch buffer and I jacked into cider and I want to load the buffer into the REPL and play without without having a file on disk, but trying to load the buffer gives "Buffer 'my-buffer' is not associated with a file"

bozhidar08:12:04

You can use cider-eval-region.

dpsutton22:12:58

typed in emacs first? ๐Ÿ™‚

dpsutton22:12:18

strange. because cider-load-buffer sends the contents as a string. i don't know why it requires a filename

bozhidar08:12:12

nREPL actually expects a filename, thatโ€™s why. It has a different op for evaluating files and for evaluating strings.

mkeller0222:12:05

Right, that's what I thought too...minor thing, but would be convenient for just messing around

dpsutton22:12:55

are you comfortable editing elisp?

dpsutton22:12:52

some people have used emacs for 3 minutes, some people have been using for 30 years. never know the level of comfort ๐Ÿ™‚

mkeller0222:12:53

I don't fool with it much, pretty much set up the nuts and bolts and left alone, but I can

dpsutton22:12:26

m-x find-function [ret] cider-load-buffer and comment out that error

dpsutton22:12:41

and then you're 50% done for a patch