emacs-orgmode
[Top][All Lists]
Advanced

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

[O] [Babel] Bug reading example blocks?


From: Thomas S. Dye
Subject: [O] [Babel] Bug reading example blocks?
Date: Fri, 22 Nov 2013 07:37:40 -1000

Aloha all,

Responding to a query by Gary Oberbrunner, I tried to point out the use
of example blocks to name arbitrary pieces of text. What I found is that
the example block isn't passed whole to a babel source block--whitespace
is removed from the first line.

* Whitespace on first line of example block removed

#+name: example
#+begin_example
 1. this is the first line
 2. this is the second line with %VARIANT% as the value
 3. this is the third line
#+end_example

#+name: repeated-text
#+header: :var x="" 
#+header: :var eg=""
#+begin_src emacs-lisp
  (let ((result))
    (setf result (replace-regexp-in-string "%VARIANT%" x eg t))
    result)
#+end_src

#+call: repeated-text(x="foo",eg=example) :results raw

#+results:
1. this is the first line
 2. this is the second line with foo as the value
 3. this is the third line

This happens, AFAICT, regardless of the value of
org-src-preserve-indentation. 

Is there a reason for this? Or, is it a bug? Or, am I going about this
task in the wrong way?

All the best,
Tom
-- 
Thomas S. Dye
http://www.tsdye.com



reply via email to

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