emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] babel: setting :cmdline header arg for sql blocks


From: Eric Schulte
Subject: Re: [O] babel: setting :cmdline header arg for sql blocks
Date: Sun, 03 Feb 2013 15:47:18 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Gary Oberbrunner <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]