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