all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jay Belanger <jay.p.belanger@gmail.com>
To: Gilles Charron <gilles.charron@gmail.com>
Cc: jay.p.belanger@gmail.com, emacs-devel@gnu.org
Subject: Re: Exchanging variables between Calc and Embedded Calc
Date: Mon, 27 Aug 2012 16:04:49 -0500	[thread overview]
Message-ID: <87pq6cxczy.fsf@gmail.com> (raw)
In-Reply-To: <loom.20120827T212634-618@post.gmane.org> (Gilles Charron's message of "Mon, 27 Aug 2012 19:35:07 +0000 (UTC)")


> 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



      reply	other threads:[~2012-08-27 21:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-27 19:35 Exchanging variables between Calc and Embedded Calc Gilles Charron
2012-08-27 21:04 ` Jay Belanger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pq6cxczy.fsf@gmail.com \
    --to=jay.p.belanger@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=gilles.charron@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.