From: Bastien <bzg@gnu.org>
To: "Johan W. Klüwer" <johan.w.kluwer@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: ob-sql.el: org-babel-process-file-name for MSSQL
Date: Fri, 04 Sep 2020 16:38:08 +0200 [thread overview]
Message-ID: <87a6y5li9b.fsf@gnu.org> (raw)
In-Reply-To: <CAC5XeFETBnJ_vYDzGuhsnoO3PS4nv6F7njZqcZUSeY84aNwaiw@mail.gmail.com> ("Johan W. Klüwer"'s message of "Tue, 10 Mar 2020 21:18:56 +0100")
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
prev parent reply other threads:[~2020-09-04 14:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-10 20:18 ob-sql.el: org-babel-process-file-name for MSSQL Johan W. Klüwer
2020-09-04 14:38 ` Bastien [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a6y5li9b.fsf@gnu.org \
--to=bzg@gnu.org \
--cc=emacs-orgmode@gnu.org \
--cc=johan.w.kluwer@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).