emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* hyperlinks executing multiline code snippets?
@ 2010-12-10 15:20 LanX
  2010-12-10 15:52 ` LanX
  0 siblings, 1 reply; 8+ messages in thread
From: LanX @ 2010-12-10 15:20 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 894 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 1374 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-12-11  2:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-10 15:20 hyperlinks executing multiline code snippets? LanX
2010-12-10 15:52 ` LanX
2010-12-10 16:14   ` LanX
2010-12-10 17:05     ` Eric Schulte
2010-12-10 18:03       ` LanX
2010-12-10 18:08         ` LanX
2010-12-10 22:14           ` LanX
2010-12-11  2:23             ` LanX

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).