emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
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: Sun, 17 Mar 2024 14:03:52 +0000	[thread overview]
Message-ID: <87bk7dymyf.fsf@localhost> (raw)
In-Reply-To: <0E2BEC9E-15B2-4FCB-9890-6BAD6B8B7546@icloud.com>

Wu Ming <wu.ming2@icloud.com> writes:

> Very clear now. Thank you. But I was mostly confounded by references
> $0 and #0 versus the @@# (and $$#) you just described the processing
> of. Don’t want to abuse your time. I can figure it out when needed.
> But if you feel inclined to unravel this little detail of the manual
> as well I would clearly appreciate the effort.

The main difference is that @# always refer to the original table, while
$0 may refer to other tables as well.

(Generally, reference expansion process is not well documented,
unfortunately; it would be nice if somebody wrote a documentation
explaining the process - things can get tricky in some edge cases)

>> Normally, if you use org-table-* commands, the formulas get updated when
>> you move the columns.
>
> One side effect of using remote formulas is re-organizing columns doesn’t update them automatically. I should find the balance of readability and formulas maintenance cost. But you may have suggested the solution below already with named columns.

In theory, we might try to update such remote references at least in
current buffer. Contributions welcome.

>> To make things more readable, you can also assign names to columns:
>> 
>>     | ! |         |     P1 |     P2 |     P3 |   Tot |      |
>>     |   | Maximum |     10 |     15 |     25 |    50 | 10.0 |
>> 
>> Then, you can write $P1 = ... instead of $3 = ...
>> See "3.5.10 Advanced features" section of the manual.
>
> Clever. And we are at the “Advanced“ features already. Are advanced-advanced in the realm of Calc? 

> Asking because was also wondering how to optimize parameters (“solver”) and deal with locales (“,” vs “.” separators). For the latter I could possibly ‘tr’ them before sharing the output. But will possibly mess the alignment. Happened while trialling groff’s tbl.

AFAIK, GNU calc does not support comma as decimal point as _input_. For
output, I am not sure.

-- 
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	other threads:[~2024-03-17 14:04 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
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 [this message]

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=87bk7dymyf.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).