---
description: Insert todo list query
tags: meta/template/slash
priority: 1000
onlyContexts:
- "FencedCode:space-lua"
- "LuaDirective"
---
query[[
  from t = index.tasks(|^|)
  where t.done == false 
    and table.includes(t.links, _CTX.currentPage.name)
    and not table.includes(t.tags, 'URGENT')
    and not table.includes(t.tags, 'next')
    and not table.includes(t.tags, 'event')
  order by t.lastModified desc 
  limit 10
  select {
    REF = "[[" .. t.ref .. "]]",
    TEXT =  t.text,
    TAGS = t.tags
  }
]]