emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-table: deleting columns not always actualise the formulas.
@ 2021-07-07  7:07 Uwe Brauer
  2021-07-07 12:16 ` Eric S Fraga
  0 siblings, 1 reply; 5+ messages in thread
From: Uwe Brauer @ 2021-07-07  7:07 UTC (permalink / raw)
  To: emacs-orgmode


Hi

Please consider the following example
#+begin_src elisp

| / | <>      |    <> |     <> |      <> |       <> | <>        |         <> |       |      |      |      |      |      |      |         |         |
|   |         | DMI G | DMNI H | ExNDM I | ExNDNM J | my-result | his-result | Check | aux1 | aux2 | aux3 | aux4 | aux5 | aux6 | Res-aux | Weight2 |
|   | Weight: |     1 |    0.2 |       1 |      0.1 |           |        0.1 |       |      |      |      |      |      |      |         |     0.1 |
|---+---------+-------+--------+---------+----------+-----------+------------+-------+------+------+------+------+------+------+---------+---------|
|   | user1   |     0 |      0 |      11 |        0 | 10.1      |       10.1 | OK    |    0 |    0 |  0.0 |  0.1 |   10 |  0.0 |    10.1 |         |
|---+---------+-------+--------+---------+----------+-----------+------------+-------+------+------+------+------+------+------+---------+---------|
,#+TBLFM: $7=if($3>10,($3-10)*@3$17,0)+ min(10,$3)*@3$3+ min(10,$4)*@3$4 + if($5>10,($5-10)*@3$17,0)+min(10,$5)*@3$5 +@3$6*$6;f1::$9=if("$7" == "$8", OK, NO)::$10=if($3>10,($3-10)*@3$17,0);f1::$11=min(10,$3)*@3$3;f1::$12=min(10,$4)*@3$4;f1::$13=if($5>10,($5-10)*@3$17,$5);f1::$14=min(10,$5)*@3$3;f1::$15=@3$6*$6;f1::$16=vsum($10..$14);f1
#+end_src


Now I delete the last columns

#+begin_src elisp

| / | <>      |    <> |     <> |      <> |       <> | <>        |         |
|   |         | DMI G | DMNI H | ExNDM I | ExNDNM J | my-result | Weight2 |
|   | Weight: |     1 |    0.2 |       1 |      0.1 |           |     0.1 |
|---+---------+-------+--------+---------+----------+-----------+---------|
|   | user1   |     0 |      0 |      11 |        0 | 10.1      |         |
|---+---------+-------+--------+---------+----------+-----------+---------|
,#+TBLFM: $7=if($3>10,($3-10)*@3$16,0)+ min(10,$3)*@3$3+ min(10,$4)*@3$4 + if($5>10,($5-10)*@3$16,0)+min(10,$5)*@3$5 +@3$6*$6;f1::
#+end_src

But as you can see @3$17 only gets changed to @3$16 but not to @3$8 as
it should be.

Is this a *BUG*? I am running emacs and org git master from a couple of
weeks ago.

Regards

Uwe Brauer 




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: org-table: deleting columns not always actualise the formulas.
  2021-07-07  7:07 org-table: deleting columns not always actualise the formulas Uwe Brauer
@ 2021-07-07 12:16 ` Eric S Fraga
  2021-07-07 16:22   ` Uwe Brauer
  2022-10-05  5:18   ` Ihor Radchenko
  0 siblings, 2 replies; 5+ messages in thread
From: Eric S Fraga @ 2021-07-07 12:16 UTC (permalink / raw)
  To: emacs-orgmode

On Wednesday,  7 Jul 2021 at 09:07, Uwe Brauer wrote:
> Hi
>
> Please consider the following example
>
> #+begin_src elisp

[...]

> #+end_src
> 
> Now I delete the last columns
>
> But as you can see @3$17 only gets changed to @3$16 but not to @3$8 as
> it should be.

Confirmed.

One solution, for the moment, is to move the column over first and then
delete the columns.

By the way, it would help if you src blocks were org and not elisp as
the language!

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4.6-577-gf76d4d
: Latest paper written in org: https://arxiv.org/abs/2106.05096


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: org-table: deleting columns not always actualise the formulas.
  2021-07-07 12:16 ` Eric S Fraga
@ 2021-07-07 16:22   ` Uwe Brauer
       [not found]     ` <878s2iowwz.fsf@ucl.ac.uk>
  2022-10-05  5:18   ` Ihor Radchenko
  1 sibling, 1 reply; 5+ messages in thread
From: Uwe Brauer @ 2021-07-07 16:22 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 813 bytes --]

>>> "ESF" == Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> On Wednesday,  7 Jul 2021 at 09:07, Uwe Brauer wrote:
>> Hi
>> 
>> Please consider the following example
>> 
>> #+begin_src elisp

> [...]

>> #+end_src
>> 
>> Now I delete the last columns
>> 
>> But as you can see @3$17 only gets changed to @3$16 but not to @3$8 as
>> it should be.

> Confirmed.

Ok so it is a bug.
I will write a but report then.

> One solution, for the moment, is to move the column over first and then
> delete the columns.

> By the way, it would help if you src blocks were org and not elisp as
> the language!

Oops, I was not sure whether this was the right conf, so to be on the
safe side I used elisp, thanks for pointing this out to me.


Off the record: good look tonight..... Although....

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: org-table: deleting columns not always actualise the formulas.
       [not found]     ` <878s2iowwz.fsf@ucl.ac.uk>
@ 2021-07-07 18:43       ` Uwe Brauer
  0 siblings, 0 replies; 5+ messages in thread
From: Uwe Brauer @ 2021-07-07 18:43 UTC (permalink / raw)
  To: Org Mode List

[-- Attachment #1: Type: text/plain, Size: 978 bytes --]

>>> "ESF" == Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> On Wednesday,  7 Jul 2021 at 18:22, Uwe Brauer wrote:
>> Off the record: good look tonight..... Although....

> Yesterday's match was fantastic even though the outcome was not what I hoped for.

I agree, I think it is fair to say, that Spain was the better team, but
then football is about scoring not about playing aesthetically pleasing. 

When Italy started the penalty shootout, I thought this is a lost case,
since, I think, most teams that started the penalties, won.

As for tonight: I am torn between England (because it took them so long
to reach a semi finals and even being the favorite) and Denmark (because what
happened to Christian Eriksen.

A last word concerning the Germany England game. 

England deserved the victory, although if Müller had kept his nerve and
made that goal things might have turned out differently.

So as I said good luck tonight: might the better team win.

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: org-table: deleting columns not always actualise the formulas.
  2021-07-07 12:16 ` Eric S Fraga
  2021-07-07 16:22   ` Uwe Brauer
@ 2022-10-05  5:18   ` Ihor Radchenko
  1 sibling, 0 replies; 5+ messages in thread
From: Ihor Radchenko @ 2022-10-05  5:18 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-orgmode

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

>> But as you can see @3$17 only gets changed to @3$16 but not to @3$8 as
>> it should be.
>
> Confirmed.

Fixed.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=ceb99b86006f9a10a772860c72dd473cb15a72aa

-- 
Ihor Radchenko,
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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-10-05  5:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-07  7:07 org-table: deleting columns not always actualise the formulas Uwe Brauer
2021-07-07 12:16 ` Eric S Fraga
2021-07-07 16:22   ` Uwe Brauer
     [not found]     ` <878s2iowwz.fsf@ucl.ac.uk>
2021-07-07 18:43       ` Uwe Brauer
2022-10-05  5:18   ` Ihor Radchenko

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).