From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jay Belanger Newsgroups: gmane.emacs.devel Subject: Re: Exchanging variables between Calc and Embedded Calc Date: Mon, 27 Aug 2012 16:04:49 -0500 Message-ID: <87pq6cxczy.fsf@gmail.com> References: Reply-To: jay.p.belanger@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1346101505 11300 80.91.229.3 (27 Aug 2012 21:05:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Aug 2012 21:05:05 +0000 (UTC) Cc: jay.p.belanger@gmail.com, emacs-devel@gnu.org To: Gilles Charron Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 27 23:05:05 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T66UX-00012C-O4 for ged-emacs-devel@m.gmane.org; Mon, 27 Aug 2012 23:05:01 +0200 Original-Received: from localhost ([::1]:41296 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T66UV-00010B-FC for ged-emacs-devel@m.gmane.org; Mon, 27 Aug 2012 17:04:59 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53886) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T66US-0000z6-K9 for emacs-devel@gnu.org; Mon, 27 Aug 2012 17:04:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T66UR-0004Cb-JJ for emacs-devel@gnu.org; Mon, 27 Aug 2012 17:04:56 -0400 Original-Received: from mail-ob0-f169.google.com ([209.85.214.169]:38222) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T66UR-0004CQ-Dl for emacs-devel@gnu.org; Mon, 27 Aug 2012 17:04:55 -0400 Original-Received: by obhx4 with SMTP id x4so10556169obh.0 for ; Mon, 27 Aug 2012 14:04:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:reply-to:cc:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=w9kM4aKuGGs69+9nK2e41lQ9o0DAfdvJBNKQcASjgfw=; b=B+h/H4tCjhnJHlLhOkrHOS3G0J9TDwVL+PrvdaMBOudIUuLl694kfAPlLVGLJv3cVX vvV/tkmoZ8bbH37gR9Db5BC1pTP38vwSTUA+Lt7xlnS/f4EoMVNdtFM+kslvqbY+/tsv BBHXeIB+9jX4cQmy4IVFu4YSjA6Wqt8KF/Ke4aJ8vSq4+aqop56H2eUieaIuFoPfzb6t zuWCIfMAn6QjeQarxj+CQp0it+1e/FNVm9+qI67tg5rdDxWVs1ziHhgos9StxGINT91N WNtEMbj8HZ55KnAXjjQD9ufEP7HN1RZ2XWoWXVZa/RKSQQKWs9SA7769jhRStIXU8Znf JOtg== Original-Received: by 10.60.30.132 with SMTP id s4mr10823195oeh.6.1346101493933; Mon, 27 Aug 2012 14:04:53 -0700 (PDT) Original-Received: from belanger-x100e (184-155-88-117.cpe.cableone.net. [184.155.88.117]) by mx.google.com with ESMTPS id c6sm18051888obn.13.2012.08.27.14.04.51 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 27 Aug 2012 14:04:52 -0700 (PDT) In-Reply-To: (Gilles Charron's message of "Mon, 27 Aug 2012 19:35:07 +0000 (UTC)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.214.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:152869 Archived-At: > Is it possible, from "calc" to read embedded calc variables? ... > myVariable := 1.5 + 13 => 14.5 ... > If I switch to "calc mode" (C-x * c), how can I get access to "myVariable"? > > From the embedded calc manual: > > "The assignment operator `a := 17' does not actually do anything by itself. But > Embedded Mode recognizes it and marks it as a sort of file-local definition of > the variable." If you have something like x := 4 in embedded Calc, then you can use calc-store (s s RET) to assign the value 4 to x in Calc. You can then use calc-evalto (s =) to get x := 4 => In your case, though, while this would assign 14.5 to myVariable in Calc, it would also leave you with myVariable := 14.5 => 14.5 in embedded Calc. > How can I access these "file-local definitions"? Also, is it possible to set > "embedded" calc variables from calc? If a variable has a value in Calc and it isn't overridden in embedded Calc, then the variable will have the same value in embedded Calc. Jay