emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Can’t assign to hline relative reference
@ 2020-10-21  1:14 Dante Catalfamo
  2020-10-21 12:43 ` Daniel Herzig
  0 siblings, 1 reply; 7+ messages in thread
From: Dante Catalfamo @ 2020-10-21  1:14 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

Hello,

I'm trying to create a table where the third column between two hlines is set by a formula referencing the second column.

Here is an example:

| a     |     b |      c |
|-------+-------+--------|
| row 1 | 12.00 | 144.00 |
| row 2 |       |  23.00 |
|-------+-------+--------|
| sum   | 12.00 | 167.00 |
#+TBLFM: @I$3..II$3=if($2 != 0, 12*$2, $3);%.2f::@4$2=vsum(@I..II);%.2f::@4$3=vsum(@I..II);%.2f

When I try to calculate this table however, I get the error "Can’t assign to hline relative reference".

Why is this now allowed? This seems like a fairly mundane use of a table to me. It is explicitly disabled in the source, but without explanation, and searching the mailing list doesn't turn up many answers.

Is there a recommended way to handle a situation like this?

Could this feature be fixed?

Thank you,
Dante



^ permalink raw reply	[flat|nested] 7+ messages in thread
* Bug: Can’t assign to hline relative reference
@ 2020-10-20 21:39 Dante Catalfamo
  0 siblings, 0 replies; 7+ messages in thread
From: Dante Catalfamo @ 2020-10-20 21:39 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

Hello,

I'm trying to create a table where the third column between two hlines is set by a formula referencing the second column.

Here is an example:

| a     |     b |      c |
|-------+-------+--------|
| row 1 | 12.00 | 144.00 |
| row 2 |       |  23.00 |
|-------+-------+--------|
| sum   | 12.00 | 167.00 |
#+TBLFM: @I$3..II$3=if($2 != 0, 12*$2, $3);%.2f::@4$2=vsum(@I..II);%.2f::@4$3=vsum(@I..II);%.2f

When I try to calculate this table however, I get the error "Can’t assign to hline relative reference".

Why is this now allowed? This seems like a fairly mundane use of a table to me. It is explicitly disabled in the source, but without explanation, and searching the mailing list doesn't turn up many answers.

Is there a recommended way to handle a situation like this?

Could this feature be fixed?

Thank you,
Dante


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

end of thread, other threads:[~2020-10-29 12:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-21  1:14 Bug: Can’t assign to hline relative reference Dante Catalfamo
2020-10-21 12:43 ` Daniel Herzig
2020-10-21 16:14   ` Dante Catalfamo
2020-10-22 12:04     ` Maxim Nikulin
2020-10-22 19:56       ` Dante Catalfamo
2020-10-29 12:40         ` Maxim Nikulin
  -- strict thread matches above, loose matches on Subject: below --
2020-10-20 21:39 Dante Catalfamo

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