* how to escape org markup? @ 2011-06-16 15:36 Steven Haryanto 2011-06-16 17:10 ` Nick Dokos 0 siblings, 1 reply; 5+ messages in thread From: Steven Haryanto @ 2011-06-16 15:36 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 400 bytes --] Hi all, I need to insert bits of plain text into a final composite Org document. The text should be protected from any Org formatting (for example, "* " at the beginning of a line should not be interpreted as a headline). Is enclosing it with #+BEGIN_SRC/#+END_SRC or #+BEGIN_EXAMPLE/#+END_EXAMPLE the correct way? I'm thinking yes, but my Emacs still interprets the "* " as headline though. -- sh [-- Attachment #2: Type: text/html, Size: 486 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to escape org markup? 2011-06-16 15:36 how to escape org markup? Steven Haryanto @ 2011-06-16 17:10 ` Nick Dokos 2011-06-16 17:35 ` Nick Dokos 2011-06-17 1:59 ` Steven Haryanto 0 siblings, 2 replies; 5+ messages in thread From: Nick Dokos @ 2011-06-16 17:10 UTC (permalink / raw) To: Steven Haryanto; +Cc: nicholas.dokos, emacs-orgmode Steven Haryanto <stevenharyanto@gmail.com> wrote: > I need to insert bits of plain text into a final composite Org document. The text should be > protected from any Org formatting (for example, "* " at the beginning of a line should not be > interpreted as a headline). Is enclosing it with #+BEGIN_SRC/#+END_SRC or #+BEGIN_EXAMPLE/# > +END_EXAMPLE the correct way? I'm thinking yes, but my Emacs still interprets the "* " as headline > though. > This seems to work - I can export to html or latex and get the expected result: --8<---------------cut here---------------start------------->8--- * foo org example #+begin_example ,* bar <2011-06-16 Thu> This is example code. #+end_example --8<---------------cut here---------------end--------------->8--- 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 it. But feel free to beat me to it. Nick ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to escape org markup? 2011-06-16 17:10 ` Nick Dokos @ 2011-06-16 17:35 ` Nick Dokos 2011-06-17 1:59 ` Steven Haryanto 1 sibling, 0 replies; 5+ messages in thread From: Nick Dokos @ 2011-06-16 17:35 UTC (permalink / raw) Cc: Steven Haryanto, nicholas.dokos, emacs-orgmode Nick Dokos <nicholas.dokos@hp.com> wrote: > Steven Haryanto <stevenharyanto@gmail.com> wrote: > > > I need to insert bits of plain text into a final composite Org document. = > The text should be > > protected from any Org formatting (for example, "* " at the beginning 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 interp= > rets the "* " as headline > > though. > >=20 > > This seems to work - I can export to html or latex and get the expected res= > ult: > > > * foo > org example > > #+begin_example > ,* bar > <2011-06-16 Thu> > > This is example code. > > #+end_example > > 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 it. > But feel free to beat me to it. > Section 11.3, "Literal Examples", of the Org manual (info "(org)Literal Examples") footnote 4. Nick ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to escape org markup? 2011-06-16 17:10 ` Nick Dokos 2011-06-16 17:35 ` Nick Dokos @ 2011-06-17 1:59 ` Steven Haryanto 2011-06-17 2:47 ` Nick Dokos 1 sibling, 1 reply; 5+ messages in thread From: Steven Haryanto @ 2011-06-17 1:59 UTC (permalink / raw) To: nicholas.dokos; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 1277 bytes --] On Fri, Jun 17, 2011 at 12:10 AM, Nick Dokos <nicholas.dokos@hp.com> wrote: > Steven Haryanto <stevenharyanto@gmail.com> wrote: > > > I need to insert bits of plain text into a final composite Org document. > The text should be > > protected from any Org formatting (for example, "* " at the beginning of > a line should not be > > interpreted as a headline). Is enclosing it with #+BEGIN_SRC/#+END_SRC > or #+BEGIN_EXAMPLE/# > > +END_EXAMPLE the correct way? I'm thinking yes, but my Emacs still > interprets the "* " as headline > > though. > > > > This seems to work - I can export to html or latex and get the expected > result: > > --8<---------------cut here---------------start------------->8--- > > * foo > org example > > #+begin_example > ,* bar > <2011-06-16 Thu> > > This is example code. > > #+end_example > --8<---------------cut here---------------end--------------->8--- > > 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 it. > But feel free to beat me to it. > > Nick > Btw, I still need to escape "#+END_SRC" if they occur at the start of line in text, for example by prepending it with a space (akin to prepending a space to "From " in mbox format). -- sh [-- Attachment #2: Type: text/html, Size: 1856 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to escape org markup? 2011-06-17 1:59 ` Steven Haryanto @ 2011-06-17 2:47 ` Nick Dokos 0 siblings, 0 replies; 5+ messages in thread From: Nick Dokos @ 2011-06-17 2:47 UTC (permalink / raw) To: Steven Haryanto; +Cc: nicholas.dokos, emacs-orgmode Steven Haryanto <stevenharyanto@gmail.com> wrote: > On Fri, Jun 17, 2011 at 12:10 AM, Nick Dokos <nicholas.dokos@hp.com> wrote: > > Steven Haryanto <stevenharyanto@gmail.com> wrote: > > > I need to insert bits of plain text into a final composite Org document. The text should be > > protected from any Org formatting (for example, "* " at the beginning of a line should not be > > interpreted as a headline). Is enclosing it with #+BEGIN_SRC/#+END_SRC or #+BEGIN_EXAMPLE/# > > +END_EXAMPLE the correct way? I'm thinking yes, but my Emacs still interprets the "* " as > headline > > though. > > > > This seems to work - I can export to html or latex and get the expected result: > > --8<---------------cut here---------------start------------->8--- > > * foo > org example > > #+begin_example > ,* bar > <2011-06-16 Thu> > > This is example code. > > #+end_example > --8<---------------cut here---------------end--------------->8--- > > 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 it. > But feel free to beat me to it. > > Nick > > Btw, I still need to escape "#+END_SRC" if they occur at the start of line in text, for example by > prepending it with a space (akin to prepending a space to "From " in mbox format). > 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 One ,* Two Euler says: ,#+begin_latex \[ \int_0^\infty e^{-x^2} dx = {{\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. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-06-17 2:47 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-06-16 15:36 how to escape org markup? Steven Haryanto 2011-06-16 17:10 ` Nick Dokos 2011-06-16 17:35 ` Nick Dokos 2011-06-17 1:59 ` Steven Haryanto 2011-06-17 2:47 ` Nick Dokos
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.