agenda: Clarification of error message

* lisp/org-agenda.el (org-agenda-check-type): Mention also 'component'
  in the error message since it could be just the unallowed component
  in a composed agenda buffer from which some action has been
  triggered.
This commit is contained in:
Marco Wahl 2019-10-23 12:13:54 +02:00
parent 80b29acba3
commit 28bb1c81fa
1 changed files with 3 additions and 3 deletions

View File

@ -7308,14 +7308,14 @@ subtree."
;;; Agenda commands
(defun org-agenda-check-type (error &rest types)
"Check if agenda buffer is of allowed type.
"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 buffers" org-agenda-type))
(error "Not allowed in '%s'-type agenda buffer or component" org-agenda-type))
(t nil)))
(defun org-agenda-Quit ()