From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Babel sql code block issue and patch proposal Date: Thu, 03 Mar 2011 06:11:12 -0700 Message-ID: <87sjv4pcwf.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=49143 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pv8JR-00045W-3M for emacs-orgmode@gnu.org; Thu, 03 Mar 2011 08:11:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pv8JM-0004ns-Ef for emacs-orgmode@gnu.org; Thu, 03 Mar 2011 08:11:24 -0500 Received: from mail-yx0-f169.google.com ([209.85.213.169]:35862) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pv8JM-0004nf-CG for emacs-orgmode@gnu.org; Thu, 03 Mar 2011 08:11:20 -0500 Received: by yxt33 with SMTP id 33so454699yxt.0 for ; Thu, 03 Mar 2011 05:11:19 -0800 (PST) In-Reply-To: ("Alain =?utf-8?Q?Cl=C3=A9ment=22's?= message of "Thu, 3 Mar 2011 12:23:47 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Alain =?utf-8?Q?Cl=C3=A9ment?= Cc: emacs-orgmode@gnu.org Hi Alain, Does the following alternative fix work for you? #+begin_src diff Changes in HEAD Modified lisp/ob-sql.el diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el index 364070e..604d444 100644 --- a/lisp/ob-sql.el +++ b/lisp/ob-sql.el @@ -71,7 +71,7 @@ This function is called by `org-babel-execute-src-block= '." (or cmdline "") (org-babel-process-file-name in-fil= e) (org-babel-process-file-name out-fi= le))) - ('mysql (format "mysql %s -e \"source %s\" > %s" + ('mysql (format "mysql %s -e 'source %s' > %s" (or cmdline "") (org-babel-process-file-name in-file) (org-babel-process-file-name out-file= ))) #+end_src Also, just out of curiosity would you mind sharing an example result of `org-babel-temporary-directory' which contains backslashes? Thanks -- Eric Alain Cl=C3=A9ment writes: > Hi everyone, > > The =3Dorg-babel-temp-file=3D string seems to be escaped with backslashes= on > some platforms (like MacOSX), which is not very appreciated by the =3Dmys= ql > -e=3D command. I suggest the following patch for =3Dob-sql.el=3D (Org-mod= e Version > 7.4 (release_7.4.590.g85d4d)): > > 74c74 > < ('mysql (format "mysql %s < %s > %s" > --- >> ('mysql (format "mysql %s -e \"source %s\" > %s" > > Best regards, > -- Alain > > --=20 > > > > Alain Cl=C3=A9ment > Dr =C3=A8s sc. math=C3=A9matiques > > Universit=C3=A9 de Lausanne > Quartier UNIL-Centre > B=C3=A2timent Unicentre > Bureau 339 > CH-1015 Lausanne > > T. +41 21 692 20 36 (direct) > T. +41 21 692 20 60 (secr=C3=A9tariat) > > alain.clement@unil.ch -- Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode