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