From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Goldman Subject: Re: Possible to get a subtree agenda view? --- possible bug? Date: Sat, 13 Dec 2008 16:35:08 -0600 Message-ID: <4944389C.3070904@sift.info> References: <4943F953.6010109@sift.info> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LBd4x-0002rc-Dp for emacs-orgmode@gnu.org; Sat, 13 Dec 2008 17:35:19 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LBd4v-0002pK-4u for emacs-orgmode@gnu.org; Sat, 13 Dec 2008 17:35:18 -0500 Received: from [199.232.76.173] (port=38245 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LBd4u-0002p8-Vd for emacs-orgmode@gnu.org; Sat, 13 Dec 2008 17:35:16 -0500 Received: from outbound-mail-104.bluehost.com ([69.89.22.14]:39634) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1LBd4u-0007Tl-Eg for emacs-orgmode@gnu.org; Sat, 13 Dec 2008 17:35:16 -0500 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Matthew Lundin Cc: emacs-orgmode@gnu.org Matthew Lundin wrote: > Hi Robert, > .... > >> Is there any existing way to do this, or should I start rooting around >> in the code? > > For a custom agenda command: > > (setq org-agenda-custom-commands > '(("f" tags-tree "+car+TODO=\"TODO\"" > ((org-show-entry-below t) > (org-show-hierarchy-above nil))) > ;; other commands > )) > Actually, I just tried this with a recent git pull, and when I try to execute it, it crashes, with the following error: Debugger entered--Lisp error: (error "Cannot execute org-mode agenda command on buffer in org-agenda-mode.") signal(error ("Cannot execute org-mode agenda command on buffer in org-agenda-mode.")) ad-Orig-error("Cannot execute org-mode agenda command on buffer in %s." org-agenda-mode) apply(ad-Orig-error ("Cannot execute org-mode agenda command on buffer in %s." org-agenda-mode)) error("Cannot execute org-mode agenda command on buffer in %s." org-agenda-mode) org-check-for-org-mode() byte-code(...) org-agenda(nil) call-interactively(org-agenda) Looks like something's being called here that is only callable in org-mode, not org-agenda-mode. Indeed, looking at org-agenda, I see: ((eq type 'tags-tree) (org-check-for-org-mode) (org-let lprops '(org-tags-sparse-tree current-prefix-arg match))) Aren't we always in org-agenda-mode at this point? I tried moving to a different buffer (in emacs-lisp mode) to invoke the same command, thinking it might be a problem specifically with invoking this custom agenda from inside org-agenda-mode, but then got the same error with emacs-lisp-mode instead of org-agenda-mode I have just this moment pulled an update from git, so I think this bug is current (unless it's some weird misconfiguration on my part). R