]> git.notmuchmail.org Git - notmuch/blob - TODO
ANSI escapes in "new" only when output is a tty
[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 notmuch library
111 ---------------
112 Add support for files that are moved or deleted (which obviously need
113 to be handled differently).
114
115 Actually compile and install a libnotmuch shared library.
116
117 Fix to use the *last* Message-ID header if multiple such headers are
118 encountered, (I noticed this is one thing that kept me from seeing the
119 same message-ID values as sup).
120
121 Add support for the user to specify custom headers to be indexed.
122
123 Add support for configuring "virtual tags" which are a tuple of
124 (tag-name, search-specification). The database is responsible for
125 ensuring that the virtual tag is always consistent.
126
127 General
128 -------
129 Audit everything for dealing with out-of-memory (and drop xutil.c).
130
131 Write a test suite.
132
133 Achieve 100% test coverage with the test suite.
134
135 Investigate why the notmuch database is slightly larger than the sup
136 database for the same corpus of email.
137
138 Xapian
139 ------
140 Fix defect #250
141
142         replace_document should make minimal changes to database file
143         http://trac.xapian.org/ticket/250
144
145         It looks like it's going to be easy to fix. Here's the file to
146         change:
147
148                 xapian-core/backends/flint/flint_database.cc
149
150         And look for:
151
152           // FIXME - in the case where there is overlap between the new
153           // termlist and the old termlist, it would be better to compare the
154           // two lists, and make the minimum set of modifications required.
155           // This would lead to smaller changesets for replication, and
156           // probably be faster overall
157
158         So I think this might be as easy as just walking over two
159         sorted lists looking for differences.
160
161         Note that this is in the currently default "flint" backend,
162         but the Xapian folks are probably more interested in fixing
163         the in-development "chert" backend. So the patch to get
164         upstreamed there will probably also fix:
165
166                 xapian-core/backends/chert/chert_database.cc
167
168         (I'm hoping the fix will be the same---an identical comment
169         exists there.)
170
171         Also, if you want to experiment with the chert backend,
172         compile current Xapian source and run notmuch with
173         XAPIAN_PREFER_CHERT=1. I haven't tried that yet, but there are
174         claims that a chert database can be 40% smaller than an
175         equivalent flint database.
176
177 Report this bug:
178
179         "tag:foo and tag:bar and -tag:deleted" goes insane
180
181         This seems to be triggered by a Boolean operator next to a
182         token starting with a non-word character---suddenly all the
183         Boolean operators get treated as literal tokens)