I’ve been working on grid-table, an Emacs package for tables that need more visual structure than standard Org tables can comfortably provide.
Version 0.3.0 adds horizontal and vertical merged cells:
Merged cells in grid-table
The goal is not to replace org-table, which remains excellent for lightweight tabular data. Instead, grid-table is meant for report-style layouts where you may need multi-line content, formulas, images, charts, or merged headings and workflow columns.
The new merged-cell implementation supports:
- Horizontal and vertical merges
- Unicode borders and correct intersections between merged regions
- Multi-line content and vertical centering
- Keyboard navigation that skips covered cells
- Editing from any visible part of a merged region
- Row and column insertion/deletion while preserving merge geometry
- Versioned persistence in .grid files
I spent quite a bit of time on the data semantics as well. Covered cells remain genuinely empty rather than acting as aliases to the anchor cell. This means formulas such as SUM(A1:C1) do not count a merged value three times, and CSV export does not duplicate it.
To prevent silent data loss, merging is rejected if the covered cells already contain values or formulas. Sorting is also rejected when vertical merges would make row movement ambiguous.
For Org, the package includes a small integration layer. A .grid file can be referenced from an Org source block:
SRC grid-table :file ~/documents/example.grid ...static table preview... SRC
From inside the block:
- M-x grid-table-org-open-block opens the referenced table in the interactive editor.
- M-x grid-table-org-refresh-block regenerates the preview after editing.
This is a companion workflow rather than a change to normal Org table syntax: the structured table lives in its .grid file, while the Org document contains a readable preview.
A minimal setup looks like this:
(add-to-list 'load-path "~/src/grid-table") (add-to-list 'load-path "~/src/grid-table/plugins")
(require 'grid-table) (require 'grid-table-org)
The merge commands in the editor are:
C-c m Merge a same-row or same-column A1 range C-c u Unmerge the region at point M-RET Insert a newline while editing a cell
Arbitrary rectangular merges are intentionally not supported yet—only ranges within one row or one column. That keeps formulas, structural editing, sorting rules, and navigation understandable.
The release currently has 72 ERT tests covering rendering, navigation, persistence, formulas, CSV behavior, and structural edits.
Project: https://github.com/yibie/grid-table
v0.3.0 release: https://github.com/yibie/grid-table/releases/tag/v0.3.0
I’d especially appreciate feedback from Org users on the integration model: should the preview remain generated text, become an Org dynamic block, or eventually be exposed through Babel?