From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xi Shen Subject: [PATCH] ob-sql.el: Support sqlcmd and cygwin environment Date: Wed, 08 Jun 2016 10:24:44 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001a113cecce6d59600534c1b753 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46742) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAafU-0002uh-LX for Emacs-orgmode@gnu.org; Wed, 08 Jun 2016 06:25:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAafR-0001T0-IL for Emacs-orgmode@gnu.org; Wed, 08 Jun 2016 06:24:58 -0400 Received: from mail-oi0-x229.google.com ([2607:f8b0:4003:c06::229]:36274) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAafR-0001Sr-AI for Emacs-orgmode@gnu.org; Wed, 08 Jun 2016 06:24:57 -0400 Received: by mail-oi0-x229.google.com with SMTP id p204so5351774oih.3 for ; Wed, 08 Jun 2016 03:24:54 -0700 (PDT) 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" To: "Emacs-orgmode@gnu.org" --001a113cecce6d59600534c1b753 Content-Type: multipart/alternative; boundary=001a113cecce6d595b0534c1b751 --001a113cecce6d595b0534c1b751 Content-Type: text/plain; charset=UTF-8 Hi, I would like to apply this path to add sqlcmd support, and allow org-mode to execute and capture sqlcmd output in cygwin environment. I added a "platform-convert-file-name" function to convert a *nix path to Windows path. Should I put this function in ob-sql.el, or somewhere else? Thanks, David -- Thanks, David S. --001a113cecce6d595b0534c1b751 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

I would like to apply this path to = add sqlcmd support, and allow org-mode to execute and capture sqlcmd output= in cygwin environment.

I added a "platform-c= onvert-file-name" function to convert a *nix path to Windows path. Sho= uld I put this function in ob-sql.el, or somewhere else?


Thanks,
David

--

Thanks,
David S.

--001a113cecce6d595b0534c1b751-- --001a113cecce6d59600534c1b753 Content-Type: application/octet-stream; name="0001-ob-sql.el-Support-sqlcmd-and-cygwin-environment.patch" Content-Disposition: attachment; filename="0001-ob-sql.el-Support-sqlcmd-and-cygwin-environment.patch" Content-Transfer-Encoding: base64 Content-ID: <1552f8805fcf707a1ec1> X-Attachment-Id: 1552f8805fcf707a1ec1 RnJvbSA5NmRhZWI4ZDIyZTMzZTM0ODRmZWZiMjc5MTRiZDQzNGVmZDMyMTQyIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBYaSBTaGVuIDxkYXZpZHNoZW44NEBnbWFpbC5jb20+CkRhdGU6 IFdlZCwgOCBKdW4gMjAxNiAxMzo0OTo1NCArMDgwMApTdWJqZWN0OiBbUEFUQ0hdIG9iLXNxbC5l bDogU3VwcG9ydCBzcWxjbWQgYW5kIGN5Z3dpbiBlbnZpcm9ubWVudAoKKiBsaXNwL29iLXNxbC5l bCAob3JnLWJhYmVsLXNxbC1kYnN0cmluZy1tc3NxbCk6IEZvcm1hdCBNaWNyb3NvZnQKICBzcWxj bWQgY29tbWFuZCBsaW5lIGFyZ3MuCgoqIGxpc3Avb2Itc3FsLmVsIChwbGF0Zm9ybS1jb252ZXJ0 LWZpbGUtbmFtZSk6IENvbnZlcnQgYSAqbml4IHBhdGggdG8KICBXaW5kb3dzIGxvbmcgcGF0aCBp biBDeWd3aW4gZW52aXJvbm1lbnQsIG9yIGRvIG5vdGhpbmcuCgoqIGxpc3Avb2Itc3FsLmVsIChv cmctYmFiZWwtZXhlY3V0ZTpzcWwpOiBBZGQgYG1zc3FsYCBjb21tYW5kIHN1cHBvcnQuCiAgRm9y IGJvdGggYG1zb3NxbGAgYW5kIGBtc3NxbGAgdGhlIGBpbnB1dGAgYW5kIGBvdXRwdXRgIHBhdGgg d2lsbCBiZQogI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