[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] A simpler way to write literal examples?
From: |
Nick Dokos |
Subject: |
Re: [O] A simpler way to write literal examples? |
Date: |
Wed, 25 May 2011 11:25:08 -0400 |
Steven Haryanto <address@hidden> wrote:
> I plan to document some parts of Perl source code (more specifically,
> description in subroutine
> Sub::Spec specification, http://search.cpan.org/dist/Sub-Spec) using Org
> format instead of the
> canonical POD, hoping to have better table support, more customizable links,
> and overall markups
> that are nicer to look at (IMO).
>
> However, one of the nice things of POD (and Wiki, Markdown, etc) for
> documenting source code is the
> relative simplicity of writing literal examples: an indented paragraph. In
> Org we either have to use
> the colon+space prefix syntax:
>
> : this is an example
> : another line
> : another line
>
> or the example block:
>
> #+BEGIN_EXAMPLE
> this is an example
> another line
> another line
> #+END_EXAMPLE
>
> Is there an alternative syntax? If there isn't, would people consider an
> alternative syntax (e.g.
> say a setting which toggles parsing an indented paragraph as a literal
> example)?
>
What is the problem with #+BEGIN_EXAMPLE/#+END_EXAMPLE? IOW, why do you need
an alternative syntax? If your answer is "too much typing", check out
section 15.2, "Easy templates", in the Org manual.
Nick