From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xi Shen Subject: Where should I add a new utility function? Date: Wed, 08 Jun 2016 07:41:43 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113d5940648be70534bf7019 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:32869) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAY7d-0007t2-V7 for Emacs-orgmode@gnu.org; Wed, 08 Jun 2016 03:41:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAY7d-0002fk-4r for Emacs-orgmode@gnu.org; Wed, 08 Jun 2016 03:41:53 -0400 Received: from mail-oi0-x233.google.com ([2607:f8b0:4003:c06::233]:33012) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAY7d-0002fc-0O for Emacs-orgmode@gnu.org; Wed, 08 Jun 2016 03:41:53 -0400 Received: by mail-oi0-x233.google.com with SMTP id k23so260328oih.0 for ; Wed, 08 Jun 2016 00:41:52 -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" --001a113d5940648be70534bf7019 Content-Type: text/plain; charset=UTF-8 Hi, I would like to add a utility function which will be used by the org-babel-execute:sql function. The function would look like this: +(defun platform-convert-file-name (file) + (if (fboundp 'cygwin-convert-file-name-to-windows) + (format "\"%s\"" (cygwin-convert-file-name-to-windows file)) + (t file))) + As its name suggests, this function if very platform specific. Should I put this definition in the ob-sql.el file, the ob-core.el file or somewhere else? Thanks, David -- Thanks, David S. --001a113d5940648be70534bf7019 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

I would like to add a utility = function which will be used by the org-babel-execute:sql function. The func= tion would look like this:

+(defun platform-conver= t-file-name (file)
+ =C2=A0(if (fboundp 'cygwin-convert-file-= name-to-windows)
+ =C2=A0 =C2=A0 =C2=A0(format "\"%s\&q= uot;" (cygwin-convert-file-name-to-windows file))
+ =C2=A0 = =C2=A0(t file)))
+

As its name suggests,= this function if very platform specific.=C2=A0Should I put this definition in the ob-sql.el file, the ob-core.el file= or somewhere else?
=

Thanks,
David

<= /span>
--

Thanks,
David S.

--001a113d5940648be70534bf7019--