From: Eric Schulte <schulte.eric@gmail.com>
To: Gary Oberbrunner <garyo@oberbrunner.com>
Cc: Orgmode Mailing List <emacs-orgmode@gnu.org>
Subject: Re: babel: setting :cmdline header arg for sql blocks
Date: Sun, 03 Feb 2013 15:47:18 -0700 [thread overview]
Message-ID: <87zjzlf1pm.fsf@gmail.com> (raw)
In-Reply-To: CAFChFyi_G1qowWfEC4F-QzNcp7UYtWEAqPx4m-V0vapi87dGYg@mail.gmail.com
Gary Oberbrunner <garyo@oberbrunner.com> writes:
> To run mysql code in org-mode (which by the way is pretty incredible that
> this works at all, and so beautifully, especially since I'm on Windows), I
> have to have a long header:
>
> #+BEGIN_SRC sql :exports both :results value :engine mysql :cmdline -h
> XXX.YYY.XXX.YYY -u user -ppassword -D database
>
> I'd like to put all those flags in one place so I only need to say
> #+BEGIN_SRC sql (and maybe the exports/results). If I put them in
> PROPERTY tags at the end of the buffer:
>
> #+PROPERTY: exports both
> #+PROPERTY: results value
> #+PROPERTY: engine mysql
> #+PROPERTY: cmdline -h XXX.YYY.XXX.YYY -u user -ppassword -D database
>
> then exporting no longer works, I presume because the exporter doesn't like
> :cmdline or :exports or :results or something else about me setting these
> globally.
>
> Is there a way to set them for sql blocks only? Or some kind of macro I
> can use to tidy up my sql blocks?
>
> (I'm running recent git org-mode from a couple of weeks ago, Emacs
> 24.3.50.1, Windows)
You could customize the `org-babel-default-header-args:sql' variable.
Cheers,
--
Eric Schulte
http://cs.unm.edu/~eschulte
prev parent reply other threads:[~2013-02-03 22:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-30 23:25 babel: setting :cmdline header arg for sql blocks Gary Oberbrunner
2013-02-03 22:47 ` Eric Schulte [this message]
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=87zjzlf1pm.fsf@gmail.com \
--to=schulte.eric@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=garyo@oberbrunner.com \
/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).