Fork me on GitHub

@cfleming @jrheard FWIW copying the last REPL output would be enough for me


@val_waeselynck Yeah, we’ve discussed that here before, that’s probably a good 80% solution.


And useful for other things too.


Hey, I am quite surprised that this is blocked by perceiving it as a combinatorial explosion. Cider has 10 eval commands, some also have a prefix version ( So that would be max. 20, some are already present in Cursive, some are not needed. Having at least a subset of those commands would be really cool.


I also like the “copy REPL output to clipboard” idea though! 👍

Roman Liutikov16:01:05

@cfleming Is it possible to add custom command in Cursive that receive, process in the REPL and return back data? For example something like eval and replace


@nblumoe Thanks for the doc link. It’s interesting the ones they’ve chosen to implement. They support three “sources” - form before point, top level form and surrounding sexp (which I don’t support but will do, people have asked for it). Cursive additionally supports sending the selection, but that’s overloaded - the other commands will send the selection if it exists rather than what they would normally use.


But the ops available for each source aren’t very consistent - you can debug a top-level form but not the form before point, and you can replace the form before point with the result but not the top-level form.


They have 4 ops - send to REPL and eval, send to REPL and replace, send to REPL and pprint result, debug in REPL. Cursive doesn’t need debug and it always pprints, so maybe it only needs two.


That’s then 6 commands, which seems pretty manageable.


And copying the last REPL output allows for some flexibility too.


@roman01la Can you give me an example of the sort of thing you’d like to do? Would replacing the original form work? Would being able to easily copy the last REPL result be sufficient?


In vim I would wrap many MB edn files/logs in a pprint then send to repl and replace, as long as the clipboard can handle it, it would be fine

Roman Liutikov23:01:05

@cfleming I’d like to be able to create commands that run arbitrary code on a selection and print results into the REPL


@roman01la Oh, yes, that you can do. See One thing that is not documented there is that you can use ~selection in your commands.


Let me know if that doesn’t meet your needs.