From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id mIgmNrjA/WQ6KgEA9RJhRA:P1 (envelope-from ) for ; Sun, 10 Sep 2023 15:12:24 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id mIgmNrjA/WQ6KgEA9RJhRA (envelope-from ) for ; Sun, 10 Sep 2023 15:12:24 +0200 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 4707231255 for ; Sun, 10 Sep 2023 15:12:24 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=QSYQ+kDI; 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"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1694351544; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=B0UR+IHspdEa7G+VcLknX+HAG6wT3yk5ITYbSPlzpdU=; b=WisqqgTD1g/vGb9cdZdID3Xv9MmjjwnRvzCmfC6y7z9SEfP8wGk7aGqy8Fm1FE/IPESNZh kgDF9uSTps1P7xYZ0aY2Qp5RpDLTTo6q3FIXKeunMwKhmUqHUqApMtpZpqLwzwru6O1igd 53p5l4WXoo7/cOpCgl8tPpq2gHFTASjD4P85eCmDK7lPPB/xOtuloNE8kWWy/HVyxQOyGQ ECLDPnskA6x1thn7KqMhqH/BrIsoD+h3bt2HTpBk6Jv9pKz7cb5S5GOusgWITBQTF+o9Yj DHD4z4QVavVpo3tj3QX0bePFJNOyTScwQjcF2rPEWqjuwCRrja8n7cxm9qAp1g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1694351544; a=rsa-sha256; cv=none; b=Ty3HAMHnmzP+WNT9ohkv1LOv0VEVoqHhfhWAsbP+gVn+h4ioLJSzPX+QkquYk5BP/Ln9a3 FCaJ68al8u0e6mVn+8AWlg5KKMrgYQN1ZaWvxwT0mWPSsKGMllvMF6yMldna6hdpIljy9t 6S5fZ9wecFq7YnQOBc5i0XNZbY3BIJCCFJQ7PKVQB9O/88RuOMAnnG9BuXvuEow5kYMmtb QMK+xsGY8ZSLNg6C2IHeUSQj3XNJuNG1ire/vST2BEwLly6lZwr70FGisQnmEL0heC1AEm luTmnCDCbCaWVegrYDeN48GXCYE2SWPyQTeIgROtZYM56z7ev/C9sLHEzhgGdg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=QSYQ+kDI; 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"; dmarc=pass (policy=none) header.from=gmail.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qfKDj-0002PD-Na; Sun, 10 Sep 2023 09:11:23 -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 1qfKDh-0002Ok-EX for emacs-orgmode@gnu.org; Sun, 10 Sep 2023 09:11:21 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qfKDe-0004Z0-OG for emacs-orgmode@gnu.org; Sun, 10 Sep 2023 09:11:21 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-401da71b85eso39035555e9.1 for ; Sun, 10 Sep 2023 06:11:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694351477; x=1694956277; darn=gnu.org; h=cc:content-language:from:subject:to:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=B0UR+IHspdEa7G+VcLknX+HAG6wT3yk5ITYbSPlzpdU=; b=QSYQ+kDIrATebr5MIOL+ULMaFBViH4Ty6N0os8Sd4VV4i3PwyeO0tFjPs5WuzbLzeA rLKX3Pvrx6w1odiQxABHyJMmLBGD/qoWBrRL8YQW9q7IP7FPqhMnIG2J8lu4e1lg2WhK UGM3bfE2xHIqkuBGliBP8LU8RwoITD/7X4107QxWrJMjh+XJRshqk76JYBCn0Y+5Vwd4 yguJsQ8ENbaLiVhXgvtQBRQnn9JrKFlgCRMrhbLojVmxVBej/JQXg9STYiM5N8yoD/vq Oale1WNA/bRragOthNB5s9E1BNQ0fDPZFdE3Xf/K5hC8AMzJ5+plaCBttU4VZmiruc8j yBDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694351477; x=1694956277; h=cc:content-language:from:subject:to:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=B0UR+IHspdEa7G+VcLknX+HAG6wT3yk5ITYbSPlzpdU=; b=gpf+iIv2B1s4kfXLqSQgxbpfc1ryiuXNSlk0ERST5GXjhg6DKRA0ENooJ/Aw+dnVkD OBP1ib/cKu7xhjsgnjVCP3DjykBg5w+2fYMmIsAKhMj16gCXs3kqEmkl0rDD1nSmrHGL qDU+bcIHgfiHTZqbjTdVdvQ2jTYhOQfDHVgZPbyr0F7MmH9iLesryw+QYTYkNE+csXWH DN6wevl8AMo8h1kAkAM/GxKSeuchN+v5N6fxuWY2kV9m3aPVtUYxFaRoludiJzNqh1tj DVq/YeOx9BhdTLUH8Mi1VXn2pEKn5lfCWOuXO61/YRrkLKB2bvk+T4vjMJGV/aees1Bu IWrw== X-Gm-Message-State: AOJu0Yypk3RCRkXKX2tSV85Vn+6OViQzRzV9rHHO7eNAUM4x/Jm4Io5X yOihEPOdfzmtjz1vmGHWq1c= X-Google-Smtp-Source: AGHT+IEkZHs19yIc7c7h3ImQh2so1cOsLy+DPzo6uW72a8f0x6/8RD9pxosaLIw7b3k5ZBhgIeeGsw== X-Received: by 2002:a05:600c:2346:b0:401:daf2:273b with SMTP id 6-20020a05600c234600b00401daf2273bmr6365518wmq.12.1694351476416; Sun, 10 Sep 2023 06:11:16 -0700 (PDT) Received: from [192.168.0.97] (static-75-196-7-89.ipcom.comunitel.net. [89.7.196.75]) by smtp.gmail.com with ESMTPSA id n14-20020a5d51ce000000b0031980783d78sm7315091wrv.54.2023.09.10.06.11.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 10 Sep 2023 06:11:15 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------ZQ2m0ZMjwuDxRBXDQm0gEye4" Message-ID: <584d6991-0b88-c5eb-564e-17c90c325014@gmail.com> Date: Sun, 10 Sep 2023 15:06:11 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 To: yantar92@posteo.net Subject: Re: Literate programming with calc (help) From: Ypo Content-Language: en-GB Cc: Org-mode Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=ypuntot@gmail.com; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx2.migadu.com X-Spam-Score: -6.42 X-Migadu-Queue-Id: 4707231255 X-Migadu-Spam-Score: -6.42 X-TUID: 4rXSPMQHf7y+ This is a multi-part message in MIME format. --------------ZQ2m0ZMjwuDxRBXDQm0gEye4 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit I have discovered, taking a look at the Org Manual, that exists an embedded mode for Calc. https://www.gnu.org/software/emacs/manual/html_mono/calc.html#Assignments-in-Embedded-Mode Using "C-x * e" it solves this kind of formula with units: a := 3 m / s t := 7 s a t => > > From:     Ihor Radchenko > > Subject:     Re: LIterate programming with calc (help) > > Date:     Tue, 01 Nov 2022 07:22:18 +0000 > > ------------------------------------------------------------------------ > "Fraga, Eric" writes: > > >/> 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./ > >// > >/Thinking out loud, what would be better, but I have no idea how feasible/ > >/it would be, would be to have ob-calc make use of the embedded calc/ > >/functionality and syntax, so that you could write something like this:/ > >// > >/#+begin_src calc/ > >/a := 300 m/ > >/b := 2 a =>/ > >/#+end_src/ > >// > >/which would output the result of any line with => on it./ > > I am CCing Tom Gillespie, the maintainer of ob-calc. Maybe he has > something to say. > > -- > Ihor Radchenko // yantar92, > Org mode contributor, > Learn more about Org mode at . > Support Org development at , > or support my work at > > > > > > > > > --------------ZQ2m0ZMjwuDxRBXDQm0gEye4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

I have discovered, taking a look at the Org Manual, that exists an embedded mode for Calc.

https://www.gnu.org/software/emacs/manual/html_mono/calc.html#Assignments-in-Embedded-Mode

Using "C-x * e" it solves this kind of formula with units:

a := 3 m / s                                                                                                            

t := 7 s                                                                                                             
                                                                                                               
a t =>



> From:     Ihor Radchenko
> Subject:     Re: LIterate programming with calc (help)
> Date:     Tue, 01 Nov 2022 07:22:18 +0000


"Fraga, Eric" <e.fraga@ucl.ac.uk> writes:

>> 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.
>
> Thinking out loud, what would be better, but I have no idea how feasible
> it would be, would be to have ob-calc make use of the embedded calc
> functionality and syntax, so that you could write something like this:
>
> #+begin_src calc
> a := 300 m
> b := 2 a =>
> #+end_src
>
> which would output the result of any line with => on it.

I am CCing Tom Gillespie, the maintainer of ob-calc. Maybe he has
something to say.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>








--------------ZQ2m0ZMjwuDxRBXDQm0gEye4--