[Top][All Lists]

[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 17:14:26 +0100


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;


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

Thanks for any help

-- rolf

PS hope this will not produce a duplicate post, "gmail" != "googlemail" confusion

reply via email to

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