]> git.notmuchmail.org Git - notmuch/blob - TODO
TODO: Add some notes to fix some recently noted problems.
[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 Enhance '+' and '-' in the search view to operate on an entire region
17 if set.
18
19 Fix '*' to work by simply calling '+' or '-' on a region consisting of
20 the entire buffer.
21
22 Add a global keybinding table for notmuch, and then view-specific
23 tables that add to it.
24         
25 Add a '|' binding from the search view.
26
27 Add support for choosing from one of the user's configured email
28 addresses for the From line.
29
30 Make 'notmuch-show-pipe-message have a private history.
31
32 Add support for a delete keybinding that adds a "deleted" tag to the
33 current message/thread and make searches not return deleted messages
34 by default, (unless the user asks explicitly for deleted messags in
35 the search query).
36
37 Add support to "mute" a thread (add a "muted" tag and then don't
38 display threads in searches by default where any message of the thread
39 has the "muted" tag).
40
41 Fix i-search to open up invisible citations as necessary.
42
43 Make '=' count from the end rather than from the beginning if more
44 than half-way through the buffer.
45
46 Fix to automatically wrap long headers (for RFC compliance) before
47 sending. This should probably just be fixed in message-mode itself,
48 (but perhaps we can have a notmuch-message-mode that layers this on
49 top).
50
51 Implement Fcc and use it for all messages, (whether a new composition,
52 a reply, or a forward). This again may require a notmuch-message-mode
53 that extends message-mode.
54
55 Stop hiding the headers so much in the thread-view mode.
56
57 Allow opening a message in thread-view mode by clicking on either
58 line.
59
60 Automatically open a message when navigating to it with N or P.
61
62 Change 'a' command in thread-view mode to only archive open messages.
63
64 Add a binding to open all closed messages.
65
66 Make all authors and subjects available to isearch, (hidden by default
67 but with magic expansion while isearching).
68
69 Fix notmuch-hello as follows:
70
71         1. Change the "notmuch" and message count in the welcome sentence to
72            not be buttons.
73
74         2. Put the saved searches (if any) before the search bar.
75
76         3. When `notmuch-hello' (or even `notmuch' when it gets its new name)
77            is invoked directly, move to the first button, (go to point-min and
78            then call widget-forward). That is, if the user has any saved
79            searches, then point will be on the first one. If the user has no
80            saved searches, then point will be on the search bar.
81
82         4. Fix refresh of notmuch-hello to leave point in the same logical
83            place, (the same saved-search widget at least).
84
85 Change the 'a'rchive command in the thread view to only archive open
86 messages.
87
88 Emacs saved-search interface
89 ----------------------------
90 Here's a proposal Carl wrote (id:87einafy4u.fsf@yoom.home.cworth.org):
91
92   So what I'm imagining for the default notmuch view is something like
93   this:
94
95           Welcome to notmuch.
96
97               Notmuch search: _________________________________________
98
99           Saved searches:
100
101               55,342      All messages
102                   22      Inbox
103
104           Recent searches:
105
106                    1      from:"someone special" and tag:unread
107                   34      tag:notmuch and tag:todo
108
109           Click (or press Enter) on any search to see the results.
110           Right-click (or press Space) on any recent search to save it.
111
112   So the "saved searches" portion of the view is basically just what
113   notmuch-folder displays now. Above that there's an obvious place to
114   start a new search, (in a slightly more "web-browser-like" way than the
115   typical mini-buffer approach).
116
117   All recent searches appear in the list at the bottom automatically, and
118   there's the documented mechanism for saving a search, (giving it a name
119   and having it appear above).
120
121 Portability
122 -----------
123 Fix configure script to test each compiler warning we want to use.
124
125 Completion
126 ----------
127 Fix bash completion to complete multiple search options (both --first
128 and *then* --max-threads), and also complete value for --sort=
129 (oldest-first or newest-first).
130
131 notmuch command-line tool
132 -------------------------
133 Fix the --format=json option to not imply --entire-thread.
134
135 Implement "notmuch search --exclude-threads=<search-terms>" to allow
136 for excluding muted threads, (and any other negative, thread-based
137 filtering that the user wants to do).
138
139 Fix "notmuch show" so that the UI doesn't fail to show a thread that
140 is visible in a search buffer, but happens to no longer match the
141 current search. (Perhaps add a --matching=<secondary-search-terms>
142 option (or similar) to "notmuch show".) For now, this is being worked
143 around in the emacs interface by noticing that "notmuch show" returns
144 nothing and re-rerunning the command without the extra arguments.
145
146 Teach "notmuch search" to return many different kinds of results. Some
147 ideas:
148
149         notmuch search --output=threads # Default if no --output is given
150         notmuch search --output=messages
151         notmuch search --output=tags
152         notmuch search --output=addresses
153         notmuch search --output=terms
154
155 Add a "--format" option to "notmuch search", (something printf-like
156 for selecting what gets printed).
157
158 Add a "--count-only" (or so?) option to "notmuch search" for returning
159 the count of search results.
160
161 Give "notmuch restore" some progress indicator.
162
163 Fix "notmuch restore" to operate in a single pass much like "notmuch
164 dump" does, rather than doing N searches into the database, each
165 matching 1/N messages.
166
167 Add a "-f <filename>" option to select an alternate configuration
168 file.
169
170 Allow configuration for filename patterns that should be ignored when
171 indexing.
172
173 Replace the "notmuch part --part=id" command with "notmuch show
174 --part=id", (David Edmonson wants to rewrite some of "notmuch show" to
175 provide more MIME-structure information in its output first).
176
177 Replace the "notmuch search-tags" command with "notmuch search
178 --output=tags".
179
180 Fix to avoid this ugly message:
181
182         (process:17197): gmime-CRITICAL **: g_mime_message_get_mime_part: assertion `GMIME_IS_MESSAGE (message)' failed
183         Warning: Not indexing empty mime part.
184
185   This probably means adding a test case to generate that message,
186   filing an upstream bug against GMime, and then silencing the
187   notmuch-generated portion of the warning (so that once GMime is
188   fixed, this is all silent).
189
190 Simplify notmuch-reply to simply print the headers (we have the
191 original values) rather than calling GMime (which encodes) and adding
192 the confusing gmime-filter-headers.c code (which decodes).
193
194 notmuch library
195 ---------------
196 Add an interface to accept a "key" and a byte stream, rather than a
197 filename.
198
199 Provide a sane syntax for date ranges. First, we don't want to require
200 both endpoints to be specified. For example it would be nice to be
201 able to say things like "since:2009-01-1" or "until:2009-01-1" and
202 have the other endpoint be implicit. Second we'd like to support
203 relative specifications of time such as "since:'2 months ago'". To do
204 any of this we're probably going to need to break down an write our
205 own parser for the query string rather than using Xapian's QueryParser
206 class.
207
208 Make failure to read a file (such as a permissions problem) a warning
209 rather than an error (should be similar to the existing warning for a
210 non-mail file).
211
212 Actually compile and install a libnotmuch shared library.
213
214 Fix to use the *last* Message-ID header if multiple such headers are
215 encountered, (I noticed this is one thing that kept me from seeing the
216 same message-ID values as sup).
217
218 Add support for configuring "virtual tags" which are a tuple of
219 (tag-name, search-specification). The database is responsible for
220 ensuring that the virtual tag is always consistent.
221
222 Indicate to the user if two files with the same message ID have
223 content that is actually different in some interesting way. Perhaps
224 notmuch initially sees all changes as interesting, and quickly learns
225 from the user which changes are not interesting (such as the very
226 common mailing-list footer).
227
228 Fix notmuch_query_count_messages to share code with
229 notmuch_query_search_messages rather than duplicating code. (And
230 consider renaming it as well.)
231
232 Provide a mechanism for doing automatic address completion based on
233 notmuch searches. Here was one proposal made in IRC:
234
235         <cworth> I guess all it would really have to be would be a way
236                  to configure a series of searches to try in turn,
237                  (presenting ambiguities at a given single level, and
238                  advancing to the next level only if one level
239                  returned no matches).
240         <cworth> So then I might have a series that looks like this:
241         <cworth> notmuch search --output=address_from tag:address_book_alias
242         <cworth> notmuch search --output=address_to tag:sent
243         <cworth> notmuch search --output=address_from
244         <cworth> I think I might like that quite a bit.
245         <cworth> And then we have a story for an address book for
246                  non-emacs users.
247
248 Provide a ~me Xapian synonym for all of the user's configured email
249 addresses.
250
251 Add symbol hiding so that we don't risk leaking any private symbols
252 into the shared-library interface.
253
254 Audit all libnotmuch entry points to ensure that all Xapian calls are
255 wrapped in a try/catch block.
256
257 Fix the "count" functionality to be exact as Olly explained in IRC:
258
259         ojwb> cworth: if you set the check_at_least parameter to the
260         database size, get_matches_estimated() will be exact
261
262 Search syntax
263 -------------
264 Implement support for "tag:*" to expand to all tags.
265
266 Fix "notmuch search to:" to be less confusing. Many users expect this
267 to search for all messages with a To: header, but it instead searches
268 for all messages with the word "to". If we don't provide the first
269 behavior, perhaps we should exit on an error when a configured prefix
270 is provided with no value?
271
272 Support "*" in all cases and not just as a special case. That is, "* "
273 should also work, as well as "* and tag:inbox".
274
275 Implement a syntax for requesting set-theoertic operations on results
276 of multiple searches. For example, I would like to do:
277
278         "tag:inbox" SET-SUBTRACT "tag:muted"
279
280     as well as:
281
282         "tag:notmuch and <date-range>" SET-INTERSECT
283         "tag:notmuch and not (tag:merged or tag:postponed)"
284
285     See id:3wdpr282yz2.fsf@testarossa.amd.com for more details on the
286     use cases of the above.
287
288 Database changes
289 ----------------
290 Store a reference term for every message-id that appears in
291 References. We just started doing this for newly-added documents, but
292 at the next convenient database-schema upgrade, we should go back and
293 fix old messages to be consistent.
294
295 Start indexing the List-Id header, (and re-index this header for
296 existing messages at the next database upgrade).
297
298 Start indexing the message file's directory ana make it available for
299 search as "folder:" (and re-index this value for existing messages at
300 the next database upgrade).
301
302 Add support for the user to specify custom headers to be indexed (and
303 re-index these for existing messages at the next database upgrade).
304
305 Test suite
306 ----------
307 Start testing --format=json.
308
309 Achieve 100% test coverage with the test suite.
310
311 Modularize test suite (to be able to run individual tests).
312
313 Summarize test results at the end.
314
315 Fix the insane quoting nightmare of the test suite, (and once we do
316 that we can actually test the implicit-phrase search feature such as
317 "notmuch search 'body search (phrase)'"
318
319 Test "notmuch reply" choosing the correct email address from the
320 Received header when no configured email address appears in To or Cc.
321
322 General
323 -------
324 Audit everything for dealing with out-of-memory (and drop xutil.c).
325
326 Investigate why the notmuch database is slightly larger than the sup
327 database for the same corpus of email.
328
329 Makefile should print message teaching user about LD_LIBRARY_PATH (or
330 similar) if libdir is not set to a directory examined by ldconfig.
331
332 Fix notmuch build system to work with gold, (apt-get
333 binutils-gold). Need the notmuch binary to explicitly link againsts
334 libraries it depends on, (rather than just getting them via
335 libnotmuch).