]> git.notmuchmail.org Git - notmuch/blob - TODO
TODO: Add idea for an --exclude-threads options to "notmuch search".
[notmuch] / TODO
1 Fix the things that are causing the most pain to new users
2 ----------------------------------------------------------
3 1. A new import is tagging all messages as "inbox" -- total pain
4
5 2. Allow an easy way to get tags from directory names (if the user has them)
6
7 3. Fix Xapian defect #250 so tagging is fast.
8
9 Emacs interface (notmuch.el)
10 ----------------------------
11 Add a global keybinding table for notmuch, and then view-specific
12 tables that add to it.
13
14 Add a command to archive all threads in a search view.
15         
16 Add a '|' binding from the search view.
17
18 When a thread has been entirely read, start out by closing all
19 messages except those that matched the search terms.
20
21 Add support for choosing from one of the user's configured email
22 addresses for the From line.
23
24 Make 'notmuch-show-pipe-message have a private history.
25
26 Add support for a delete keybinding that adds a "deleted" tag to the
27 current message/thread and make searches not return deleted messages
28 by default, (unless the user asks explicitly for deleted messags in
29 the search query).
30
31 Add support to "mute" a thread (add a "muted" tag and then don't
32 display threads in searches by default where any message of the thread
33 has the "muted" tag).
34
35 Portability
36 -----------
37 Fix configure script to test each compiler warning we want to use.
38
39 Completion
40 ----------
41 Fix bash completion to complete multiple search options (both --first
42 and *then* --max-threads), and also complete value for --sort=
43 (oldest-first or newest-first).
44
45 notmuch command-line tool
46 -------------------------
47 Implement "notmuch search --exclude-threads=<search-terms>" to allow
48 for excluding muted threads, (and any other negative, thread-based
49 filtering that the user wants to do).
50
51 Fix "notmuch show" so that the UI doesn't fail to show a thread that
52 is visible in a search buffer, but happens to no longer match the
53 current search. (Perhaps add a --matching=<secondary-search-terms>
54 option (or similar) to "notmuch show".)
55
56 Teach "notmuch search" to return many different kinds of results. Some
57 ideas:
58
59         notmuch search --for threads    # Default if no --for is given
60         notmuch search --for messages
61         notmuch search --for tags
62         notmuch search --for addresses
63         notmuch search --for terms
64
65 Add a "--format" option to "notmuch search", (something printf-like
66 for selecting what gets printed).
67
68 Add a "--count-only" (or so?) option to "notmuch search" for returning
69 the count of search results.
70
71 Give "notmuch restore" some progress indicator. Until we get the
72 Xapian bugs fixed that are making this operation slow, we really need
73 to let the user know that things are still moving.
74
75 Fix "notmuch restore" to operate in a single pass much like "notmuch
76 dump" does, rather than doing N searches into the database, each
77 matching 1/N messages.
78
79 Add a "-f <filename>" option to select an alternate configuration
80 file.
81
82 Fix notmuch.c to call add_timestamp/get_timestamp with path names
83 relative to the database path. (Otherwise, moving the database to a
84 new directory will result in notmuch creating new timestamp documents
85 and leaving stale ones behind.)
86
87 Fix notmuch.c to use a DIR prefix for directory timestamps, (the idea
88 being that it can then add other non-directory timestamps such as for
89 noting how far back in the past mail has been indexed, and whether it
90 needs to re-tag messages based on a theoretical "auto-tags"
91 configuration file).
92
93 Make "notmuch new" notice when a mail directory has gone more than a
94 month without receiving new mail and use that to trigger the printing
95 of the note that the user might want to mark the directory read-only.
96
97 Also make "notmuch new" optionally able to just mark those month-old
98 directories read-only on its own. (Could conflict with low-volume
99 lists such as announce lists if they are setup to deliver to their own
100 maildirs.)
101
102 Allow configuration for filename patterns that should be ignored when
103 indexing.
104
105 notmuch library
106 ---------------
107 Index content from citations, please.
108
109 Provide a sane syntax for date ranges. First, we don't want to require
110 both endpoints to be specified. For example it would be nice to be
111 able to say things like "since:2009-01-1" or "until:2009-01-1" and
112 have the other endpoint be implicit. Second we'd like to support
113 relative specifications of time such as "since:'2 months ago'". To do
114 any of this we're probably going to need to break down an write our
115 own parser for the query string rather than using Xapian's QueryParser
116 class.
117
118 Make failure to read a file (such as a permissions problem) a warning
119 rather than an error (should be similar to the existing warning for a
120 non-mail file).
121
122 Add support for files that are moved or deleted (which obviously need
123 to be handled differently).
124
125 Actually compile and install a libnotmuch shared library.
126
127 Fix to use the *last* Message-ID header if multiple such headers are
128 encountered, (I noticed this is one thing that kept me from seeing the
129 same message-ID values as sup).
130
131 Add support for the user to specify custom headers to be indexed.
132
133 Add support for configuring "virtual tags" which are a tuple of
134 (tag-name, search-specification). The database is responsible for
135 ensuring that the virtual tag is always consistent.
136
137 Indicate to the user if two files with the same message ID have
138 content that is actually different in some interesting way. Perhaps
139 notmuch initially sees all changes as interesting, and quickly learns
140 from the user which changes are not interesting (such as the very
141 common mailing-list footer).
142
143 General
144 -------
145 Audit everything for dealing with out-of-memory (and drop xutil.c).
146
147 Write a test suite.
148
149 Achieve 100% test coverage with the test suite.
150
151 Investigate why the notmuch database is slightly larger than the sup
152 database for the same corpus of email.
153
154 Xapian
155 ------
156 Fix defect #250
157
158         replace_document should make minimal changes to database file
159         http://trac.xapian.org/ticket/250
160
161         It looks like it's going to be easy to fix. Here's the file to
162         change:
163
164                 xapian-core/backends/flint/flint_database.cc
165
166         And look for:
167
168           // FIXME - in the case where there is overlap between the new
169           // termlist and the old termlist, it would be better to compare the
170           // two lists, and make the minimum set of modifications required.
171           // This would lead to smaller changesets for replication, and
172           // probably be faster overall
173
174         So I think this might be as easy as just walking over two
175         sorted lists looking for differences.
176
177         Note that this is in the currently default "flint" backend,
178         but the Xapian folks are probably more interested in fixing
179         the in-development "chert" backend. So the patch to get
180         upstreamed there will probably also fix:
181
182                 xapian-core/backends/chert/chert_database.cc
183
184         (I'm hoping the fix will be the same---an identical comment
185         exists there.)
186
187         Also, if you want to experiment with the chert backend,
188         compile current Xapian source and run notmuch with
189         XAPIAN_PREFER_CHERT=1. I haven't tried that yet, but there are
190         claims that a chert database can be 40% smaller than an
191         equivalent flint database.
192
193 Report this bug:
194
195         "tag:foo and tag:bar and -tag:deleted" goes insane
196
197         This seems to be triggered by a Boolean operator next to a
198         token starting with a non-word character---suddenly all the
199         Boolean operators get treated as literal tokens)