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