emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] ob-sql: Don't print out the command
@ 2015-12-24 17:41 Sacha Chua
  2015-12-26 13:30 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Sacha Chua @ 2015-12-24 17:41 UTC (permalink / raw)
  To: emacs-orgmode

[-- 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ob-sql: Don't print out the command
  2015-12-24 17:41 [PATCH] ob-sql: Don't print out the command Sacha Chua
@ 2015-12-26 13:30 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2015-12-26 13:30 UTC (permalink / raw)
  To: Sacha Chua; +Cc: emacs-orgmode

Hello,

Sacha Chua <sacha@sachachua.com> writes:

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

Applied. Thank you.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-26 13:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-24 17:41 [PATCH] ob-sql: Don't print out the command Sacha Chua
2015-12-26 13:30 ` Nicolas Goaziou

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).