all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* how to quote "#+end_src" string in a Babel block?
@ 2013-07-24  5:39 asenal
  2013-07-24  6:11 ` Thorsten Jolitz
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: asenal @ 2013-07-24  5:39 UTC (permalink / raw
  To: emacs-orgmode

Hi Guys I'm trying to do literature programming with org mode.
My problem is How can I safely quote "#+XXX" inside a Babel-block?
I found org-mode mismatch the outter "#+begin_src"  with the first "#+end_src" inside the block hence gives me a wrong parse.

Here's an example:
#+headers: :var varlist=top_iv
#+begin_src python :return iv_template(varlist)
  def iv_template(varlist,db,table):
      for var in varlist:
          babel_template='''
	  #+name: var
          #+begin_src sqlite :db mydb
            SELECT colName,cnt,suc,fal,iv FROM mytable WHERE colName == %s';
          #+end_src   # org mode stop here!
          ''' % (var,var)

          print babel_template
#+end_src

I know it looks twisted,but what I really care is wheather org-mode holds the capability to do so.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-08-15 11:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-24  5:39 how to quote "#+end_src" string in a Babel block? asenal
2013-07-24  6:11 ` Thorsten Jolitz
2013-07-24  7:24 ` Nicolas Goaziou
2013-07-24 22:32 ` Eric Schulte
2013-08-15 11:38   ` asenal

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.