瀏覽代碼

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

Matt Lundin 14 年之前
父節點
當前提交
9bb4ef66ab
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      lisp/org-agenda.el

+ 2 - 0
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.
 This function allows interactive building of block agendas.
 Agenda views are separated by `org-agenda-block-separator'."
 Agenda views are separated by `org-agenda-block-separator'."
   (interactive)
   (interactive)
+  (unless (string= (buffer-name) org-agenda-buffer-name)
+    (error "Can only append from within agenda buffer"))
   (let ((org-agenda-multi t))
   (let ((org-agenda-multi t))
     (org-agenda)
     (org-agenda)
     (widen)))
     (widen)))