From mboxrd@z Thu Jan 1 00:00:00 1970 From: Viktor Rosenfeld Subject: Re: [BABEL] BUG: Can't pass format string (-F) to ledger Date: Mon, 16 May 2011 19:50:39 +0200 Message-ID: <20110516175039.GA17396@kenny.fritz.box> References: <20110514144115.GA416@kenny.fritz.box> <87liy6q4aa.fsf@pinto.chemeng.ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:60285) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QM1wS-0003d3-2p for emacs-orgmode@gnu.org; Mon, 16 May 2011 13:50:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QM1wR-0005nr-7v for emacs-orgmode@gnu.org; Mon, 16 May 2011 13:50:52 -0400 Received: from mail-fx0-f41.google.com ([209.85.161.41]:38568) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QM1wQ-0005nm-W8 for emacs-orgmode@gnu.org; Mon, 16 May 2011 13:50:51 -0400 Received: by fxm18 with SMTP id 18so4043976fxm.0 for ; Mon, 16 May 2011 10:50:49 -0700 (PDT) Content-Disposition: inline In-Reply-To: <87liy6q4aa.fsf@pinto.chemeng.ucl.ac.uk> 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: emacs-orgmode@gnu.org Hi Eric, I applied your patch locally and can confirm that it works. Thank you, Viktor Eric S Fraga wrote: > Viktor Rosenfeld writes: > > > Hi, > > > > I'm having trouble passing format strings (-F) to ledger using > > org-babel. When I pass -F to :cmdline, I get the following error: > > > > Not enough arguments for format string. > > yes, sorry, this is an error in formatting a message which doesn't > actually do anything. > > Can somebody please apply the attached patch? > > Thanks, > eric > > diff --git a/lisp/ob-ledger.el b/lisp/ob-ledger.el > index e2709a7..e678137 100644 > --- a/lisp/ob-ledger.el > +++ b/lisp/ob-ledger.el > @@ -52,7 +52,7 @@ called by `org-babel-execute-src-block'." > (in-file (org-babel-temp-file "ledger-")) > (out-file (org-babel-temp-file "ledger-output-"))) > (with-temp-file in-file (insert body)) > - (message (concat "ledger" > + (message "%s" (concat "ledger" > " -f " (org-babel-process-file-name in-file) > " " cmdline)) > (with-output-to-string > > -- > : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 > : using Org-mode version 7.5 (release_7.5.284.g2a8fb.dirty)