From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id +I0zFCg+kmBwOAEAgWs5BA (envelope-from ) for ; Wed, 05 May 2021 08:41:44 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id uETVDyg+kmDNSwAAB5/wlQ (envelope-from ) for ; Wed, 05 May 2021 06:41:44 +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 A6DE9210F2 for ; Wed, 5 May 2021 08:41:35 +0200 (CEST) Received: from localhost ([::1]:48920 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1leBDy-0000RL-T5 for larch@yhetil.org; Wed, 05 May 2021 02:41:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42412) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1leBCg-0008Si-2G for emacs-orgmode@gnu.org; Wed, 05 May 2021 02:40:14 -0400 Received: from mout.gmx.net ([212.227.17.21]:52993) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1leBCe-0002Gs-BI for emacs-orgmode@gnu.org; Wed, 05 May 2021 02:40:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1620196809; bh=FQXbHpWvC1rbYCfIDsvZFtCvJdcPs/YttkOIspUaxI4=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Uqgq7FibB+dAo8Oc4rW7n5dBHhLhogLdtQc1Kl7HC88NOUNHx56PBROq2jAHtBits /IChiomuwcsgyZGUnQoTI8pVua8DxtnDmDaTXsB5S+aEohoAB7CvoUtxLTAE05y5n2 kp1+M0lf8bQ88nyFVTYqLkn+FpGpFtFmlVomrtk8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs02.server.lan [172.19.170.129]) (via HTTP); Wed, 5 May 2021 08:40:09 +0200 MIME-Version: 1.0 Message-ID: From: pietru@caramail.com To: Eric S Fraga Subject: Re: Multiple calc commands with orgbabel Content-Type: text/plain; charset=UTF-8 Date: Wed, 5 May 2021 08:40:09 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <871ral7kq8.fsf@ucl.ac.uk> References: <871ral7kq8.fsf@ucl.ac.uk> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:oYbO2v5g013TlJfSGrdSqg2t+wR7uVM9SbBse72jxmz70hsm0LIdWQp7wNGUH1rAzgnfE nrpBrmRAgrMGD4Epn4WEO4eW2JjjXWnalhBScctEafj1UUZxDk4K4aYcx7Ac0eHxtqovOiAa/fS9 iwZpRL8XBgAQsq7G1HEuaMg9dRx3tGjjTgFA/pvocgNUFrdc2hCfUS7Q/dpxxxDoXb1t/h9oofyy 5ImAqzWuL5ARUD2uhE1KTMRBJYMtdHecw4BFZVFmDyq2KbhVzTctn6MedV2CFdNI7Sr5MhVvvHH4 eE= X-UI-Out-Filterresults: notjunk:1;V03:K0:fUMZsGeFsQw=:3t+CUaUftPUtnyd/KeIQaW VFj07ma8jxvIfEHkERCbPUGjHJ5HwtSjdPPX6n+eMRANaawwJT3+vO++3vHIKmMETycQ4Bpxr EpXTXCiJAhHjU8EVmAb9w67WCmeiwOEa+ew5p0TShckKAZBePOuhTpq5HN9Bm84MOoA6LPcFN 3JimKyWyyNNfoMM/K42BscLZt4ooi52Ot+l4lXmNSnkSIS2GQMlgTdHJUGY9S0CCkxFeSGrdR G1iO03JCU1MKIWXgJWOKd9+wJgvpRh6WCkpQabmIGuLvfi8FUUPTFC3A8kVDujTFeVsjLsvvP 1VI9+YA2Y7FM8sm7jlKdUcoXcqzFzuk3tg1c5kStIFldiS8BQnwWK2DPJHEupGMd0vBKjbU5S zRsUR4bqF5asH8IfjLhy1Tv8zBO4TxlK+X7ZZK1Bwa4dk99GNEadcpW1ZKQVGhfRAHWmaMRqE tejW++dm+YxRHA6uKeqemZAY2njC9D0052MLkle886lqFzvq2qEENX/VSgpNqYGVJj3cEQBZb S8tLyBRR+YHIGlYcy8x89szQ18M02ekY48/abyb/sk6YXiJL76iCGmC1meUmlK5Hl5Lo/fZuc KytWjKE3t7zhxbmdpPjvWigHzdK1tfjy/1j42hm/7kY44BSdwCJX9Ct7QH1q/MjxErq0tPl2B jt1XAkjRnP+THWTIOxPY6KfNQNWoyGNBLEpHyI8r+mu5SHAP4C1Zv/2FWh/3vTufTlswJ1UJV TIYeMTuDL+bHvqrYXwA5umqopP8ILP+aUCAN1KrlxyWdb26OhjVvFx5Tm7S65iMGC2ghLdJ8m hgkbWmgWcr308TEYuaERTsDdleaZ+omLhkKI7JXRjPmOB0mcdYJ67SlXWOc9tumj1lhLjE/ru AcAMCxjFgfCNkTrK8EWjRD0oinM5qq+qkaGeu+sJLYoep/BGoCKpqMmmRSlc70 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=212.227.17.21; envelope-from=pietru@caramail.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: help Emacs Orgmode 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=1620196898; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=dVLd8sEFHFD0jgSz4og7rjlT1qPNLrjiyS5lP3vqxzc=; b=G4i7zUgllUqjg90Mp1euylzYGJ6eX1SuawxeRXbNcItttiuSzge/zH8rhpqaLGNwSVPhPx G49M6jJescCLG5ozSodF8T85NTjdtGNvio2efslXcCGe8zQxOoG38jGuu4/oo7RrhtWn/V cSmeOfNhBm3dPfKwNEDNDqrdBt6CmDATP4EhZ2AI+3RXtTMSFKvcnsyFSLcPj471/ZeyD9 U3LGgNeq+M/muMdq9P7TByoUpo7mLpszPaGPdGHowjRhM6xggCRE8Vr7EjZj8EZVRfJrHw AZYK6nl/3tsXqABak+w1ua1V7bEiG4/OVlCKab1ay5Itn9tlLcVahKfpeXnJ0g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620196898; a=rsa-sha256; cv=none; b=fVir0p97jPMSLaSwxkW9dJBpvZGoQw4n5UBH3w/HyT8z/kDnZqtD8wLHaNzf9MVkM8AwZ4 Mbf7kiUBU4zgK3BGiUufRJJFkEB7hv1Y/P04s6KqAjGoZTzqC14g5rE3EmXrtiVuIs7ydp ajV86FOxdMiMomXbmy37GXIK0SPOyVuhFVBxAXwKwJj1BVBq2RcgbL7hSe9IjDIUSVki4C A2U2b3zPgxm7LcTx+4rxABM+8N1zaghiQMNR3cjwL0Iwr+kkiO03ZfRq6sktfL7Ag8ja2i URdMPgXFALo4U3vb2efv52I8nzibddg4G5gpwY4cU9V83bplg1Z3mSyVVqSoMQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmx.net header.s=badeba3b8450 header.b=Uqgq7Fib; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=caramail.com (policy=none); 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: -2.06 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmx.net header.s=badeba3b8450 header.b=Uqgq7Fib; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=caramail.com (policy=none); 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: A6DE9210F2 X-Spam-Score: -2.06 X-Migadu-Scanner: scn0.migadu.com X-TUID: HH3e51M2f0mo > Sent: Wednesday, May 05, 2021 at 6:33 PM > From: "Eric S Fraga" > To: pietru@caramail.com > Cc: "help Emacs Orgmode" > Subject: Re: Multiple calc commands with orgbabel > > 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. Is the top stack element just with ob-calc? > 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 =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 result is > shown to the right instead of replacing the expression itself (default > embedded Calc behaviour). Will check it out, thanks. > -- > : Eric S Fraga via Emacs 28.0.50, Org release_9.4.5-395-g82fbdd > >