From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: Re: [Babel] Bug reading example blocks? Date: Thu, 13 Feb 2014 17:20:34 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44409) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WE6WD-0003NK-Tk for emacs-orgmode@gnu.org; Thu, 13 Feb 2014 19:20:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WE6WC-0007aJ-2r for emacs-orgmode@gnu.org; Thu, 13 Feb 2014 19:20:37 -0500 Received: from mail-we0-x232.google.com ([2a00:1450:400c:c03::232]:34320) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WE6WB-0007aA-QL for emacs-orgmode@gnu.org; Thu, 13 Feb 2014 19:20:35 -0500 Received: by mail-we0-f178.google.com with SMTP id q59so8325928wes.9 for ; Thu, 13 Feb 2014 16:20:35 -0800 (PST) In-Reply-To: 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: "Thomas S. Dye" Cc: Org-mode hi thomas, is this still a bug? samuel On 11/22/13, Thomas S. Dye wrote: > 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 > > -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com The disease DOES progress. MANY people have died from it. ANYBODY can get it. Denmark: free Karina Hansen NOW.