Browse Source

org-agenda.el: Bugfix: correctly check whether we are in org-agenda-mode

* org-agenda.el (org-agenda-append-agenda): Bugfix: correctly
check whether we are in org-agenda-mode.
Bastien Guerry 12 years ago
parent
commit
db4c1454a3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lisp/org-agenda.el

+ 1 - 1
lisp/org-agenda.el

@@ -2571,7 +2571,7 @@ 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)
+  (unless (derived-mode-p 'org-agenda-mode)
     (error "Can only append from within agenda buffer"))
     (error "Can only append from within agenda buffer"))
   (let ((org-agenda-multi t))
   (let ((org-agenda-multi t))
     (org-agenda)
     (org-agenda)