emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Charles C. Berry" <ccberry@ucsd.edu>
To: "Cook, Malcolm" <MEC@stowers.org>
Cc: "'emacs-orgmode@gnu.org'" <emacs-orgmode@gnu.org>
Subject: Re: seeking good practices for writing about org using org
Date: Wed, 3 Aug 2016 19:15:52 -0700	[thread overview]
Message-ID: <alpine.OSX.2.20.1608031903450.989@charles-berrys-macbook.local> (raw)
In-Reply-To: <e133f5cb010f4fe190168b3aa1a1abe2@exchsrv2.sgc.loc>

On Wed, 3 Aug 2016, Cook, Malcolm wrote:

> Hi,
>
> I am seeking good practices for writing about org using , erhm, well, 
> org itself.  (doh!)
>
> I'd use these practices, for example, when writing examples of using 
> org, or lessons in using org, or bug reports about org.
>
> I reached of ob-org thinking this is what it was for, and wrote the 
> following
>
> --------------------------------------- (beginning of example)
> Here is simple org book structure with chapters and a table of
> contents at the end:
>
> #+BEGIN_SRC org :exports both :results value
>
> * chapter one
>
> Fa la la
>
> * chapter two
>
> La di di
>
> * table of contents
>
> #+TOC:
>
> #+END_SRC
> --------------------------------------- (end of example)
>
> My dashed expectations were that when executed and exported, this would 
> produce a block of the org source, appropriately quoted, followed be the 
> RESULTS, being, well, the rendered org.
>
> Are your expectations the same as mine?
>

No. Run `M-x org-lint RET' and you will see that this is malformed. The 
org code needs to be escaped.

> What do YOU do in such cases?

Edit the src block in an edit buffer. You'll need to kill the contents of 
that src block first, then C-c ' to open the src edit buffer, then yank, then C-c ' 
again. The resulting buffer will be properly escaped.

See (info "(org) Literal examples"), especially footnote 4.

--

Then specify `:results replace' to override `:results silent' which
`org-babel-default-header-args:org' sets.

--

Then the export should be what you expect.

HTH,

Chuck

  reply	other threads:[~2016-08-04  2:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-03 23:50 seeking good practices for writing about org using org Cook, Malcolm
2016-08-04  2:15 ` Charles C. Berry [this message]
2016-08-04  2:47   ` Cook, Malcolm
2016-08-04 16:24     ` Charles C. Berry
2016-08-04 20:56       ` Cook, Malcolm
2016-08-05  3:05         ` Charles C. Berry
2016-08-04  2:54   ` Cook, Malcolm

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  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=alpine.OSX.2.20.1608031903450.989@charles-berrys-macbook.local \
    --to=ccberry@ucsd.edu \
    --cc=MEC@stowers.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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