From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Haryanto Subject: A simpler way to write literal examples? Date: Wed, 25 May 2011 16:43:30 +0700 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf303b3cc185932b04a416893c Return-path: Received: from eggs.gnu.org ([140.186.70.92]:59814) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPFrU-0000Vj-Ae for emacs-orgmode@gnu.org; Wed, 25 May 2011 11:19:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QPFrT-00045T-3E for emacs-orgmode@gnu.org; Wed, 25 May 2011 11:19:04 -0400 Received: from mail-gy0-f169.google.com ([209.85.160.169]:40838) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPFrT-00043t-0Z for emacs-orgmode@gnu.org; Wed, 25 May 2011 11:19:03 -0400 Received: by gyd8 with SMTP id 8so3871079gyd.0 for ; Wed, 25 May 2011 08:18:55 -0700 (PDT) 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: emacs-orgmode@gnu.org --20cf303b3cc185932b04a416893c Content-Type: text/plain; charset=ISO-8859-1 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)? -- sh --20cf303b3cc185932b04a416893c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I plan to document some parts of Perl source code (more specifically, descr= iption in subroutine Sub::Spec specification,=A0http://search.cpan.org/dist/Sub-Spec) using Org f= ormat instead of the canonical POD, hoping to have better table support, mo= re 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 lite= ral examples: an indented paragraph. In Org we either have to use the colon= +space prefix syntax:

=A0: this is an example
=A0: another line
=A0: another line

or the example block:

=A0#+BEGIN_EXAMPLE
=A0this is an example
=A0another line
=A0another line
=A0#+END_EXAMPLE
<= div>
Is there an alternative syntax? If there isn't, woul= d people consider an alternative syntax (e.g. say a setting which toggles p= arsing an indented paragraph as a literal example)?

--
sh
--20cf303b3cc185932b04a416893c--