[slime-devel] copying result from minibuffer

Madhu enometh at meer.net
Sun May 3 06:57:03 UTC 2009


* Tamas K Papp <gti5eg$iv$1 at ger.gmane.org> :
Wrote on Sat, 2 May 2009 19:03:44 +0000 (UTC):

|>> When I evaluate something, eg with C-x C-e, the result appears in the
|>> minibuffer.  Is there a way I can copy it from there?  It would be nice
|>> to paste it into e-mails etc, but when I press a key it disappears.
|
| Is there a way to put the output either in the killring or a register?

Do you want to grab the output or do you want to grab the result? You
could tweak the following:

(define-key slime-mode-map "\C-x\C-e"
  (lambda ()
    "Evaluate the expression preceding point. Copies result to kill ring."
    (interactive)
    (destructuring-bind (output results)
	(slime-eval `(swank:eval-and-grab-output ,(slime-last-expression)))
      (message "--> %S\n==> %S" output results)
      (kill-new results)
      results)))
--
Madhu






More information about the slime-devel mailing list