Re: [notmuch] [PATCH 2/2] notmuch list: A new command to produce various lists.
authorJan Janak <jan@ryngle.com>
Thu, 19 Nov 2009 15:40:32 +0000 (16:40 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:35:37 +0000 (09:35 -0800)
d3/fc139ae1babc4dd4a17ead26465bb5e78060b0 [new file with mode: 0644]

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