[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Creating live elisp link
From: |
Lawrence Bottorff |
Subject: |
[O] Creating live elisp link |
Date: |
Tue, 19 Mar 2013 21:44:38 -0500 |
I'm trying to create a link that takes an elisp _expression_ and evaluates it in another buffer. Here's what I've come up with
1. C-c C-l
2. choose elisp:
3. In the mini buffer:
Link: elisp:(with-output-to-temp-buffer "scratch" (print 20))
Description: Print 20
Okay, this calls up the scratch buffer and prints out 20. But how would I call up scratch and, say, change its mode to lisp with (lisp-interaction-mode)? I can try:
Link: elisp:(with-output-to-temp-buffer "scratch" (eval '(lisp-interaction-mode)))
but this only seems to change my active org file's org-mode to lisp-interaction-mode. Not a pretty sight. My Messages says:
Execute "(with-output-to-temp-buffer "scratch" (eval '(lisp-interaction-mode)))" as elisp? y
(with-output-to-temp-buffer "scratch" (eval '(lisp-interaction-mode))) => nil
But of course
[[elisp:(zone)][zone]]
is kinda exciting...
What am I doing wrong?
LB
- [O] Creating live elisp link,
Lawrence Bottorff <=