From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: [Babel] Bug reading example blocks? Date: Fri, 22 Nov 2013 07:37:40 -1000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjugL-0007jI-0J for emacs-orgmode@gnu.org; Fri, 22 Nov 2013 12:38:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VjugD-0008Bf-M6 for emacs-orgmode@gnu.org; Fri, 22 Nov 2013 12:38:16 -0500 Received: from alt-proxy26.mail.unifiedlayer.com ([69.89.18.2]:42302) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1VjugD-0008B4-Dl for emacs-orgmode@gnu.org; Fri, 22 Nov 2013 12:38:09 -0500 Received: from [98.155.255.145] (port=55079 helo=poto.myhome.westell.com) by box472.bluehost.com with esmtpsa (TLSv1:CAMELLIA128-SHA:128) (Exim 4.80) (envelope-from ) id 1Vjufk-0005OC-Ot for emacs-orgmode@gnu.org; Fri, 22 Nov 2013 10:37:40 -0700 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org-mode 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