emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] hyperlinks executing multiline code snippets?


From: LanX
Subject: [Orgmode] hyperlinks executing multiline code snippets?
Date: Fri, 10 Dec 2010 16:52:52 +0100

(hope this will not produce a duplicate post)

Hi

Don't know if this is trivially answered...

I'm thinking about using org-mode for a collection of code-snippets which are executed by a click on a link

My first idea was to use orgs hyperlink syntax but there I have two problems
1. something like [[shell:code][NAME]] can't be multiline
2. forĀ  perlĀ  code I'll need to escape certain characters when using [[shell:...] or [[elisp:...]

my second idea was org-babel, but AFAI see
1. it seems to execute code-snippets only when exporting
2. the code can't be hidden behind a NAME in a link text

Is there a way to combine both ways?

A hyperlink which executes a codesnippet (which is per default folded away)?

something like?
* [[exec:following snippet][name]
#+begin_src perl
for $i (1..9){
print $i;
}
#+end_src

or


* Title
#+begin_src perl :hyperlink name
for $i (1..9){
print $i;
}
#+end_src


Thanks for any help

-- rolf


reply via email to

[Prev in Thread] Current Thread [Next in Thread]