From: asenal <asenalhere@gmail.com>
To: emacs-orgmode@gnu.org
Subject: how to quote "#+end_src" string in a Babel block?
Date: Wed, 24 Jul 2013 13:39:13 +0800 [thread overview]
Message-ID: <65A347E6-F361-4410-93B6-CEA910195E7E@gmail.com> (raw)
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.
next reply other threads:[~2013-07-24 5:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-24 5:39 asenal [this message]
2013-07-24 6:11 ` how to quote "#+end_src" string in a Babel block? Thorsten Jolitz
2013-07-24 7:24 ` Nicolas Goaziou
2013-07-24 22:32 ` Eric Schulte
2013-08-15 11:38 ` asenal
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=65A347E6-F361-4410-93B6-CEA910195E7E@gmail.com \
--to=asenalhere@gmail.com \
--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).