0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-24 20:02:51 +00:00

org-agenda-append-agenda: check that we are in an agenda buffer.

This commit is contained in:
Matt Lundin 2011-03-03 01:03:43 +00:00 committed by Bastien Guerry
parent c431fef47a
commit 9bb4ef66ab

View file

@ -2266,6 +2266,8 @@ Pressing `<' twice means to restrict to the current subtree or region
This function allows interactive building of block agendas.
Agenda views are separated by `org-agenda-block-separator'."
(interactive)
(unless (string= (buffer-name) org-agenda-buffer-name)
(error "Can only append from within agenda buffer"))
(let ((org-agenda-multi t))
(org-agenda)
(widen)))