emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: tsd@tsdye.com (Thomas S. Dye)
To: Samuel Wales <samologist@gmail.com>
Cc: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: [Babel] Bug reading example blocks?
Date: Sun, 23 Feb 2014 14:37:37 -1000	[thread overview]
Message-ID: <m2wqgle46m.fsf@tsdye.com> (raw)
In-Reply-To: <CAJcAo8sJOHw1Zn6hyuDaP+Vro0HgnseaP1YODuL-m82zGwgCHw@mail.gmail.com> (Samuel Wales's message of "Thu, 13 Feb 2014 17:20:34 -0700")

Hi Samuel,

I think not.  I get these results now:

#+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

All the best,
Tom

Samuel Wales <samologist@gmail.com> writes:

> hi thomas,
>
> is this still a bug?
>
> samuel
>
>
> On 11/22/13, Thomas S. Dye <tsd@tsdye.com> 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
v>> #+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
>>
>>

-- 
Thomas S. Dye
http://www.tsdye.com

  reply	other threads:[~2014-02-24  0:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-22 17:37 [Babel] Bug reading example blocks? Thomas S. Dye
2014-02-14  0:20 ` Samuel Wales
2014-02-24  0:37   ` Thomas S. Dye [this message]
2014-02-24  1:31     ` Samuel Wales

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2wqgle46m.fsf@tsdye.com \
    --to=tsd@tsdye.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=samologist@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).