emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Indentation messed up after example block


From: Brett Viren
Subject: Re: [O] Indentation messed up after example block
Date: Mon, 07 Jul 2014 12:09:18 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Hi,

Alexander Baier <address@hidden> writes:

> On 2014-07-06 20:03 York Zhao wrote:
...
>> #+BEGIN_EXAMPLE
>> * Example at level one
>> #+END_EXAMPLE
>>
>> Indentation is wrong.
>
> The asterisk followed by a space followed by text in your example block
> is recognized by org as a headline. So org thinks everything under that
> headline is the body of the headline.

I hit this very problem recently and first assumed it must be a bug.
But, since it's documented[1] I guess it's a "feature".  Although one I
don't immediately see a use for.

I hit this when capturing some logging info which happened to have a
line starting with a triple-*.  Trying to manually find such offending
lines in a large EXAMPLE block is too tedious to contemplate.  A better
way, which is implied by that footnote, is to use Org Src buffers when
entering the content of EXAMPLE blocks in the first place.  I do like:

  <e TAB C-c' <PASTE> C-c'

Where <PASTE> is me pasting or typing whatever is the content of the
EXAMPLE block.

This will not only indent the entire block with a couple of spaces but
will "escape" the problematic headline asterisk with the "special
syntax" comma.

-Brett.

[1] http://orgmode.org/manual/Literal-examples.html#fnd-4

Attachment: pgp9INlCFRtv6.pgp
Description: PGP signature


reply via email to

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