From: Keith Packard <keithp@keithp.com>
To: notmuch@notmuchmail.org
Subject: notmuch 'index' mode.
Date: Fri, 20 Nov 2009 23:35:29 -0800 [thread overview]
Message-ID: <yun7htkcou6.fsf@aiko.keithp.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3330 bytes --]
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.
--
keith.packard@intel.com
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next reply other threads:[~2009-11-21 7:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-21 7:35 Keith Packard [this message]
2009-11-23 6:06 ` notmuch 'index' mode Carl Worth
2009-11-23 7:18 ` Keith Packard
2009-11-24 3:16 ` Carl Worth
2009-11-24 3:43 ` Keith Packard
2009-11-24 10:20 ` Jed Brown
2009-11-24 12:14 ` Jan Janak
2009-11-24 16:38 ` Keith Packard
2009-11-24 17:14 ` Jed Brown
2009-11-24 17:51 ` Jan Janak
2009-11-24 23:40 ` Bart Trojanowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yun7htkcou6.fsf@aiko.keithp.com \
--to=keithp@keithp.com \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).