[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [Orgmode] Babel sql code block issue and patch proposal
From: |
Eric Schulte |
Subject: |
Re: [O] [Orgmode] Babel sql code block issue and patch proposal |
Date: |
Thu, 03 Mar 2011 06:11:12 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
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-file)
(org-babel-process-file-name out-file)))
- ('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ément <address@hidden> writes:
> Hi everyone,
>
> The =org-babel-temp-file= string seems to be escaped with backslashes on
> some platforms (like MacOSX), which is not very appreciated by the =mysql
> -e= command. I suggest the following patch for =ob-sql.el= (Org-mode 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
>
> --
>
>
>
> Alain Clément
> Dr ès sc. mathématiques
>
> Université de Lausanne
> Quartier UNIL-Centre
> Bâtiment Unicentre
> Bureau 339
> CH-1015 Lausanne
>
> T. +41 21 692 20 36 (direct)
> T. +41 21 692 20 60 (secrétariat)
>
> address@hidden