From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id KNtqBRuUX2N8dgEAbAwnHQ (envelope-from ) for ; Mon, 31 Oct 2022 10:23:39 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 4PJoBRuUX2NWOwAA9RJhRA (envelope-from ) for ; Mon, 31 Oct 2022 10:23:39 +0100 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 CBE5236F12 for ; Mon, 31 Oct 2022 10:23:38 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opR09-0000iI-VX; Mon, 31 Oct 2022 05:22:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opR07-0000hm-Q6 for emacs-orgmode@gnu.org; Mon, 31 Oct 2022 05:22:35 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opR05-0003GX-NO for emacs-orgmode@gnu.org; Mon, 31 Oct 2022 05:22:35 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 7E67B240101 for ; Mon, 31 Oct 2022 10:22:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1667208150; bh=5yrNTNENF0T9MOTIVu0DMk1hR4bzNZwCvdXjK6Fk0+s=; h=From:To:Cc:Subject:Date:From; b=GUIERx0KYhHclvqNESNJk9jIx8gTU3PSoD4usW4Pp159UzA/Bejf5Ez6YE2jRFQU5 EoVNPsZyHr6elyHDY95E0EKC0htg4KIg75dnrH3W57RF/GUTv8VkzoHbwagewp/XNn IXJTgQGpUWA9nW6CLkdRhhHzjOOU/fxoBLGQb+FspSEFBQ0rjskAh1ubd4q7gXzPUM JxIpxrAXi720tk8mX9cRDDeX/YI/H+IkzGREYm6MUBhZZb0QUr0a5m468rKvfdEqwD 86/j4/G0JHhB5p/oB4IMlCoJ1vXgb79xEdDxYCAgFE9j4+j4F6pbERzh7G3H7lnfXg vzLXBM+wYwQiw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N17384Cj6z6tqy; Mon, 31 Oct 2022 10:22:28 +0100 (CET) From: Ihor Radchenko To: Ypo Cc: Org-mode Subject: Re: LIterate programming with calc (help) In-Reply-To: References: Date: Mon, 31 Oct 2022 09:23:07 +0000 Message-ID: <871qqojqis.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, 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.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1667208219; 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=1bs4agAxlsnb27z9H8J4zWcIR3/t2/2QmcXtzNL/W2E=; b=BZ9bcJBwsa0ZGgcaestYhPusmGq9B02pP5mNqPOIxjp17oDpTa7QMRluXlXPRn0jl113Qa +YmFB51ToiYckQ7AMjQdDxyQ1gbTDRGAMU4njK+nfagtfpc+LSQprFOE64BSJoH8SqTiAR EBdi1gKpg7rDPrMEXafbP3PPy4gNUvVl+SXJ/LNCdKbOS3ZLqqN4lb0X/tx5JIyJtuyeXn 1Shu7DWzRFeZGfBIfyo8x4VJ+B8H3v2SamhfjI1yCJD6Wx19nDnHb2RrqjBkRAJqGilACf eSW+FTobv+UAwMa44urRBPvf/VzQIiOYYcEJWB/SVg3GRuj09Z8atSYx3OKCjg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667208219; a=rsa-sha256; cv=none; b=AwdaTvjOgMOQpbHC0+6vw0pvzwD2K0I9xJrOJOWsvYo+3TxnAsqBowsVPOtRuy3Aq/XpxF 2s0cxrPKSmfM2/uGqApVo8lRVQwhpg5j7qVwPRI4EnhDQYe+J+hpzDko1zWqY3RhQvHE54 lwsvc4GNMeUJei473/v9T9OA5FLG5PCtEK+U7Pal9IFk+nAl7ruvX6RkKGm7iYoEeS4cxx 4oZCAj2eOIpWDZNz7lrIXigS9DzN9XOKLGZkz4xE4wyGATfbwn/yNqgGh4gdavSmC4CAHg nvUyVqkmVmBcmF+0cQedAEdw+/XI5fMgjATfrt1mhxTo+10+n/fxdSx73hpCKw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=GUIERx0K; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -8.46 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=GUIERx0K; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: CBE5236F12 X-Spam-Score: -8.46 X-Migadu-Scanner: scn0.migadu.com X-TUID: gAtgUwzc9xdN Ypo writes: > Would it be something like this? > > #+begin_src calc > =C2=A0 a =3D 300 m > =C2=A0 b =3D 300 m > =C2=A0 Area =3D a*b > =C2=A0 cost =3D 1 ($/m^2) > =C2=A0 A*c > > #+end_src I looked into ob-calc and it looks like the way to define variables is via :var header argument. Other than that, ob-calc simply does what calc would do if you type the above into calc stack. Which would also yield nothing. I guess that the main problem is that calc is tightly integrated with interactive commands. Maybe ob-calc could be extended to somehow indicate the commands to be executed in addition to inputting stack entries. Not sure if there is much interest in such feature though. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at