* babel: setting :cmdline header arg for sql blocks
@ 2013-01-30 23:25 Gary Oberbrunner
2013-02-03 22:47 ` Eric Schulte
0 siblings, 1 reply; 2+ messages in thread
From: Gary Oberbrunner @ 2013-01-30 23:25 UTC (permalink / raw)
To: Orgmode Mailing List
[-- Attachment #1: Type: text/plain, Size: 987 bytes --]
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)
--
Gary
[-- Attachment #2: Type: text/html, Size: 1268 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: babel: setting :cmdline header arg for sql blocks
2013-01-30 23:25 babel: setting :cmdline header arg for sql blocks Gary Oberbrunner
@ 2013-02-03 22:47 ` Eric Schulte
0 siblings, 0 replies; 2+ messages in thread
From: Eric Schulte @ 2013-02-03 22:47 UTC (permalink / raw)
To: Gary Oberbrunner; +Cc: Orgmode Mailing List
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-02-03 22:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-30 23:25 babel: setting :cmdline header arg for sql blocks Gary Oberbrunner
2013-02-03 22:47 ` Eric Schulte
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).