From mboxrd@z Thu Jan 1 00:00:00 1970 From: Max Mikhanosha Subject: Re: [Sticky Agenda] How to create Agenda Buffers in functions Date: Thu, 19 Apr 2012 21:39:04 -0400 Message-ID: <87bomnnpvr.wl%max@openchat.com> References: <87fwckbv21.fsf@gmx.ch> <87limc73av.wl%max@openchat.com> <80obqn79yz.fsf@somewhere.org> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([208.118.235.92]:55599) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SL2oW-000390-QQ for emacs-orgmode@gnu.org; Thu, 19 Apr 2012 21:39:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SL2oV-0000Rv-0X for emacs-orgmode@gnu.org; Thu, 19 Apr 2012 21:39:08 -0400 Received: from openchat.com ([75.99.81.170]:36968 helo=momoland.openchat.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SL2oU-0000Rn-T8 for emacs-orgmode@gnu.org; Thu, 19 Apr 2012 21:39:06 -0400 In-Reply-To: <80obqn79yz.fsf@somewhere.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Sebastien Vauban Cc: emacs-orgmode@gnu.org 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