From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id WKJuHhHzJ2U1yAAA9RJhRA:P1 (envelope-from ) for ; Thu, 12 Oct 2023 15:22:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id WKJuHhHzJ2U1yAAA9RJhRA (envelope-from ) for ; Thu, 12 Oct 2023 15:22:25 +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 20E35425E6 for ; Thu, 12 Oct 2023 15:22:25 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=iK1P+287; 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=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1697116945; 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=grJYMS+xvWzdH+E4vUmDnsC9IKe4+IgXMLE3Mh7onSo=; b=sAECR8eSlMHqs0ncvPh5seAUI8yNWPWCyNZlWH58P160fbB5762MxlwUmso0jYxuE0lrQl LSbU5Ut9XGCGDIcm//rLiwJOHSd+fSqfUgK9WqdFdPo9xF8vlQ8c5HHWv2hp+gGQJP0WRY 9L6zLy2s9mNvk7U6hm5aXj35UAS0yF1AwOPFHySdxO0Ix3W0+mtYs63pBk4qDFd7S1nuKt m1LbpOCZaGnz4LTgR//O9HzwTgluUomcJGh6xt1m4XHqtNvzw6gVSUKaO5ewtWbM1erKAX pUR5++SKb2zlYS4bHxPi3O6qSpGvpfn7Z7vRx4x27VvljPwL5Qm+0HAJh7TjJA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=iK1P+287; 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=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1697116945; a=rsa-sha256; cv=none; b=DSty6bXJEydaZ/33qpyISCbUC16d6BHJc2S506H0bv2LSgZ2CCt95knN8974IrUrIjmGRi AzCSD14kFYYAsM1ynuKizNIMIIUwQowihqGzXNK5ZXhHjqwaDRSYRZGPww95aju3ugD0L5 hBpGPfB3puF+eju0W0hKmTCTgw/LL7klosq9WAr5+HEGl16d/p7s3ytPdUYORv7EEyygOc CnyWD7RSuLbvKf6LYt+vwpVbCSt0TspHnh9plk6eKgkY4OuDbeCI0PaHMPzYtdD0PJQm9t QR3T4MLOqhFaLDzW/o178/ARF9umXBwWf0CaLJk8Yf/iLhHtqbbUq4Pe1wzjzQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqvcv-0001mz-T8; Thu, 12 Oct 2023 09:21:21 -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 1qqvcq-0001mr-ON for emacs-orgmode@gnu.org; Thu, 12 Oct 2023 09:21:16 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqvcp-0007kR-2u for emacs-orgmode@gnu.org; Thu, 12 Oct 2023 09:21:16 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-307d20548adso852263f8f.0 for ; Thu, 12 Oct 2023 06:21:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697116873; x=1697721673; 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=grJYMS+xvWzdH+E4vUmDnsC9IKe4+IgXMLE3Mh7onSo=; b=iK1P+287/gqGSsJz3ti3mG4CTs0BjLisMHorQuH5P0aGfSeGYksS+fKh2HwAR0/wUT xQmFu0xIqxBk7B1h8uapoeuIp4z+W1a4PLZs9tcvukmOYKVb+r2+pZG4NVWhDc3Bbb3f Go+LbdGRcIh0IxDSKmpwJ/8SJUruLoW4xY3EX5nszw3M3JDVH5x7/c9ZyYeOxyLBW0Se Rlo7qLIr0Zjv7wZJYMHaCcs2tiu2oGy4iIV7tYYkpYiuFPzHmB9LGbfS1ApP1PNSQJSo OTFFH304W/jgil920IurMATtmvFyrqVb+1cvlwzegIq4RqipM1FbdfndbKa6+l945M04 qAqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697116873; x=1697721673; 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=grJYMS+xvWzdH+E4vUmDnsC9IKe4+IgXMLE3Mh7onSo=; b=SlzQswBet7p/ezAZwZOpMremYJi5JB38smmLlun8Pwbh8qYrqgbhAhzFvCthwobzQH lnb9zgxwahKc4RtQRbX6akSIEAk4j7CK6C5WrVjkqW1CVn4r8f6VSCcA4lILetXYVq7c YJOy0B3wzq5Kf5kh2lhk3/jjsZjLxPM93W8LewMztBq6TzjSMG52+QfZnjQIfHFZDYY+ Q3lV8nT89DTClAs+sPuQqnzv8HkaNlU1UjxiFAyG548GDfNw7fhMTi8V4bP3SpjjZPj5 30cHiwbpkyqLf8o+1XHtRDpaYRkbH5hEqnZ9gV3Sn/txp9hzFYPI9TpH2Sf7veft2XPx 1ZHQ== X-Gm-Message-State: AOJu0YyLQ52VPG7gVMHZJ88DEJuV3k0yxXUThjcUZ3rHa9W5eRErCmlc 3xhjoKkmgG+HNbE18xvJ9ug= X-Google-Smtp-Source: AGHT+IFcdhKhVJurSdNLPEYQ8KVJdOA7zejybKw+Yx5oeUX5QOfph+o2dylGkL2W16zYvaAdr3W7Ug== X-Received: by 2002:adf:e8cc:0:b0:322:da1f:60d9 with SMTP id k12-20020adfe8cc000000b00322da1f60d9mr22379492wrn.47.1697116872760; Thu, 12 Oct 2023 06:21:12 -0700 (PDT) Received: from keynux ([2a01:e0a:505:3460:af6d:fac1:6ab6:3fb2]) by smtp.gmail.com with ESMTPSA id x11-20020adff0cb000000b00323293bd023sm18568344wro.6.2023.10.12.06.21.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 06:21:12 -0700 (PDT) Message-ID: <6527f2c8.df0a0220.2dfe0.7f88@mx.google.com> Received: by keynux (sSMTP sendmail emulation); Thu, 12 Oct 2023 15:21:10 +0200 From: Bruno Barbier To: Uwe Brauer , emacs-orgmode@gnu.org Subject: Re: [the cryptic @@#$7] In-Reply-To: <87v8bd5hkw.fsf@mat.ucm.es> References: <87h6n1i84d.fsf@mat.ucm.es> <6522dbff.df0a0220.53465.d25c@mx.google.com> <871qe5hxed.fsf@mat.ucm.es> <87v8bhgidc.fsf_-_@mat.ucm.es> <6522e73e.1c0a0220.17022.1dfd@mx.google.com> <87v8bd5hkw.fsf@mat.ucm.es> Date: Thu, 12 Oct 2023 15:21:10 +0200 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=brubar.cs@gmail.com; helo=mail-wr1-x431.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 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -5.48 X-Spam-Score: -5.48 X-Migadu-Queue-Id: 20E35425E6 X-Migadu-Scanner: mx2.migadu.com X-TUID: whnIVNpVosBt Hi Uwe, Uwe Brauer writes: > Here is an example where the org-lookup-first method seems to fail > #+TBLFM: $3='(org-lookup-first $2 '(remote(Table1A, @I$1..@II$1)) '(remote(Table1A, @I$7..@II$7)))::$4='(org-lookup-first $2 '(remote(Table2A, @I$1..@II$1)) '(remote(Table2A, @I$7..@II$7)))::$5=vsum($3..$4);f2 You forgot to update the column numbers: the names to look for are now in the column '2', and, the totals are now in column '8'. This should work: #+TBLFM: $3='(org-lookup-first $2 '(remote(Table1A, @I$2..@II$2)) '(remote(Table1A, @I$8..@II$8))) #+TBLFM: $4='(org-lookup-first $2 '(remote(Table2A, @I$2..@II$2)) '(remote(Table2A, @I$8..@II$8))) #+TBLFM: $5=vsum($3..$4);f2 Bruno