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: Sun, 14 Dec 2008 13:43:30 -0600 Message-ID: <494561E2.7070807@sift.info> References: <4943F953.6010109@sift.info> <4944389C.3070904@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 1LBwsO-0007l0-Hf for emacs-orgmode@gnu.org; Sun, 14 Dec 2008 14:43:40 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LBwsM-0007jz-To for emacs-orgmode@gnu.org; Sun, 14 Dec 2008 14:43:40 -0500 Received: from [199.232.76.173] (port=44232 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LBwsM-0007jj-PY for emacs-orgmode@gnu.org; Sun, 14 Dec 2008 14:43:38 -0500 Received: from outbound-mail-114.bluehost.com ([69.89.24.4]:35045) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1LBwsK-0002JP-06 for emacs-orgmode@gnu.org; Sun, 14 Dec 2008 14:43:36 -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, > > Robert Goldman writes: > >> 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: > > Sorry if I forgot to mention it in my first post, but I believe this > custom command only works when the agenda is called from within an org > buffer. As far as I understand it, since the tags tree command creates > a sparse tree within an org buffer, it needs a particular org buffer > to work with. If that is the case, isn't it incorrect to offer "tags-tree" as one of the org-agenda custom commands? Since it can't be safely invoked as part of org-agenda? One suggested possible solution: Change tags-tree argument to (tags tree ), then do some kind of with-excursion to get into the buffer for (in org mode). But here we're running up against my limited understanding of the tags tree. Is tags-tree even really an agenda command? I.e., does it build a new agenda buffer that we can use, or is it a way of viewing the current buffer? I think the latter. If that is correct, it suggests .... Alternate solution: remove tags-tree from the set of org-agenda commands. tags-tree isn't really an agenda-building command, and should not be treated as one. Note also that this means that this doesn't work as a solution to my problem, because it requires all of the car category items to appear in a single org file, and ignores the org-agenda-files setting. So, for example, I can't have work-related in-car tasks in one org file and personal chores that are in-car tasks in another. :-(