aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* notmuch search: Avoid infinite stream of exceptions from "notmuch search"Carl Worth2009-11-18
| | | | | | That is, give a nice error message and exit if no search terms are provided. Thanks to Priit Laes <plaes@plaes.org> for reporting the error and providing an early version of the fix.
* README: Mention the actual mailing list address now that it exists.Carl Worth2009-11-18
| | | | Much better than telling people to mail me individually.
* TypsosIngmar Vanhassel2009-11-18
|
* Older versions of install do not support -C.Jan Janak2009-11-18
| | | | | | | | Do not use -C cmdline option of install, older versions, commonly found in distributions like Debian, do not seem to support it. Running make install on such systems (tested on Debian Lenny) fails. Signed-off-by: Jan Janak <jan@ryngle.com>
* linke_message: Avoid segfault when In-Reply-to header is empty.Carl Worth2009-11-18
| | | | | | | | | | | | | This was recently introduced in commit: 64c03ae97f2f5294c60ef25d7f41849864e6ebd3 which was adding extra checks to avoid adding a self-referencing message. How many times am I going to fix a dumb regression like this and say "we really need a test suite" before I actually sit down and write the test suite?
* notmuch-completion.bash: Update for new commands and help.Carl Worth2009-11-18
| | | | Would be nice to add the options for "notmuch search" too.
* notmuch help: Update documentation (following recent text from notmuch.1)Carl Worth2009-11-17
| | | | | | | We take the recently created text from the notmuch manual page and update the "notmuch help" command to use similar text. In particular, we add a new "notmuch help search-terms" for documenting the search syntax that is common to several commands.
* notmuch.1: Fix a couple of typos.Carl Worth2009-11-17
| | | | | Little things I noticed while using this text as reference for the "notmuch help" documentation.
* man.1: A big update of the notmuch manual page.Carl Worth2009-11-17
| | | | | | | | | | | | I set out merely to add documentation for the recently-added options for "notmuch search" (--first, --max-threads, and --sort), but ended up revamping a lot. A significant change is a new SEARCH SYNTAX section separate from "notmuch search" that is referred to in the documentation of search, show, reply, and tag. Also many sections were updated to reflect recent changes, (such as the dropping of the NOTMUCH_BASE environment variable, the addition of the .notmuch-config file, etc.)
* Makefile: Fix missing dependency for notmuch.1 manual page.Carl Worth2009-11-17
| | | | | | The Makefile was failing to regnerate the notmuch.1.gz file when notmuch.1 was updated, (so stale documentation could potentially be installed).
* notmuch search: Change default search order to be newest messages first.Carl Worth2009-11-17
| | | | | | | | | | | | | | | | | This is what most people want for a _search_ command. It's often different for actually reading mail in an inbox, (where it makes more sense to have results displayed in chronological order), but in such a case, ther user is likely using an interface that can simply pass the --sort=oldest-first option to "notmuch search". Here we're also change the sort enum from NOTMUCH_SORT_DATE and NOTMUCH_SORT_DATE_REVERSE to NOTMUCH_SORT_OLDEST_FIRST and NOTMUCH_SORT_NEWEST_FIRST. Similarly we replace the --reverse option to "notmuch search" with two options: --sort=oldest-first and --sort=newest-first. Finally, these changes are all tracked in the emacs interface, (which has no change in its behavior).
* notmuch search: Return first 100 results as quickly as possible.Carl Worth2009-11-17
| | | | | | | | | This is one of those cases where total time is not the metric of interest. We increase the total time of the search, (by doing some redundant work for the initial threads). But more significantly, we give the user *some* results nearly instantaneously, (so that the user might see the result of interest without ever even waiting for the complete results to come in).
* Add some const correctness to talloc 'ctx' parameter.Carl Worth2009-11-17
| | | | The tentacles of const just keep reaching out.
* database: Make _parse_message_id static once again.Carl Worth2009-11-17
| | | | | | | We had exposed this to the internal implementation for a short time, (only while we had the silly code fetching In-Reply-To values from message files instead of from the database). Make this private again as it should be.
* database: Add "replyto" to the database schema documentation.Carl Worth2009-11-17
| | | | | | Maybe ths lack of this documentation is why I forgot we were actually storing this and wrote the ugly code to fetch In-Reply-To from message files rather than from the database.
* database: Rename "ref" prefix name to "reference"Carl Worth2009-11-17
| | | | | | | Which is more consistent with the XREFERENCE prefix used in the terms in the database. Also remove some stale documentation describing the removal of resolved references from the database (we no longer do this).
* message_file_get_header: Use break where more clear than continue.Carl Worth2009-11-17
| | | | | | Calling continue here worked only because we set a flag before the continue, and, check the flag at the beginning of the loop, and *then* break. It's much more clear to just break in the first place.
* Fix "too many open files" bug by closing message files when done with them.Keith Packard2009-11-17
| | | | | | | | | | | | | | | | | | | | | The message file header parsing code parses only enough of the file to find the desired header fields, then it leaves the file open until the next header parsing call or when the message is no longer in use. If a large number of messages end up being active, this will quickly run out of file descriptors. Here, we add support to explicitly close the message file within a message, (_notmuch_message_close) and call that from thread construction code. Signed-off-by: Keith Packard <keithp@keithp.com> Edited-by: Carl Worth <cworth@cworth.org>: Many portions of Keith's original patch have since been solved other ways, (such as the code that changed the handling of the In-Reply-To header). So the final version is clean enough that I think even Keith would be happy to have his name on it.
* notmuch show: Detect an internal error if a thread has no messages.Carl Worth2009-11-17
| | | | | | This really should be impossible---if there are no messages, then what was the thread object created from? During recent debugging, it was useful to have this error detected and reported.
* add_message: Don't add any self-references to the database.Carl Worth2009-11-17
| | | | | | In our scheme it's illegal for any message to refer to itself, (nor would it be useful for anything anyway). Cut these self-references off at the source, before they trip up any internal errors.
* message_get_thread_id: Generate internal error if message has no thread ID.Carl Worth2009-11-17
| | | | | | | | | | | This case was happening when a message had its own message ID in its In-Reply-To header. The thread-resolution code would find the partially constructed message, (with no thread ID yet), get garbage from this function, and then march right along with that garbage. With this commit, a self-cyclic message like this will now trigger an internal error rather than marching along silienty. (And a subsequent commit will remove the call to this function in this case.)
* Remove the talloc_owner argument from create_for_message_id.Carl Worth2009-11-17
| | | | | | | This function has only one caller, and that one caller was passing the same value for both talloc_owner and the notmuch database. Dropping the redundant argument simplifies the documentation of this function considerably.
* get_in_reply_to: Implement via the database, not by opening mail file.Carl Worth2009-11-17
| | | | | | | This reduces our reliance on open message_file objects, (so is a step toward fixing the "too many open files" bug), but more importantly, it means we don't load a self-referencing in-reply-to header, (since we weed those out before adding any replyto terms to the database).
* Makefile: Manual pages shouldn't be executableIngmar Vanhassel2009-11-17
|
* Makefile: Change default install prefix from /usr to /usr/local, reallyIngmar Vanhassel2009-11-17
|
* Makefile: Change default install prefix from /usr to /usr/localCarl Worth2009-11-17
| | | | | | | We'll be a much more polite package this way. And the user can change the prefix by editing Makefile.config. Still to be done is to make configure write out Makefile.config and to add a --prefix option to configure.
* Makefile: Prefer directories as the target for install commands.Carl Worth2009-11-17
| | | | | | I was confusing myself with some rules installing to directories and some installing to files. We do still install to a filename when simultaneously renaming, (such as notmuch-completion.bash to notmuch).
* Update .gitignore, add objects and static archivesIngmar Vanhassel2009-11-17
|
* Makefile: Create installation directories explicitlyIngmar Vanhassel2009-11-17
| | | | Previously, notmuch.1.gz was installed as /usr/share/man/man1 (a file).
* Deal with situation where sysconf(_SC_GETPW_R_SIZE_MAX) returns -1Alexander Botero-Lowry2009-11-17
|
* Fix broken commit.Carl Worth2009-11-17
| | | | Oops. I should have actually compiled before pushing.
* Include <stdint.h> to get uint32_t in C++ file with gcc 4.4Mikhail Gusarov2009-11-17
| | | | Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
* Close message file after parsing message headersMikhail Gusarov2009-11-17
| | | | | | Keeping unused files open helps to see "Too many open files" often. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
* add_message: Avoid a memory leak when user holds on to message return.Carl Worth2009-11-17
| | | | | | | | | | When this function was originally written, the 'message' object was always destroyed locally, so I thought it would be good to use a NULL talloc context to make it more obvious if there was any leak. Since then, however, this function has been changed to optionally return the added message, and in that case we *don't* free the message locally, so let's let the database be the talloc context.
* notmuch_message_file_get_header returns "" for missing headers, not NULLKeith 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>
* Use 'forward-line' instead of 'next-line' while walking search displayKeith Packard2009-11-16
| | | | | | | | The documentation for 'next-line' suggests that 'forward-line' is a better choice for non-interactive usage. That appears to be the case here; using next-line caused emacs to spin forever for me. Signed-off-by: Keith Packard <keithp@keithp.com>
* notmuch.el: Consider an entire line of underscores as a signature separator.Carl Worth2009-11-16
| | | | | | | This is the default separator used by mailman, so there's a lot of clutter in thread displays without this. Also, we not provide a nice variable to the user (notmuch-show-signature-regexp) for configuring this.
* notmuch.el: Insert a newline if the last line of a part is missing one.Carl Worth2009-11-16
| | | | | | | | | | | | | I think there's a GMime bug that we're getting parts decoded without a final newline (the encoded parts seem to have them just fine). We can workaround the bug easily enough by finding a part-closing delimiter that is not at the beginning of a line, and if so, just insert a newline. Without this, the one-line-summary of the next message would continue on the same line as the last line of the previous message, (and this would often happen for mailing-list messages where mailman would add an extra part for its signature block).
* notmuch restore was skipping entries with no new tagsKeith Packard2009-11-16
| | | | | | | | | | | notmuch restore used to only add tags; now that it clears existing tags, it needs to operate on messages even if the new tag list is empty. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Carl Worth <cworth@cworth.org>: I fixed up the indentation here, (someday we might switch to 8-space indents, but we haven't yet).
* notmuch.el: Display authors in a column separate from subject.Carl Worth2009-11-16
| | | | | | | | | | | | | | | This makes it much easier to actually read the subject lines. The user can set notmuch-search-authors-width to control the width of the column. Two possible ideas for improving this support further: 1. Make the excess authors invisible instead of removing them from the buffer, (which means that isearch could still find them). 2. Have the user variable control a percentage of the window width rather than being a fixed number of columns.
* notmuch.el: Indent messages to show nested structure of thread.Carl Worth2009-11-16
| | | | | | | | | | | | | Now that we're actually adding text to the buffer for the indentation, our old aproach of using positions to record regions to manipulate is now longer correct. Fortunately, it's easy to switch from positions to markers which are robust, (just call point-marker instead of point and all relevant functions accept markers as well as points). I also finally fixed the bug where the text "[6 line signature]" we display was causing the one-line-summary of the next message to be on its same line rather than at the beginning of the next line where it belongs.
* notmuch show: Implement proper thread ordering/nesting of messages.Carl Worth2009-11-15
| | | | | | | | We now properly analyze the in-reply-to headers to create a proper tree representing the actual thread and present the messages in this correct thread order. Also, there's a new "depth:" value added to the "message{" header so that clients can format the thread as desired, (such as by indenting replies).
* Minor whitespace touchup.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.
* Add _notmuch_message_get_in_reply_to.Carl Worth2009-11-15
| | | | | | | The existing notmuch_message_get_header is *almost* good enough for this, except that we also need to remove the '<' and '>' delimiters. We'll probably want to implement this function with database storage in the future rather than loading the email message.
* Remove obsolete notmuch_message_get_subject prototype.Carl Worth2009-11-15
| | | | | | This prototype has been sitting around for a while with no function implementing it. I wonder if there's a compiler warning I could turn on to catch these things.
* lib/messages: Add new notmuch_message_list_t to internal interface.Carl Worth2009-11-15
| | | | | | | | | | | | Previously, the notmuch_messages_t object was a linked list built on top of a linked-list node with the odd name of notmuch_message_list_t. Now, we've got much more sane naming with notmuch_message_list_t being a list built on a linked-list node named notmuch_message_node_t. And now the public notmuch_messages_t object is a separate iterator based on notmuch_message_node_t. This means the interfaces for the new notmuch_message_list_t object are now made available to the library internals.
* database: Fix a typo in a commit.Carl Worth2009-11-15
| | | | | Nothing significant here, but we might as well not keep things misspelled when we notice.
* Export _parse_message_id to the library implementation.Carl Worth2009-11-15
| | | | | | Not exported through the public interface, but the thread code is going to want to be able to parse In-Reply-To headers so needs access to this code.
* _thread_add_messages: Remove unused variable.Carl Worth2009-11-15
| | | | | I'm not sure how I let this warning go by unfixed for a while. Fix it now.
* lib: Move notmuch_messages_t code from query.cc to new messages.cCarl Worth2009-11-14
| | | | | | | | | | | | | The new object is simply a linked-list of notmuch_message_t objects, (unlike the old object which contained a couple of Xapian iterators). This works now by the query code immediately iterator over all results and creating notmuch_message_t objects for them, (rather than waiting to create the objects until the notmuch_messages_get call as we did earlier). The point of this change is to allow other instances of lists of messages, (such as in notmuch_thread_t), that are not directly related to Xapian search results.