]> git.notmuchmail.org Git - notmuch/blob - TODO
Add rudimentary date-based search.
[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. Make emacs fast for big search results (see "lazy searching" below)
8
9 4. Fix Xapian defect #250 so tagging is fast.
10
11 Emacs interface (notmuch.el)
12 ----------------------------
13 Make the keybindings help ('?') display the summary of each command's
14 documentation, not the function name.
15
16 Add a global keybinding table for notmuch, and then view-specific
17 tables that add to it.
18
19 Add a command to archive all threads in a search view.
20
21 Lazy searching: call "notmuch search" with --first and --max to fill
22 just a screenful of results, and then fill in more as ther user pages
23 through the buffer.
24
25 Add a '|' binding from the search view.
26
27 Add a binding to run a search from notmuch-show-mode.
28
29 When a thread has been entirely read, start out by closing all
30 messages except those that matched the search terms.
31
32 Add support for choosing from one of the user's configured email
33 addresses for the From line.
34
35 Make 'notmuch-show-pipe-message have a private history.
36
37 Add support for a delete keybinding that adds a "deleted" tag to the
38 current message/thread and make searches not return deleted messages
39 by default, (unless the user asks explicitly for deleted messags in
40 the search query).
41
42 Add support to "mute" a thread (add a "muted" tag and then don't
43 display threads in searches by default where any message of the thread
44 has the "muted" tag).
45
46 Portability
47 -----------
48 Fix configure script to test each compiler warning we want to use.
49
50 Implement strndup locally (or call talloc_strndup instead).
51
52 Implement getline locally, (look at gnulib).
53
54 Completion
55 ----------
56 Fix bash completion to complete multiple search options (both --first
57 and *then* --max-threads), and also complete value for --sort=
58 (oldest-first or newest-first).
59
60 notmuch command-line tool
61 -------------------------
62 Teach "notmuch search" to return many different kinds of results. Some
63 ideas:
64
65         notmuch search --for threads    # Default if no --for is given
66         notmuch search --for messages
67         notmuch search --for tags
68         notmuch search --for addresses
69         notmuch search --for terms
70
71 Add a "--format" option to "notmuch search", (something printf-like
72 for selecting what gets printed).
73
74 Add a "--count-only" (or so?) option to "notmuch search" for returning
75 the count of search results.
76
77 Give "notmuch restore" some progress indicator. Until we get the
78 Xapian bugs fixed that are making this operation slow, we really need
79 to let the user know that things are still moving.
80
81 Add a "-f <filename>" option to select an alternate configuration
82 file.
83
84 Fix notmuch.c to call add_timestamp/get_timestamp with path names
85 relative to the database path. (Otherwise, moving the database to a
86 new directory will result in notmuch creating new timestamp documents
87 and leaving stale ones behind.)
88
89 Ensure that "notmuch new" is sane if its first, giant indexing session
90 gets interrupted, (that is, ensure that any results indexed so far are
91 flushed).
92
93 Fix notmuch.c to use a DIR prefix for directory timestamps, (the idea
94 being that it can then add other non-directory timestamps such as for
95 noting how far back in the past mail has been indexed, and whether it
96 needs to re-tag messages based on a theoretical "auto-tags"
97 configuration file).
98
99 Make "notmuch new" notice when a mail directory has gone more than a
100 month without receiving new mail and use that to trigger the printing
101 of the note that the user might want to mark the directory read-only.
102
103 Also make "notmuch new" optionally able to just mark those month-old
104 directories read-only on its own. (Could conflict with low-volume
105 lists such as announce lists if they are setup to deliver to their own
106 maildirs.)
107
108 Allow configuration for filename patterns that should be ignored when
109 indexing.
110
111 notmuch library
112 ---------------
113 Provide a sane syntax for date ranges. First, we don't want to require
114 both endpoints to be specified. For example it would be nice to be
115 able to say things like "since:2009-01-1" or "until:2009-01-1" and
116 have the other enpoint be implicit. Second we'de like to support
117 relative specifications of time such as "since:'2 months ago'". To do
118 any of this we're probably going to need to break down an write our
119 own parser for the query string rather than using Xapian's QueryParser
120 class.
121
122 Add support for files that are moved or deleted (which obviously need
123 to be handled differently).
124
125 Actually compile and install a libnotmuch shared library.
126
127 Fix to use the *last* Message-ID header if multiple such headers are
128 encountered, (I noticed this is one thing that kept me from seeing the
129 same message-ID values as sup).
130
131 Add support for the user to specify custom headers to be indexed.
132
133 Add support for configuring "virtual tags" which are a tuple of
134 (tag-name, search-specification). The database is responsible for
135 ensuring that the virtual tag is always consistent.
136
137 General
138 -------
139 Audit everything for dealing with out-of-memory (and drop xutil.c).
140
141 Write a test suite.
142
143 Achieve 100% test coverage with the test suite.
144
145 Investigate why the notmuch database is slightly larger than the sup
146 database for the same corpus of email.
147
148 Xapian
149 ------
150 Fix defect #250
151
152         replace_document should make minimal changes to database file
153         http://trac.xapian.org/ticket/250
154
155         It looks like it's going to be easy to fix. Here's the file to
156         change:
157
158                 xapian-core/backends/flint/flint_database.cc
159
160         And look for:
161
162           // FIXME - in the case where there is overlap between the new
163           // termlist and the old termlist, it would be better to compare the
164           // two lists, and make the minimum set of modifications required.
165           // This would lead to smaller changesets for replication, and
166           // probably be faster overall
167
168         So I think this might be as easy as just walking over two
169         sorted lists looking for differences.
170
171         Note that this is in the currently default "flint" backend,
172         but the Xapian folks are probably more interested in fixing
173         the in-development "chert" backend. So the patch to get
174         upstreamed there will probably also fix:
175
176                 xapian-core/backends/chert/chert_database.cc
177
178         (I'm hoping the fix will be the same---an identical comment
179         exists there.)
180
181         Also, if you want to experiment with the chert backend,
182         compile current Xapian source and run notmuch with
183         XAPIAN_PREFER_CHERT=1. I haven't tried that yet, but there are
184         claims that a chert database can be 40% smaller than an
185         equivalent flint database.
186
187 Report this bug:
188
189         "tag:foo and tag:bar and -tag:deleted" goes insane
190
191         This seems to be triggered by a Boolean operator next to a
192         token starting with a non-word character---suddenly all the
193         Boolean operators get treated as literal tokens)