]> git.cworth.org Git - notmuch/blob - devel/TODO
emacs: Add new option notmuch-search-hide-excluded
[notmuch] / devel / 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 Add a global keybinding table for notmuch, and then view-specific
18 tables that add to it.
19         
20 Add a '|' binding from the search view.
21
22 Add support for choosing from one of the user's configured email
23 addresses for the From line.
24
25 Make 'notmuch-show-pipe-message have a private history.
26
27 Add support for a delete keybinding that adds a "deleted" tag to the
28 current message/thread and make searches not return deleted messages
29 by default, (unless the user asks explicitly for deleted messages in
30 the search query).
31
32 Add support to "mute" a thread (add a "muted" tag and then don't
33 display threads in searches by default where any message of the thread
34 has the "muted" tag).
35
36 Make '=' count from the end rather than from the beginning if more
37 than half-way through the buffer.
38
39 Fix to automatically wrap long headers (for RFC compliance) before
40 sending. This should probably just be fixed in message-mode itself,
41 (but perhaps we can have a notmuch-message-mode that layers this on
42 top).
43
44 Stop hiding the headers so much in the thread-view mode.
45
46 Allow opening a message in thread-view mode by clicking on either
47 line.
48
49 Automatically open a message when navigating to it with N or P.
50
51 Change 'a' command in thread-view mode to only archive open messages.
52
53 notmuch command-line tool
54 -------------------------
55 Add support to "notmuch search" and "notmuch show" to allow for
56 listing of duplicate messages, (distinct filenames with the same
57 Message-ID). I'm not sure what the option should be named. Perhaps
58 --with-duplicates ?
59
60 Replace "notmuch reply" with "notmuch compose --reply <search-terms>".
61 This would enable a plain "notmuch compose" to be used to construct an
62 initial message, (which would then have the properly configured name
63 and email address in the From: line. We could also then easily support
64 "notmuch compose --from <something>" to support getting at alternate
65 email addresses.
66
67 Implement "notmuch search --exclude-threads=<search-terms>" to allow
68 for excluding muted threads, (and any other negative, thread-based
69 filtering that the user wants to do).
70
71 Fix "notmuch show" so that the UI doesn't fail to show a thread that
72 is visible in a search buffer, but happens to no longer match the
73 current search. (Perhaps add a --matching=<secondary-search-terms>
74 option (or similar) to "notmuch show".) For now, this is being worked
75 around in the emacs interface by noticing that "notmuch show" returns
76 nothing and re-rerunning the command without the extra arguments.
77
78 Add a "--format" option to "notmuch search", (something printf-like
79 for selecting what gets printed).
80
81 Give "notmuch restore" some progress indicator.
82
83 Fix "notmuch restore" to operate in a single pass much like "notmuch
84 dump" does, rather than doing N searches into the database, each
85 matching 1/N messages.
86
87 Allow configuration for filename patterns that should be ignored when
88 indexing.
89
90 Fix to avoid this ugly message:
91
92         (process:17197): gmime-CRITICAL **: g_mime_message_get_mime_part: assertion `GMIME_IS_MESSAGE (message)' failed
93         Warning: Not indexing empty mime part.
94
95   This probably means adding a test case to generate that message,
96   filing an upstream bug against GMime, and then silencing the
97   notmuch-generated portion of the warning (so that once GMime is
98   fixed, this is all silent).
99
100 Simplify notmuch-reply to simply print the headers (we have the
101 original values) rather than calling GMime (which encodes) and adding
102 the confusing gmime-filter-headers.c code (which decodes).
103
104 Properly handle replying to multiple messages. Currently, the JSON
105 reply format only supports a single message, but the default reply
106 format accepts searches returning multiple messages. The expected
107 behavior of replying to multiple messages is not obvious, and there
108 are multiple ideas that might make sense. Some consensus needs to be
109 reached on this issue, and then both reply formats should be updated
110 to be consistent.
111
112 Return docid-based queries in thread search results, instead of
113 message-id-based queries.  These are much more compact and much faster
114 to later query.  This will require support from the library, both for
115 retrieving docids (probably as an opaque "get a query that identifies
116 this message") and for docid queries.
117
118 notmuch library
119 ---------------
120 Add support for custom flag<->tag mappings. In the notmuch
121 configuration file this could be
122
123         [maildir]
124         synchronize_flags = R:replied; D*:deleted; S:~unread;
125
126 In the library interface this could be implemented with an array of
127 structures to define the mapping (flag character, tag name,
128 inverse-sense bit (~ above), and tag-when-any-file-flagged
129 vs. tag-when-all-files-flagged (* above)).
130
131 Add an interface to accept a "key" and a byte stream, rather than a
132 filename.
133
134 Improve syntax for date ranges queries. date:expr should be
135 interpreted as date:expr..expr so that, for example, "date:2013-01-22"
136 would cover the whole of the specified day (currently that's not even
137 recognized as a date range expression). It might be nice to be able to
138 use things like "since:2013-01-22" and "until:2013-01-22" as synonyms
139 to "date:2013-01-22.." and "date:..2013-01-22", respectively. To do
140 any of this we're probably going to need to break down and write our
141 own parser for the query string rather than using Xapian's QueryParser
142 class.
143
144 Make failure to read a file (such as a permissions problem) a warning
145 rather than an error (should be similar to the existing warning for a
146 non-mail file).
147
148 Fix to use the *last* Message-ID header if multiple such headers are
149 encountered, (I noticed this is one thing that kept me from seeing the
150 same message-ID values as sup).
151
152 Add support for configuring "virtual tags" which are a tuple of
153 (tag-name, search-specification). The database is responsible for
154 ensuring that the virtual tag is always consistent.
155
156 Indicate to the user if two files with the same message ID have
157 content that is actually different in some interesting way. Perhaps
158 notmuch initially sees all changes as interesting, and quickly learns
159 from the user which changes are not interesting (such as the very
160 common mailing-list footer).
161
162 Fix notmuch_query_count_messages to share code with
163 notmuch_query_search_messages rather than duplicating code. (And
164 consider renaming it as well.)
165
166 Provide a mechanism for doing automatic address completion based on
167 notmuch searches. Here was one proposal made in IRC:
168
169         <cworth> I guess all it would really have to be would be a way
170                  to configure a series of searches to try in turn,
171                  (presenting ambiguities at a given single level, and
172                  advancing to the next level only if one level
173                  returned no matches).
174         <cworth> So then I might have a series that looks like this:
175         <cworth> notmuch search --output=address_from tag:address_book_alias
176         <cworth> notmuch search --output=address_to tag:sent
177         <cworth> notmuch search --output=address_from
178         <cworth> I think I might like that quite a bit.
179         <cworth> And then we have a story for an address book for
180                  non-emacs users.
181
182 Provide a ~me Xapian synonym for all of the user's configured email
183 addresses.
184
185 Add symbol hiding so that we don't risk leaking any private symbols
186 into the shared-library interface.
187
188 Audit all libnotmuch entry points to ensure that all Xapian calls are
189 wrapped in a try/catch block.
190
191 Fix the threading of a message that has a References: header but no
192 In-Reply-To: header (see id:"87lixxnxpb.fsf@yoom.home.cworth.org").
193
194 Search syntax
195 -------------
196 Implement support for "tag:*" to expand to all tags.
197
198 Fix "notmuch search to:" to be less confusing. Many users expect this
199 to search for all messages with a To: header, but it instead searches
200 for all messages with the word "to". If we don't provide the first
201 behavior, perhaps we should exit on an error when a configured prefix
202 is provided with no value?
203
204 Support "*" in all cases and not just as a special case. That is, "* "
205 should also work, as well as "* and tag:inbox".
206
207 Implement a syntax for requesting set-theoertic operations on results
208 of multiple searches. For example, I would like to do:
209
210         "tag:inbox" SET-SUBTRACT "tag:muted"
211
212     as well as:
213
214         "tag:notmuch and <date-range>" SET-INTERSECT
215         "tag:notmuch and not (tag:merged or tag:postponed)"
216
217     See id:3wdpr282yz2.fsf@testarossa.amd.com for more details on the
218     use cases of the above.
219
220 Database changes
221 ----------------
222 Store a reference term for every message-id that appears in
223 References. We just started doing this for newly-added documents, but
224 at the next convenient database-schema upgrade, we should go back and
225 fix old messages to be consistent.
226
227 Start indexing the List-Id header, (and re-index this header for
228 existing messages at the next database upgrade).
229
230 Add support for the user to specify custom headers to be indexed (and
231 re-index these for existing messages at the next database upgrade).
232
233 Save filenames for files detected as "not an email file" in the
234 database. This would allow for two things: 1. Optimizing "notmuch new"
235 to not have to look at these files again (since they are potentially
236 large so the detection could be potentially slow). 2. A "notmuch
237 search" syntax could be added to allow the user to find these files,
238 (and perhaps delete them or move them away as appropriate).
239
240 Fix filesystem/notmuch-new race condition by not updating database
241 mtime for a directory if it is the same as the current mtime.
242
243 Test suite
244 ----------
245 Achieve 100% test coverage with the test suite.
246
247 General
248 -------
249 Audit everything for dealing with out-of-memory (and drop xutil.c).
250
251 Investigate why the notmuch database is slightly larger than the sup
252 database for the same corpus of email.
253
254 Makefile should print message teaching user about LD_LIBRARY_PATH (or
255 similar) if libdir is not set to a directory examined by ldconfig.