emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [Sticky Agenda] How to create Agenda Buffers in functions


From: Max Mikhanosha
Subject: Re: [O] [Sticky Agenda] How to create Agenda Buffers in functions
Date: Thu, 19 Apr 2012 21:39:04 -0400
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.6 Emacs/23.3.50 (x86_64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO)

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

[Prev in Thread] Current Thread [Next in Thread]