-
-
Notifications
You must be signed in to change notification settings - Fork 168
Description
Does this feature exist in Emacs orgmode core?
Yes
Orgmode link
https://orgmode.org/manual/Custom-Agenda-Views.html
Feature value
This would allow the user “to store and quickly access frequently used TODO and tags searches, and to create special composite agenda buffers”. My particular use case would be a “dailies” view for a GTD workflow. Show the normal agenda for the current day on a 1-day span and beneath that, all non-scheduled TODOs filtered by some tag and sorted by the priority. But I would also use this to compose weekly review views filtered by properties and sorted by, for example entry date. Ideally, this would be as flexible as in Emacs with custom commands to view saved filters and searches (can already be done with the API, i.e. require("orgmode".api.agenda).todos({ filter = "refile+TAG" })
, but this approach is not built-in, flexible enough and does not work with TODOS because the query stills pops up) and the "block agenda", where several views can be combined.
Also, I would love to see a column view, but this is better tackled in another issue.
Additional context
A minimal non-working example for my usecase is
local agenda = require("orgmode").instance().agenda
local AgendaTodosView = require('orgmode.agenda.views.todos')
local AgendaView = require('orgmode.agenda.views.agenda')
local utils = require("orgmode.utils")
agenda:open_window()
agenda.win_width = utils.winwidth()
local view1 = AgendaView:new(vim.tbl_deep_extend('force', opts or {}, {
filters = agenda.filters,
win_width = agenda.win_width,
})):build()
local view2 = AgendaTodosView:new(vim.tbl_deep_extend('force', opts or {}, {
filters = agenda.filters,
win_width = agenda.win_width,
})):build()
agenda.views = { view1, view2 }
vim.b.org_agenda_type = type
return agenda:_render()
This produces the wanted agenda ("calendar") + TODOs view, but the highlighting is off, it seems the TODOs highlighting is applied to the whole buffer as if only the TODOs were present.
Some video references: