From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id YAQ+A+FBD2V7ZwAAauVa8A:P1 (envelope-from ) for ; Sat, 23 Sep 2023 21:52:01 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id YAQ+A+FBD2V7ZwAAauVa8A (envelope-from ) for ; Sat, 23 Sep 2023 21:52:01 +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 BC68754870 for ; Sat, 23 Sep 2023 21:52:00 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=catsu.it header.s=mail header.b=myUd+cTr; 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=quarantine) header.from=catsu.it ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1695498720; 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=3vf3q30lKhOEoMWg42ExlYHU38BKJit/5z4WXIAXjEY=; b=a2BjgFfLuKdZLiBZGC652ySpzyABXe+pmD9BZDnr+JrSugKUzK1220XK3iNcc453NoBVEs 2iryMUCsCurZJF07TtnBZ2A8PzYb3HDNh0/fzXl4If31z0IIK+XYgki55ER/PpW66luC+C 9zkA3lVrQjdJU3K0/vATtjtyb92fDh6Ja8BmQUFQM98A9frq6uwM9UAxSRsY8gXbJPmKBL 3auZ1qIycqE2wu9WYMZaBi7PSBCV6OQJqJVUS9wtTZzRpuipY/wjip+Rgd5axXoZMFBuSV FuBz+NlnJquQBd6ytk2N1Xn8kRHppO1Sv1DbM/jLJG/w3t7JStvwDyaTNtAErg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1695498720; a=rsa-sha256; cv=none; b=thVONW7baIFrMTVy0c6bSn0KZEo0t/BjqQb1/Upe1kmS22oAE0ddhgszIQ6VsSJ9LmiE/T DI52O71l5MJbRB18OzSAwp03/UgsOuWUh08vy6EKFgZN7ajkrgz5tBTHeN+vb76aPZGrU2 sxjAPDTzOEEd/ErvBViUZ1k6rfXwG3o75L0XjBplJLmuTaTA9RjUQmEu5/vVpfCCQAxeYi pMRkhWxINjrXCsPxDpmX0tq1Wcta86FiNmz81gCF2Lmm9/gm0inXif65o8l+PwKZrM9b0O rsrZrvWgCzPbh5Mw3X0frf7rIvG3GGFuIt4keDp1DVRe6GAiR7nr+SelKd0yOQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=catsu.it header.s=mail header.b=myUd+cTr; 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=quarantine) header.from=catsu.it Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qk8ei-0003sW-ML; Sat, 23 Sep 2023 15:51:08 -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 1qk8eg-0003sM-HZ for emacs-orgmode@gnu.org; Sat, 23 Sep 2023 15:51:06 -0400 Received: from box.catsu.it ([46.232.250.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qk8eb-0003M8-Ul for emacs-orgmode@gnu.org; Sat, 23 Sep 2023 15:51:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=catsu.it; s=mail; t=1695498658; bh=3vf3q30lKhOEoMWg42ExlYHU38BKJit/5z4WXIAXjEY=; h=From:To:Subject:Date:From; b=myUd+cTrUZexrSntnlwm2WFoxWfcnLmvpRQ5u2h+Q1uXxxGX2JgSz7hfq+i9NpWo0 itSpz/P5iQh1Bi5v4MVYiTr7Qi1Kjr1yIjXmLitb9U6MGSGZDcxFzMTN31lDEs5vnI Yb5BdRZ44Dd7nQ1T3nBzqjsH2BJfywU6PvKIzvnsgSuORI8uOvZ3tzCKg1HtVtU9g4 hD/RLBRuqlpfnb3kabqjUSaUN4rQr/qlkDAx7r2BkERzU6eZ6c8KjBCHRAWg5sn9w3 vLsR9RObeiPqS++dYSt9JnPHMYq5gdJCj0ciT3au3oBsJYLQLlLyja5WtEBaQCKAfX h+WzsKjiopm+g== Received: from authenticated-user (box.catsu.it [46.232.250.231]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by box.catsu.it (Postfix) with ESMTPSA id 546BB67117 for ; Sat, 23 Sep 2023 21:50:58 +0200 (CEST) From: Chris Keschnat To: emacs-orgmode@gnu.org Subject: Calc/TBLFM: how to conditionally insert hours:minutes? Date: Sat, 23 Sep 2023 21:38:25 +0200 Message-ID: <87pm28llcu.fsf@catsu.it> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=46.232.250.231; envelope-from=chris@catsu.it; helo=box.catsu.it 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, SPF_HELO_FAIL=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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -6.44 X-Spam-Score: -6.44 X-Migadu-Queue-Id: BC68754870 X-TUID: KoxKAMsoZAfl Hi, I am trying to understand how to set hours:minutes values in tables conditionally. Just setting hours directly works: | 40:03:00 | | 40:03:00 | | 40:03:00 | #+TBLFM: $1=40:03;T But when doing that conditionally (first row different from the others), I do not understand the behavior: This seemed to work: | 19:55:00 | | 40:03:00 | | 40:03:00 | #+TBLFM: $1=if(@# <= 1, 19:55, 40:03);T But after adjusting the minutes, this happens: | 19:55:00 | | 00:00:40 | | 00:00:40 | #+TBLFM: $1=if(@# <= 1, 19:55, 40:01);T What would be the correct way to do this? PS: I have found that the same happens when I add parentheses: | 40:03:00 | | 40:03:00 | | 40:03:00 | #+TBLFM: $1=(40:03);T | 00:00:40 | | 00:00:40 | | 00:00:40 | #+TBLFM: $1=(40:01);T PPS: I came across this when trying to understand the formulas here https://github.com/clange/org-mode Thanks Chris