From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gary Oberbrunner Subject: babel: setting :cmdline header arg for sql blocks Date: Wed, 30 Jan 2013 18:25:39 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d044796fd03633904d489d49a Return-path: Received: from eggs.gnu.org ([208.118.235.92]:36770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0h2E-0007cW-Fh for emacs-orgmode@gnu.org; Wed, 30 Jan 2013 18:25:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0h2D-00029t-CN for emacs-orgmode@gnu.org; Wed, 30 Jan 2013 18:25:42 -0500 Received: from mail-ob0-f172.google.com ([209.85.214.172]:58513) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0h2D-00029k-7A for emacs-orgmode@gnu.org; Wed, 30 Jan 2013 18:25:41 -0500 Received: by mail-ob0-f172.google.com with SMTP id tb18so2270671obb.3 for ; Wed, 30 Jan 2013 15:25:39 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Orgmode Mailing List --f46d044796fd03633904d489d49a Content-Type: text/plain; charset=ISO-8859-1 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 --f46d044796fd03633904d489d49a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
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&#= 39;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 o= nly need to say #+BEGIN_SRC sql (and maybe the exports/results). =A0 If I p= ut 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 l= onger works, I presume because the exporter doesn't like :cmdline or :e= xports or :results or something else about me setting these globally.

Is there a way to set them for sql blocks only? = =A0Or some kind of macro I can use to tidy up my sql blocks?

(I'm running recent git org-mode from a couple o= f weeks ago, Emacs 24.3.50.1, Windows)


--
Gary --f46d044796fd03633904d489d49a--