emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Better ways to address fields in tables


From: Torsten Wagner
Subject: [Orgmode] Better ways to address fields in tables
Date: Wed, 24 Nov 2010 23:37:06 +0900

Hi,
I was wondering whether it might be possible to address table fields, which 
float due to adding and deletion of rows, more easily and thought about two 
possible ways.
The way I know (are there more ways?)

| | A | B|
|-+---+---|
| | a | 1 |
| | b | 1 |
|-+---+---|
| | s | 2 |
|^|   | f |
|-+---+---|
many many more rows....

To calculate the sum s of all rows between a and b even if there will be more 
or less any time later I, use
f = vsum(@address@hidden)

Rather verbose for a simple sum.
Might it be possible to adress the target fields relativ to horizonal lines?
@II = vsum(@address@hidden)
This would make it independend of the number of rows in the block and there 
would be no need to assign a name to the field.

On the other hand, I often use a description beside the actual field like the 
"s" in the above example and in reality it might be something like "sum of all 
foo". Now I have to assign a name for the variable (above simply "f") or e.g., 
sum_foo. I am ending up having two descriptions for the same field, a human 
readable and an arithmetical.
Marking the first one (the one contains "s") in a special way could indicate to 
use it as a variablename for another field.

| A | B|
|---+---|
| a | 1 |
| b | 1 |
|---+---|
| s\> | 2 |
 
Whereas \> indicates: Use this string as the variable name for the field to the 
right. Similar, there could be \< \^ \v to assign the string to the field to 
the left, above or below. This method would be redundant to the original method 
for fields above and below but less verbose. Kind of shortcut.

Greetings
Torsten
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]