On Sat, Jul 13 2013, Adam Wolfe Gordon <firstname.lastname@example.org> wrote: > The recent introduction of insert inspired me to finally add a feature I've > been wanting: a command to index a specific file in the maildir. My usecase > for this is that I have an inotify-based script that watches for new mail > and calls notmuch new when new mail shows up. Running notmuch new in this > situation is overkill, since I know exactly what's changed. A faster command > that just adds a single file reduces contention on the database lock. > > This series introduces a new command, "notmuch add", which indexes a file > that already exists in the maildir. It is implemented in notmuch-insert.c > because it uses the basic infrastructure introduced for the insert command. > > Missing man page for now - wanted to get the code out first for review. Hey, Adam. This feature seems fine, but it seems similar enought to insert that I wonder if they can just be unified. What if insert just took an optional path argument as well, e.g.: notmuch insert [options] [ +<tag>|-<tag> ... ] [-- /path/to/file] If the path is not in the db, it would insert it the same as if it had come in via stdin. If the path *is* in the db, it could just do the add part that you're looking for. That seems like it might be a more intuitive UI experience to me. jamie.