From mboxrd@z Thu Jan 1 00:00:00 1970 From: dieter@duenenhof-wilhelm.de (H. Dieter Wilhelm) Subject: Re: Evaluating simple inline expressions in org-mode Date: Sun, 07 Feb 2016 16:45:18 +0100 Message-ID: <87r3gozfqp.fsf@duenenhof-wilhelm.de> References: <87twlpwzbw.fsf@delle7240.chemeng.ucl.ac.uk> <87wpqlyn5f.fsf@duenenhof-wilhelm.de> <87vb64j2f0.fsf@delle7240.chemeng.ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45469) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSRdn-0004pV-Mi for emacs-orgmode@gnu.org; Sun, 07 Feb 2016 10:52:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSRdk-0000Fs-96 for emacs-orgmode@gnu.org; Sun, 07 Feb 2016 10:52:47 -0500 Received: from plane.gmane.org ([80.91.229.3]:55222) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSRdk-0000FG-2C for emacs-orgmode@gnu.org; Sun, 07 Feb 2016 10:52:44 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aSRdh-0005vi-Pg for emacs-orgmode@gnu.org; Sun, 07 Feb 2016 16:52:41 +0100 Received: from p57acef1c.dip0.t-ipconnect.de ([87.172.239.28]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 07 Feb 2016 16:52:41 +0100 Received: from dieter by p57acef1c.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 07 Feb 2016 16:52:41 +0100 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 >>> works as well. I'm not sure how you define variables in calc however... >> >> You could write something like src_calc[:var x=3.41]{2*x} :-) > > Yes but can you save a variable for use in a later expression? Well, at the moment I don't know another way as defining the calc variables on the lisp level: #+BEGIN_SRC emacs-lisp (setq var-foo 9.81 var-x 3.14 var-bar ...) #+END_SRC Note: `var-' is a special prefix for the calc variables `foo', `x', ... And then something like src_calc{2*x} is working. -- Best wishes H. Dieter Wilhelm Darmstadt, Germany