emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <ucecesf@ucl.ac.uk>
To: Dan <dandavison7@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: [Babel] Handling of errors when using Ledger
Date: Fri, 26 Nov 2010 08:34:15 +0000	[thread overview]
Message-ID: <871v68eb5k.fsf@pinto.chemeng.ucl.ac.uk> (raw)
In-Reply-To: <loom.20101125T162526-124@post.gmane.org> (Dan's message of "Thu, 25 Nov 2010 16:32:49 +0000 (UTC)")

Dan <dandavison7@gmail.com> writes:

[...]

> This patch should make ob-ledger use the common org-babel error mechanism. It is
> in branch ledger of the main repo. However, I'm not yet a ledger user. Could
> someone test it?

Unfortunately, it doesn't work at all [1] for a very simple reason: you
have removed the -f option which specifies the file that ledger should
read.  Ledger does not interpret a file argument directly but needs the
-f option, as in:

   ledger -f file.ledger <rest of command line>

Note the second line in the concatenated list of strings below:

[...]

> -    (with-output-to-string
> -      (shell-command (concat "ledger"
> -                            " -f " (org-babel-process-file-name in-file)
> -                            " " cmdline
> -                            " > " (org-babel-process-file-name out-file))))

I am not sure how you pass this option with the much shorter code you
have written:

> +  (org-babel-eval
> +   (concat org-babel-ledger-command " " (cdr (assoc :cmdline params)))
> +   body))

I hope this makes sense?

Footnotes: 
[1]  actually, what does work very nicely indeed is that error messages
     are reported perfectly!!  So thank you very much for this.

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.3 (release_7.3.99.g9db0.dirty)

  parent reply	other threads:[~2010-11-26  8:35 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-07 11:55 [Babel] Handling of errors when using Ledger Sébastien Vauban
2010-10-07 13:36 ` Dan Davison
2010-10-12 19:58   ` Sébastien Vauban
2010-10-13  8:04     ` Eric S Fraga
2010-11-25 16:32       ` Dan
2010-11-25 19:59         ` Bernt Hansen
2010-11-25 21:00           ` [OT] retrieving old messages [WAS] " Dan Davison
2010-11-26  0:19             ` [OT] retrieving old messages Bernt Hansen
2010-11-29  2:34             ` [OT] retrieving old messages [WAS] Re: [Babel] Handling of errors when using Ledger Matt Lundin
2010-11-29  9:14               ` [OT] retrieving old messages Sébastien Vauban
2010-11-29 14:11                 ` Matt Lundin
2010-11-25 21:13           ` [Babel] Handling of errors when using Ledger Sébastien Vauban
2010-11-25 20:03         ` Sébastien Vauban
2010-11-26  8:34         ` Eric S Fraga [this message]
2010-11-26 11:47           ` Dan Davison
2010-11-26 12:39             ` Eric S Fraga
2010-12-23 10:28               ` Dan Davison
2010-12-23 15:52                 ` Sébastien Vauban
2010-12-23 19:07                 ` Eric S Fraga
2011-03-05  0:29                   ` Dan Davison
2011-03-07  9:11                     ` Eric S Fraga
2010-11-27 22:04             ` [Babel] Piping between code blocks Was: " Eric Schulte

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=871v68eb5k.fsf@pinto.chemeng.ucl.ac.uk \
    --to=ucecesf@ucl.ac.uk \
    --cc=dandavison7@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).