At Thu, 19 Apr 2012 22:17:08 +0200,
Sebastien Vauban wrote:

> I tried the updated version of Sven:
> 
> #+begin_src emacs-lisp
>   (defun my-gtd-frame ()
>     (interactive)
>     (save-excursion)
>     (make-frame '(
>        (name                      . "gtd")
>        (active-alpha              . 0.75)
>        (inactive-alpha            . 0.8)
>        (top                       . 20)
>        (left                      . 20)
>        (width                     . 80)
>        (height                    . 40)))
>     (select-frame-by-name "gtd")
>     (org-agenda-goto-today)
>     (delete-other-windows)
>     (split-window-horizontally)
>     (other-window 1)
>     (catch 'exit
>       (org-batch-agenda "work")))
> #+end_src
> 
> But I get the following error:
> 
> --8<---------------cut here---------------start------------->8---
> Debugger entered--Lisp error: (error "Not allowed in nil-type agenda buffers")
>   signal(error ("Not allowed in nil-type agenda buffers"))
>   error("Not allowed in %s-type agenda buffers" nil)
>   (if error (error "Not allowed in %s-type agenda buffers" org-agenda-type) 
> nil)
>   (if (memq org-agenda-type types) t (if error (error "Not allowed in %s-type 
> agenda buffers" org-agenda-type) nil))
>   org-agenda-check-type(t timeline agenda)
>   org-agenda-goto-today()
>   my-gtd-frame()
>   call-interactively(my-gtd-frame)
>   ...
> Am I missing something?
> 

The call to (org-agenda-goto-today) is before it created the agenda, I
think it should be inside the catch, after the (org-batch-agenda) call.

Regards,
  Max

Reply via email to