-
-
Notifications
You must be signed in to change notification settings - Fork 648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cider-eval to kill-ring and pre-sexp comment. #1169
Comments
Your suggestions sound reasonable. Put something together, so we can discuss some actual code. |
Will do! |
@phillord Ping :-) |
Working on new command "M-x create-more-time" first... Still think this is a good idea and will do it at some point. Not sure Bozhidar Batsov notifications@github.com writes:
|
@bbatsov There's already a |
Yeah, probably this would be the best direction. I don't really want to add more prefix arguments to eval commands. But I think @phillord wanted to different things - a way to push results to the killring and a way to display results as comments. |
Isn't that what |
Just for one type of evaluation (top-level expression evaluation). Which is probably enough. But with the results to kill-ring, you'd probably want for every eval op to push its result to the the kill-ring when this is enabled. On the other hand some people might want to push there only specific results... |
I think eval to comment makes most sense for top-level expressions i.e. inserting comment "inside" sexp could be problematic/confusing. For specific results I don't really know how to tackle it, but for every eval maybe it would be sufficent to put the kill-ring behaviour in somewhere in |
Indeed. |
Nope, feel free to close the issue. |
@phillord so you don't want the ability to push eval results to the kill right anymore? |
Well, I wanted this as a way to get results as comments into the buffer. As that's been implemented instead, it seems the better solution. I'll close. |
Here is a function that would implement the evaluation to kill ring. I keep it in my init.el for now.
|
this would be a really nice feature, sat here evaluating html would be nice to get the result and format it in another buffer like html mode. perhaps even eval to new buffer for large results you want to format. |
Thanks @jvillste! This is quite useful. I like putting an extra |
As a feature request, it would be lovely to have the ability to push the results of the last eval to the kill-ring.
I write quite a lot of tutorial material where I want to do something with the eval results of Clojure code, and currently I have to insert into buffer, then kill. Even better would be an "eval-last-sexp-and-insert-as-comment-before-the-sexp" (sorry, not a good name). So:
Would become...
(+ 2 2)
I guess both of these could be layered onto
cider-eval-last-sexp
by extending the prefix argument support.If you are interested, I can put a PR together.
The text was updated successfully, but these errors were encountered: