From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id cC79LGhRUl+SAQAA0tVLHw (envelope-from ) for ; Fri, 04 Sep 2020 14:38:32 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id KFTnKGhRUl8/AwAAbx9fmQ (envelope-from ) for ; Fri, 04 Sep 2020 14:38:32 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 15183940654 for ; Fri, 4 Sep 2020 14:38:31 +0000 (UTC) Received: from localhost ([::1]:56926 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kECrG-0002Al-Dd for larch@yhetil.org; Fri, 04 Sep 2020 10:38:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36312) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kECqw-0002AH-B5 for emacs-orgmode@gnu.org; Fri, 04 Sep 2020 10:38:10 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43737) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kECqw-0004lk-2f; Fri, 04 Sep 2020 10:38:10 -0400 Received: from [2a01:e35:2fe1:f780:8527:1161:6222:31b3] (port=48668 helo=guerry) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1kECqv-00037R-Hr; Fri, 04 Sep 2020 10:38:09 -0400 Received: by guerry (Postfix, from userid 1000) id 0F5F31A60D43; Fri, 4 Sep 2020 16:38:08 +0200 (CEST) From: Bastien To: Johan W. =?utf-8?Q?Kl=C3=BCwer?= Subject: Re: ob-sql.el: org-babel-process-file-name for MSSQL Organization: GNU References: Date: Fri, 04 Sep 2020 16:38:08 +0200 In-Reply-To: ("Johan W. =?utf-8?Q?Kl=C3=BCwer=22's?= message of "Tue, 10 Mar 2020 21:18:56 +0100") Message-ID: <87a6y5li9b.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: uCabBikYQDiK Hi Johan, thanks for reporting this. Johan W. Kl=C3=BCwer 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 =3D', save the diff and attach it to a plain-text email sent to the list. Looking forward, thanks, --=20 Bastien