Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id D4A3A431FBF for ; Thu, 19 Nov 2009 07:40:34 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kHnsMSVR0zol for ; Thu, 19 Nov 2009 07:40:34 -0800 (PST) Received: from mail-fx0-f217.google.com (mail-fx0-f217.google.com [209.85.220.217]) by olra.theworths.org (Postfix) with ESMTP id 14706431FAE for ; Thu, 19 Nov 2009 07:40:33 -0800 (PST) Received: by fxm9 with SMTP id 9so2551475fxm.30 for ; Thu, 19 Nov 2009 07:40:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.155.92 with SMTP id r28mr131734bkw.121.1258645232952; Thu, 19 Nov 2009 07:40:32 -0800 (PST) In-Reply-To: <87lji2bmrb.fsf@yoom.home.cworth.org> References: <1258630481-5133-1-git-send-email-jan@ryngle.com> <1258630481-5133-2-git-send-email-jan@ryngle.com> <87lji2bmrb.fsf@yoom.home.cworth.org> Date: Thu, 19 Nov 2009 16:40:32 +0100 Message-ID: From: Jan Janak To: Carl Worth Content-Type: text/plain; charset=UTF-8 Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH 2/2] notmuch list: A new command to produce various lists. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 15:40:35 -0000 On Thu, Nov 19, 2009 at 3:41 PM, Carl Worth wrote: > On Thu, 19 Nov 2009 12:52:49 +0100, Jan Janak wrote: >> I implemented a new notmuch command that can be used to list all tags >> present in the database: > > Ah, very very interesting! I'd been planning on doing something like > this soon. And I was just thinking of "notmuch tags" as the command > line. What other ideas do you have in mind for "notmuch list" ? Yes, I considered "notmuch tags" too, but then I realized that we already have "notmuch tag" and I was worried that having both tag and tags as commands could be confusing. I was also thinking that "notmuch list" could be extended to list other terms than just tags, but I currently have no use-case for that. In any case, this is just an initial proposal, I can change it to use some other command name if you prefer that. > One way we could possibly do "notmuch tags" is to have it accept search > terms and then return the list of all tags from the matched messages. > Then of course we'd need a syntax for a search term to match all > messages, (which we want in any case). That sounds like a good idea. If the user does not provide any search terms then we could return all tags from the database like we do now. If there is a search term then we could iterate through all the messages that match it, collect their tags, sort them and present to the user. >> The main reason why I implemented this is because I am also working on >> adding the tag completion feature to the Emacs mode. This is very >> useful if you have a large collection of tags--it can save you some >> typing and, perhaps more importantly, it minimizes the risk of having >> typos in tag names. I'll send a patch for that later too. > > That will be a very nice feature to have, yes. > > The other reason I've wanted this is have something like a "folder view" > that would show a list of tags and a number of messages with each tag, > (or a number of messages with that tag and the inbox tag). Yeah, I would want that too :-). I've already looked into this and it seems like it should be easy to implement. At least it seems to be easy to get the numbers from Xapian. So we would just need to come up with a format for the list of tags with message counts, read it into emacs and present in a buffer. -- Jan