From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id WKQ4IGtGKWGLVgEAgWs5BA (envelope-from ) for ; Fri, 27 Aug 2021 22:09:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 4AiIG2tGKWEHRAAAB5/wlQ (envelope-from ) for ; Fri, 27 Aug 2021 20:09:15 +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 DC5F4D377 for ; Fri, 27 Aug 2021 22:09:14 +0200 (CEST) Received: from localhost ([::1]:52566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mJiA5-0000VH-V8 for larch@yhetil.org; Fri, 27 Aug 2021 16:09:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51950) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJi9i-0000U1-KV for emacs-orgmode@gnu.org; Fri, 27 Aug 2021 16:08:51 -0400 Received: from ciao.gmane.io ([116.202.254.214]:35652) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJi9g-0001TS-Lk for emacs-orgmode@gnu.org; Fri, 27 Aug 2021 16:08:50 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mJi9e-0008Df-SH for emacs-orgmode@gnu.org; Fri, 27 Aug 2021 22:08:46 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Nick Dokos Subject: Re: Org table: emphasizing calculated cell Date: Fri, 27 Aug 2021 16:08:39 -0400 Message-ID: <87bl5ihcqg.fsf@alphaville.usersys.redhat.com> References: <87r1egeozd.fsf@iki.fi> <20210826075152.17173b56@carnot2> <8735qvcyyy.fsf@iki.fi> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cancel-Lock: sha1:NHQp/YPD6VZszxrnFZFF9Mdm0wU= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , 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=1630094955; 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:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=gb5VoIBTl+iHMBPXzLOwG9Xs2bPSFLfumpGwgcqPWzg=; b=j4GJSRXUoXGbCLPScdsmhrqFApTu1Qnzfg07tbFG3IDWJcN8gKZ8MVZI5WVJyV2jB50XFC CwESVRZfgqW8VrcOzoZFrae0afZSWtSrEya60rfBxOGVp6lugzEpXMqasO8T2g8MyhwmNP /Pi+tSzza70mn9AAzTFr8mjm7kXAczXq3of8gf2LulL8AiSVTz/R7zqyZtJ9hRD2D68w3T 2uOU0RGpc8dlFfzrRTGK4vcIVJGucQOirTFpBhKA59v3n3qjeBYzslMDuVscTlf5MH7SyR vL3gCuPeP8wv2Yl2eJT7th1LYC92ApF634GTZav9Q5aapXtM1+gXdSPcN8Bgtg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630094955; a=rsa-sha256; cv=none; b=JVluWKnIBwf/JgGl+C05wauDuBATgBKamvq7cfuU8CN9yyOXx2ksstW5E0kabv7mxpb6Ms 10NDz4dkeKELG6RkGbqwhDAID9bCgXTNqqCmxOpbZaKQ/y23NsW8MZsx6N/GTFA63raoG9 EBODspuFzsm/kPcrhPxPPcrE/VwQNBnUHKkSRobknL3dX1wALFxeCM+kxI/kOz9nUz2pO+ L5yHmbc3TJ1lPsgBafiJm+FDRHRcFBofJXgRQ9FPSGkoLCeUhPSIQPhiRv4fdpSCxYzF5s ccFsnYVS5Jb/Jmx0IjomJ6lVu7rACEd7ca54lVTJobzXw9QaSEZOIqSmzbJ7mA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.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: -1.83 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.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: DC5F4D377 X-Spam-Score: -1.83 X-Migadu-Scanner: scn0.migadu.com X-TUID: EEk+8H2SGQCr 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