From: Ihor Radchenko <yantar92@posteo.net>
To: Jeff Trull <edaskel@att.net>
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/)]
Date: Mon, 01 Apr 2024 10:42:12 +0000 [thread overview]
Message-ID: <87sf058iuz.fsf@localhost> (raw)
In-Reply-To: <CAF_DUeEgLW2atD=_Bq9xSMA3oTceaAeBxKt8wu69PeT6FtOVpA@mail.gmail.com>
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>
next prev parent reply other threads:[~2024-04-01 10:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAF_DUeEgLW2atD=_Bq9xSMA3oTceaAeBxKt8wu69PeT6FtOVpA.ref@mail.gmail.com>
2024-03-31 18:38 ` [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/)] Jeff Trull
2024-04-01 10:42 ` Ihor Radchenko [this message]
[not found] ` <CAF_DUeH1RR=xCGBoFspVTRt9Za=LaHWgMuzq9-Ki2qUZUpuQxw@mail.gmail.com>
2024-04-02 12:51 ` Ihor Radchenko
2024-04-05 14:08 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sf058iuz.fsf@localhost \
--to=yantar92@posteo.net \
--cc=edaskel@att.net \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.