From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Allan Webber Subject: Re: Why doesn't this calc org-babel code work? Date: Thu, 24 May 2012 18:02:56 -0500 Message-ID: <878vghmbbz.fsf@grumps.lan> References: <878vghqjjt.fsf@grumps.lan> <87ehq9mblz.fsf@grumps.lan> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:45976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXh1B-00071s-LQ for emacs-orgmode@gnu.org; Thu, 24 May 2012 19:00:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SXh19-0005vR-Vj for emacs-orgmode@gnu.org; Thu, 24 May 2012 19:00:29 -0400 Received: from li424-160.members.linode.com ([50.116.34.160]:49312 helo=dustycloud.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXh19-0005vL-S9 for emacs-orgmode@gnu.org; Thu, 24 May 2012 19:00:27 -0400 Received: from grumps.lan (localhost [127.0.0.1]) by dustycloud.org (Postfix) with ESMTP id 2F82726AFA for ; Thu, 24 May 2012 19:00:26 -0400 (EDT) In-Reply-To: <87ehq9mblz.fsf@grumps.lan> (Christopher Allan Webber's message of "Thu, 24 May 2012 17:56:56 -0500") 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 I guess what I'm saying is that assignment would be really nice. However, I'm now seeing that this would take a lot of work. What I'd really like to do is something like the following: # Total BS financial projection, don't read into this at all #+BEGIN_SRC calc derp_expenses := 1234 derp_income := 4315 monthly_balance := derp_income - derp_expenses monthly_balance => monthly_balance * 12 => #+END_SRC #+RESULTS: : monthly_balance => 3081 : monthly_balance * 12 => 36972 I guess I could use calc embedded mode, but I haven't figured out how to do that yet. ;) - Chris Christopher Allan Webber writes: > I see now. > > #+BEGIN_SRC calc :var foo=5 > foo + 5 => > #+END_SRC > > #+RESULTS: > : 5 + 5 => 10 > > However, this isn't as useful as I'd like. I'd really like to be able > to see it say "foo + 5 =>" in the output. That's clearer which line is > being referred to... > > Christopher Allan Webber writes: > >> Hey all... >> >> I have: >> >> #+BEGIN_SRC calc >> foo := 5 >> foo + 5 => >> #+END_SRC >> >> #+RESULTS: >> : foo + 5 => foo + 5 >> >> What I'd like, obviously, is for it to result in: >> >> #+RESULTS: >> : foo + 5 => 10 >> >> I guess I really don't understand how calc support works in org-babel. >> Could someone enlighten me?