소스 검색

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)))