From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gary Oberbrunner Subject: Re: Babel more verbose? Date: Fri, 5 Sep 2014 09:20:58 -0400 Message-ID: References: <878um2dqdw.fsf@alphaville.bos.redhat.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bd91f00fa1fcc05025156cb Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36618) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPtRw-000737-SE for emacs-orgmode@gnu.org; Fri, 05 Sep 2014 09:21:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPtRn-0006JK-7z for emacs-orgmode@gnu.org; Fri, 05 Sep 2014 09:21:12 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:36710) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPtRn-0006J8-0A for emacs-orgmode@gnu.org; Fri, 05 Sep 2014 09:21:03 -0400 Received: by mail-pd0-f177.google.com with SMTP id r10so15652511pdi.8 for ; Fri, 05 Sep 2014 06:21:01 -0700 (PDT) In-Reply-To: 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: David Wagle Cc: Orgmode Mailing List --047d7bd91f00fa1fcc05025156cb Content-Type: text/plain; charset=UTF-8 On Tue, Sep 2, 2014 at 11:01 AM, David Wagle wrote: > It sounds like perhaps the issue is code blocks with a long run-time that > may or may not fail or hang in some way? > > If that's the case, the solution is probably simply breaking up your code > blocks into smaller bits of code so that you more easily follow what's > happening. > > If the code is emacs-lisp, it's easy enough to put (message ...) calls > entering and leaving the code blocks. > The defadvice idea is great; I will try it and report back. As for breaking up my code blocks... I wish I could, but some of my SQL queries are just very long running. We have a lot of data. I want to look into indexing and other SQL optimizations -- but I need something in my org-mode to at least show me which blocks are the long-running ones, so I can know where to start! Someone else mentioned that the message about "Wrote " could be suppressed; just don't forget that we users need _something_ to help debug our babel code. If one of my sql queries goes wrong, I get something like this in the messages buffer: executing Sql code block (machines-by-week)... mysql ... -N < "c:/tmp/babel-26204dNc/sql-in-26204uKN" > "c:/tmp/babel-26204dNc/sql-out-262047UT" Wrote c:/tmp/babel-26204dNc/ob-input-26204IfZ Babel evaluation exited with code 1 so in this case it'd be OK if the "Wrote " went away, because the entire mysql command is still there, so I can find that temp file (which babel doesn't clean up, btw, and in my case that's a good thing!) and trace it back to which code block it came from. But it would be way better if mysql-mode would actually show the sql error! -- Gary --047d7bd91f00fa1fcc05025156cb Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable



On Tue, Sep 2, 2014 at 11:01 AM, David Wagle <= david.wagle@gmai= l.com> wrote:
= It sounds like perhaps the issue is code blocks with a long run-time that m= ay or may not fail or hang in some way?

If that's the case, the solution is probably simply breaking up your code= =20 blocks into smaller bits of code so that you more easily follow what's= =20 happening.

If the code is emacs-lisp, it's easy enough to put (message .= ..) calls entering and leaving the code blocks.

=
The defadvice idea is great; I will try it and report back. =C2= =A0As for breaking up my code blocks... I wish I could, but some of my SQL = queries are just very long running. =C2=A0We have a lot of data. =C2=A0I wa= nt to look into indexing and other SQL optimizations -- but I need somethin= g in my org-mode to at least show me which blocks are the long-running ones= , so I can know where to start!

Someone else m= entioned that the message about "Wrote <sql input file>" co= uld be suppressed; just don't forget that we users need _something_ to = help debug our babel code. =C2=A0If one of my sql queries goes wrong, I get= something like this in the messages buffer:

= executing Sql code block (machines-by-week)...
mysql =C2=A0... -N= =C2=A0< "c:/tmp/babel-26204dNc/sql-in-26204uKN" > "c:= /tmp/babel-26204dNc/sql-out-262047UT"
Wrote c:/tmp/babel-262= 04dNc/ob-input-26204IfZ
Babel evaluation exited with code 1
=

so in this case it'd be OK if the "Wrote= <file>" went away, because the entire mysql command is still th= ere, so I can find that temp file (which babel doesn't clean up, btw, a= nd in my case that's a good thing!) and trace it back to which code blo= ck it came from.

But it would be way better if mys= ql-mode would actually show the sql error!

-- Gary
--047d7bd91f00fa1fcc05025156cb--