From: Uwe Brauer <oub@mat.ucm.es>
To: emacs-orgmode@gnu.org
Subject: table, calc, reorder and protect calculation in one cell
Date: Tue, 11 Jun 2019 11:35:09 +0200 [thread overview]
Message-ID: <87blz4qxbm.fsf@mat.ucm.es> (raw)
Hi
I have the following problem
This is my original table
The row starting with smith is calculated differently from the other two
* Orginal
#+begin_src
| name | C1 | C2 | Res |
|--------+----+----+-----|
| Adams | 5 | 5 | 10 |
| Miller | 6 | 2 | 8 |
| Smith | 9 | 1 | 1.7 |
,#+TBLFM: $4=$3+$2::@4$4=0.1*@4$2+0.8*@4$3
#+end_src
Now I reorder the table using the column C1
* Original reordered
#+begin_src
| name | C1 | C2 | Res |
|--------+----+----+-----|
| Smith | 9 | 1 | 10 |
| Miller | 6 | 2 | 8 |
| Adams | 5 | 5 | 4.5 |
,#+TBLFM: $4=$3+$2::@4$4=0.1*@4$2+0.8*@4$3
#+end_src
Everything looks fine, however when I recalculate the table calc follows
its definition and I obtain
* Original reordered recalculated
#+begin_src
| name | C1 | C2 | Res |
|--------+----+----+-----|
| Smith | 9 | 1 | 10 |
| Miller | 6 | 2 | 8 |
| Adams | 5 | 5 | 4.5 |
,#+TBLFM: $4=$3+$2::@4$4=0.1*@4$2+0.8*@4$3
#+end_src
Which is not what I want. So the question is this.
Is there any way to enhance the ordering of rows so that it is reflected
in the way the rows a calculated
I mean reordering should/could have produced
* Original reordered TBLFM changed
#+begin_src
| name | C1 | C2 | Res |
|--------+----+----+-----|
| Smith | 9 | 1 | 10 |
| Miller | 6 | 2 | 8 |
| Adams | 5 | 5 | 4.5 |
,#+TBLFM: $4=$3+$2::@2$4=0.1*@2$2+0.8*@2$3
#+end_src
Is this behavior possible? When I delete a row or a column, the TBLFM
is updated, could that be done for reordering?
Thanks
Uwe Brauer
next reply other threads:[~2019-06-11 9:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-11 9:35 Uwe Brauer [this message]
2019-06-17 6:07 ` table, calc, reorder and protect calculation in one cell Michael Brand
2019-06-17 21:06 ` Uwe Brauer
2019-08-10 14:09 ` Carsten Dominik
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=87blz4qxbm.fsf@mat.ucm.es \
--to=oub@mat.ucm.es \
--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 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).