* How to execute calc commands in src blocks?
@ 2015-08-10 1:22 jenia.ivlev
2015-08-11 9:18 ` Eric S Fraga
0 siblings, 1 reply; 2+ messages in thread
From: jenia.ivlev @ 2015-08-10 1:22 UTC (permalink / raw)
To: emacs-orgmode
Hello.
I want to use calc in org src-blocks. But it doesnt always work.
Here is an example that does work:
#+BEGIN_SRC calc
3
2
'+
#+END_SRC
#+RESULTS:
6
Here is another example where it doesn't work:
#+BEGIN_SRC calc
[3 2]
[2 10]
'+
#+END_SRC
This doesn't work at all. It tells me "Invalid data object encoutered".
Can someone please tell me how to make the second exaple work?
And also, how do I assign a value to a variable maybe someone knows?
Thanks
Jenia
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How to execute calc commands in src blocks?
2015-08-10 1:22 How to execute calc commands in src blocks? jenia.ivlev
@ 2015-08-11 9:18 ` Eric S Fraga
0 siblings, 0 replies; 2+ messages in thread
From: Eric S Fraga @ 2015-08-11 9:18 UTC (permalink / raw)
To: jenia.ivlev; +Cc: emacs-orgmode
On Sunday, 9 Aug 2015 at 21:22, jenia.ivlev wrote:
> Hello.
>
> I want to use calc in org src-blocks. But it doesnt always work.
I've usually found that calc in org babel works best in algebraic mode
as opposed to stack mode:
> Here is another example where it doesn't work:
>
> #+BEGIN_SRC calc
> [3 2]
> [2 10]
> '+
> #+END_SRC
Try
#+BEGIN_SRC calc
[3,2] + [2,10]
#+END_SRC
instead. Stack mode is best for interactive use but really has few
benefits for non-interactive use, in my experience. And I say this as a
fervent HP calculator user for <mumble> decades... :-)
--
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.1-34-gb911f1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-11 9:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-10 1:22 How to execute calc commands in src blocks? jenia.ivlev
2015-08-11 9:18 ` Eric S Fraga
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).