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 7F4E7431FBC for ; Fri, 20 Nov 2009 23:35:35 -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 bMkF-rNzY4Wy for ; Fri, 20 Nov 2009 23:35:34 -0800 (PST) Received: from keithp.com (home.keithp.com [63.227.221.253]) by olra.theworths.org (Postfix) with ESMTP id 22FD7431FAE for ; Fri, 20 Nov 2009 23:35:34 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 70CED76012C for ; Fri, 20 Nov 2009 23:35:33 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 9MVZQpEbdpjB for ; Fri, 20 Nov 2009 23:35:30 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 54218B9404B; Fri, 20 Nov 2009 23:35:30 -0800 (PST) Received: from keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 4642B76012C for ; Fri, 20 Nov 2009 23:35:30 -0800 (PST) From: Keith Packard To: notmuch@notmuchmail.org Date: Fri, 20 Nov 2009 23:35:29 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: [notmuch] notmuch 'index' mode. 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: Sat, 21 Nov 2009 07:35:35 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable I posted a patch adding an 'index' mode to notmuch and though I'd explain my idea. Most mail systems provide a 'folder view' mode which displays the set of folders and a count of messages in each folder. I used this myself as the first sort of which messages I want to read. Notmuch doesn't have folders, but it does have tags, so I thought I'd take advantage of that, along with the quick searching ability in Xapian to construct something much like the folder view. In 'index' mode, notmuch shows a list of 'folders', each of which is defined by a Xapian query. The new 'notmuch count' command is used to figure out how many messages matching the query are in the database. When you hit 'enter' (or click the mouse) on any line, it executes the search for real using the notmuch-search command. Here's the set of indexes I'm using right now (oddly, it looks a lot like the set of tags I auto-configure in my notmuch-poll script). (setq notmuch-indexes '(("inbox" . "tag:inbox") ("me" . "tag:inbox AND tag:me") ("announce" . "tag:inbox AND tag:announce") ("bugs" . "tag:inbox AND tag:bugs") ("cairo" . "tag:inbox AND tag:cairo") ("debian" . "tag:inbox AND tag:debian"); ("hackers" . "tag:inbox AND tag:hackers") ("intel" . "tag:inbox AND tag:intel") ("mesa" . "tag:inbox AND tag:mesa") ("notmuch" . "tag:inbox AND tag:notmuch") ("oes" . "tag:inbox AND tag:oes") ("rockets" . "tag:inbox AND tag:rockets") ("x" . "tag:inbox AND tag:x") ("xorg-board" . "tag:inbox AND tag:xorg-board") ("xpatches" . "tag:inbox AND tag:x AND tag:patch"))) And here's what I see in the *notmuch-index* buffer: inbox 3 me 3 announce 0 bugs 0 cairo 0 debian 0 hackers 0 intel 0 mesa 0 notmuch 0 oes 0 rockets 0 x 0 xorg-board 0 xpatches 0 This is all pretty simple, and it does much of what I want. However, one could always get more :-) One missing piece here is that the searches don't have a total/unread count. Because the 'notmuch count' command is so fast (notmuch count the returns 532891 on my machine, and takes 0.240 seconds), we really could count the number of messages matching a single tag and then *also* count the number of messages matching that tag and the inbox tag. Another missing piece is that these should be shared with the notmuch-poll script, probably via the .notmuch-config file. I do like that I can have some entries here that aren't in my notmuch-poll script. It might be nice to make this hierarchical as I used to do with evolution's vfolder stuff -- an 'intel' folder with an 'intel/unread' sub-folder. That would be done with simple conjunctions of tags, but providing some structure on the screen might be nice. I'm also wondering if we should elide, or at least change the appearance, of lines which match zero messages. I'd also like to be able to get the system to display my mail in three panes -- one with the index, one with the current search and the last with the current thread. Getting those laid out on the screen correctly and letting you get them back to that layout easily would make notmuch look a lot more like other email clients, a form I've found fairly functional as I do not generally read mail in a linear fashion. =2D-=20 keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLB5hBQp8BWwlsTdMRAp5SAJ9CesEvi3Af0+172hprETZYg6HS+wCgvNWh ASoUlxX8eOfgnnYMI/zhqCE= =L/wE -----END PGP SIGNATURE----- --=-=-=--