From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Haryanto Subject: Re: A simpler way to write literal examples? Date: Wed, 1 Jun 2011 08:53:16 +0700 Message-ID: References: <13042.1306337108@alphaville.dokosmarshall.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=bcaec5016035c0ffe104a49cc84a Return-path: Received: from eggs.gnu.org ([140.186.70.92]:55226) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRbjV-0003CS-9b for emacs-orgmode@gnu.org; Tue, 31 May 2011 23:04:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QRbjT-0003J2-Ud for emacs-orgmode@gnu.org; Tue, 31 May 2011 23:04:33 -0400 Received: from mail-vw0-f41.google.com ([209.85.212.41]:39498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRacX-0001Ln-UY for emacs-orgmode@gnu.org; Tue, 31 May 2011 21:53:18 -0400 Received: by vws4 with SMTP id 4so4973798vws.0 for ; Tue, 31 May 2011 18:53:16 -0700 (PDT) In-Reply-To: <13042.1306337108@alphaville.dokosmarshall.org> 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: nicholas.dokos@hp.com Cc: emacs-orgmode@gnu.org --bcaec5016035c0ffe104a49cc84a Content-Type: text/plain; charset=ISO-8859-1 On Wed, May 25, 2011 at 10:25 PM, Nick Dokos wrote: > Steven Haryanto 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. The problem is visual clutter (yes, I guess Emacs can be told to hide the markup, but I'm talking about when text is displayed as-is and/or outside Emacs) and copy-pasteability (especially with the colon syntax). I know Org format is not optimized for fixed width section, but perhaps there is a way? -- sh --bcaec5016035c0ffe104a49cc84a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Wed, May 25, 2011 at 10:25 PM, Nick Dokos <nicholas.dokos@= hp.com> wrote:
Steven Haryanto <stevenharyanto@gmail.com> wrote:

> I plan to document some parts of Perl source code (more specifically, = description in subroutine
> Sub::Spec specification,=A0http://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 d= ocumenting 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:
>
> =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
>
> Is there an alternative syntax? If there isn't, would people consi= der 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, wh= y do you need
an alternative syntax? If your answer is "too much typing", check= out
section 15.2, "Easy templates", in the Org manual.

The problem is visual clutter (yes, I guess Emacs can be = told to hide the markup, but I'm talking about when text is displayed a= s-is and/or outside Emacs) and copy-pasteability (especially with the colon= syntax). I know Org format is not optimized for fixed width section, but p= erhaps there is a way?

--
sh
--bcaec5016035c0ffe104a49cc84a--