#+Title: Example demonstrating repetition of a block of text * Top When exported, say as ASCII, I'd like this: #+call: w/replacement(replacement="foo") :results list #+call: w/replacement(replacement="bar") :results list #+call: w/replacement(replacement="baz") :results list * COMMENT Support #+name: lines 1. this is the first line 2. this is the second line with %VARIANT% as the value 3. this is the third line #+name: w/replacement #+begin_src emacs-lisp :var lines=lines :var replacement="rep" :results list (mapcar (lambda (line) (replace-regexp-in-string (regexp-quote "%VARIANT%") replacement line 'fixedcase)) lines) #+end_src #+RESULTS: w/replacement - this is the first line - this is the second line with rep as the value - this is the third line