org.nvim

Dynamic blocks

#+BEGIN: clocktable :scope file :maxlevel 2 :block thisweek
#+END:
<prefix>xu / xUUpdate the block at the cursor / all blocks. <C-c><C-c> on the #+BEGIN: line also updates it.

clocktable parameters (the output matches Emacs 9.8):

:scopefile|subtree|tree|treeN|agenda|agenda-with-archives| file-with-archives|("a.org" "b.org")
:maxlevelN (default 2)
:blocktoday, yesterday, thisweek, lastweek, thismonth, lastmonth, thisq, lastq, thisyear, lastyear (the this* forms and today take -N / +N), untilnow, 2026-09-23, 2026-W39, 2026-Q3, 2026-09, 2026. It wins over :tstart / :tend.
:tstart / :tendtimestamps or <now>, <today>, <yesterday>, <tomorrow>, <-2d>, <+1w>, <-3h> (h from now, d w m y from today)
:wstart / :mstartfirst day of the week (1 = Monday) / of the month
:stepday|week|semimonth|month|quarter|year: one table per period of the :block or :tstart/:tend range (:stepskip0 t skips empty ones)
:matcha match string (org-match-syntax)
:formula% adds a percentage column; "$3=$2;t" adds a #+TBLFM line. A #+TBLFM below the table survives updates.
:sort (2 . ?T)sort the rows by a column (a/A n/N t/T)
:lang deheaders in de, es, fr, nl, nn, pl, pt-BR or sk
:filetitle t#+TITLE instead of the file name in the file column
:properties ("Effort" "OWNER")property columns (:inherit-props t)
:level ta level column
:timestamp ta timestamp column
:tags ta tags column
:emphasize tbold level 1, italic 2
:link tlink headlines
:fileskip0 tskip files without time
:hidefiles tno file column
:tcolumns Nat most N time columns
:compact tone time column, indented headlines
:indent nilno \_ indentation
:narrow 40!cut headlines at 40 characters (the default); :narrow 40 adds a <40> width row instead
:header "text"replace the #+CAPTION: line

columnview parameters: :id local|global|file:path|ID (default local; a local or ID view covers the subtree of the entry holding the COLUMNS property that entry inherits, else the entry's own subtree, as column view does), :maxlevel, :skip-empty-rows, :indent, :format, :match (tags / property match), :exclude-tags (a b) (inherited tags count), :hlines t|N (a hline before each entry, or each entry of level N or less), :vlines t (column groups), :link t (link items to their headings), :formatter (the name of a global Lua function function(rows, params) returning the lines; columns_dblock_formatter sets one for every block; rows are the titles, "hline", then { level = n, hl = headline, cells... }). Like Emacs (org-columns-dblock-write-default), a first row of width cookies (<25>) is written when the format has widths, and the columns are shrunk; ITEM loses statistics cookies, footnote references, targets and inline src blocks / calls; archived and commented subtrees are skipped. Keywords like #+NAME: above the table and the first #+TBLFM: line below it are kept, and the formulas re-applied. A | in a value is written as \vert{} (Emacs writes it raw, which breaks the table).

Custom blocks:

require("org.dblock").register("myblock", function(params, ctx)
  return { "| generated | table |" }
end)