From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Goldman Subject: Re: Possible to get a subtree agenda view? Date: Sat, 13 Dec 2008 17:43:57 -0600 Message-ID: <494448BD.9080609@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 1LBe9b-0004OC-Dk for emacs-orgmode@gnu.org; Sat, 13 Dec 2008 18:44:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LBe9Y-0004Mx-0D for emacs-orgmode@gnu.org; Sat, 13 Dec 2008 18:44:09 -0500 Received: from [199.232.76.173] (port=44853 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LBe9X-0004Mu-RG for emacs-orgmode@gnu.org; Sat, 13 Dec 2008 18:44:07 -0500 Received: from outbound-mail-34.bluehost.com ([69.89.18.154]:55839) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1LBe9X-0005Ku-CY for emacs-orgmode@gnu.org; Sat, 13 Dec 2008 18:44:07 -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: > >> I have a @car category that I use to keep track of things I might want >> to do when out in the car. Getting the agenda view *almost* works for >> this. But often an item here indicates that I should visit some store, >> and underneath the item is a list of things to purchase. The agenda >> view, of course, suppresses that list. This means that printing out (or >> pushing to my palm) the agenda view isn't really what I want. I'd >> really like to have the subtree below the matching items (because I know >> the subtree is always trivial). >> >> I *think* I should be able to do this with a custom agenda command, >> using sparse trees, but I'm having a couple of problems figuring this out: >> >> 1. I don't really want a sparse tree, because I don't want anything >> "upstream" of the selected items. > > See the variable org-show-hierarchy-above. > >> 2. I want to force the matches to be expanded. > > See the variable org-show-entry-below. > >> 3. I want to match on a tag (@car) *and* on a TODO tag "TODO". I may >> be missing something, but I don't see any obvious conjunctive matching >> command in the sparse tree or agenda codes. > > C-c / T +@car+TODO="TODO" > >> 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 > )) > > I believe all of this is in the manual of the most recent version of > org. Thank you very much for the tutorial Matt. Yes, it's all there, now that you pointed me in the right direction, but it's scattered hither and yon and I simply wasn't able to pull all the pieces together without some hand-holding. In particular, the variable settings weren't near the agenda discussion, and are not in the index. Question: would it be useful to add a variable index to the info file? If it is, and there isn't someone more texinfo competent than me to do it, I'll look into seeing how hard it would be to do this. Also, in the manual and code there's no real discussion of how the settings part of the org-agenda-custom-commands is to be used. I mean, it's clear that they are variable bindings, but there's no use case. Would it be reasonable to modify your example above into an example to be added to the texinfo file? I would be happy to have a whack if this seems like a good idea. best, R