emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Steven Haryanto <stevenharyanto@gmail.com>
To: nicholas.dokos@hp.com
Cc: emacs-orgmode@gnu.org
Subject: Re: A simpler way to write literal examples?
Date: Wed, 1 Jun 2011 08:53:16 +0700	[thread overview]
Message-ID: <BANLkTi=LPx9bq5bqxit49ssEXMSyW1wxEg@mail.gmail.com> (raw)
In-Reply-To: <13042.1306337108@alphaville.dokosmarshall.org>

[-- Attachment #1: Type: text/plain, Size: 1647 bytes --]

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, 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:
> >
> >  this is an example
> >  another line
> >  another line
> >
> > 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?


[-- Attachment #2: Type: text/html, Size: 2264 bytes --]

  parent reply	other threads:[~2011-06-01  3:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-25  9:43 A simpler way to write literal examples? Steven Haryanto
2011-05-25 15:25 ` Nick Dokos
2011-05-25 16:01   ` Eric Schulte
2011-06-01  1:53   ` Steven Haryanto [this message]
2011-06-01  7:29 ` Carsten Dominik

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:

  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='BANLkTi=LPx9bq5bqxit49ssEXMSyW1wxEg@mail.gmail.com' \
    --to=stevenharyanto@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=nicholas.dokos@hp.com \


* 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


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).