From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Re: [babel] ledger tutorial on Worg Date: Wed, 08 Sep 2010 11:53:44 -0600 Message-ID: <87r5h4xgt3.fsf@gmail.com> References: <871v9lm0s3.wl%ucecesf@ucl.ac.uk> <4296BE2D-051E-47E8-8AA7-24582082DD0F@gmail.com> <87zkw8vzxw.fsf@gmail.com> <87aao1bt8w.fsf@mundaneum.com> <87mxs1co0f.wl%ucecesf@ucl.ac.uk> <87mxs071us.fsf@mundaneum.com> <87tym8b3e0.fsf@gmail.com> <87mxryv9ah.fsf@mundaneum.com> <8762ymo6hf.fsf@gmail.com> <877hizvrui.fsf@mundaneum.com> <87wrqxw3ou.fsf@gmail.com> <871v94wspn.fsf@mundaneum.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=59077 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OtOqU-000663-OH for emacs-orgmode@gnu.org; Wed, 08 Sep 2010 13:54:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OtOqH-0003ZF-6g for emacs-orgmode@gnu.org; Wed, 08 Sep 2010 13:53:59 -0400 Received: from mail-yx0-f169.google.com ([209.85.213.169]:36499) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OtOqH-0003Z7-2w for emacs-orgmode@gnu.org; Wed, 08 Sep 2010 13:53:53 -0400 Received: by yxk8 with SMTP id 8so236576yxk.0 for ; Wed, 08 Sep 2010 10:53:52 -0700 (PDT) In-Reply-To: <871v94wspn.fsf@mundaneum.com> (=?utf-8?Q?=22S=C3=A9bastien?= Vauban"'s message of "Wed, 08 Sep 2010 10:21:56 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?utf-8?Q?S=C3=A9bastien?= Vauban Cc: emacs-orgmode@gnu.org Hi Seb, S=C3=A9bastien Vauban writes: > Hi Eric, > > "Eric Schulte" wrote: >> S=C3=A9bastien Vauban writes: >>> "Eric Schulte" wrote: >>>> S=C3=A9bastien Vauban writes: [...] >>>>> 2. When the evaluation produces no output, but had well produced outp= ut >>>>> before, shouldn't Babel have to delete the previously written resu= lts in >>>>> the Org buffer? >>>> >>>> This is a good point. Currently Babel just quits if it receives a nil >>>> result, but I think you're right that we should replace existing resul= ts >>>> when a nil result has been returned. I'll add this as PROPOSED to the = babel >>>> task list. >>> >>> I consider this kind of mandatory, for the sake of coherency, and to re= ally >>> make use of Org-babel every time I want to run some shell commands (and= change >>> them, eventually getting no results then). >>> >> >> I've just pushed up a change that implements this behavior. > > I've just git pulled, and tested your change. > > From my point of view, it does not work yet. Take this example: > [...] > > With `:cmdline reg unknown', it produced the line with -21.91 EUR. Correc= t. > > Now, if I write `:cmdline "reg" unknown', I expect no output from Ledger,= and > thus the results block to be removed. That's not the case. > If ledger throws an exception then the result probably will not be replaced, however if ledger does return an empty result, then the existing result will be removed. If you execute the following code block #+begin_src emacs-lisp "test" #+end_src and then change the body to "" is the previous result removed? > > Other peculiarity, if I write `:cmdline reeg unknown', I get an > exception: > Ah, thanks for pointing this out, it seems I introduced an error with my previous change. I've just pushed up a fix for this issue. Thanks -- Eric