emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Gary Oberbrunner <garyo@oberbrunner.com>
To: David Wagle <david.wagle@gmail.com>
Cc: Orgmode Mailing List <emacs-orgmode@gnu.org>
Subject: Re: Babel more verbose?
Date: Fri, 5 Sep 2014 09:20:58 -0400	[thread overview]
Message-ID: <CAFChFyhKHejaNXw_zM-_pbd+rKm8vW6j32MkzqzRH=BGUSdLuQ@mail.gmail.com> (raw)
In-Reply-To: <CAJdTJyNwmvS7cnZt61_50+xFGwe2r4mYBpw-8zRK679046XBtA@mail.gmail.com>

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

On Tue, Sep 2, 2014 at 11:01 AM, David Wagle <david.wagle@gmail.com> 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 <sql input file>"
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 <file>" 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

[-- Attachment #2: Type: text/html, Size: 2383 bytes --]

  parent reply	other threads:[~2014-09-05 13:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-02 12:32 Babel more verbose? Gary Oberbrunner
2014-09-02 14:15 ` John Kitchin
2014-09-02 14:54   ` Nick Dokos
2014-09-02 15:01     ` David Wagle
2014-09-02 17:23       ` Grant Rettke
2014-09-05 13:20       ` Gary Oberbrunner [this message]
2014-09-02 17:30     ` John Kitchin
2014-09-03  3:58       ` Nick Dokos

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='CAFChFyhKHejaNXw_zM-_pbd+rKm8vW6j32MkzqzRH=BGUSdLuQ@mail.gmail.com' \
    --to=garyo@oberbrunner.com \
    --cc=david.wagle@gmail.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).