Function: org-agenda-check-type
org-agenda-check-type is a byte-compiled function defined in
org-agenda.el.gz.
Signature
(org-agenda-check-type ERROR &rest TYPES)
Documentation
Check if agenda buffer or component is of allowed type.
If ERROR is non-nil, throw an error, otherwise just return nil.
Allowed types are agenda todo tags search.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-agenda.el.gz
;;; Agenda commands
(defun org-agenda-check-type (error &rest types)
"Check if agenda buffer or component is of allowed type.
If ERROR is non-nil, throw an error, otherwise just return nil.
Allowed types are `agenda' `todo' `tags' `search'."
(cond ((not org-agenda-type)
(error "No Org agenda currently displayed"))
((memq org-agenda-type types) t)
(error
(error "Not allowed in '%s'-type agenda buffer or component" org-agenda-type))
(t nil)))