emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sacha Chua <sacha@sachachua.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] ob-sql: Don't print out the command
Date: Thu, 24 Dec 2015 12:41:25 -0500	[thread overview]
Message-ID: <87wps3eoca.fsf@sachachua.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 449 bytes --]

Out of curiosity, is there a particular reason why ob-sql messages the
whole command, aside from debugging/development purposes? funnykitty on
#emacs said that executing a long command set was rather slow because of
the message. I've attached a tiny patch to remove the (message ...) in
case it's left over from debugging, and I've suggested that funnykitty
either use cl-flet to override message or redefine org-babel-execute:sql
in the meantime.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-ob-sql-Don-t-print-out-the-command.patch --]
[-- Type: text/x-diff, Size: 730 bytes --]

From 04da1fb280847613290e11ce494ba58f17e951ac Mon Sep 17 00:00:00 2001
From: Sacha Chua <sacha@sachachua.com>
Date: Thu, 24 Dec 2015 12:36:40 -0500
Subject: [PATCH] ob-sql: Don't print out the command

* lisp/ob-sql.el (org-babel-execute:sql): Don't print out the command
  in the echo area, since it could be very long.
---
 lisp/ob-sql.el | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el
index 275370e..14d5c61 100644
--- a/lisp/ob-sql.el
+++ b/lisp/ob-sql.el
@@ -175,7 +175,6 @@ SET COLSEP '|'
 ")
 	 (_ ""))
        (org-babel-expand-body:sql body params)))
-    (message command)
     (org-babel-eval command "")
     (org-babel-result-cond result-params
       (with-temp-buffer
-- 
2.6.3


[-- Attachment #3: Type: text/plain, Size: 7 bytes --]


Sacha

             reply	other threads:[~2015-12-24 17:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-24 17:41 Sacha Chua [this message]
2015-12-26 13:30 ` [PATCH] ob-sql: Don't print out the command Nicolas Goaziou

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=87wps3eoca.fsf@sachachua.com \
    --to=sacha@sachachua.com \
    --cc=emacs-orgmode@gnu.org \
    /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).