From mboxrd@z Thu Jan 1 00:00:00 1970
From: "Sebastien Vauban"
Subject: Re: using a simple numerical variable in an org text ocument
Date: Wed, 14 Aug 2013 07:54:31 +0200
Message-ID: <86wqno24x4.fsf@somewhere.org>
References:
<86mwp922bt.fsf@somewhere.org> <877ggbg91d.fsf@duenenhof-wilhelm.de>
Mime-Version: 1.0
Content-Type: text/plain
Return-path:
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-mXXj517/zsQ@public.gmane.org
Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Hi Dieter,
Dieter Wilhelm wrote:
> "Sebastien Vauban" writes:
>> As macros are expanded before Babel code is evaluated, I would
>> try #+scr_calc{...} with MACRO constants in the formula (untested).
>
> it seems that you're working with calc source blocks! :-) I'd like to
> leverage calc in org-mode (I'm thinking of unit conversions, etc.:
> Mathematica for free men) but I'm not getting it. I assume that in an
> #+src_calc block the mode of operation of calc is algebraic, isn't it?
>
> #+BEGIN_SRC calc
> 2 + 2
> sqrt(8)
> # above is working, by the way, does a calc block have a comment sign?
> 2 cm
> calc-convert-units(mm)
> #+END_SRC
>
> #+RESULTS:
> : calc - convert - units(mm)
>
> Above attempt is not working. Is it also possible to use the RPN? Like
> in this fictive block:
>
> #+BEGIN_SRC calc :mode rpn
> 2 2 +
> 2 'mm 8 'cm + 'in u c
> #+END_SRC
>
> And the *Calc Trail* buffer seems not to reflect any operations, despite
> Calc showing the block results in its calculator buffer!
Sorry to come back to this with a huge delay, but in fact I don't have any
experience with Calc mode at all! I can't answer your questions without
digging the manuals.
The only thing I make use of is inline Calc for simple computations, to avoid
making mistakes in prices (fictitious example):
--8<---------------cut here---------------start------------->8---
The work will last 20 days and cost src_calc[:results raw]{20 * 498} USD at
the base rate.
--8<---------------cut here---------------end--------------->8---
Best regards,
Seb
--
Sebastien Vauban