From: Ihor Radchenko <yantar92@posteo.net>
To: Wu Ming <wu.ming2@icloud.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Table column formula with remote reference
Date: Wed, 13 Mar 2024 12:16:08 +0000 [thread overview]
Message-ID: <8734suxr7b.fsf@localhost> (raw)
In-Reply-To: <86F6BD74-10F6-4796-B1A5-23B4FB425336@icloud.com>
Wu Ming <wu.ming2@icloud.com> writes:
> My fault. Missed the line "One of the very first actions during evaluation of Calc formulas and Lisp formulas is to substitute ‘@#’ and ‘$#’ in the formula with the row or column number of the field where the current result will go to.“ So '@@#' becomes '@<current row>'.
>
> Overlooked it also because I did read the other line "‘@0’ and ‘$0’ refer to the current row and column, respectively, i.e., to the row/column for the field being computed.” and did try '@0$1'. Why is this different from the above?
See "Remote references" subsection. It explains that in
remote(NAME,REF), REF is inside the remote table. Relative and current
column/row is ambiguous there.
In contrast, @# and $# are special - they are replaced before
remote(...) is processed.
I agree that the manual is somewhat confusing. Possibly, we may even
change `org-table-get-remote-range' to use relative references according
to the original table. Improvements welcome!
--
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-03-13 12:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-11 10:52 Table column formula with remote reference Wu Ming
2024-03-11 11:43 ` Wu Ming
2024-03-12 14:46 ` Ihor Radchenko
2024-03-13 6:04 ` Wu Ming
2024-03-13 12:16 ` Ihor Radchenko [this message]
2024-03-14 1:16 ` Wu Ming
2024-03-14 13:40 ` Fraga, Eric
2024-03-17 2:29 ` Wu Ming
2024-03-18 12:53 ` Fraga, Eric
2024-03-14 21:58 ` Ihor Radchenko
2024-03-17 2:55 ` Wu Ming
2024-03-17 14:03 ` 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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8734suxr7b.fsf@localhost \
--to=yantar92@posteo.net \
--cc=emacs-orgmode@gnu.org \
--cc=wu.ming2@icloud.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).