Jeff Trull <edas...@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>

Reply via email to