From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Filtering agenda by the "top" category Date: Tue, 10 Apr 2012 22:42:23 +0200 Message-ID: <8762d7fhe8.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:42556) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHhsG-00061e-HN for emacs-orgmode@gnu.org; Tue, 10 Apr 2012 16:41:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SHhsE-00075v-Ni for emacs-orgmode@gnu.org; Tue, 10 Apr 2012 16:41:12 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:60962) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHhsE-00075S-Eb for emacs-orgmode@gnu.org; Tue, 10 Apr 2012 16:41:10 -0400 Received: by wgbdr1 with SMTP id dr1so160282wgb.30 for ; Tue, 10 Apr 2012 13:41:08 -0700 (PDT) In-Reply-To: (John Wiegley's message of "Wed, 04 Apr 2012 15:38:55 -0500") 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: John Wiegley Cc: Dave Abrahams , emacs-orgmode@gnu.org Hi John, John Wiegley writes: > I discovered the < key in the agenda yesterday (by accident!), which filters > the Agenda down to entries having the same category. > > However, I use both *categories* and *projects*. For example: > > * Work > :CATEGORY: Work > :OVERLAY: (face (:background "#fdfdeb")) > ** PROJECT Foo > :CATEGORY: Foo > > I use :CATEGORY: for my project here so it shows up in the leftmost column of > my agenda. I don't want every project displaying as just "Work". I use the > :OVERLAY: so that all Work items have the same background color, which is a > better way of seeing at a glance which *category* every item falls into. > > What this means is that although I can use < to filter by *project*, I can't > filter down to the "Work" *category*. So that's what the code below does. I > bind it to >, since I wasn't using what that binding does. I tested the code and it looks useful. Could you make a patch against current master? > Also, I found a bug: passing a prefix argument to < doesn't have any effect. > The code doesn't use that argument in any meaningful way. This is now fixed. You can use `C-u <' to filter out the category of the current line. Thanks for spotting this! -- Bastien