emacs-orgmode
[Top][All Lists]
Advanced

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

Re: ob-sql.el: org-babel-process-file-name for MSSQL


From: Bastien
Subject: Re: ob-sql.el: org-babel-process-file-name for MSSQL
Date: Fri, 04 Sep 2020 16:38:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hi Johan,

thanks for reporting this.

Johan W. Klüwer <johan.w.kluwer@gmail.com> writes:

> I'm not sure of the best way to submit this. The following change to
> ob-sql.el works for me, but maybe it wouldn't in other setups with Sql
> Server.
>
>    (`mssql (format "sqlcmd %s -s \"\t\" %s -i \"%s\" -o \"%s\""
>    (or cmdline "")
>    (org-babel-sql-dbstring-mssql
>     dbhost dbuser dbpassword database)
>    (org-babel-sql-convert-standard-filename
>              (replace-regexp-in-string "/" (regexp-quote "\\")
>                                        (replace-regexp-in-string "c\\\\" "c"
>                                (org-babel-process-file-name in-file))))
>    (org-babel-sql-convert-standard-filename
>              (replace-regexp-in-string "/" (regexp-quote "\\")
>                                        (replace-regexp-in-string "c\\\\" "c"
>     (org-babel-process-file-name out-file))))))

You would need to update org-babel-sql-convert-standard-filename so
that it handles temporary paths (anti-)slashes correctly.

>From within Emacs and a cloned org-mode.git repository, go to the
ob-sql.el file, make the change, hit `C-x v =', save the diff and
attach it to a plain-text email sent to the list.

Looking forward, thanks,

-- 
 Bastien



reply via email to

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