summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Lundin <mdl@imapmail.org>2011-03-03 01:03:43 +0000
committerBastien Guerry <bzg@altern.org>2011-03-03 17:40:08 +0100
commit9bb4ef66abeada1ceeca930a70c800beef24254f (patch)
tree7e12dab2c158c15a881a20743c654db3188c2451
parentc431fef47a7cbcc6ea79e3a945bc22cca4b4be96 (diff)
downloadorg-mode-9bb4ef66abeada1ceeca930a70c800beef24254f.tar.gz
org-agenda-append-agenda: check that we are in an agenda buffer.
-rw-r--r--lisp/org-agenda.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index ea822da..f2eac99 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -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)))