From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id cA8MGhGohWLPQQAAbAwnHQ (envelope-from ) for ; Thu, 19 May 2022 04:14:41 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 2AXvGRGohWLDVwEAauVa8A (envelope-from ) for ; Thu, 19 May 2022 04:14:41 +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 D90FD26759 for ; Thu, 19 May 2022 04:14:40 +0200 (CEST) Received: from localhost ([::1]:60400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nrVgV-00017V-5w for larch@yhetil.org; Wed, 18 May 2022 22:14:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59592) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrVfr-00017M-Vy for emacs-orgmode@gnu.org; Wed, 18 May 2022 22:14:00 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:46993) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nrVfq-0005K4-3D for emacs-orgmode@gnu.org; Wed, 18 May 2022 22:13:59 -0400 Received: by mail-wr1-x434.google.com with SMTP id r30so5081403wra.13 for ; Wed, 18 May 2022 19:13:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=qr/dB+7hcUmGTZi/AO5GrusqU9ASR3FKI4Q91PZITfI=; b=JvxpGTaDFhLIiWydSpmTGRZF5XOh+xqXocMyvG+RRcmPLXUjtcGOMJV7fstZz5O1OY sxxz8PXm/U60CTu5iqu5E28d9RWp/Ogt+s51oP+RXryOmRatjtmsqFDPzzY9Crn26jQD c0fmTaCMPZ/7W8C+aokXYnQJv3DsrcbOWzBn+K3uRov2+PpdbiPs/VOQL8bZ7rWtpBVK hDR2Eygi+beH8nIWX6WaCf/zgn3vjkY0LsCXCmDtytn28DTnuCgnHe85PL0yjdHF24sm BPefAG+VM8wkJFxVNwXZ5Bvqn0rrKCxsKdzk6d3WkrAJf6UohCuy10cGp5PzjKNQoGTk 1/kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=qr/dB+7hcUmGTZi/AO5GrusqU9ASR3FKI4Q91PZITfI=; b=z7QGnaEATE1OcRPO8dvBllg5UsIm/Mj4ztucHKgf/JsN4lFIpkIlVevNkNM28FuSl+ 20OBFLQYvBdMwc30SuCsR0WwZ3H3FEm9207uQlRcACxw5k2xRA36wyvPHyRrsC3bPA2q yNkhBAb/NE3yB2cUSYh0ijWx0B4XH8yr4k7RzUuKtcOd91MNkEV1wR0B2KKYVT07Lx1K VoZHJvXHdHXuHOvgrC2PqmelHJQb6Y454UUwcw+gMViHkJiZuOo3hLlNWOOiYY5CsgeO Xa1t2K/ElVIGM8uBw6nM1vJuGqMYutn/Uv4f7KY9/c6X+AszJGnJHxpKUkVXy63lSu+T zcRw== X-Gm-Message-State: AOAM533V9IWjt1AD4ty8rO4zW7XQfaMCu15V+TRTbRaURS019GYf5/Lw L7OEpjNrhkAqyw+rc6R+RfUml7XfxNwz1iRtUrkIbOQCa3A= X-Google-Smtp-Source: ABdhPJxcV4/2YJ4jMwdfkOHPRgo3B+1Iu/Lw6e+X9a8WPs3t1eGSoRy0jNfzWfZ8mtu8+UpNAlSRL6tOxMbjbA9jjwY= X-Received: by 2002:a5d:6802:0:b0:20e:5e12:cb67 with SMTP id w2-20020a5d6802000000b0020e5e12cb67mr1931947wru.61.1652926435284; Wed, 18 May 2022 19:13:55 -0700 (PDT) MIME-Version: 1.0 From: Jun Inoue Date: Thu, 19 May 2022 11:13:29 +0900 Message-ID: Subject: Newbie Questions on Spreadsheets To: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="00000000000003d95205df53ed57" Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=jun.lambda@gmail.com; helo=mail-wr1-x434.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, T_SCC_BODY_TEXT_LINE=-0.01 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1652926481; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=qr/dB+7hcUmGTZi/AO5GrusqU9ASR3FKI4Q91PZITfI=; b=d3DeZCSBU6SXWTjp3C5BTaWzjJnUr7c+lMGv4YD08rvrpwDX3qj6J1bKALOmLojlRIfqON bBvhgWETC6N4F4d0YPiuxnMkdm1sZgSBE2f74C28MbGSaM/xE8ZxMQo9+SJefBiMitM+B7 /OoPbt+isRGDYW3La4f0PqDpl+mF6ZqPaf61Dr/tFrZX0JmNJWH4aKS6YMl7LF1dBqsnuW ZLN+f2bX4w6xafnPKqFwYh/fLolS3us5F6p9kviEDUc8MAGUSVOgg3JPTYrRAiryN4d7ob 13Y5w+26YsN3Rlc/h//FRxds9lFQa4o7hFd4OTVEnkYf8tyTlkoUrLwztb0pNg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652926481; a=rsa-sha256; cv=none; b=X+o0ih33JP68X5x7LRiwOf1hk+ua4ZZrVlcQXvbr46jrRKBFnmCsELUKDCDtBWueI2kUII O25SiLvQyk/JhMJZAAa4jCwb6xVTFaEQBQVIhGSdWWJdb1Yz2sUiY4O9ibFtnIa7+jUJ23 zoI16490b5abFUatlckrU5NB38h4Z39xzjXcRgwnUJZnPaSFE6+Nc+O8qYx5Im2rSCn3rU qOVKcdBTV7+sv9OS032bWoTNk2+ml7G6NWsCzA51Pz0GRt43WqvXRy5MkV9TBuKB89WKdj BZc45llePlh9T1t/7tMm5TEz4iLW3Z0uVJSNWSuyoNJx0lOwj0d6VSO1I4ntFw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=JvxpGTaD; dmarc=pass (policy=none) header.from=gmail.com; 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: -5.54 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=JvxpGTaD; dmarc=pass (policy=none) header.from=gmail.com; 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: D90FD26759 X-Spam-Score: -5.54 X-Migadu-Scanner: scn0.migadu.com X-TUID: 8VMNpULXT0iI --00000000000003d95205df53ed57 Content-Type: text/plain; charset="UTF-8" Hi! I've recently started using org mode, and have loved pretty much every step of it. Thanks for all your work! I just discovered the power of tables and spreadsheets and started toying around with it, but there are a few things I can't get to work the way I want. Would someone please help me out, or tell me if I'm trying to use it wrong? 1. How do you apply a column formula? The info manual mentions C-u C-c *, but this doesn't always work. For example, I have | $ | | | | | 2.80 | | | | 5.53 | | #+TBLFM: $3=$2 and typing C-u C-c * inside the table changes nothing. If I remove the $ cell the C-u C-c * does update the whole table, so could it be a bug in the handling of $? 2. Is there a way to move/delete columns and rows without screwing up formulas? While minimizing the example above, I deleted a bunch of columns from a larger table using org-table-delete-column, only to find that the formulas are not updated, so they become dangling references or reference the wrong columns. Same for rows, or moving them with e.g. org-metadown. Is there a way to have the formulas update as I restructure the table? 3. Formatting directives seem to take the numerators of rationals. For example, if I hit C-c C-c in | 5:6 | :=@1$1;%.2f | I get | 5:6 | 5.00 | #+TBLFM: @1$2=@1$1;%.2f whereas I would have expected the last column to be 0.17. It seems that %f directives take the numerators of ratios, but I would have expected it to coerce to the closest floating point instead. (It doesn't make sense to me: when would you /want/ to drop the denominator?) I know I can coerce manually with float(), but counting on myself to insert that every time sounds like a mistake waiting to happen. Is there a way to customize it so that ratios are converted to float by the %f directive, rather than having its denominator thrown away? 4. Is there a way to combine concise display with high-precision calculations? I prefer floating point to be formatted concisely, like %.2f, to avoid visual clutter and to keep column sizes manageable (especially since I use visual-line-mode). But if I put %.2f everywhere, I quickly run into precision issues. For example: | :=2/3;%.2f | := @1$1+@1$1 | :=@1$2 + @1$2 + @1$2 | Evaluating these formulas gives | 0.67 | 1.34 | 4.02 | #+TBLFM: @1$1=2/3;%.2f::@1$2=@1$1+@1$1::@1$3=@1$2 + @1$2 + @1$2 The calculation is cut off at two decimal places. Full-blown spreadsheet software usually separates the internal data representation from the formatting, so that formatting doesn't affect precision. Is there a way to achieve a similar effect, or is that difficult given how org-mode tables keep all the data as explicit text? BTW, I'm using Org mode 9.5.2 with Emacs 28.1 on macOS (so-called Mitsuharu's mac-port). -- Jun Inoue --00000000000003d95205df53ed57 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi!=C2=A0 I've recently started using org mode, and ha= ve loved pretty much every step of it.=C2=A0 Thanks for all your work!
<= br>I just discovered the power of tables and spreadsheets and started toyin= g around with it, but there are a few things I can't get to work the wa= y I want.=C2=A0 Would someone please help me out, or tell me if I'm try= ing to use it wrong?

1. How do you apply a column formula?

Th= e info manual mentions C-u C-c *, but this doesn't always work.=C2=A0 F= or example, I have

| $ | =C2=A0 =C2=A0 =C2=A0| =C2=A0 |
| =C2=A0 = | 2.80 | =C2=A0 |
| =C2=A0 | 5.53 | =C2=A0 |
#+TBLFM: $3=3D$2

= and typing C-u C-c * inside the table changes nothing.=C2=A0 If I remove th= e $ cell the C-u C-c * does update the whole table, so could it be a bug in= the handling of $?

2. Is there a way to move/delete columns and row= s without screwing up formulas?

While minimizing the example above, = I deleted a bunch of columns from a larger table using org-table-delete-col= umn, only to find that the formulas are not updated, so they become danglin= g references or reference the wrong columns.=C2=A0 Same for rows, or moving= them with e.g. org-metadown.=C2=A0 Is there a way to have the formulas upd= ate as I restructure the table?

3. Formatting directives seem to tak= e the numerators of rationals.

For example, if I hit C-c C-c in
<= br>| 5:6 | :=3D@1$1;%.2f |

I get

| 5:6 | 5.00 |
#+TBLFM: @= 1$2=3D@1$1;%.2f

whereas I would have expected the last column to be = 0.17.=C2=A0 It seems that %f directives take the numerators of ratios, but = I would have expected it to coerce to the closest floating point instead. = =C2=A0(It doesn't make sense to me: when would you /want/ to drop the d= enominator?) =C2=A0I know I can coerce manually with float(), but counting = on myself to insert that every time sounds like a mistake waiting to happen= .

Is there a way to customize it so that ratios are converted to flo= at by the %f directive, rather than having its denominator thrown away?
=
4. Is there a way to combine concise display with high-precision calcul= ations?

I prefer floating point to be formatted concisely, like %.2f= , to avoid visual clutter and to keep column sizes manageable (especially s= ince I use visual-line-mode).=C2=A0 But if I put %.2f everywhere, I quickly= run into precision issues.=C2=A0 For example:

| :=3D2/3;%.2f | :=3D= @1$1+@1$1 | :=3D@1$2 + @1$2 + @1$2 |

Evaluating these formulas give= s

| 0.67 | 1.34 | 4.02 |
#+TBLFM: @1$1=3D2/3;%.2f::@1$2=3D@1$1+@1= $1::@1$3=3D@1$2 + @1$2 + @1$2

The calculation is cut off at two= decimal places.=C2=A0 Full-blown spreadsheet software usually separates th= e internal data representation from the formatting, so that formatting does= n't affect precision.=C2=A0 Is there a way to achieve a similar effect,= or is that difficult given how org-mode tables keep all the data as explic= it text?

BTW, I'm using Org mode 9.5.2 with Emacs 2= 8.1 on macOS (so-called Mitsuharu's mac-port).

--
Jun Inoue
--00000000000003d95205df53ed57--