From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id kI7vGeTlYmY8LgEAqHPOHw:P1 (envelope-from ) for ; Fri, 07 Jun 2024 12:50:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id kI7vGeTlYmY8LgEAqHPOHw (envelope-from ) for ; Fri, 07 Jun 2024 12:50:12 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=CV4eWkWw; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1717757412; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=wh6NE0mdyMBZt3ncX3OqN2XoCeTuVXPtyXioWCziwwQ=; b=Q3ZKO8ntPOvcnQy7MTQZgMGFwF0wKx2HBJ4r7dZdbW8mWEetcWpIT1Sg3dRBvEH0iJZrte cM4ePpFzWJ/P4eCWmy0SVPOS8j0jvTqKDlPYUaE2ecVyliIz4YX8OxIbFiMQgEGtP/UvYz 65Dr5x1NiY9016PcCILfniL/1s17Zibm+Kzr8yNG/0q6z5StSbBCPI2DEGPDHq3prRTGfL mDNnnw57F76lXfmxjwyQ0kH5J6dp4cTBLnuZxu2TccpGoTqF2I2VN2gorYnB1v8U5X0hy9 ERyFuOD+421yV16Y0sXrQEWu9w/eHMtF3w9utjumEgvBTrarRAbJlerfST0pCQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1717757412; a=rsa-sha256; cv=none; b=WhRgEM84cwaodjM6OhcpEvvKxTLL0lWTxEMOBsIEwWC58vmCSG6Xh5Xw2XF6+Ewd0dk6Uz 2ZQJt0UdqMUXGAer9Zz1/xgjmG8x/Uuh0mEeQPzjhOgzUUshjqcplXl0agxEx02vUYLzuU gzSjvPdTRXWxtge/O05WkKluYt9zre6Cmdy4jiZmw+J+8qAC4W3w7xJcHWY6/HnbvAnOh1 2qgqVALCBTfe15DxBckNOudyMxRixFnz4R9azPiFSJXXOYcGD3+SqAr/6WmfXASYf4SAA+ RMmdISHqt3d6ankuUgg9zS6fH83DKTsSCa7hyNajKZHAcffsIsaiUzAcxLMjDA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=CV4eWkWw; 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" 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 2EAE766997 for ; Fri, 07 Jun 2024 12:50:12 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sFX9f-0001AI-6V; Fri, 07 Jun 2024 06:49:07 -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 1sFX9d-0001A4-Hb for emacs-orgmode@gnu.org; Fri, 07 Jun 2024 06:49:05 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sFX9b-0004Fg-8z for emacs-orgmode@gnu.org; Fri, 07 Jun 2024 06:49:05 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-421727f4e4aso2298055e9.2 for ; Fri, 07 Jun 2024 03:49:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717757341; x=1718362141; darn=gnu.org; h=mime-version:date:references:in-reply-to:subject:to:from:message-id :from:to:cc:subject:date:message-id:reply-to; bh=wh6NE0mdyMBZt3ncX3OqN2XoCeTuVXPtyXioWCziwwQ=; b=CV4eWkWw/1smnwaG8n/r/inz2pB1gPhJknCIRvYC8RFFA/AneAiteSUNNDjN79So9o QlmpCODQDRK8BqlVs3t5BwZUDNHApJHHfRiGebk831ZtDzwAOVwoHACr3Gwmqrj5Y+ct b1rODlxY3VWKRf7nG/29J2jH9AT4iNvebTDTkFPBC+18WHxZJFklAmgFbn582UK+ZRxf 08AetcbrbALJRVNzDkjBWaauhqxzYhYaGGpUOOehuvi+ZovaNMysnWs0GxAFLMCTeTar StGslXUnbpxl2cwzjI3cyP7Tp2CIDH5WaEqAZSpqbFW6gA8/XfGkV3uSzFlofJuFWmiP RgbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717757341; x=1718362141; h=mime-version:date:references:in-reply-to:subject:to:from:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wh6NE0mdyMBZt3ncX3OqN2XoCeTuVXPtyXioWCziwwQ=; b=QKMnCkS9F1q86pPuD7n3AT3GEP9GDjHVC/9NqiwecsXFOKUewcJ9wPl0lWDZBzv0Vk oC1h6Vn0nejKC4bVODpYJ3XJs5umP1mOmzMQBlVoqe320G49KrJcpmlE3+647tUwT/io O33Ruo/l9/glY9pjXToODAB4C2a4WakuY+buVFggXFNGPAb9mdhjNmNJcwPwaPDTkcHm 7EWA8o8of7cFl86mIMa3XOCePW4ERtWvnWfw9QPXOdqaViLcUTXeglw4OUWwlXlRyyjv mszrtB8MYMeG//rXN1JYg8t1NdPHvt/uw09nFz7uRb+uZA8hzGGAL6b0L5gLWdZTcDRN ApHg== X-Forwarded-Encrypted: i=1; AJvYcCVdsPd7xWXP8QoQXmrABw4I/EtjHDKbQgeJJ1iqImBaUGvKcsn5J+qK7YL6jUC1PRUzBG8/B34IwPdfjX5AVKFVZvRwCmI= X-Gm-Message-State: AOJu0Yxp0HBNOByyvPclwzmJfgC/0ioPqfR23+sZc7Ns9j0tERWEOWcL krgC7GUNBjRCSSNfNHTaAXSgrY+b9E7RDxtpXKhsnIcuWdOTHNne X-Google-Smtp-Source: AGHT+IFZCx2Wp7lg7kXLRiyWMx3bOn93O96JSmEyWPS+9KwyuQJyVhR45ZW/fYIl8GBziXPRK5dZig== X-Received: by 2002:a05:600c:1914:b0:421:4f34:3ada with SMTP id 5b1f17b1804b1-42164a20d68mr19336135e9.32.1717757340738; Fri, 07 Jun 2024 03:49:00 -0700 (PDT) Received: from keynux.home.arpa. ([2a01:e0a:505:3460:1c18:688d:ece4:372e]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-421580fe3cfsm81634515e9.9.2024.06.07.03.48.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 03:49:00 -0700 (PDT) Message-ID: <6662e59c.050a0220.ebd80.ced5@mx.google.com> Received: by keynux.home.arpa. (sSMTP sendmail emulation); Fri, 07 Jun 2024 12:48:58 +0200 From: Bruno Barbier To: Uwe Brauer , emacs-orgmode@gnu.org Subject: Re: remote calls to tables and (empty entry, NAN) In-Reply-To: <87ikylfc34.fsf@mat.ucm.es> References: <87ikylfc34.fsf@mat.ucm.es> Date: Fri, 07 Jun 2024 12:48:58 +0200 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=brubar.cs@gmail.com; helo=mail-wm1-x32d.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, MSGID_FROM_MTA_HEADER=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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.67 X-Spam-Score: -6.67 X-Migadu-Queue-Id: 2EAE766997 X-Migadu-Scanner: mx11.migadu.com X-TUID: YuwjhntduUuJ Hi, Uwe Brauer writes: > However if in table1 there is an empty entry in the relevant column, > remote copies it as 0 > > #+begin_src > > #+NAME: table2 > | Name | Ex1 | Ex2 | Ex2 | Ex4 | Ex5 | ResSh1 | > |--------+-----+-----+-----+-----+-----+--------| > | Smith | | 3 | 4 | 6 | 7 | | > | Miller | 2 | 10 | 1 | 1 | 5 | 19 | > | Wick | 1 | 2 | 3 | 10 | 2 | 18 | > #+TBLFM: $7=if("$2" == "nan", string(""),vsum($2..$6)); E f-2 > > > #+Name: total > | Name | ResSh1 | ResSh2 | Total | > |--------+--------+--------+-------| > | Smith | 0 | | | > | Miller | 19 | | | > | Wick | 18 | | | > #+TBLFM: $2=remote(table2,@@#$7) > #+end_src > > Any idea how to obtain an empty entry instead of 0? This works for me: #+TBLFM: $2=if(typeof(remote(table2, @@#$7)) == 12, string(""), remote(table2, @@#$7)); E (everything is documented here: https://orgmode.org/manual/Formula-syntax-for-Calc.html#Formula-syntax-for-Calc ) This works too, although I'm not sure it should: #+TBLFM: $2=if("remote(table2, @@#$7)" = "nan", string(""), remote(table2, @@#$7)); E HTH, Bruno