From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id gO+ELme2kmD9pQAAgWs5BA (envelope-from ) for ; Wed, 05 May 2021 17:14:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id oKkOKme2kmDvTAAAbx9fmQ (envelope-from ) for ; Wed, 05 May 2021 15:14:47 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E8752ACB2 for ; Wed, 5 May 2021 17:14:46 +0200 (CEST) Received: from localhost ([::1]:55072 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1leJEa-0002VS-VA for larch@yhetil.org; Wed, 05 May 2021 11:14:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33130) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1leJBf-0000Yz-Ew for emacs-orgmode@gnu.org; Wed, 05 May 2021 11:11:43 -0400 Received: from mail-ua1-x936.google.com ([2607:f8b0:4864:20::936]:35403) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1leJBU-0005xw-GC for emacs-orgmode@gnu.org; Wed, 05 May 2021 11:11:43 -0400 Received: by mail-ua1-x936.google.com with SMTP id n61so674571uan.2 for ; Wed, 05 May 2021 08:11:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=j0z2qFB+WSdD4cKIUucCs7bexf3ex19e3p6yOJ9jHpM=; b=KLnPQaN0kRj1+Gxvp6PRJh0dFVuUC2l6ce86yqPluEu9MhXQeemCDNB/UIn3xjuwuj EPm2Lc/9yYYJDcJ5n6XJDCwxsUND9JZt/9gCT0lnWHrgnanrkxGzhBWf+M+jVkSpopU9 vC3eUHYILuSvQEGFy/XjZm5MiqsbV0yzyj5W0lOpjFWMdkdQ7ybx4iabrVTcJVjgWx6S /910Uymtzy0rujzvo6HdQFwJz7wBqQq8wbtk4BsRfNyIIDJcCKS8GPLkQFDAfcWcfxa/ earif5nLkTIbyw6Z9gabuCxKecek4DF0Ov9dnismsF23riubLAS8oIyKzf1uPaFZ3XJL cpow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=j0z2qFB+WSdD4cKIUucCs7bexf3ex19e3p6yOJ9jHpM=; b=VGTc/55yhK5A7YnYR5kKTghuxLS5L8VvwJx+D4KioOJaxCdbmb6RVRT436fN4X/LrP ouSnPaJP6vJ8vBip/q3Y1F53dS8fLxlsPADd0RFrP0VlBzPPn/qdE3pp5Zmlb4xtLvah S6QBWwt8A/99jC+F6nEr1/8MUAtcjONvy2znTLHt1sBorC457BzP4LShR5bZhnz6cf2Y ZoP1zzMdZ3699hskMfom+ZVCu/K9vkb4G6vW4AqcT6sGuIo5EGi5q0fpjMoFLw/vDu8W WslWANGGlRNc5tXPtNVEi/pXJh5z03KlaFUfj5OJHNd6+NtIhmDHVSixCnWdPNSTIMYd brhA== X-Gm-Message-State: AOAM532JF+kvRxVFV0IV/bE8GKKHd9RzXW57jgALcFSEaVllm83i5/pu CJxlzAcuVDtUwfWD9Gv6he0ttaDYWEnRuG/wCDzRl+KZn1w= X-Google-Smtp-Source: ABdhPJys26qNAdKVTLd3+9/2eihkDY7IZlpTQXJaW8bompS5JraMrHPkSVE7haZO8WUeLi/OzBs6o9EN/EJAmP7pB3s= X-Received: by 2002:ab0:c18:: with SMTP id a24mr18046496uak.68.1620227490789; Wed, 05 May 2021 08:11:30 -0700 (PDT) MIME-Version: 1.0 References: <871ral7kq8.fsf@ucl.ac.uk> In-Reply-To: <871ral7kq8.fsf@ucl.ac.uk> From: Matt Price Date: Wed, 5 May 2021 11:11:19 -0400 Message-ID: Subject: Re: Multiple calc commands with orgbabel To: Org Mode List Content-Type: multipart/alternative; boundary="0000000000000b3cd805c1969ca2" Received-SPF: pass client-ip=2607:f8b0:4864:20::936; envelope-from=moptop99@gmail.com; helo=mail-ua1-x936.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pietru@caramail.com Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620227687; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=j0z2qFB+WSdD4cKIUucCs7bexf3ex19e3p6yOJ9jHpM=; b=Qn5Yea7t5OKmRJ5eQhpSk+zXiN9+N1Nd9vxqs1NJFjDzHedDXRxTxDX2maDej6UzT8xcx9 3w37UbUWCyjIwyBgjCpUTDOfln4FXITv/Y9c4g25zcE+gAVz0CfvpobBDextEKShUmRGIz NB+7w3v4HlrvnbxIe4D+DmETaeukQuqxhPOehY+u68KRhs5KFCP5qlrZ0Rw++f21O66C8B Ai61x6fLZwqZTocf5nzBHgNjAO1/GT2TlI+L4PTFzUbkkuONveDWtzM2O2c+/+t+5AaNYi /iKiGnNv/ndq3B28KRlAPo/u2USaJqfrVTGvaWVdbXg1B9TWDvZRL1kfngqEHg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620227687; a=rsa-sha256; cv=none; b=L3fJd/tN1drxtdsJ0lWmeyPpvGmdCPVYWAvsRjLAo3EqqYfU673zLxaaYPVf8wnSbEMCXx 5C+khWT4QXMrhxxxpTW8IgiwziZ81E/L7p5wOjwfZABC3PjZBm3no0meZVxahdCPosRb19 ExJWMNMXcmeNGOjUKB4gxh1lIEC6PvgqKT5GWkgOk+ajthJHNbN95TybkaTxF+IgjRURNk apyWa9fVGpz72GTxNuyAuIlqZO1Yc48lF7BBTO/bzxjeDwPDo1Kl557XY6QixcoRlDCZ2j OX2eIGJlAU+DRkWns2SRzU9NPqzVRhYD3k7j68Tx9yIsz1z9px246zGFKr4hGw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=KLnPQaN0; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.17 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=KLnPQaN0; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: E8752ACB2 X-Spam-Score: -3.17 X-Migadu-Scanner: scn0.migadu.com X-TUID: zrAE1a12qq4r --0000000000000b3cd805c1969ca2 Content-Type: text/plain; charset="UTF-8" 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 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 > > --0000000000000b3cd805c1969ca2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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 unders= tand what hte delimiters are.=C2=A0

On Wed, May 5, 2021 at 2:35 AM Eric= S Fraga <e.fraga@ucl.ac.uk>= wrote:
On Wedne= sday,=C2=A0 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.=C2=A0 I don't thi= nk
there's any way around this.

I use embedded Calc for this reason.=C2=A0 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 =3D 4, x) =3D> x =3D 1.33333333333

fsolve([x + y =3D a, x - y =3D b], [x, y]) =3D> [x =3D a + (b - a) / 2, = y =3D (a - b) / 2]

I added the "=3D>" at the end of each expression so that the r= esult 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

--0000000000000b3cd805c1969ca2--