From: Lawrence Bottorff <galaxybeinglambda@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Creating live elisp link
Date: Tue, 19 Mar 2013 21:44:38 -0500 [thread overview]
Message-ID: <CAOPJoVrci1dmJtq6-msY7wk3e-hwGw4x0qVhurVNGsAcK4jm1g@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 907 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 1284 bytes --]
next reply other threads:[~2013-03-20 2:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-20 2:44 Lawrence Bottorff [this message]
2013-03-20 3:15 ` Creating live elisp link Samuel Wales
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAOPJoVrci1dmJtq6-msY7wk3e-hwGw4x0qVhurVNGsAcK4jm1g@mail.gmail.com \
--to=galaxybeinglambda@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).