From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: how to escape org markup? Date: Thu, 16 Jun 2011 22:47:04 -0400 Message-ID: <18179.1308278824@alphaville.dokosmarshall.org> References: <12526.1308244252@alphaville.dokosmarshall.org> Reply-To: nicholas.dokos@hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:59031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXP5v-0000Ul-AK for emacs-orgmode@gnu.org; Thu, 16 Jun 2011 22:47:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QXP5t-0006MX-T9 for emacs-orgmode@gnu.org; Thu, 16 Jun 2011 22:47:39 -0400 Received: from vms173001pub.verizon.net ([206.46.173.1]:47628) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXP5t-0006MK-Nd for emacs-orgmode@gnu.org; Thu, 16 Jun 2011 22:47:37 -0400 Received: from alphaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173001.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LMW005VQYEGCSD0@vms173001.mailsrvcs.net> for emacs-orgmode@gnu.org; Thu, 16 Jun 2011 21:47:17 -0500 (CDT) In-reply-to: Message from Steven Haryanto of "Fri\, 17 Jun 2011 08\:59\:41 +0700." 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: Steven Haryanto Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org Steven Haryanto wrote: > On Fri, Jun 17, 2011 at 12:10 AM, Nick Dokos wrot= e: >=20 > Steven Haryanto wrote: >=20=20=20=20 > > I need to insert bits of plain text into a final composite Org docu= ment. The text should be > > protected from any Org formatting (for example, "* " at the beginni= ng of a line should not be > > interpreted as a headline). Is enclosing it with #+BEGIN_SRC/#+END_= SRC or=C2=A0#+BEGIN_EXAMPLE/# > > +END_EXAMPLE the correct way? I'm thinking yes, but my Emacs still = interprets the "* " as > headline > > though. > > >=20=20=20=20 > This seems to work - I can export to html or latex and get the expect= ed result: >=20=20=20=20 > --8<---------------cut here---------------start------------->8--- >=20=20=20=20 > * foo > org example >=20=20=20=20 > #+begin_example > ,* bar > <2011-06-16 Thu> >=20=20=20=20 > This is example code. >=20=20=20=20 > #+end_example > --8<---------------cut here---------------end--------------->8--- >=20=20=20=20 > But I don't know all the rules and moreover I don't know of any place= where > they are described. I'll look around and post an update when I find i= t. > But feel free to beat me to it. >=20=20=20=20 > Nick >=20 > Btw, I still need to escape "#+END_SRC" if they occur at the start of lin= e in text, for example by > prepending it with a space (akin to prepending a space to "From " in mbox= format). >=20 Try the round-trip suggested in sec. 11.3, "Literal examples", of the manual: C-c ' on the block, then C-c ' to go back. Here is the example that I used in a recent bug report[fn:1] after round-tripping it: --8<---------------cut here---------------start------------->8--- * foo #+begin_example ,#+TITLE: foo ,* One =20=20 One =20=20 ,* Two =20=20 Euler says: =20=20 ,#+begin_latex \[ \int_0^\infty e^{-x^2} dx =3D {{\sqrt{\pi}} \over {2}} \] ,#+end_latex #+end_example --8<---------------cut here---------------end--------------->8--- It indented and added commas in front.[fn:2] Nick Footnotes: [fn:1] http://thread.gmane.org/gmane.emacs.orgmode/42546 [fn:2] Unfortunately, it does not fix things: the bug is still biting me. Actually, it's two bugs: one is a generic one, the other is specific to latex export.