guide/10-tables.html
420 lines · 50472 bytes
1<!DOCTYPE html>
2<html lang="en">
3<head>
4<meta charset="utf-8">
5<meta name="viewport" content="width=device-width, initial-scale=1">
6<title>Tables · Orgstar</title>
7<meta name="description" content="Creating and editing Org tables, column widths, import and export, and spreadsheet formulas.">
8<link rel="icon" href="../favicon.svg" type="image/svg+xml">
9<link rel="stylesheet" href="../theme.css">
10<link rel="stylesheet" href="../syntax.css">
11<link rel="stylesheet" href="../style.css">
12</head>
13<body>
14<header class="site">
15<a class="site-title" href="../index.html">Orgstar</a>
16<nav>
17<a href="../install.html">Install</a>
18<a href="../quickstart.html">Quick start</a>
19<a href="index.html">Manual</a>
20</nav>
21</header>
22<main>
23<h1>Tables</h1>
24<p class="lede">Org tables are plain text that Orgstar keeps aligned, edits by row and column, and recalculates with the same formulas Emacs uses.</p>
25<nav class="toc" aria-label="On this page">
26<h2>On this page</h2>
27<ul>
28<li><a href="#tables-in-org">Tables in Org</a></li>
29<li><a href="#creating-a-table">Creating a table</a></li>
30<li><a href="#moving-around-and-alignment">Moving around and alignment</a></li>
31<li><a href="#editing-rows-and-columns">Editing rows and columns</a>
32<ul>
33<li><a href="#sorting">Sorting</a></li>
34<li><a href="#transposing">Transposing</a></li>
35<li><a href="#the-field-editor">The field editor</a></li>
36</ul></li>
37<li><a href="#narrow-columns">Narrow columns</a></li>
38<li><a href="#importing-and-exporting">Importing and exporting</a></li>
39<li><a href="#formulas">Formulas</a>
40<ul>
41<li><a href="#kinds-of-formula">Kinds of formula</a></li>
42<li><a href="#references">References</a></li>
43<li><a href="#names-parameters-and-constants">Names, parameters and constants</a></li>
44<li><a href="#remote-references">Remote references</a></li>
45<li><a href="#calc-expressions">Calc expressions</a></li>
46<li><a href="#mode-flags-and-formats">Mode flags and formats</a></li>
47<li><a href="#durations">Durations</a></li>
48<li><a href="#dates">Dates</a></li>
49<li><a href="#lisp-formulas">Lisp formulas</a></li>
50</ul></li>
51<li><a href="#entering-formulas">Entering formulas</a></li>
52<li><a href="#recalculating">Recalculating</a></li>
53<li><a href="#when-emacs-is-needed">When Emacs is needed</a></li>
54<li><a href="#table-el-tables">table.el tables</a></li>
55<li><a href="#plotting">Plotting</a></li>
56<li><a href="#on-ios">On iOS</a></li>
57</ul>
58</nav>
59<h2 id="tables-in-org">Tables in Org</h2>
60<p>A table is a run of lines that start with <code class="verbatim">|</code>. Fields are separated by <code class="verbatim">|</code>, and a line that starts with <code class="verbatim">|-</code> is a horizontal rule:</p>
61<pre><code class="language-org highlight"><span class="text org"><span class="markup other table org">| Name | Qty | Price |</span>
62<span class="markup other table org">|-------+-----+-------|</span>
63<span class="markup other table org">| Apple | 3 | 0.50 |</span>
64<span class="markup other table org">| Pear | 12 | 0.75 |</span></span></code></pre>
65<p>Orgstar follows <code class="verbatim">org-table.el</code> from Org 9.8.7, with <code class="verbatim">org-table-automatic-realign</code> on, <code class="verbatim">org-table-tab-jumps-over-hlines</code> on, and formulas adjusted without asking when rows and columns move (<code class="verbatim">org-table-fix-formulas-confirm</code> nil). Tables inside dynamic blocks count as tables; tables inside other blocks don't.</p>
66<h2 id="creating-a-table">Creating a table</h2>
67<p>Type <code class="verbatim">|</code>, a few field names separated by <code class="verbatim">|</code>, and press <code class="verbatim">TAB</code>: Orgstar aligns the line as a table and moves to the next field, adding a row after the last one. Type <code class="verbatim">|-</code> on the line below a row and press <code class="verbatim">TAB</code> to turn it into a full-width rule.</p>
68<p><code class="verbatim">org-table-create-or-convert-from-region</code> builds one for you: <code>C-c |</code> in the Emacs and Doom presets, <code class="verbatim">⌃⌘\</code> in the Mac preset.</p>
69<p>With no selection it asks <code class="verbatim">Table size Columns x Rows [e.g. 5x2]:</code>. An empty answer makes a 5 × 2 table. When there is more than one row, a rule follows the first row.</p>
70<p>With text selected, the command converts the selected lines to a table instead (<code class="verbatim">org-table-convert-region</code>). The separator is guessed:</p>
71<ul>
72<li>tabs, when every line has a tab;</li>
73<li>otherwise commas, when every line has a comma, read as CSV: a field in double quotes can hold commas, and a line break in it becomes a space;</li>
74<li>otherwise runs of spaces.</li>
75</ul>
76<h2 id="moving-around-and-alignment">Moving around and alignment</h2>
77<table>
78<thead>
79<tr><th>Key</th><th>Org command</th><th>Action</th></tr>
80</thead>
81<tbody>
82<tr><td><code class="verbatim">TAB</code></td><td><code class="verbatim">org-table-next-field</code></td><td>Aligns the table and moves to the next field, skipping rules. In the last field it adds a row.</td></tr>
83<tr><td><code class="verbatim">S-TAB</code></td><td><code class="verbatim">org-table-previous-field</code></td><td>Aligns the table and moves to the previous field.</td></tr>
84<tr><td><code class="verbatim">RET</code></td><td><code class="verbatim">org-table-next-row</code></td><td>Aligns the table and moves down a row in the same column. Before a rule or at the end of the table it inserts a row.</td></tr>
85</tbody>
86</table>
87<p>These keys work the same in the Emacs and Mac presets. In Doom they apply in insert state; in normal state <code class="verbatim">RET</code> is Doom's "act at point" (see <em>Recalculating</em>).</p>
88<p>Alignment (<code class="verbatim">org-table-align</code>) pads every field to its column's width and redraws rules to match. A column is right-aligned when at least half of its non-empty fields are numbers, and left-aligned otherwise. A field that holds only a cookie <code class="verbatim"><l></code>, <code class="verbatim"><c></code> or <code class="verbatim"><r></code> (optionally with a width, such as <code class="verbatim"><r10></code>) fixes the column's alignment. Widths count display columns, so wide characters and hidden link markup are measured as they appear.</p>
89<p>Alignment happens when you press <code class="verbatim">TAB</code>, <code class="verbatim">S-TAB</code> or <code class="verbatim">RET</code> in a table and after every table command, not while you type. To align without moving, use Org ▸ Align Table:</p>
90<table>
91<thead>
92<tr><th>Preset</th><th>Key</th></tr>
93</thead>
94<tbody>
95<tr><td>Emacs</td><td><code class="verbatim">C-c C-c</code> in a table</td></tr>
96<tr><td>Mac</td><td><code class="verbatim">⌃⌘X</code> in a table</td></tr>
97<tr><td>Doom</td><td><code class="verbatim">C-c C-c</code>, or <code class="verbatim">SPC m b a</code></td></tr>
98</tbody>
99</table>
100<p><code class="verbatim">C-c C-c</code> (Mac <code class="verbatim">⌃⌘X</code>) in a table is <code class="verbatim">org-ctrl-c-ctrl-c</code>, as in Emacs. It first evaluates a formula typed in the current field (see <em>Entering formulas</em>). Then, in a row marked <code class="verbatim">#</code> (see <em>Names, parameters and constants</em>), it recalculates that row, which also aligns the table; in any other row it aligns the table. With the caret at the table's very first character, it recalculates the whole table instead.</p>
101<p>To align every table when a file opens, set <code class="verbatim">org-startup-align-all-tables</code> to <code class="verbatim">true</code> in the config file (default <code class="verbatim">false</code>), or put <code class="verbatim">#+STARTUP: align</code> in the file; <code class="verbatim">#+STARTUP: noalign</code> turns it off for that file. See <a href="13-configuration.html">Configuration</a>.</p>
102<h2 id="editing-rows-and-columns">Editing rows and columns</h2>
103<table>
104<thead>
105<tr><th>Action</th><th>Org command</th><th>Emacs</th><th>Mac</th><th>Doom</th></tr>
106</thead>
107<tbody>
108<tr><td>Move row up</td><td><code class="verbatim">org-table-move-row-up</code></td><td><code class="verbatim">M-<up></code></td><td><code class="verbatim">⌃⌘↑</code></td><td><code class="verbatim">M-<up></code>, <code class="verbatim">M-k</code></td></tr>
109<tr><td>Move row down</td><td><code class="verbatim">org-table-move-row-down</code></td><td><code class="verbatim">M-<down></code></td><td><code class="verbatim">⌃⌘↓</code></td><td><code class="verbatim">M-<down></code>, <code class="verbatim">M-j</code></td></tr>
110<tr><td>Move column left</td><td><code class="verbatim">org-table-move-column-left</code></td><td><code class="verbatim">M-<left></code></td><td><code class="verbatim">⌃⌘←</code></td><td><code class="verbatim">M-<left></code>, <code class="verbatim">M-h</code></td></tr>
111<tr><td>Move column right</td><td><code class="verbatim">org-table-move-column-right</code></td><td><code class="verbatim">M-<right></code></td><td><code class="verbatim">⌃⌘→</code></td><td><code class="verbatim">M-<right></code>, <code class="verbatim">M-l</code></td></tr>
112<tr><td>Insert column</td><td><code class="verbatim">org-table-insert-column</code></td><td><code class="verbatim">M-S-<right></code></td><td><code class="verbatim">⌃⌥⌘→</code></td><td><code class="verbatim">M-S-<right></code>, <code class="verbatim">SPC m b i c</code></td></tr>
113<tr><td>Delete column</td><td><code class="verbatim">org-table-delete-column</code></td><td><code class="verbatim">M-S-<left></code></td><td><code class="verbatim">⌃⌥⌘←</code></td><td><code class="verbatim">M-S-<left></code>, <code class="verbatim">SPC m b d c</code></td></tr>
114<tr><td>Insert row above</td><td><code class="verbatim">org-table-insert-row</code></td><td><code class="verbatim">M-S-<down></code></td><td><code class="verbatim">⌃⌥⌘↓</code></td><td><code class="verbatim">M-S-<down></code>, <code class="verbatim">SPC m b i r</code></td></tr>
115<tr><td>Delete row</td><td><code class="verbatim">org-table-kill-row</code></td><td><code class="verbatim">M-S-<up></code></td><td><code class="verbatim">⌃⌥⌘↑</code></td><td><code class="verbatim">M-S-<up></code>, <code class="verbatim">SPC m b d r</code></td></tr>
116<tr><td>Insert rule below</td><td><code class="verbatim">org-table-insert-hline</code></td><td><code class="verbatim">C-c -</code></td><td><code class="verbatim">⌃⌘-</code></td><td><code class="verbatim">C-c -</code>, <code class="verbatim">SPC m b -</code>, <code class="verbatim">SPC m b i h</code></td></tr>
117<tr><td>Sort rows</td><td><code class="verbatim">org-table-sort-lines</code></td><td><code class="verbatim">C-c ^</code></td><td><code class="verbatim">⌃⇧⌘S</code></td><td><code class="verbatim">C-c ^</code></td></tr>
118<tr><td>Transpose</td><td><code class="verbatim">org-table-transpose-table-at-point</code></td><td>Org ▸ Transpose Table</td><td>Org ▸ Transpose Table</td><td>Org ▸ Transpose Table</td></tr>
119<tr><td>Edit field in its own editor</td><td><code class="verbatim">org-table-edit-field</code></td><td><code class="verbatim">C-c `</code></td><td>Org ▸ Edit Table Field</td><td><code class="verbatim">C-c `</code></td></tr>
120</tbody>
121</table>
122<p>The new column goes to the left of the caret's column, empty. Deleting a row deletes the line; it doesn't go to the clipboard. When rows and columns move, are inserted or are deleted, the <code class="verbatim">#+TBLFM</code> line is updated to match: references are renumbered, and formulas for a deleted row or column are removed.</p>
123<p>The Mac preset uses the same keys for headings and list items; in a table they act on the table.</p>
124<h3 id="sorting">Sorting</h3>
125<p><code class="verbatim">C-c ^</code> in a table asks <code class="verbatim">Sort Table: [a]lphabetic, [n]umeric, [t]ime. A/N/T means reversed:</code> and sorts the rows between the rules around the caret by the caret's column. If the caret isn't in a field, it asks for the column first. Sorting is stable.</p>
126<ul>
127<li><strong>a</strong> compares text without case.</li>
128<li><strong>n</strong> compares the number at the start of each field.</li>
129<li><strong>t</strong> compares a timestamp in the field, else a duration such as <code class="verbatim">1:30</code> or <code class="verbatim">2h 15min</code>, else a clock time <code class="verbatim">H:MM</code>. Fields with none of these sort as 0.</li>
130</ul>
131<h3 id="transposing">Transposing</h3>
132<p>Org ▸ Transpose Table swaps rows and columns. Rules are dropped.</p>
133<h3 id="the-field-editor">The field editor</h3>
134<p><code class="verbatim">C-c `</code> opens the field at the caret in an editor of its own, which is easier for long text. <code class="verbatim">C-c '</code> or <code class="verbatim">⌘Return</code> puts it back; <code class="verbatim">Escape</code> or <code class="verbatim">C-c C-k</code> leaves it unchanged. Line breaks become single spaces and lines that start with <code class="verbatim">#</code> are dropped, as <code class="verbatim">org-table-finish-edit-field</code> does.</p>
135<h2 id="narrow-columns">Narrow columns</h2>
136<p>A field that holds a width cookie <code class="verbatim"><N></code>, optionally with an alignment letter (<code class="verbatim"><l10></code>, <code class="verbatim"><c8></code>, <code class="verbatim"><r12></code>), marks the column for narrowing. Narrowed fields show their first <em>N</em> display columns followed by <code class="verbatim">…</code>. The text itself is unchanged.</p>
137<table>
138<thead>
139<tr><th>Command</th><th>Org command</th><th>Keys</th></tr>
140</thead>
141<tbody>
142<tr><td>Org ▸ Shrink or Expand Table Column</td><td><code class="verbatim">org-table-toggle-column-width</code></td><td>Emacs and Doom <code class="verbatim">C-c TAB</code></td></tr>
143<tr><td>Org ▸ Shrink Table Columns with Widths</td><td><code class="verbatim">org-table-shrink</code></td><td>No default key</td></tr>
144<tr><td>Org ▸ Expand Table Columns</td><td><code class="verbatim">org-table-expand</code></td><td>No default key</td></tr>
145</tbody>
146</table>
147<p><code class="verbatim">C-c TAB</code> in a field toggles that column. Outside a column, for example on the leading <code class="verbatim">|</code>, it asks for <code class="verbatim">Column ranges (e.g. 2-4 6-):</code>, where <code class="verbatim">6-</code> means column 6 to the end. A column without a width cookie shrinks to a bare <code class="verbatim">…</code> when toggled. Typing in a narrowed field widens its column again, as editing Org's overlays does. <code class="verbatim">#+STARTUP: shrink</code> narrows every column with a width cookie when the file opens.</p>
148<h2 id="importing-and-exporting">Importing and exporting</h2>
149<table>
150<thead>
151<tr><th>Command</th><th>Org command</th></tr>
152</thead>
153<tbody>
154<tr><td>Import Table from File… (command palette)</td><td><code class="verbatim">org-table-import</code></td></tr>
155<tr><td>Export Table to File… (command palette)</td><td><code class="verbatim">org-table-export</code></td></tr>
156</tbody>
157</table>
158<p>Open the command palette with <code class="verbatim">⇧⌘P</code> (<code class="verbatim">M-x</code> in the Emacs preset, <code class="verbatim">SPC :</code> in Doom).</p>
159<p>Import asks for a CSV, TSV or plain text file, inserts its contents at the caret on a line of its own, and converts them to a table with the separator guessed as for a region (see <em>Creating a table</em>).</p>
160<p>Export writes the table at the caret. A file name ending in <code class="verbatim">.csv</code> gets CSV: fields separated by commas, with fields that contain a comma or a double quote quoted and inner quotes doubled. Any other name gets TSV. Rules are left out.</p>
161<p>Import and export are Mac only.</p>
162<h2 id="formulas">Formulas</h2>
163<p>Orgstar evaluates Org's spreadsheet formulas, <code class="verbatim">org-table-recalculate</code> and <code class="verbatim">org-table-eval-formula</code>, natively: Calc expressions in a reimplementation of the part of Emacs Calc that tables use, and Lisp formulas in a small Emacs Lisp evaluator. What falls outside them is handed to Emacs on the Mac (see <em>When Emacs is needed</em>).</p>
164<p>Formulas live in a <code class="verbatim">#+TBLFM:</code> line right after the table, separated by <code class="verbatim">::</code>:</p>
165<pre><code class="language-org highlight"><span class="text org"><span class="markup other table org">| Item | Qty | Price | Total |</span>
166<span class="markup other table org">|-------+-----+-------+-------|</span>
167<span class="markup other table org">| Apple | 3 | 0.50 | 1.50 |</span>
168<span class="markup other table org">| Pear | 12 | 0.75 | 9.00 |</span>
169<span class="markup other table org">|-------+-----+-------+-------|</span>
170<span class="markup other table org">| Sum | | | 10.50 |</span>
171<span class="keyword other keyword org">#+TBLFM:</span><span class="string unquoted org"> $4=$2*$3;%.2f::@>$4=vsum(@I..@II);%.2f</span></span></code></pre>
172<p>Blank lines between the table and <code class="verbatim">#+TBLFM:</code> are allowed. If there are several <code class="verbatim">#+TBLFM:</code> lines, recalculating the table uses the first; <code class="verbatim">C-c C-c</code> on another applies that line instead (<code class="verbatim">org-table-calc-current-TBLFM</code>).</p>
173<h3 id="kinds-of-formula">Kinds of formula</h3>
174<table>
175<thead>
176<tr><th>Left side</th><th>Kind</th><th>Applies to</th></tr>
177</thead>
178<tbody>
179<tr><td><code class="verbatim">$3</code></td><td>Column formula</td><td>Every data row of column 3, except rows marked <code class="verbatim">!</code>, <code class="verbatim">^</code>, <code class="verbatim">_</code>, <code class="verbatim">$</code> or <code class="verbatim">/</code> in the first column.</td></tr>
180<tr><td><code class="verbatim">$<</code>, <code class="verbatim">$></code></td><td>Column formula</td><td>The first or last column.</td></tr>
181<tr><td><code class="verbatim">@2$3</code>, <code class="verbatim">@>$3</code></td><td>Field formula</td><td>One field. Field formulas override column formulas.</td></tr>
182<tr><td><code class="verbatim">@2$2..@4$3</code></td><td>Range formula</td><td>Every field in the rectangle.</td></tr>
183<tr><td><code class="verbatim">@4</code></td><td>Row formula</td><td>Every field of data row 4.</td></tr>
184<tr><td><code class="verbatim">$name</code></td><td>Named field formula</td><td>The field named by a <code class="verbatim">^</code> or <code class="verbatim">_</code> row (see <em>Names, parameters and constants</em>).</td></tr>
185</tbody>
186</table>
187<p>A left side relative to the current row, such as <code class="verbatim">@-1$2</code>, is an error (<code class="verbatim">Unknown field</code>), and so is one relative to a rule, such as <code class="verbatim">@I$2</code>, as in Org. Two formulas for the same field are an error.</p>
188<h3 id="references">References</h3>
189<p>Rows count data lines from 1; rules don't count. Columns count from 1.</p>
190<table>
191<thead>
192<tr><th>Reference</th><th>Meaning</th></tr>
193</thead>
194<tbody>
195<tr><td><code class="verbatim">$2</code></td><td>Column 2 in the current row.</td></tr>
196<tr><td><code class="verbatim">$-1</code>, <code class="verbatim">$+1</code></td><td>The column before or after the current one.</td></tr>
197<tr><td><code class="verbatim">$<</code>, <code class="verbatim">$></code>, <code class="verbatim">$>></code></td><td>The first column, the last, the one before last.</td></tr>
198<tr><td><code class="verbatim">@3</code></td><td>Row 3 in the current column.</td></tr>
199<tr><td><code class="verbatim">@-1</code>, <code class="verbatim">@+1</code></td><td>The row above or below.</td></tr>
200<tr><td><code class="verbatim">@<</code>, <code class="verbatim">@></code></td><td>The first or last data row.</td></tr>
201<tr><td><code class="verbatim">@I</code>, <code class="verbatim">@II</code>, <code class="verbatim">@III</code></td><td>The first, second, third rule; as a row, the line after it.</td></tr>
202<tr><td><code class="verbatim">@-I</code></td><td>The rule above the current row.</td></tr>
203<tr><td><code class="verbatim">@I+2</code></td><td>Two data rows after the first rule.</td></tr>
204<tr><td><code class="verbatim">@2$3</code></td><td>Row 2, column 3.</td></tr>
205<tr><td><code class="verbatim">$0</code></td><td>The current column.</td></tr>
206<tr><td><code class="verbatim">@0</code></td><td>The current row: <code class="verbatim">@0$2</code> is <code class="verbatim">$2</code>.</td></tr>
207<tr><td><code class="verbatim">@#</code>, <code class="verbatim">$#</code></td><td>The current row's or column's number, as a value.</td></tr>
208<tr><td><code class="verbatim">@2$1..@4$3</code></td><td>A range: the fields of the rectangle, as a vector.</td></tr>
209<tr><td><code class="verbatim">$1..$3</code></td><td>Columns 1 to 3 of the current row.</td></tr>
210<tr><td><code class="verbatim">@I..@II</code></td><td>The current column from the first rule to the second.</td></tr>
211</tbody>
212</table>
213<p>In a Calc formula a single field becomes a number in parentheses, and a range becomes a vector such as <code class="verbatim">[1,2,3]</code>. Without the <code class="verbatim">E</code> flag, empty fields count as 0 on their own and are left out of ranges.</p>
214<p>Fields in a Calc formula must hold numbers, timestamps or <code class="verbatim">nan</code>, unless the <code class="verbatim">N</code> flag reads every field as a number. A reference to a field with other text needs Emacs, because Calc would treat the text as a symbol.</p>
215<h3 id="names-parameters-and-constants">Names, parameters and constants</h3>
216<p>The first column can mark special rows, as in Org's spreadsheet:</p>
217<table>
218<thead>
219<tr><th>Mark</th><th>Row</th></tr>
220</thead>
221<tbody>
222<tr><td><code class="verbatim">#</code></td><td>Marked for recalculation.</td></tr>
223<tr><td><code class="verbatim">*</code></td><td>Marked for recalculation.</td></tr>
224</tbody>
225</table>
226<p>When any row's first field is one of <code class="verbatim">!</code>, <code class="verbatim">^</code>, <code class="verbatim">_</code>, <code class="verbatim">$</code>, <code class="verbatim">#</code> or <code class="verbatim">*</code>, column formulas in a whole-table recalculation apply only to the rows marked <code class="verbatim">#</code> or <code class="verbatim">*</code>, as <code class="verbatim">org-table-calculate-mark-regexp</code> decides in Org. So a table with a <code class="verbatim">!</code> names row and no <code class="verbatim">#</code> rows gets no column formulas applied; mark the rows to calculate. Field formulas apply either way. Rows marked <code class="verbatim">!</code>, <code class="verbatim">^</code>, <code class="verbatim">_</code>, <code class="verbatim">$</code> or <code class="verbatim">/</code> are never changed by column formulas.</p>
227<pre><code class="language-org highlight"><span class="text org"><span class="markup other table org">| ! | qty | price | total |</span>
228<span class="markup other table org">|---+-----+-------+-------|</span>
229<span class="markup other table org">| # | 2 | 3 | 6 |</span>
230<span class="markup other table org">| # | 4 | 0.5 | 2 |</span>
231<span class="keyword other keyword org">#+TBLFM:</span><span class="string unquoted org"> $4=$qty*$price</span></span></code></pre>
232<p>A <code class="verbatim">$name</code> that isn't a column name, parameter or named field is looked up as <code class="verbatim">org-table-get-constant</code> does:</p>
233<ul>
234<li>in <code class="verbatim">#+CONSTANTS:</code> lines of the file or its setup file, written <code>name=value</code> and separated by spaces (<code>#+CONSTANTS: c=299792458 g=9.81</code>);</li>
235<li><code class="verbatim">$PROP_xyz</code> reads the <code class="verbatim">xyz</code> property of the entry holding the table, with inheritance.</li>
236</ul>
237<p>A name that isn't found becomes <code class="verbatim">#UNDEFINED_NAME</code>. A parameter named <code class="verbatim">%</code> in a <code class="verbatim">$</code> row, for example <code>%=%.2f</code>, is put in front of the flags of every formula that has a <code class="verbatim">;</code>, so <code>$3=$2/3;</code> is formatted with <code class="verbatim">%.2f</code>.</p>
238<h3 id="remote-references">Remote references</h3>
239<p><code class="verbatim">remote(NAME, REF)</code> reads a field or range from another table:</p>
240<pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+NAME:</span><span class="string unquoted org"> rates</span>
241<span class="markup other table org">| item | rate |</span>
242<span class="markup other table org">|------+------|</span>
243<span class="markup other table org">| a | 2 |</span>
244<span class="markup other table org">| b | 3 |</span>
245
246<span class="markup other table org">| x | y | z |</span>
247<span class="markup other table org">|---+---+---|</span>
248<span class="markup other table org">| 4 | 8 | 5 |</span>
249<span class="keyword other keyword org">#+TBLFM:</span><span class="string unquoted org"> $2=$1*remote(rates,@2$2)::$3=vsum(remote(rates,@2$2..@>$2))</span></span></code></pre>
250<p><code class="verbatim">NAME</code> is found in this order:</p>
251<ol>
252<li>a table after <code class="verbatim">#+NAME: NAME</code> or <code class="verbatim">#+TBLNAME: NAME</code> in the same file;</li>
253<li>the first table in the entry whose <code class="verbatim">ID</code> property is <code class="verbatim">NAME</code>, in the same file;</li>
254<li>the first table in the entry with that <code class="verbatim">ID</code> in any indexed file in your sidebar folders, read from the file on disk.</li>
255</ol>
256<p><code class="verbatim">REF</code> may use spreadsheet-style references such as <code class="verbatim">B3</code> (column B, row 3), which become <code class="verbatim">@3$2</code>. A <code class="verbatim">REF</code> without a row, such as <code class="verbatim">$1..$2</code>, reads the row of the other table that has the current row's number. <code class="verbatim">NAME</code> can itself be a reference: in <code class="verbatim">remote($1,@1$1)</code>, the current row's first field holds the table's name.</p>
257<h3 id="calc-expressions">Calc expressions</h3>
258<p>Calc formulas use Calc's number rules: integers are exact, and decimal numbers are rounded to 12 significant digits after every operation. Results are shown with up to 8 significant digits unless a format flag says otherwise (<code class="verbatim">org-calc-default-modes</code>).</p>
259<p>Operators, from lowest to highest precedence (the lowest, <code>||</code>, is logical or, giving 1 or 0):</p>
260<table>
261<thead>
262<tr><th>Operator</th><th>Meaning</th></tr>
263</thead>
264<tbody>
265<tr><td><code class="verbatim">&&</code></td><td>Logical and.</td></tr>
266<tr><td><code>==</code>, <code>!=</code>, <code class="verbatim"><</code>, <code class="verbatim">></code>, <code><=</code>, <code>>=</code></td><td>Comparisons, giving 1 or 0. They can't be chained.</td></tr>
267<tr><td><code class="verbatim">+</code>, <code class="verbatim">-</code></td><td>Addition and subtraction.</td></tr>
268<tr><td><code class="verbatim">/</code>, <code class="verbatim">%</code>, <code class="verbatim">\</code></td><td>Division, modulo (sign of the divisor), integer division rounding down.</td></tr>
269<tr><td><code class="verbatim">*</code></td><td>Multiplication.</td></tr>
270<tr><td>unary <code class="verbatim">-</code></td><td>Negation.</td></tr>
271</tbody>
272</table>
273<p>Parentheses group, <code class="verbatim">[a, b, c]</code> writes a vector, <code class="verbatim"><2026-10-05 Mon></code> writes a date, and <code class="verbatim">nan</code> is "not a number".</p>
274<p>Functions:</p>
275<table>
276<thead>
277<tr><th>Function</th><th>Result</th></tr>
278</thead>
279<tbody>
280<tr><td><code class="verbatim">vsum</code>, <code class="verbatim">vprod</code></td><td>Sum or product of a vector.</td></tr>
281<tr><td><code class="verbatim">vcount</code></td><td>Number of elements.</td></tr>
282<tr><td><code class="verbatim">vmean</code>, <code class="verbatim">vmedian</code></td><td>Mean, median.</td></tr>
283<tr><td><code class="verbatim">vmax</code>, <code class="verbatim">vmin</code></td><td>Largest, smallest element.</td></tr>
284<tr><td><code class="verbatim">vvar</code>, <code class="verbatim">vsdev</code></td><td>Sample variance, sample standard deviation.</td></tr>
285<tr><td><code class="verbatim">vpvar</code>, <code class="verbatim">vpsdev</code></td><td>Population variance, population standard deviation.</td></tr>
286<tr><td><code class="verbatim">max(a, b, …)</code>, <code class="verbatim">min(a, b, …)</code></td><td>Largest, smallest argument.</td></tr>
287<tr><td><code class="verbatim">if(c, a, b)</code></td><td><code class="verbatim">a</code> if <code class="verbatim">c</code> is nonzero, else <code class="verbatim">b</code>.</td></tr>
288<tr><td><code class="verbatim">abs</code></td><td>Absolute value.</td></tr>
289<tr><td><code class="verbatim">floor</code>, <code class="verbatim">ceil</code>, <code class="verbatim">trunc</code></td><td>Round down, up, toward zero, to an integer.</td></tr>
290<tr><td><code class="verbatim">round(x)</code>, <code class="verbatim">round(x, n)</code></td><td>Round to an integer, or to <em>n</em> decimal places.</td></tr>
291<tr><td><code class="verbatim">mod(a, b)</code>, <code class="verbatim">idiv(a, b)</code></td><td>As <code class="verbatim">%</code> and <code class="verbatim">\</code>.</td></tr>
292<tr><td><code class="verbatim">fact</code></td><td>Factorial of a non-negative integer.</td></tr>
293<tr><td><code class="verbatim">sqrt</code>, <code class="verbatim">exp</code>, <code class="verbatim">ln</code>, <code class="verbatim">log10</code></td><td>Square root, exponential, natural and base-10 logarithm.</td></tr>
294<tr><td><code class="verbatim">sin</code>, <code class="verbatim">cos</code>, <code class="verbatim">tan</code></td><td>Trigonometry, in degrees unless the <code class="verbatim">R</code> flag is set.</td></tr>
295<tr><td><code class="verbatim">arcsin</code>, <code class="verbatim">arccos</code>, <code class="verbatim">arctan</code></td><td>Inverse trigonometry, in degrees unless <code class="verbatim">R</code>.</td></tr>
296</tbody>
297</table>
298<p>Other Calc functions, variables such as <code class="verbatim">pi</code> or <code class="verbatim">e</code>, symbolic results, complex results and division by zero need Emacs.</p>
299<h3 id="mode-flags-and-formats">Mode flags and formats</h3>
300<p>After the formula, a <code class="verbatim">;</code> starts its flags, as in <code>$3=$1/$2;%.2f</code> or <code>$4=$1*2;f2</code>:</p>
301<table>
302<thead>
303<tr><th>Flag</th><th>Meaning</th></tr>
304</thead>
305<tbody>
306<tr><td><code class="verbatim">nN</code></td><td>Float format with <em>N</em> significant digits.</td></tr>
307<tr><td><code class="verbatim">fN</code></td><td>Fixed format with <em>N</em> decimal places.</td></tr>
308<tr><td><code class="verbatim">sN</code></td><td>Scientific format with <em>N</em> digits.</td></tr>
309<tr><td><code class="verbatim">eN</code></td><td>Engineering format with <em>N</em> digits.</td></tr>
310<tr><td><code class="verbatim">pN</code></td><td>Calc precision. Only <code class="verbatim">p12</code>, the default, is evaluated natively; others need Emacs.</td></tr>
311<tr><td><code class="verbatim">D</code>, <code class="verbatim">R</code></td><td>Angles in degrees (the default) or radians.</td></tr>
312<tr><td><code class="verbatim">F</code></td><td>Prefer fractions: <code class="verbatim">1/3</code> stays <code class="verbatim">1:3</code>.</td></tr>
313<tr><td><code class="verbatim">N</code></td><td>Treat every field as a number; text counts as 0.</td></tr>
314<tr><td><code class="verbatim">E</code></td><td>Keep empty fields: in ranges they stay in, and count as <code class="verbatim">nan</code> in Calc.</td></tr>
315<tr><td><code class="verbatim">L</code></td><td>Literal: in Lisp formulas, insert fields as they are written.</td></tr>
316<tr><td><code class="verbatim">T</code></td><td>Durations: read <code class="verbatim">H:MM</code> and <code class="verbatim">H:MM:SS</code> fields as times, show the result as <code class="verbatim">HH:MM:SS</code>.</td></tr>
317<tr><td><code class="verbatim">U</code></td><td>As <code class="verbatim">T</code>, showing <code class="verbatim">HH:MM</code>.</td></tr>
318<tr><td><code class="verbatim">t</code></td><td>As <code class="verbatim">T</code>, showing decimal hours with two places, such as <code class="verbatim">1.50</code>.</td></tr>
319</tbody>
320</table>
321<p>The flags <code class="verbatim">S</code> (symbolic) and <code class="verbatim">u</code> need Emacs. Any other text after the flags is a <code class="verbatim">format</code> string applied to the result, such as <code class="verbatim">%.2f</code> or <code class="verbatim">%d</code>; <code class="verbatim">format</code> supports <code class="verbatim">%s</code>, <code class="verbatim">%S</code>, <code class="verbatim">%d</code>, <code class="verbatim">%o</code>, <code class="verbatim">%x</code>, <code class="verbatim">%X</code>, <code class="verbatim">%c</code>, <code class="verbatim">%e</code>, <code class="verbatim">%f</code> and <code class="verbatim">%g</code>.</p>
322<h3 id="durations">Durations</h3>
323<p>With <code class="verbatim">T</code>, <code class="verbatim">U</code> or <code class="verbatim">t</code>, fields like <code class="verbatim">1:30</code> or <code class="verbatim">10:00:30</code> are read as hours, minutes and seconds:</p>
324<pre><code class="language-org highlight"><span class="text org"><span class="markup other table org">| start | end | sum | diff | hours |</span>
325<span class="markup other table org">|----------+---------+----------+-------+-------|</span>
326<span class="markup other table org">| 1:30 | 0:45 | 02:15:00 | 00:45 | 3.00 |</span>
327<span class="markup other table org">| 10:00:30 | 2:15:10 | 12:15:40 | 07:45 | 20.02 |</span>
328<span class="keyword other keyword org">#+TBLFM:</span><span class="string unquoted org"> $3=$1+$2;T::$4=$1-$2;U::$5=$1*2;t</span></span></code></pre>
329<h3 id="dates">Dates</h3>
330<p>Timestamps in fields, active or inactive, take part in Calc arithmetic as dates. The difference of two dates is a number of days, with a fraction when the timestamps have times. A date plus a number is a date, written back as an inactive timestamp:</p>
331<pre><code class="language-org highlight"><span class="text org"><span class="markup other table org">| start | end | days | later |</span>
332<span class="markup other table org">|------------------+------------------+------+------------------|</span>
333<span class="markup other table org">| <2026-10-05 Mon> | <2026-10-12 Mon> | 7 | [2026-10-12 Mon] |</span>
334<span class="keyword other keyword org">#+TBLFM:</span><span class="string unquoted org"> $3=$2-$1::$4=$1+7</span></span></code></pre>
335<h3 id="lisp-formulas">Lisp formulas</h3>
336<p>A formula that starts with <code class="verbatim">'(</code> is Emacs Lisp. Each reference becomes a Lisp string, or a number with <code class="verbatim">N</code>, or the field's text inserted as is with <code class="verbatim">L</code>. A range becomes the values separated by spaces, so wrap it in a quoted list:</p>
337<pre><code class="language-org highlight"><span class="text org"><span class="markup other table org">| name | greeting |</span>
338<span class="markup other table org">|-------+----------|</span>
339<span class="markup other table org">| Ada | Ada! |</span>
340<span class="markup other table org">| Grace | Grace! |</span>
341<span class="keyword other keyword org">#+TBLFM:</span><span class="string unquoted org"> $2='(concat $1 "!")</span>
342
343<span class="markup other table org">| n |</span>
344<span class="markup other table org">|---|</span>
345<span class="markup other table org">| 1 |</span>
346<span class="markup other table org">| 2 |</span>
347<span class="markup other table org">|---|</span>
348<span class="markup other table org">| 3 |</span>
349<span class="keyword other keyword org">#+TBLFM:</span><span class="string unquoted org"> @>$1='(apply '+ '(@I..@II));N</span></span></code></pre>
350<p>The evaluator supports:</p>
351<ul>
352<li>special forms: <code class="verbatim">quote</code>, <code class="verbatim">function</code>, <code class="verbatim">lambda</code>, <code class="verbatim">progn</code>, <code class="verbatim">prog1</code>, <code class="verbatim">if</code>, <code class="verbatim">when</code>, <code class="verbatim">unless</code>, <code class="verbatim">cond</code>, <code class="verbatim">and</code>, <code class="verbatim">or</code>, <code class="verbatim">let</code>, <code class="verbatim">let*</code>, <code class="verbatim">setq</code>, <code class="verbatim">push</code>, <code class="verbatim">pop</code>, <code class="verbatim">while</code>, <code class="verbatim">dolist</code>, <code class="verbatim">dotimes</code>, <code class="verbatim">with-output-to-string</code>, <code class="verbatim">ignore-errors</code>, <code class="verbatim">condition-case</code>;</li>
353<li>arithmetic: <code class="verbatim">+</code>, <code class="verbatim">-</code>, <code class="verbatim">*</code>, <code class="verbatim">/</code>, <code class="verbatim">%</code>, <code class="verbatim">mod</code>, <code class="verbatim">1+</code>, <code class="verbatim">1-</code>, <code class="verbatim">abs</code>, <code class="verbatim">max</code>, <code class="verbatim">min</code>, <code class="verbatim">float</code>, <code class="verbatim">floor</code>, <code class="verbatim">ceiling</code>, <code class="verbatim">round</code>, <code class="verbatim">truncate</code>, <code>=</code>, <code class="verbatim"><</code>, <code class="verbatim">></code>, <code><=</code>, <code>>=</code>, <code>/=</code>, <code class="verbatim">zerop</code>;</li>
354<li>predicates: <code class="verbatim">not</code>, <code class="verbatim">null</code>, <code class="verbatim">eq</code>, <code class="verbatim">eql</code>, <code class="verbatim">equal</code>, <code class="verbatim">numberp</code>, <code class="verbatim">integerp</code>, <code class="verbatim">floatp</code>, <code class="verbatim">stringp</code>, <code class="verbatim">listp</code>, <code class="verbatim">consp</code>, <code class="verbatim">symbolp</code>;</li>
355<li>lists: <code class="verbatim">car</code>, <code class="verbatim">cdr</code>, <code class="verbatim">cadr</code>, <code class="verbatim">cddr</code>, <code class="verbatim">cons</code>, <code class="verbatim">list</code>, <code class="verbatim">nth</code>, <code class="verbatim">nthcdr</code>, <code class="verbatim">elt</code>, <code class="verbatim">aref</code>, <code class="verbatim">append</code>, <code class="verbatim">length</code>, <code class="verbatim">reverse</code>, <code class="verbatim">number-sequence</code>, <code class="verbatim">memq</code>, <code class="verbatim">member</code>, <code class="verbatim">memql</code>, <code class="verbatim">assoc</code>, <code class="verbatim">assq</code>, <code class="verbatim">delq</code>, <code class="verbatim">delete</code>, <code class="verbatim">mapcar</code>, <code class="verbatim">mapc</code>, <code class="verbatim">mapconcat</code>, <code class="verbatim">funcall</code>, <code class="verbatim">apply</code>, <code class="verbatim">identity</code>, <code class="verbatim">ignore</code>;</li>
356<li>strings: <code class="verbatim">concat</code>, <code class="verbatim">format</code>, <code class="verbatim">format-message</code>, <code>string=</code>, <code class="verbatim">string-equal</code>, <code class="verbatim">string<</code>, <code class="verbatim">string-lessp</code>, <code class="verbatim">upcase</code>, <code class="verbatim">downcase</code>, <code class="verbatim">capitalize</code>, <code class="verbatim">substring</code>, <code class="verbatim">string-to-number</code>, <code class="verbatim">number-to-string</code>, <code class="verbatim">int-to-string</code>, <code class="verbatim">string-prefix-p</code>, <code class="verbatim">string-suffix-p</code>, <code class="verbatim">string-empty-p</code>, <code class="verbatim">string-trim</code>, <code class="verbatim">split-string</code>, <code class="verbatim">prin1-to-string</code>;</li>
357<li>output and errors: <code class="verbatim">princ</code>, <code class="verbatim">prin1</code>, <code class="verbatim">print</code>, <code class="verbatim">terpri</code>, <code class="verbatim">message</code>, <code class="verbatim">error</code>, <code class="verbatim">user-error</code>;</li>
358<li>Org's lookup functions <code class="verbatim">org-lookup-first</code>, <code class="verbatim">org-lookup-last</code> and <code class="verbatim">org-lookup-all</code>.</li>
359</ul>
360<p>Any other function needs Emacs. An error inside a Lisp formula writes <code class="verbatim">#ERROR</code> in the field, as does a Calc error.</p>
361<h2 id="entering-formulas">Entering formulas</h2>
362<p>There are three ways to set a formula.</p>
363<p><strong>In the field.</strong> Type <code>=expr</code> in a field and press <code class="verbatim">TAB</code> or <code class="verbatim">RET</code>: Orgstar stores <code>$N=expr</code> as the column's formula and evaluates it, as <code class="verbatim">org-table-maybe-eval-formula</code> does. Type <code>:=expr</code> instead to store a field formula <code>@R$C=expr</code>.</p>
364<p><strong>With a prompt.</strong> <code class="verbatim">org-table-eval-formula</code> asks for the formula (<code>Column formula $N=</code> or <code>Field formula @R$C=</code>) with the stored one filled in, stores it and evaluates it in the current field. Clearing the prompt and pressing <code class="verbatim">Return</code> removes the stored formula, as in Emacs, and the echo area shows <code class="verbatim">Formula removed</code>. You can also delete a formula in the formula editor below or from the <code class="verbatim">#+TBLFM:</code> line.</p>
365<table>
366<thead>
367<tr><th>Command</th><th>Emacs</th><th>Mac</th><th>Doom</th></tr>
368</thead>
369<tbody>
370<tr><td>Org ▸ Set Column Formula</td><td><code>C-c =</code></td><td>Org ▸ Set Column Formula</td><td><code>C-c =</code></td></tr>
371<tr><td>Org ▸ Set Field Formula</td><td>none</td><td>Org ▸ Set Field Formula</td><td>none</td></tr>
372</tbody>
373</table>
374<p>Org's <code>C-u C-c =</code> for field formulas has no equivalent key, because Orgstar has no prefix argument; use the menu item or type <code>:=</code> in the field.</p>
375<p><strong>In the formula editor.</strong> <code class="verbatim">C-c '</code> in a table or on its <code class="verbatim">#+TBLFM:</code> line (<code class="verbatim">org-table-edit-formulas</code>) opens the formulas in an editor of their own, one per line, grouped under <code class="verbatim"># Column Formulas</code>, <code class="verbatim"># Field and Range Formulas</code> and <code class="verbatim"># Named Field Formulas</code>. A formula can continue on indented lines. <code class="verbatim">C-c '</code> or <code class="verbatim">⌘Return</code> installs the formulas; <code class="verbatim">Escape</code> or <code class="verbatim">C-c C-k</code> leaves them unchanged. Installing doesn't recalculate. The echo area says so and points to Recalculate Table: <code class="verbatim">C-c C-c</code> on the <code class="verbatim">#+TBLFM:</code> line, or <code class="verbatim">⌃⌘X</code> there in the Mac preset.</p>
376<p>The formulas are stored sorted the way <code class="verbatim">org-table-formula-less-p</code> sorts them.</p>
377<h2 id="recalculating">Recalculating</h2>
378<table>
379<thead>
380<tr><th>Command</th><th>Org command</th><th>Emacs</th><th>Mac</th><th>Doom</th></tr>
381</thead>
382<tbody>
383<tr><td>Recalculate Table</td><td><code class="verbatim">org-table-recalculate</code> with <code class="verbatim">C-u</code></td><td><code class="verbatim">C-c C-c</code> on <code class="verbatim">#+TBLFM:</code></td><td><code class="verbatim">⌃⌘X</code> on <code class="verbatim">#+TBLFM:</code></td><td><code class="verbatim">SPC m b r</code>, <code class="verbatim">C-c C-c</code> on <code class="verbatim">#+TBLFM:</code></td></tr>
384<tr><td>Recalculate Table Row</td><td><code class="verbatim">org-table-recalculate</code></td><td><code class="verbatim">C-c *</code></td><td>Org ▸ Recalculate Table Row</td><td><code class="verbatim">C-c *</code></td></tr>
385</tbody>
386</table>
387<p>In Doom's normal state, <code class="verbatim">RET</code> in a table recalculates it when it has a <code class="verbatim">#+TBLFM:</code> line and aligns it otherwise; on a <code class="verbatim">#+TBLFM:</code> line it recalculates.</p>
388<p>When the table has a rule below its first data row, recalculating the whole table leaves the rows above that rule, the header, alone. With marked rows, the marks decide instead (see <em>Names, parameters and constants</em>). Each command evaluates the column formulas row by row, then the field formulas, then aligns the table. Formulas are evaluated once; Org's iterate-until-stable recalculation (<code class="verbatim">C-u C-u C-c *</code>) isn't available.</p>
389<p>Tables are not recalculated automatically. Rows marked <code class="verbatim">#</code> are not recalculated when you press <code class="verbatim">TAB</code> or <code class="verbatim">RET</code> in them, as <code class="verbatim">org-table-maybe-recalculate-line</code> would do in Emacs; recalculate with one of the commands above, or with <code class="verbatim">C-c C-c</code> (Mac <code class="verbatim">⌃⌘X</code>) in the row.</p>
390<h2 id="when-emacs-is-needed">When Emacs is needed</h2>
391<p>When a formula uses something the native evaluator doesn't have, the command reports what it was and the Mac recalculates the table in Emacs instead. This happens for:</p>
392<ul>
393<li>references to fields holding text in a Calc formula, and symbolic results;</li>
394<li>Calc functions and variables not listed above, precision other than <code class="verbatim">p12</code>, and the <code class="verbatim">S</code> and <code class="verbatim">u</code> flags;</li>
395<li>division by zero, complex results, vector results, and numbers too large for 64-bit integers;</li>
396<li>Lisp functions not listed above.</li>
397</ul>
398<p>The echo area shows <code class="verbatim">Recalculating in Emacs (reason)…</code>, then <code class="verbatim">Recalculated in Emacs</code>. Orgstar runs <code class="verbatim">emacs -Q --batch</code> on a copy of the file, so your Emacs init file, packages and customizations are not loaded, then replaces the table with Emacs's result. It looks for Emacs at the path in the <code class="verbatim">ORGSTAR_EMACS</code> environment variable, then <code class="verbatim">/opt/homebrew/bin/emacs</code>, <code class="verbatim">/usr/local/bin/emacs</code>, <code class="verbatim">/Applications/Emacs.app/Contents/MacOS/Emacs</code>, <code class="verbatim">/run/current-system/sw/bin/emacs</code> and <code class="verbatim">/usr/bin/emacs</code>. If none is found, the echo area says Emacs isn't installed and the table is unchanged. Emacs gets your <code class="verbatim">PATH</code> with <code class="verbatim">/opt/homebrew/bin</code>, <code class="verbatim">/usr/local/bin</code>, <code class="verbatim">/Library/TeX/texbin</code>, <code class="verbatim">/usr/bin</code> and <code class="verbatim">/bin</code> added, as code blocks and export do, so programs a formula starts are found when Orgstar was opened from the Dock. The run stops after 60 seconds. If you edit the table while Emacs is working, its result is discarded.</p>
399<p>Edit ▸ Cancel Running Task (<code class="verbatim">⌘.</code>) stops the recalculation; the echo area shows <code class="verbatim">Recalculation canceled</code> and the table is unchanged. Starting another recalculation or export in Emacs cancels the one that is running.</p>
400<p>If the table's formulas contain Lisp, Orgstar asks first: <code class="verbatim">This table's formulas run Lisp. Run them? (yes, no, always)</code>. <code class="verbatim">always</code> trusts this table's text in this file, so the question isn't asked again until the text changes.</p>
401<p>Entering a formula that needs Emacs with <code>C-c =</code>, Set Field Formula or <code>=</code> in a field is not handed to Emacs. The formula is stored in the <code class="verbatim">#+TBLFM:</code> line and the field is left as it was; the echo area shows <code class="verbatim">The formula was stored; recalculating it needs Emacs</code> and the reason. <code class="verbatim">TAB</code> and <code class="verbatim">RET</code> still move to the next field. Recalculate the table to run the formula in Emacs.</p>
402<p>For how Orgstar and Emacs share files, see <a href="15-alongside-emacs.html">Using Orgstar alongside Emacs</a>.</p>
403<h2 id="table-el-tables">table.el tables</h2>
404<p>Tables drawn with <code class="verbatim">+</code> corners and <code class="verbatim">-</code> and <code class="verbatim">|</code> borders, as the <code class="verbatim">table.el</code> package makes them, are recognized and kept as written:</p>
405<pre><code class="language-org highlight"><span class="text org"><span class="markup strikethrough org">+-------+</span>-------+
406<span class="markup other table org">| Name | Value |</span>
407<span class="markup strikethrough org">+-------+</span>-------+
408<span class="markup other table org">| a | 1 |</span>
409<span class="markup strikethrough org">+-------+</span>-------+</span></code></pre>
410<p>Orgstar doesn't edit them as tables: <code class="verbatim">TAB</code>, alignment and formulas don't apply. HTML export renders them as tables, with cells that span rows and columns, and Markdown export writes them as a code block. See <a href="12-export.html">Export</a>.</p>
411<h2 id="plotting">Plotting</h2>
412<p><code class="verbatim">#+PLOT:</code> lines are recognized and completed as keywords, but Orgstar doesn't draw plots (<code class="verbatim">org-plot/gnuplot</code> is not available).</p>
413<h2 id="on-ios">On iOS</h2>
414<p>The iOS app evaluates formulas natively with the same engine. Tables that need Emacs are not recalculated there; the app reports <code class="verbatim">This table needs Emacs, which runs on the Mac</code> with the reason. Table import and export are Mac only. See <a href="14-ios.html">iOS</a>.</p>
415</main>
416<footer class="site">
417Orgstar is 0BSD-licensed. Source: <a href="https://gitbay.org/krz/orgstar">gitbay.org/krz/orgstar</a>.
418</footer>
419</body>
420</html>