]> git.notmuchmail.org Git - notmuch/blob - TODO
626ece43550c703eb18710812a4a2e83b4473c02
[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 Emacs interface (notmuch.el)
8 ----------------------------
9 Switch the notmuch-search view to use "notmuch search --format=json"
10 to fix large classes of bugs regarding poorly-escaped output and lame
11 regular expressions. (The most recently found, unfixed example is the
12 sender's name containing ';' which causes emacs to drop a search
13 result.) This may require removing the outer array from the current
14 "notmuch search --format=json" results.
15
16 Fix '*' to work by simply calling '+' or '-' on a region consisting of
17 the entire buffer.
18
19 Add a global keybinding table for notmuch, and then view-specific
20 tables that add to it.
21         
22 Add a '|' binding from the search view.
23
24 Add support for choosing from one of the user's configured email
25 addresses for the From line.
26
27 Make 'notmuch-show-pipe-message have a private history.
28
29 Add support for a delete keybinding that adds a "deleted" tag to the
30 current message/thread and make searches not return deleted messages
31 by default, (unless the user asks explicitly for deleted messags in
32 the search query).
33
34 Add support to "mute" a thread (add a "muted" tag and then don't
35 display threads in searches by default where any message of the thread
36 has the "muted" tag).
37
38 Make '=' count from the end rather than from the beginning if more
39 than half-way through the buffer.
40
41 Fix to automatically wrap long headers (for RFC compliance) before
42 sending. This should probably just be fixed in message-mode itself,
43 (but perhaps we can have a notmuch-message-mode that layers this on
44 top).
45
46 Stop hiding the headers so much in the thread-view mode.
47
48 Allow opening a message in thread-view mode by clicking on either
49 line.
50
51 Automatically open a message when navigating to it with N or P.
52
53 Change 'a' command in thread-view mode to only archive open messages.
54
55 Add a binding to open all closed messages.
56
57 Change the 'a'rchive command in the thread view to only archive open
58 messages.
59
60 Portability
61 -----------
62 Fix configure script to test each compiler warning we want to use.
63
64 Completion
65 ----------
66 Fix bash completion to complete multiple search options (both --first
67 and *then* --max-threads), and also complete value for --sort=
68 (oldest-first or newest-first).
69
70 notmuch command-line tool
71 -------------------------
72 Replace "notmuch reply" with "notmuch compose --reply <search-terms>".
73 This would enable a plain "notmuch compose" to be used to construct an
74 initial message, (which would then have the properly configured name
75 and email address in the From: line. We could also then easily support
76 "notmuch compose --from <something>" to support getting at alternate
77 email addresses.
78
79 Fix the --format=json option to not imply --entire-thread.
80
81 Implement "notmuch search --exclude-threads=<search-terms>" to allow
82 for excluding muted threads, (and any other negative, thread-based
83 filtering that the user wants to do).
84
85 Fix "notmuch show" so that the UI doesn't fail to show a thread that
86 is visible in a search buffer, but happens to no longer match the
87 current search. (Perhaps add a --matching=<secondary-search-terms>
88 option (or similar) to "notmuch show".) For now, this is being worked
89 around in the emacs interface by noticing that "notmuch show" returns
90 nothing and re-rerunning the command without the extra arguments.
91
92 Teach "notmuch search" to return many different kinds of results. Some
93 ideas:
94
95         notmuch search --output=threads # Default if no --output is given
96         notmuch search --output=messages
97         notmuch search --output=tags
98         notmuch search --output=addresses
99         notmuch search --output=terms
100
101 Add a "--format" option to "notmuch search", (something printf-like
102 for selecting what gets printed).
103
104 Give "notmuch restore" some progress indicator.
105
106 Fix "notmuch restore" to operate in a single pass much like "notmuch
107 dump" does, rather than doing N searches into the database, each
108 matching 1/N messages.
109
110 Add a "-f <filename>" option to select an alternate configuration
111 file.
112
113 Allow configuration for filename patterns that should be ignored when
114 indexing.
115
116 Replace the "notmuch part --part=id" command with "notmuch show
117 --part=id", (David Edmonson wants to rewrite some of "notmuch show" to
118 provide more MIME-structure information in its output first).
119
120 Replace the "notmuch search-tags" command with "notmuch search
121 --output=tags".
122
123 Fix to avoid this ugly message:
124
125         (process:17197): gmime-CRITICAL **: g_mime_message_get_mime_part: assertion `GMIME_IS_MESSAGE (message)' failed
126         Warning: Not indexing empty mime part.
127
128   This probably means adding a test case to generate that message,
129   filing an upstream bug against GMime, and then silencing the
130   notmuch-generated portion of the warning (so that once GMime is
131   fixed, this is all silent).
132
133 Simplify notmuch-reply to simply print the headers (we have the
134 original values) rather than calling GMime (which encodes) and adding
135 the confusing gmime-filter-headers.c code (which decodes).
136
137 notmuch library
138 ---------------
139 Add an interface to accept a "key" and a byte stream, rather than a
140 filename.
141
142 Provide a sane syntax for date ranges. First, we don't want to require
143 both endpoints to be specified. For example it would be nice to be
144 able to say things like "since:2009-01-1" or "until:2009-01-1" and
145 have the other endpoint be implicit. Second we'd like to support
146 relative specifications of time such as "since:'2 months ago'". To do
147 any of this we're probably going to need to break down an write our
148 own parser for the query string rather than using Xapian's QueryParser
149 class.
150
151 Make failure to read a file (such as a permissions problem) a warning
152 rather than an error (should be similar to the existing warning for a
153 non-mail file).
154
155 Fix to use the *last* Message-ID header if multiple such headers are
156 encountered, (I noticed this is one thing that kept me from seeing the
157 same message-ID values as sup).
158
159 Add support for configuring "virtual tags" which are a tuple of
160 (tag-name, search-specification). The database is responsible for
161 ensuring that the virtual tag is always consistent.
162
163 Indicate to the user if two files with the same message ID have
164 content that is actually different in some interesting way. Perhaps
165 notmuch initially sees all changes as interesting, and quickly learns
166 from the user which changes are not interesting (such as the very
167 common mailing-list footer).
168
169 Fix notmuch_query_count_messages to share code with
170 notmuch_query_search_messages rather than duplicating code. (And
171 consider renaming it as well.)
172
173 Provide a mechanism for doing automatic address completion based on
174 notmuch searches. Here was one proposal made in IRC:
175
176         <cworth> I guess all it would really have to be would be a way
177                  to configure a series of searches to try in turn,
178                  (presenting ambiguities at a given single level, and
179                  advancing to the next level only if one level
180                  returned no matches).
181         <cworth> So then I might have a series that looks like this:
182         <cworth> notmuch search --output=address_from tag:address_book_alias
183         <cworth> notmuch search --output=address_to tag:sent
184         <cworth> notmuch search --output=address_from
185         <cworth> I think I might like that quite a bit.
186         <cworth> And then we have a story for an address book for
187                  non-emacs users.
188
189 Provide a ~me Xapian synonym for all of the user's configured email
190 addresses.
191
192 Add symbol hiding so that we don't risk leaking any private symbols
193 into the shared-library interface.
194
195 Audit all libnotmuch entry points to ensure that all Xapian calls are
196 wrapped in a try/catch block.
197
198 Fix the "count" functionality to be exact as Olly explained in IRC:
199
200         ojwb> cworth: if you set the check_at_least parameter to the
201         database size, get_matches_estimated() will be exact
202
203 Search syntax
204 -------------
205 Implement support for "tag:*" to expand to all tags.
206
207 Fix "notmuch search to:" to be less confusing. Many users expect this
208 to search for all messages with a To: header, but it instead searches
209 for all messages with the word "to". If we don't provide the first
210 behavior, perhaps we should exit on an error when a configured prefix
211 is provided with no value?
212
213 Support "*" in all cases and not just as a special case. That is, "* "
214 should also work, as well as "* and tag:inbox".
215
216 Implement a syntax for requesting set-theoertic operations on results
217 of multiple searches. For example, I would like to do:
218
219         "tag:inbox" SET-SUBTRACT "tag:muted"
220
221     as well as:
222
223         "tag:notmuch and <date-range>" SET-INTERSECT
224         "tag:notmuch and not (tag:merged or tag:postponed)"
225
226     See id:3wdpr282yz2.fsf@testarossa.amd.com for more details on the
227     use cases of the above.
228
229 Database changes
230 ----------------
231 Store a reference term for every message-id that appears in
232 References. We just started doing this for newly-added documents, but
233 at the next convenient database-schema upgrade, we should go back and
234 fix old messages to be consistent.
235
236 Start indexing the List-Id header, (and re-index this header for
237 existing messages at the next database upgrade).
238
239 Start indexing the message file's directory and make it available for
240 search as "folder:" (and re-index this value for existing messages at
241 the next database upgrade).
242
243 Add support for the user to specify custom headers to be indexed (and
244 re-index these for existing messages at the next database upgrade).
245
246 Test suite
247 ----------
248 Achieve 100% test coverage with the test suite.
249
250 General
251 -------
252 Audit everything for dealing with out-of-memory (and drop xutil.c).
253
254 Investigate why the notmuch database is slightly larger than the sup
255 database for the same corpus of email.
256
257 Makefile should print message teaching user about LD_LIBRARY_PATH (or
258 similar) if libdir is not set to a directory examined by ldconfig.
259
260 Fix notmuch build system to work with gold, (apt-get
261 binutils-gold). Need the notmuch binary to explicitly link againsts
262 libraries it depends on, (rather than just getting them via
263 libnotmuch).