aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch-reply.c
Commit message (Collapse)AuthorAge
* Rename NOTMUCH_DATABASE_MODE_WRITABLE to NOTMUCH_DATABASE_MODE_READ_WRITEGravatar Carl Worth2009-11-21
| | | | And correspondingly, READONLY to READ_ONLY.
* Permit opening the notmuch database in read-only mode.Gravatar Chris Wilson2009-11-21
| | | | | | | | | We only rarely need to actually open the database for writing, but we always create a Xapian::WritableDatabase. This has the effect of preventing searches and like whilst updating the index. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Carl Worth <cworth@cworth.org>
* notmuch reply: Include text parts in reply, even with disposition attachment.Gravatar Carl Worth2009-11-21
| | | | | If it's text, (such as a patch), then I want it quoted in my reply, (so that I can comment on it).
* reply: Pointer mismatch.Gravatar Chris Wilson2009-11-19
| | | | Apparently typeof (size_t) != unsigned int on my x86-64.
* Make reply/show/tag all require at least one search termGravatar Keith Packard2009-11-18
| | | | | | | | In particular, notmuch tag -inbox "" tended to take a long time to run, happened if you hit 'a' on a blank line in the search view and probably didn't have the desired effect. Signed-off-by: Keith Packard <keithp@keithp.com>
* notmuch_message_file_get_header returns "" for missing headers, not NULLGravatar Keith Packard2009-11-16
| | | | | | | This makes notmuch reply fail to add From: addresses to the list of recipients. Signed-off-by: Keith Packard <keithp@keithp.com>
* Minor whitespace touchup.Gravatar Carl Worth2009-11-15
| | | | | | It's funny that I picked up the habit of always including a space before a left parenthesis from Keith, and now he's in the habit of contributing code without it.
* notmuch reply: Prefer "Reply-To" header over "From" for choosing recipient.Gravatar Carl Worth2009-11-13
| | | | | | There are still open questions about how to correctly compute the intended list of recipients. We'll probably need separate "reply to sender" and "reply to all" commands at some point (unfortunately).
* libnotmuch: Underlying support for doing partial-results searches.Gravatar Carl Worth2009-11-12
| | | | | | The library interface now allows the caller to do incremental searches, (such as one page of results at a time). Next we'll just need to hook this up to "notmuch search" and the emacs interface.
* notmuch reply: Add Bcc to the user's primary email address.Gravatar Carl Worth2009-11-12
| | | | | The user really wants a copy of all outbound messages to come back in.
* notmuch reply: Fish out user's address from recipient list to use as From.Gravatar Carl Worth2009-11-11
| | | | | | That is, if mail was addresses to one of the "other" addresses in the configuration file, then the reply will have its "From" header set to that same address rather than the primary address.
* notmuch reply: Don't reply to address belonging to the user.Gravatar Carl Worth2009-11-11
| | | | | | Here's our first real advantage of having a configuration system. We get to omit our own addresses from the recipient list of any replies.
* Unbreak several notmuch commands after the addition of configuration.Gravatar Carl Worth2009-11-11
| | | | | | | | | | | | | | | | | | | | | | All of the following commands: notmuch dump notmuch reply notmuch restore notmuch search notmuch show notmuch tag were calling notmuch_database_open with an argument of NULL. This was a legitimate call until the recent addition of configuration, after which it is expected that all commands will lookup the correct path in the configuration file. So fix all these commands to do that. Also, while touching all of these commands, we fix them to use the talloc context that is passed in rather than creating a local talloc context. We also switch from using goto for return values, to doing direct returns as soon as an error is detected, (which can be leak free thanks to talloc).
* notmuch reply: Use GMime to construct the header for the reply.Gravatar Carl Worth2009-11-11
| | | | | | | | | The advantage here is that we actually get the necessary folding of long headers, (particularly the References header, but also things like Subject). This also gives us parsed recipient addresses so that we can easily elide the sender's address(es) from the recipient list (just as soon as we have a configured value for the recipient's address(es)).
* notmuch reply: Process headers a bit more accurately.Gravatar Carl Worth2009-11-10
| | | | | | We know take the original From: and all recipients and put them on the To: line. We also add a "Re: " to the subject, and we add In-Reply-To: and References: headers.
* notmuch reply: Add (incomplete) reply commandGravatar Keith Packard2009-11-10
Reviewed-by: Carl Worth <cworth@cworth.org> Keith wrote all the code here against notmuch before notmuch.c was split up into multiple files. So I've pushed the code around in various ways to match the new code structure, but have generally tried to avoid making any changes to the behavior of the code. I did fix one bug---a missing call to g_mime_stream_file_set_owner in show_part which would cause "notmuch show" to go off into the weeds when trying to show multiple messages, (since the first stream would fclose stdout).