Org-mode mailing list
 help / color / mirror / Atom feed
From: Matt Price <moptop99@gmail.com>
To: Org Mode List <emacs-orgmode@gnu.org>
Cc: pietru@caramail.com
Subject: Re: Multiple calc commands with orgbabel
Date: Wed, 5 May 2021 11:11:19 -0400
Message-ID: <CAN_Dec_WXf+GKAXagCB34dtrpKjK=h_aE2Ou5ObTe_otfe0-ww@mail.gmail.com> (raw)
In-Reply-To: <871ral7kq8.fsf@ucl.ac.uk>

[-- Attachment #1: Type: text/plain, Size: 1173 bytes --]

Can you explain how you get calc embedded mode working in org? I have never
used it and it sounds interesting, but I don't understand what hte
delimiters are.

On Wed, May 5, 2021 at 2:35 AM Eric S Fraga <e.fraga@ucl.ac.uk> wrote:

> On Wednesday,  5 May 2021 at 07:46, pietru@caramail.com wrote:
> > Have been trying to execute multiple calc commands, but when I
> > evaluate the calc expressions, I get just one result.
>
> ob-calc returns the top element of the stack when finished and this will
> be the result of the last operation in the src block.  I don't think
> there's any way around this.
>
> I use embedded Calc for this reason.  You could rewrite your equations
> as simple lines (separated by empty lines from the surroundings) and
> evaluate each in turn with "C-x * u":
>
> fsolve(x 2 + x = 4, x) => x = 1.33333333333
>
> fsolve([x + y = a, x - y = b], [x, y]) => [x = a + (b - a) / 2, y = (a -
> b) / 2]
>
> I added the "=>" at the end of each expression so that the result is
> shown to the right instead of replacing the expression itself (default
> embedded Calc behaviour).
>
> --
> : Eric S Fraga via Emacs 28.0.50, Org release_9.4.5-395-g82fbdd
>
>

[-- Attachment #2: Type: text/html, Size: 1637 bytes --]

  parent reply	other threads:[~2021-05-05 15:14 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-05  5:46 pietru
2021-05-05  6:33 ` Eric S Fraga
2021-05-05  6:40   ` pietru
2021-05-05  6:41     ` Eric S Fraga
2021-05-05  6:45       ` pietru
2021-05-05 15:11   ` Matt Price [this message]
2021-05-05 15:29     ` pietru
2021-05-05 16:19       ` Tom Gillespie
2021-05-05 16:39     ` Eric S Fraga
2021-05-05 17:03       ` Tom Gillespie
2021-05-06 11:16         ` Bastien
2021-05-06 15:21           ` Tom Gillespie
2021-05-07  4:04             ` Bastien
2021-05-07  7:01               ` Tom Gillespie
2021-05-07  7:31                 ` Bastien
2021-05-05 20:24       ` pietru
2021-05-05 23:09       ` ob-fortran behaviour Christopher Dimech
2021-05-05 23:29         ` Christopher Dimech
2021-05-06  2:24       ` ob-fortran fixes to column position 6 and subroutine keywords pietru
2021-05-05  7:12 ` Multiple calc commands with orgbabel Dr. Arne Babenhauserheide
2021-05-05  7:20   ` pietru
2021-05-05  7:23   ` Eric S Fraga
2021-05-05  7:26     ` pietru
2021-05-05  7:59       ` Eric S Fraga
2021-05-05  8:00         ` pietru

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

  List information: https://orgmode.org

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

  git send-email \
    --in-reply-to='CAN_Dec_WXf+GKAXagCB34dtrpKjK=h_aE2Ou5ObTe_otfe0-ww@mail.gmail.com' \
    --to=moptop99@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=pietru@caramail.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

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git