[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [BUG] org-export-table-row-number off by one when special row presen
From: |
Ihor Radchenko |
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/)] |
Date: |
Mon, 01 Apr 2024 10:42:12 +0000 |
Jeff Trull <edaskel@att.net> 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:
>
> ...
> | | <c> |
> ...
> 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 <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>