Selaa lähdekoodia

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

Matt Lundin 14 vuotta sitten
vanhempi
commit
9bb4ef66ab
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  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.
 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)))