That is a great option when you want to run *without* a session. That is also a nice approach when you are using plantuml and do not want to use a single external file and include it all over the place.
On Thu, Oct 9, 2014 at 12:23 AM, Jarmo Hurri <jarmo.hu...@iki.fi> wrote: > t...@tsdye.com (Thomas S. Dye) writes: > >>> Jarmo Hurri <jarmo.hu...@iki.fi> writes: >>>> I have a language-specific function - in this case Asymptote, but it >>>> could be e.g. C as well - that I want to use in a number of different >>>> source blocks of the same language in an Org file. How do I accomplish >>>> this? >> Or, perhaps use the noweb syntax. >> >> >> #+NAME: foo >> #+BEGIN_SRC emacs-lisp >> (defun foo (x) (+ x 2)) >> #+END_SRC >> >> #+results: foo >> : foo >> #+begin_src emacs-lisp :noweb yes >> <<foo>> >> (foo 3) >> #+end_src >> >> #+results: >> : 5 > > Yes, this is a perfect solution. You can use noweb to include any code > block, not only function definitions. Thanks! > > Jarmo > > -- Grant Rettke g...@wisdomandwonder.com | http://www.wisdomandwonder.com/ “Wisdom begins in wonder.” --Socrates ((λ (x) (x x)) (λ (x) (x x))) “Life has become immeasurably better since I have been forced to stop taking it seriously.” --Thompson