From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id oFWlKJ6PCmZKGwEA62LTzQ:P1 (envelope-from ) for ; Mon, 01 Apr 2024 12:42:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id oFWlKJ6PCmZKGwEA62LTzQ (envelope-from ) for ; Mon, 01 Apr 2024 12:42:38 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=XDrbWfpa; dmarc=pass (policy=none) header.from=posteo.net; 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-Seal: i=1; s=key1; d=yhetil.org; t=1711968158; a=rsa-sha256; cv=none; b=dkczcqsjmRaHC62SAjXakCKr8a00+zWYPNZ78oCgioXWgabr4oMMD8VLvNr/RiRdeLeBqM XIRIC2WovZZqCYKekwe7Cx6h4IpG0TmPM0370mXdyrmKvnODXrt/eubfgxMrRCRX2gf97f kwGcuo9L25WOal9vcdrLps3j/wEOHnBURv/JTo9HvioEGvkelm+ecCGKXaTTfv+swN0dT8 eIzkF/k8p6R9BdCfsFZjquB3+Z0CUGMI90W6xfmtQggROW7iTpuaGQ/1I0sXBTgz269Q5C 1mOOcKA6BUlIYHF22i2bnQnPAkwRGPb/7f1Eor1rUGxugznwpS11xI73Laz1PA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=XDrbWfpa; dmarc=pass (policy=none) header.from=posteo.net; 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=1711968158; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=fQ4CP6g0PUnYgej6uLmsILGHi4h4Ai1L42jgWXAO2lc=; b=KjejqUAVsZ2p4rvfOZ2vGWNmI/PlC0kXo+NkEkxZiDS94HvAYgMgadFsGKaUQ0qaE+dQ7x WvWUk3UQggv7cK0m3IeJN+7t1vQ5N0FXQ11ZuVFhNBEVVAsMdwFoiWFzOEKPs34y6N1ccp H2y8Ykl5iWkdQhSfYrXNcBMuqtDMgz43x8Y5Vw034DPJdSV3reOUqKSrnXMnsPkdqjkfYi nVSI4i3UY2+Syv5mDHeChkAcCt3VppRloTkuheaUC+reqVObtUsn/LhoK99SdlcbkJkJNy OhEEt7aHTClo9lzSFcyK7wUdFLsQwxNJw/2nGWFHqqStTD7TNBSkXwCIPezN8Q== 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 4BB1525578 for ; Mon, 1 Apr 2024 12:42:38 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rrF7E-0005yK-41; Mon, 01 Apr 2024 06:42:12 -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 1rrF7C-0005y9-0F for emacs-orgmode@gnu.org; Mon, 01 Apr 2024 06:42:10 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rrF79-0001zz-Qi for emacs-orgmode@gnu.org; Mon, 01 Apr 2024 06:42:09 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id EC723240027 for ; Mon, 1 Apr 2024 12:42:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1711968125; bh=X3f/rv7uZqWPk3oitbdRbnPBDkTw5o8FsmDj8Wx5WSM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=XDrbWfpaM2pbTjl5S5r1ZICWrhcUp7VVGL4vZH+ucu3G07BL3WbS6JdPYO66pR5fe K3GJySTM9Ol8b6TFZFSib2ZIdIxpUmonMKDRR87OH7igZdyHzNThj3sXjmTQvT/Ft3 D8nZyvP2t2eyoorN2zblg0sWHouf7OSg7Esztt5S7WQG3WAQ0SEB+hKv3s6TYc06Q7 CypWFrlGNXNX4oii7DV0NBGm1fD1FejRK1COCKtPBdMbTGZSuzunUpVrkqlbid7Xyh fz0Iv/SIQssNfz5444RrG76FmMSJGnXZBb0tqrxMbHehbHAebRqtuKWTetP+5AHYbK YV4j4jrABGzAQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4V7SHw0t0xz6tvl; Mon, 1 Apr 2024 12:42:03 +0200 (CEST) From: Ihor Radchenko To: Jeff Trull Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] org-export-table-row-number off by one when special row present [9.6.23 ( @ /home/jet/.config/emacs/elpa/org-9.6.23/)] In-Reply-To: References: Date: Mon, 01 Apr 2024 10:42:12 +0000 Message-ID: <87sf058iuz.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -7.17 X-Migadu-Queue-Id: 4BB1525578 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -7.17 X-TUID: kvOaWIvZQNzS Jeff Trull writes: > Consider this table: > > ... > org-export-table-row-number correctly returns 3 for the cell containing '4' > (and the target of the formula) > > Now add a column alignment row: > > ... > | | | > ... > org-export-table-row-number still returns 3 for the same cell, despite > the extra row. I think this is inconsistent with the documentation of > the function, which implies that only separator lines are considered > when determining the count. Also note that from a user perspective, > special rows (but not separators) are part of the row count. During export, table may be not the same as it appears in the original document - some rows may be omitted. `org-export-table-row-number' returns the coordinates in as-exported table, not in the original table. > I did some initial investigation and determined that org-element-map is > used to count the row numbers, and special rows are ignored in that > function. `org-element-map' by itself does not ignore special rows. It only ignores the AST elements that are marked to be ignored. In your example, with many built-in exporters, alignment rows are omitted from the export and thus `org-export-table-row-number' intentionally ignores them. So, there is no bug here. Or may it be that you encountered a different, more specific, problem? -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at