The command line
kalem is the editor and a set of command-line tools in one program.
kalem --help lists them with the variables that move the settings and
the log, and kalem COMMAND --help gives a command's options.
| Command | What it does |
|---|---|
kalem [FILE], kalem FOLDER |
The editor: graphical where there is a display, else in the terminal; kalem gui and kalem tui (-t) choose |
kalem check FILE-OR-FOLDER... |
Syntax diagnostics and a check that the file reads back as it is; exits 1 on errors (--deny-warnings, --format json); a folder stands for the Org, Markdown, LaTeX, CSV and BibTeX files under it, hidden ones left out; in Markdown, links to files that are not there |
kalem check FILE.tex --unrendered |
LaTeX: unbalanced groups, labels, citations, missing files; what shows as source |
kalem fmt FILE-OR-FOLDER... |
Formats Org (tables, tags, blank lines), LaTeX (--align lines up the & of tables) and code whose language has a formatter; leaves any other file as it is; --check for CI; a folder stands for the Org and LaTeX files under it |
kalem export FILE-OR-FOLDER... --to FORMAT |
Exports Org as Emacs does: html, md, gfm, org, latex, txt, utf8, pdf (through LaTeX), and docx, odt, epub, rtf through pandoc; -o, --body-only, --subtree HEADLINE; a folder stands for the Org files under it, each exported beside itself |
kalem import FILE... |
Converts Word, OpenDocument, Markdown, HTML, EPUB or RTF to Org through pandoc, the pictures into NAME_assets |
kalem view FILE |
A file a viewer opens (a PDF, a picture, a workbook): the text of a unit (--unit N, a page, frame or sheet) and the file's information, or a page or picture as PNG (--to png -o OUT) |
kalem table recalc FILE... |
Recalculates every table that has a #+TBLFM line and aligns it, as Emacs does; --iterate, --check |
kalem query FILE-OR-FOLDER... MATCH |
Headlines matching an Org match string, such as 'TODO"NEXT"+work'=; a folder stands for the Org files under it; what the match string has that is no term is said, and left out as Emacs leaves it out |
kalem latex build FILE |
Builds the PDF of a LaTeX project; its problems at their files and lines (--engine, --outdir) |
kalem complete FILE:LINE:COL |
Prints the completions there: label, kind and completer, one a line |
kalem commands [--type T] |
Lists the commands (of text type T): ID, title, scope and keys |
kalem parse FILE |
The syntax tree of an Org, Markdown or LaTeX file, each by its own parser |
kalem plugin ACTION |
Plugins: browse, install NAME (or a link or a path), list, check, remove ID, enable ID, new NAME, build [DIR], dev [DIR] (Plugins) |
kalem run PLUGIN COMMAND [FILE...] |
Runs an installed plugin's command without a window, as the editors run it: against each file (a folder as its listing) or once without one; the documents it writes printed (--format json), its notices on standard error, a prompt given the text it offers, a choice nothing, a confirmation no; a file it changed saved; --args JSON (Plugins) |
kalem lsp ACTION |
Language servers: status [FILE], check FILE..., ask REQUEST FILE [LINE:COL] (Language plugins) |
kalem book build, kalem book check |
Builds this Book as a site, and checks that every chapter exports and every link leads somewhere |
--format json gives stable output for scripts. The tools that compare
Kalem with Emacs and pandoc (diff-emacs, diff-pandoc, dump,
latex-coverage) still run but are left out of the help: they are for
Kalem's own development.