* Exchanging variables between Calc and Embedded Calc
@ 2012-08-27 19:35 Gilles Charron
2012-08-27 21:04 ` Jay Belanger
0 siblings, 1 reply; 2+ messages in thread
From: Gilles Charron @ 2012-08-27 19:35 UTC (permalink / raw)
To: emacs-devel
Hi,
I've been using embedded calc for some time now and have been looking for an
answer to the following:
Is it possible, from "calc" to read embedded calc variables?
Suppose I have the following in a file:
myVariable := 1.5 + 13 => 14.5
Hitting C-x * u will refresh "14.5" and now embedded calc knowns about
"myVariable".
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."
How can I access these "file-local definitions"? Also, is it possible to set
"embedded" calc variables from calc?
Thanks!
Regards,
Gilles
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Exchanging variables between Calc and Embedded Calc
2012-08-27 19:35 Exchanging variables between Calc and Embedded Calc Gilles Charron
@ 2012-08-27 21:04 ` Jay Belanger
0 siblings, 0 replies; 2+ messages in thread
From: Jay Belanger @ 2012-08-27 21:04 UTC (permalink / raw)
To: Gilles Charron; +Cc: jay.p.belanger, emacs-devel
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-08-27 21:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-27 19:35 Exchanging variables between Calc and Embedded Calc Gilles Charron
2012-08-27 21:04 ` Jay Belanger
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.