I set up habits in org mode and using C-k
to toggle the habits on/off in the normal agenda is working fine.
However, in my custom agenda (taken from Bernt Hansen GTD implementation link) I get the following error when using C-k
:
Debugger entered--Lisp error: (error "Not allowed in tags-type agenda buffers")
signal(error ("Not allowed in tags-type agenda buffers"))
error("Not allowed in %s-type agenda buffers" tags)
org-agenda-check-type(t agenda)
org-habit-toggle-habits()
call-interactively(org-habit-toggle-habits nil nil)
command-execute(org-habit-toggle-habits)
The same is true for changing week and day view:
Debugger entered--Lisp error: (error "Not allowed in tags-type agenda buffers")
signal(error ("Not allowed in tags-type agenda buffers"))
error("Not allowed in %s-type agenda buffers" tags)
org-agenda-check-type(t agenda)
org-agenda-change-time-span(week nil)
org-agenda-week-view(nil)
call-interactively(org-agenda-week-view nil nil)
command-execute(org-agenda-week-view)
Any hints on how to toggle habits in the custom agenda? Or why is toggling not possible in tags-type agendas?
By the way I am using spacemacs 0.105.21 (emacs 24.5.1)
The solution is to change (agenda "" nil)
to (agenda "")
.
Here is a part of the custom agenda:
(setq org-agenda-custom-commands
(quote (("N" "Notes" tags "NOTE"
((org-agenda-overriding-header "Notes")
(org-tags-match-list-sublevels t)))
("h" "Habits" tags-todo "STYLE=\"habit\""
((org-agenda-overriding-header "Habits")
(org-agenda-sorting-strategy
'(todo-state-down effort-up category-keep))))
(" " "Agenda"
((agenda "") ;; delete nil
(tags "REFILE"
((org-agenda-overriding-header "Tasks to Refile")
(org-tags-match-list-sublevels nil)))
(tags-todo "-CANCELLED/!"
((org-agenda-overriding-header "Stuck Projects")
(org-agenda-skip-function 'bh/skip-non-stuck-projects)
(org-agenda-sorting-strategy
'(category-keep))))
...
Thanks to @elethan