- Emacs Lisp 99.7%
- Makefile 0.3%
Default scripts/publish-packages.py to project from main without --allow-backwards and add unit tests covering revision and safety flags. Add standalone-clone guards to acceptance and api-check targets across all package Makefiles, and align etaf-manual book version tables with current package headers (etaf 0.3.18, etaf-manual 0.1.26). Validation: make structure-check; python3 -m unittest tests/tools/test_publish_packages.py tests/tools/test_repository_policy.py; make -C packages/etaf-manual book-check; make -C packages/ecss check; make -C packages/etaf-install check |
||
|---|---|---|
| benchmarks | ||
| docs | ||
| examples | ||
| lisp | ||
| native | ||
| scripts | ||
| tests | ||
| .gitignore | ||
| CHANGELOG.md | ||
| etaf-org.el | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
ETAF Org (etaf-org)
etaf-org renders native Org-mode documents as modern interactive reading views inside Emacs using ETAF and Ebox, and extends Org through a unified node registry, style-rule engine, Org-native container syntax, workspace live views, and an O(Δ) live-editing preview shell.
Capabilities
- Complete native Org rendering. Headlines with accumulating
#+TODO:sequences, priorities, inherited tags, statistics cookies,COMMENT/:ARCHIVE:, real overdue calculation, planning lines, property drawers,LOGBOOKclock/state summaries, nested and description lists, clickable checkboxes, three-line booktabs tables (alignment/width cookies, whole-table centering, sorting, table copy, zebra, row/column/cell highlights), syntax-highlighted source blocks (line numbers,[!code ...]markers, word highlight, folding, copy, paired#+RESULTS:), quotes with formatted attributions, indented verses with inline markup, strict$...$math vs currency disambiguation, multi-paragraph footnotes with↩return links,#+TOC:,#+SETUPFILE:,#+INCLUDE:,#+BIBLIOGRAPHY:/org-cite/#+PRINT_BIBLIOGRAPHY:, entities, timestamps/ranges, targets, and links. - Unified node & style-rule engine. Every core Org construct (
headline,src,table,quote,drawer,planning,math) and every extended container lives inetaf-org-node-definitions. Style rules (etaf-org-set-attr) and view overrides (etaf-org-set-view) apply uniformly; user nodes load automatically frometaf-org-node-directory. - Focused editorial & Org living-document vocabulary. Write containers as standard Org
#+begin_<name> :key val ... #+end_<name>, affiliated#+attr_etaf:,#+<marker>:child markers,#+BEGIN:dynamic blocks, and inline link micro-widgets ([[kbd:...]],[[badge:...]],[[sym:...]],[[color:...]],[[spoiler:...]],[[icon:...]],[[abbr:...]],[[roam:...]],[[denote:...]]). Includes curated L0 layout/collection/visualization/comparison widgets, bounded workspace L1 views (include,code-ref,symbol,project-tree,git-log,git-diffsupporting Git and Jujutsu), Org-exclusive live views (org-query,kanban,clock-summary,transclude,backlinks), and explicit confirmation-gated L2 actions (run, opt-in Babel). Switch to pure Org at any time with:flavor 'standardor#+OPTIONS: etaf:nil. - Clean single-window reading & O(Δ) live editing.
M-x etaf-org-openopens full-width in the current window with zero prompt on.orgbuffers and syncs to the source line;M-x etaf-org-previewtoggles a non-destructive right split with proportional follow-scroll (f) and cleans up only its own window;vtoggles single-window ↔ side-by-side split;e/ojumps back to source;Ttoggles an independent configurable TOC side window (*ETAF Org Outline*,etaf-org-toc-sidedefaulting toleft,etaf-org-toc-widthdefaulting to28);/filters sections live;Ktoggles a floating peek dialog;z/Zfolds sections;Stoggles spoilers;Htoggles hidden metadata;tcycles themes; every preview action is also a preview-scopedM-xcommand (see Quick start to customize keys); andetaf-org-edit-modeprovides optional Lisp-enabled authoring help. - Native zero-browser Mermaid & MathJax rendering. Display formulas (
$$...$$,\[...\],\begin{align}...\end{align}) andmermaidblocks render asynchronously inside a sandboxed QuickJS native module (vendored Obsidian Pele + MathJax TeX-to-SVG, auto-installed viaM-x etaf-install/M-x etaf-install-native, zero browser or Node.js required) into a bounded LRU disk cache tinted to the active palette (auto,dark,light,sepia). Pluggableetaf-org-src-renderersplus optionalsvg,dot,plantuml, andqrencodesupport.
Requirements
- Emacs 29.1 or newer.
- ETAF 0.3.11+,
etaf-ui0.3.11+,ebox, andecss. - Prebuilt QuickJS native module (
typeset-native, downloaded and SHA-256 verified automatically byM-x etaf-installorM-x etaf-install-nativeinto~/.cache/emacs-taf/native/) for Mermaid and MathJax SVGs. - Optional external CLI tools (inspect via
(etaf-org-doctor)):ffmpeg(inline video),qrencode,git/jj,rg,dot,plantuml.
Installation
From the ETAF package archive, install via M-x etaf-install and select etaf-org (this installs all framework dependencies plus the prebuilt native Mermaid/MathJax module automatically), or load it after package-install:
(require 'etaf-org)
From a checkout, add this repository and its sibling providers to load-path and byte-compile:
make compile
(add-to-list 'load-path "~/emacs-taf/etaf-org")
(add-to-list 'load-path "~/emacs-taf/etaf-ui")
(add-to-list 'load-path "~/emacs-taf/etaf")
(add-to-list 'load-path "~/emacs-taf/ebox")
(add-to-list 'load-path "~/emacs-taf/ecss")
(require 'etaf-org)
Quick start
M-x etaf-org-open: open a full-width reading view in the current window (zero prompt when visiting a.orgbuffer; passC-uto pick another file).M-x etaf-org-preview: toggle a non-destructive right-hand live split beside the current.orgsource buffer with proportional follow-scroll (or toggle split when invoked inside a preview buffer).- Optional Lisp hook:
(add-hook 'org-mode-hook #'etaf-org-edit-mode)enables soft highlighting, CAPF completion, and block-pair matching in Org source buffers without adding extra globalM-xcommands.
Keybindings and customizing keys
Inside a preview buffer, press ? to browse all active single-key shortcuts (n/p headings, j jump, T TOC side window, e/o goto source, v toggle split, f follow scroll, / filter, z/Z fold, K peek, S spoilers, H hidden metadata, t theme, [/] measure, g/r reload, q close). See docs/manual.md for the full command table.
Preview bindings are defined in the customizable variable etaf-org-keys rather than a traditional major-mode keymap (defaults use single keys only so C-c / C-t / C-x prefixes are never shadowed, and every action is also callable via M-x / M-X inside a preview buffer). Each entry has the form (KEY COMMAND LABEL).
Run M-x customize-variable RET etaf-org-keys, or edit etaf-org-keys in your init file (changes apply to newly opened previews):
(with-eval-after-load 'etaf-org
;; Rebind `e' to `C-c e' and unbind `o':
(setq etaf-org-keys
(cons '("C-c e" etaf-org-goto-source "Jump to source")
(assoc-delete-all "o"
(assoc-delete-all "e" (copy-sequence etaf-org-keys))))))
;; Or disable all default single-key bindings (useful for Evil / Meow users):
;; (setq etaf-org-keys nil)
Headless embedding example:
(let* ((session (etaf-org-create :file "~/notes.org" :theme 'auto))
(buffer (etaf-mount (generate-new-buffer " *org*")
(etaf-org-view session)
'(:viewport-width 100 :viewport-height 40))))
(etaf-org-state session))
The root entry's Commentary in etaf-org.el is the authoritative public API inventory.
Documentation
- User Manual / 用户手册: reading workflows, keybindings, flavors, trust policy, and embedding.
- Extensions & Widgets Guide / 扩展与组件指南: unified node model, style rules, L0/L1/L2 & Org-exclusive widgets, and custom node authoring.
- Architecture: module DAG, parse/derive/publish/render pipeline, O(Δ) live editing, and performance baseline.
- Changelog.
Development
make compile # byte-compile with warnings as errors
make test # public behavior scenarios (tests/acceptance.json)
make check # structure, compile, acceptance, and API boundary gates
make benchmark # parse, mount, fold, and edit/repaint timings
Runnable examples: examples/complete-gallery.org, examples/widgets-showcase.org, and examples/etaf-org-demo.el.
