Hi,
C-x C-e (slime-interactive-eval) prints the value(s) in the minibuffer. Prefixed with C-u, it is inserted in the current buffer.
Is there a way to insert it somewhere else? Ideally, it would be very handy to have a way to just save the result in the kill ring, then I could yank it later.
Thanks,
Tamas
* Tamas K Papp [2010-09-16 10:47] writes:
Hi,
C-x C-e (slime-interactive-eval) prints the value(s) in the minibuffer. Prefixed with C-u, it is inserted in the current buffer.
Is there a way to insert it somewhere else?
No, currently not.
Ideally, it would be very handy to have a way to just save the result in the kill ring, then I could yank it later.
Kill-ring sounds good. Any good ideas what key/prefix to use for this?
Helmut
* Helmut Eller [2010-09-20 07:53] writes:
- Tamas K Papp [2010-09-16 10:47] writes:
Ideally, it would be very handy to have a way to just save the result in the kill ring, then I could yank it later.
Kill-ring sounds good. Any good ideas what key/prefix to use for this?
Maybe we could continue to use C-u C-x C-e and simply set the mark before inserting the result. After the result is inserted, C-w would put it the kill-ring.
Helmut
On Mon, 20 Sep 2010 10:20:35 +0200, Helmut Eller wrote:
- Helmut Eller [2010-09-20 07:53] writes:
- Tamas K Papp [2010-09-16 10:47] writes:
Ideally, it would be very handy to have a way to just save the result in the kill ring, then I could yank it later.
Kill-ring sounds good. Any good ideas what key/prefix to use for this?
Maybe we could continue to use C-u C-x C-e and simply set the mark before inserting the result. After the result is inserted, C-w would put it the kill-ring.
I know that this breaks compatibility with earlier versions, but I would prefer if C-u C-x C-e put the result in the kill ring by default, then those who need it at that immediate point could just yank it, others could do that later.
The rationale for this is as follows. Suppose (some-complicated-function) evaluates to RESULT. It happens very rarely that one needs
(some-complicated-function)RESULT
My typical use cases would be
1. writing
(some-complicated-function) ; => RESULT
which, under the new definition, could be achieved with
C-u C-x C-e M-; space=> C-y
or
2. putting RESULT in the docstring, which for which I would use C-u C-x C-e, move the cursor, and yank.
Currently, both of these are a bit more cumbersome than necessary.
Tamas
* Tamas K Papp [2010-09-20 09:45] writes:
I know that this breaks compatibility with earlier versions, but I would prefer if C-u C-x C-e put the result in the kill ring by default, then those who need it at that immediate point could just yank it, others could do that later.
I put it on M-- C-x C-e and left C-u C-x C-e as it is to preserve backward compatibility and compatibility with Emacs's own eval-last-sexp.
Helmut
On Fri, 01 Oct 2010 11:34:46 +0200, Helmut Eller wrote:
- Tamas K Papp [2010-09-20 09:45] writes:
I know that this breaks compatibility with earlier versions, but I would prefer if C-u C-x C-e put the result in the kill ring by default, then those who need it at that immediate point could just yank it, others could do that later.
I put it on M-- C-x C-e and left C-u C-x C-e as it is to preserve backward compatibility and compatibility with Emacs's own eval-last-sexp.
Thank you, it works very nicely.
Tamas