From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id WJwVLfLjv2Q5bQEASxT56A (envelope-from ) for ; Tue, 25 Jul 2023 17:02:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id oMNRLPLjv2RzGgEAG6o9tA (envelope-from ) for ; Tue, 25 Jul 2023 17:02:10 +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 918104B7B1 for ; Tue, 25 Jul 2023 17:02:09 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=cqxTmMte; 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=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1690297330; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=TFyltVFkDyIjNe12HXinMzpnyVoVG/GmDbzcKztKcis=; b=EguetBL1O5iszkk+gmWNzGwqjHxMO7Tf9mAvg/gGFnjBN5DwCXPMURUsag4aGCnXwekP5w pWx1c07NIA680C4GeV8O5lNhJWXUso3aqhLI+Xm9o3FcFOTbij1rvNA5zIDHct0khn07uH sLX/rdskhd4Pg00nCvl0MclCGi6h+8ztxsGf2sd1I3jrjW4tlJZRmDs6Bcqy/TfTQvYwk3 rIpd+dVzffiQEP068TNpmjwxhu8XnINUDQz4ZyF1rmPU/IyxHYpc7rPillbiha1DZTJYIp RF1I10GZuknzlaO3wqWc4AsR71/YD/r2d2iwXg/nF/lzayrKVJ/3xOgeVzkaAA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1690297330; a=rsa-sha256; cv=none; b=QBpOwYYBOBImSDxki6TJVOcK5/lA9B2nMsF951lJYP4ygctGe0VgI4xcmfYx0uPSR6iLy2 tmqx2thgrzP+J26YmVbUlFpIYPyz4peEjuuiMF6AO70XpITHcYrQjxH7Y1BaFhiyl5bKOt S8usOg4HSGaJiUpuotGvbsX4o+wD9T93xORB2ppTTlNxkhoe4Qqq/GAPkAOHrtvr61Qi0A 2FstMi8gPW4gtCyka5M2BdVDJQIbmjCO9GlaHb7GG0uLwnIa7X25lw9hxoiV7esB72Htvj 1avv5e0tLT5zmZe+c0Qgoas5Ctlu2BmZK4PhJey8t3kHEDh32p8c41i/MJwtDw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=cqxTmMte; 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=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qOJXH-0001HJ-LP; Tue, 25 Jul 2023 11:01:15 -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 1qOJXD-0001FT-7F for emacs-orgmode@gnu.org; Tue, 25 Jul 2023 11:01:11 -0400 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qOJXA-0001uX-B4 for emacs-orgmode@gnu.org; Tue, 25 Jul 2023 11:01:09 -0400 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-4fd32e611e0so7126401e87.0 for ; Tue, 25 Jul 2023 08:01:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690297266; x=1690902066; h=content-transfer-encoding:in-reply-to:mail-followup-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:sender:from:to:cc:subject:date:message-id:reply-to; bh=TFyltVFkDyIjNe12HXinMzpnyVoVG/GmDbzcKztKcis=; b=cqxTmMteGs4Dn9B983GU6ftroC8aec6N9XYaGhva7MYW4VLtcVyeAojOyaFj19vfyT xerY0MBeFxZXxvhHCfUVbc798sdmeJKHkXngN9Irpqdvno/zXw1ECxzbVvsWINE6sJ6W 7EOF+i0VqAnva66ngBoWrEiYueouKWFFPc5ymf2a9Gy+gKXxINslh5YcK9QOw4JGpWNy u0C5cge/LlX0d1aI2BCp1N+rHVlEc6XWcSZx41okpGOPGmh4bhEKywhZNZnm0BgsoI6+ rpYdCS5jxJFQ8rhMBtZDBWHKxRuQdQRDy3VV/AtR4kHmOn59jdIztBTTPO+BRJXLk5jk jodQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690297266; x=1690902066; h=content-transfer-encoding:in-reply-to:mail-followup-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=TFyltVFkDyIjNe12HXinMzpnyVoVG/GmDbzcKztKcis=; b=hwoObJLZro18vHkxUopt93nJ70E18AGgq90uiS4aCoQUMTlQBl1/cKM9Gdjf8+A+Xo DlU4ZYysCcaXhciR2x+Ivtqueza42+5zYH4QBByUWTIvGWcU1BQE9iszCJRp/E2NV1uM e1p0nzBjNztxASSCmBVrbgaTQbUIZ+wV6rWOTybil0F13VTG0PoRdpbVzY79b5F3n3Gv /B3JSKBg79c99GpzzrM7Je0gDXw2XH0qnjba3EEJvkTgX9uptvSzoBjjL8QSGzjn0FfY moNMsQxzAUKdcIKhJemHE5UxILznoPFp6XtY9KHKZTkn9XwemLfsTpcaGynPyFEfvmzG iRPg== X-Gm-Message-State: ABy/qLaXxNyPR5Up6mIS9sLyRa3ML/HjQ8/h149vk8mOK2OKBpankjD/ ymhbjhC3V5cQz9GHghjoIXV5wylRfyM= X-Google-Smtp-Source: APBJJlGvI5VrWDCfcSHmxA8l+1UWFOn2vQTO70zqulvcPeXzHs2SwK4kVzsT+bu6/ppA0kSaXB/LjA== X-Received: by 2002:a05:6512:2210:b0:4f8:6e1a:f3ac with SMTP id h16-20020a056512221000b004f86e1af3acmr1135118lfu.28.1690297266104; Tue, 25 Jul 2023 08:01:06 -0700 (PDT) Received: from [192.168.0.101] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id s1-20020a19ad41000000b004f864690901sm2801903lfd.244.2023.07.25.08.01.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 Jul 2023 08:01:05 -0700 (PDT) Message-ID: <8b17c390-4aa7-f988-aa9c-54479b8b4461@gmail.com> Date: Tue, 25 Jul 2023 22:01:03 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH] lisp/org-table.el: Allow named columns on lhs Content-Language: en-US, ru-RU To: Gavin Downard Cc: emacs-orgmode@gnu.org References: <877cqwbpa2.fsf@runbox.com> <4fee1ca5-4d38-0bb9-1931-ee554307ac4d@gmail.com> <87wmyoks82.fsf@runbox.com> From: Max Nikulin Mail-Followup-To: Gavin Downard , emacs-orgmode@gnu.org In-Reply-To: <87wmyoks82.fsf@runbox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::12a; envelope-from=manikulin@gmail.com; helo=mail-lf1-x12a.google.com X-Spam_score_int: 11 X-Spam_score: 1.1 X-Spam_bar: + X-Spam_report: (1.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, NICE_REPLY_A=-0.091, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: -2.06 X-Spam-Score: -2.06 X-Migadu-Queue-Id: 918104B7B1 X-Migadu-Scanner: mx1.migadu.com X-TUID: 2YaFWPgRsuiT On 25/07/2023 03:29, Gavin Downard wrote: > Max Nikulin writes: >> I have tried the patch. The formula for the named column "$three=" does >> not work. >> >> | ! | one | two | three | four | >> |---+-----+-----+-------+------| >> | # | 1 | 2 | | 3 | >> #+tblfm: @>$5=$one+$two::@>$three=$one+$two > > Yeah, I guess my current patch only supports column names in column > formulas. Allowing column names inside of arbitrary references will take > some more comprehensive changes. I'll see what I can do. The regexp for parsing formulas does not allow named references after @. I have no idea if other code should be modified as well. I consider it as more important than detection of duplicated definitions. A crazy idea: several columns may have the same name: | | Jun sum | Jun count | Jun avg | Jul sum | Jul count | Jul avg | | ! | | | average | | | average | |---+---------+-----------+---------+---------+-----------+---------| | | 150 | 10 | | 200 | 14 | | #+tblfm: $average=$-2/$-1 It has no sense for numeric references but with names it can help to avoid repeated expressions.