Next:Updating the table, Previous:Lookup functions, Up:The Spreadsheet [Contents][Index]
You can edit individual formulas in the minibuffer or directly in thefield. Org can also prepare a special buffer with all active formulasof a table. When offering a formula for editing, Org convertsreferences to the standard format (like ‘B3’ or ‘D&’) if possible. Ifyou prefer to only work with the internal format (like ‘@3$2’ or‘$4’), configure the variableorg-table-use-standard-references.
org-table-eval-formula) ¶Edit the formula associated with the current column/field in theminibuffer. SeeColumn formulas, andField and range formulas.
org-table-eval-formula) ¶Re-insert the active formula (either a field formula, or a columnformula) into the current field, so that you can edit it directly inthe field. The advantage over editing in the minibuffer is that youcan use the commandC-c ?.
org-table-field-info) ¶While editing a formula in a table field, highlight the field(s)referenced by the reference at point position in the formula.
org-table-toggle-coordinate-overlays) ¶Toggle the display of row and column numbers for a table, usingoverlays. These are updated each time the table is aligned; you canforce it withC-c C-c.
org-table-toggle-formula-debugger) ¶Toggle the formula debugger on and off. See below.
org-table-edit-formulas) ¶Edit all formulas for the current table in a special buffer, wherethe formulas are displayed one per line. If the current field hasan active formula, point in the formula editor marks it. Whileinside the special buffer, Org automatically highlights any field orrange reference at point position. You may edit, remove and addformulas, and use the following commands:
org-table-fedit-finish) ¶Exit the formula editor and store the modified formulas. WithC-u prefix, also apply the new formulas to theentire table.
org-table-fedit-abort) ¶Exit the formula editor without installing changes.
org-table-fedit-toggle-ref-type) ¶Toggle all references in the formula editor between standard (like‘B3’) and internal (like ‘@3$2’).
org-table-fedit-lisp-indent) ¶Pretty-print or indent Lisp formula at point. When in a linecontaining a Lisp formula, format the formula according to EmacsLisp rules. AnotherTAB collapses the formula backagain. In the open formula,TAB re-indents just likein Emacs Lisp mode.
lisp-complete-symbol) ¶Complete Lisp symbols, just like in Emacs Lisp mode.
Shift the reference at point. For example, if the reference is‘B3’ and you pressS-RIGHT, it becomes ‘C3’. This alsoworks for relative references and for hline references.
org-table-fedit-line-up) ¶Move the test line for column formulas up in the Org buffer.
org-table-fedit-line-down) ¶Move the test line for column formulas down in the Org buffer.
org-table-fedit-scroll-up) ¶Scroll up the window displaying the table.
org-table-fedit-scroll-down) ¶Scroll down the window displaying the table.
Turn the coordinate grid in the table on and off.
Making a table field blank does not remove the formula associated withthe field, because that is stored in a different line—the ‘TBLFM’keyword line. During the next recalculation, the field will be filledagain. To remove a formula from a field, you have to give an emptyreply when prompted for the formula, or to edit the ‘TBLFM’ keyword.
You may edit the ‘TBLFM’ keyword directly and re-apply the changedequations withC-c C-c in that line or with the normalrecalculation commands in the table.
You may apply the formula temporarily. This is useful when you wantto switch the formula applied to the table. Place multiple ‘TBLFM’keywords right after the table, and then pressC-c C-c onthe formula to apply. Here is an example:
| x | y ||---+---|| 1 | || 2 | |#+TBLFM: $2=$1*1#+TBLFM: $2=$1*2
PressingC-c C-c in the line of ‘#+TBLFM: $2=$1*2’ yields:
| x | y ||---+---|| 1 | 2 || 2 | 4 |#+TBLFM: $2=$1*1#+TBLFM: $2=$1*2
If you recalculate this table, withC-u C-c *, for example,you get the following result from applying only the first ‘TBLFM’keyword.
| x | y ||---+---|| 1 | 1 || 2 | 2 |#+TBLFM: $2=$1*1#+TBLFM: $2=$1*2
When the evaluation of a formula leads to an error, the field contentbecomes the string ‘#ERROR’. If you want to see what is going onduring variable substitution and calculation in order to find a bug,turn on formula debugging in the Tbl menu and repeat the calculation,for example by pressingC-u C-u C-c =RET in a field.Detailed information are displayed.
Next:Updating the table, Previous:Lookup functions, Up:The Spreadsheet [Contents][Index]