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 OMorGNBhKWEqggEAgWs5BA (envelope-from ) for ; Sat, 28 Aug 2021 00:06:08 +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 0O21E9BhKWFyHAAAbx9fmQ (envelope-from ) for ; Fri, 27 Aug 2021 22:06:08 +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 B7BFEF0B4 for ; Sat, 28 Aug 2021 00:06:07 +0200 (CEST) Received: from localhost ([::1]:58256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mJjzC-0005s2-Ms for larch@yhetil.org; Fri, 27 Aug 2021 18:06:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39276) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJjyX-0005pT-3u for emacs-orgmode@gnu.org; Fri, 27 Aug 2021 18:05:25 -0400 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]:46893) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mJjyU-00009v-Rv for emacs-orgmode@gnu.org; Fri, 27 Aug 2021 18:05:24 -0400 Received: by mail-lj1-x231.google.com with SMTP id w4so13856007ljh.13 for ; Fri, 27 Aug 2021 15:05:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=MNSeUwSjF9ShD7GLfJkfhLUdcfEgdGdY8WcZ9Q1NoYY=; b=e0U7VHlHrLQbCruK76FJmmL8V6uxvAdEhCFh0KJDZfZm7SC1FpY0xjZf7tAqORheAH pGqFNpwUXmSCEXkdBH4+B1wF0hxHBc14EPKroEDSQUOWSY3X0Ocl/vTNMRrfzxEBInfc WN+yNHiduRzvvJuuPGbzWPXN7lqAKqiHiLYiCVM/gooEyq6FiJx5QoMGYP6hAVr0IItb 4ZYBPs21VgQ7kz3GlmdZ46QJDncTchfZ6Ge5g8K2WNNGqxZa/U1i+vmL/pK8v69qKHq/ CUpJldZ6XpfXtsHQmMlzqsRjk4UsYBiqt3BcO4pV9CPT/A/z5CErrh8gHMEeOl0z2VRY jFxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=MNSeUwSjF9ShD7GLfJkfhLUdcfEgdGdY8WcZ9Q1NoYY=; b=aVHuxrr87Xi+ShOe95v+NziYn5V41pOXM2aGEh3kASu8m0svc5sngmztEVHtmkt7LI qhagiBOCA5KCD6rzkGECC0bhKS1+5GWOHKsP+2Kam4MMYNEknFjEJ5HN3UHje6+5s9pm WclqGPLD8r0v86grFevQ1V5XiR9jE7q+rzWakmx03PnNgVoFKwQrf9M5S6se35q0n2+Q yzgXSIMoXweeY5IpgFeYz8N6ys6SOdZzLCBDDsHVRb1Y/opRB2mqDzT4och36mmOlR+d Tudl6H/9piTaXs5yl8w56P1gUDvgsjcGrKShYoqruNy58Iod62NPrymGKBWenm/b08hQ ksdw== X-Gm-Message-State: AOAM5337+SN/VHYWvPpJ60l799Vnl4XeHt4p04/19sohhtDpvivrvlRB TC3/qSqsDocRTXRxXN5QuuIL/lpURgOeQa8leWs= X-Google-Smtp-Source: ABdhPJxDxijruxjyIjMgGFjG4aIZtBuYPkgtQ2hnzutIWXmx65mAvL+oFRfTBBtHToMwNfbL1zEiGfUzrXLZdv4XOnI= X-Received: by 2002:a2e:85d2:: with SMTP id h18mr9378642ljj.39.1630101920053; Fri, 27 Aug 2021 15:05:20 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6504:4086:0:0:0:0 with HTTP; Fri, 27 Aug 2021 15:05:19 -0700 (PDT) In-Reply-To: <87bl5ihcqg.fsf@alphaville.usersys.redhat.com> References: <87r1egeozd.fsf@iki.fi> <20210826075152.17173b56@carnot2> <8735qvcyyy.fsf@iki.fi> <87bl5ihcqg.fsf@alphaville.usersys.redhat.com> From: Samuel Wales Date: Fri, 27 Aug 2021 15:05:19 -0700 Message-ID: Subject: Re: Org table: emphasizing calculated cell To: Nick Dokos Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::231; envelope-from=samologist@gmail.com; helo=mail-lj1-x231.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, 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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org 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=1630101968; 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=MNSeUwSjF9ShD7GLfJkfhLUdcfEgdGdY8WcZ9Q1NoYY=; b=U4o7e54Tb4Ya95WLuLbZzMHMEYA3NCJHO5BmQYkLI/TSqL43W5Nz7t06tyI4pTykWJ2TV1 77p/yfvngB3BTSOnTnmo7C54sr+XSVu7FcB0hSA0896aI+vA2ld6xTjTrpXGK7f5gGN6Tk kBmY9x+CX+FBLtkyOpbxqn9A5gOyPmdCojBZGw2Cyy5UreIvdmXYJ9E7Yvr5OecGjaqd4r 0o9tGz4Vbq2NqKqtlWYKhz3v3iDhXXtPi3HeNzOGs6f/B6nxRVkrr+FwXq34xWMVwjJvri 0G8Hor4qXxZQ0q1hMJWsaspicxeDip/7rDgCNCno3o3gtEIp7v8uZh2bG+FcVQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630101968; a=rsa-sha256; cv=none; b=qJNwVqpVjIm3M60E05ohr1uQkcrBr40NetDMKHuABZGSZdnWfK/G5boKzIg+rAN3jiK8DH 8Qa3ZJNYR4WCWG/K+6naIZVMmZesEUSJyuVJzgQiu88pM4NdJ0xSGDxiTKcUfQHzrIvcUA Bhi7yu2L6Sa/5vMqWcfFge8jRS1Z9fnhiGQW5ZrNws665hPdQ6chf0/jTtl04qNjJ2cmSW vHzTWxTNwWeQWj3LqZbblFPc9pYAE5HFP9gAHlqcM38u3184ovK0yOcw87WiBVdbZZE1ix wX0otCSqb553p5Pz/XsPSTiKqacQPDej4J8ZFJLeJUrxhs4Z24gHBySqE5h+eQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=e0U7VHlH; 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: -1.63 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=e0U7VHlH; 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: B7BFEF0B4 X-Spam-Score: -1.63 X-Migadu-Scanner: scn0.migadu.com X-TUID: phT5T3J3Y9TP out of curiosity, do common spreadsheets implement the feature of distinguishing calculated results from entered values? i find myself wanting that too, but don't know if that desire is unusual. On 8/27/21, Nick Dokos wrote: > Jarmo Hurri writes: > >> Greetings Norwid. >> >> Norwid Behrnd writes: >> >>> try extending the format of the table formula with asterisks, i.e. >>> >>> ``` >>> | quantity | value | >>> |----------+--------| >>> | A | 1 | >>> | B | 3 | >>> |----------+--------| >>> | *C* | *0.33* | >>> >>> #+TBLFM: @4$2=@-2/@-1; *%.2f* >>> ``` >>> >>> Subsequently, issue the call ```C-c *``` for an update while the >>> cursor is within the table. This approach works well enough for me >>> (equally for emphasis with enclosing forward slashes, or underscores) >>> in Emacs' native display (backed by elpa-org 9.4.0) as well as for a >>> subsequent export into .html and display (e.g., in Firefox), or .tex. >> >> Excellent, this is a working solution for the basic case. Much >> appreciated! >> >> This solution seems to change the contents of a cell, not only its >> formatting. So the following, where I try to increase the value of "C" >> by one, leads to an error: >> >> ``` >> | quantity | value | >> |----------+--------| >> | A | 1 | >> | B | 3 | >> |----------+--------| >> | *C* | *0.33* | >> | D | #ERROR | >> >> #+TBLFM: @4$2=@-2/@-1; *%.2f*::@5$2=@-1+1 >> ``` >> >> I wonder if there is a way around this effect? >> > > The error here is that `*0.33*' is no longer a string that can be converted > to a number, > so the calculator barfs. > > TUrn on formula debugging with `C-c {' and try evaluating it. > > -- > Nick > > "There are only two hard problems in computer science: cache > invalidation, naming things, and off-by-one errors." -Martin Fowler > > > -- The Kafka Pandemic Please learn what misopathy is. https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html