aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-11-25move from search to show with Enter, and back with qBart Trojanowski
2009-11-25primitive notmuch mail interface for vimBart Trojanowski
2009-11-25notmuch-show: identify which messages printed matched the query stringBart Trojanowski
The show command outputs all messages in the threads that match the search-terms. This patch introduces a 'match:[01]' entry to the 'message{' line output by the show command. Value of 1 indicates that the message is matching the search expression. Signed-off-by: Bart Trojanowski <bart@jukie.net>
2009-11-25have _notmuch_thread_create mark which messages matched the queryBart Trojanowski
When _notmuch_thread_create() is given a query string, it can return more messages than just those matching the query. To distinguish those that matched the query expression, the MATCHING_SEARCH flag is set appropriately. Signed-off-by: Bart Trojanowski <bart@jukie.net>
2009-11-25message: add flags to notmuch_message_tBart Trojanowski
This patch allows for different flags, internal to notmuch, to be set on a message object. The patch does not define any such flags, just the facilities to manage these flags. Signed-off-by: Bart Trojanowski <bart@jukie.net>
2009-11-24notmuch.el: Quote arguments to protect from shell interpretation.Carl Worth
We want to allow the user to be able to use search expressions with parentheses and semi-colons, etc. and we definitely don't want the shell interpreting those!
2009-11-24notmuch.el: Exceute "notmuch search" asynchronously.Carl Worth
Previously, our emacs interface was waiting for the "notmuch search" to complete before it would display anything. Now, we execute the process asyncrhonously and filter results as they come in. This takes advantage of the recent work to make "notmuch search" results stream out steadily. The result is that some search results will be available nearly instantly and the user can navigate and view those while additional results continue loading.
2009-11-24Merge buttons-for-body-and-headers branch.Carl Worth
Thanks, Alexander!
2009-11-24Remove the global expand body keymappingAlexander Botero-Lowry
With local buttons done now, we don't need this anymore.
2009-11-24lib/messages.c: Make message searches stream as well.Carl Worth
Xapian provides an interator-based interface to all search results. So it was natural to make notmuch_messages_t be iterator-based as well. Which we did originally. But we ran into a problem when we added two APIs, (_get_replies and _get_toplevel_messages), that want to return a messages iterator that's *not* based on a Xapian search result. My original compromise was to use notmuch_message_list_t as the basis for all returned messages iterators in the public interface. This had the problem of introducing extra latency at the beginning of a search for messages, (the call would block while iterating over all results from Xapian, converting to a message list). In this commit, we remove that initial conversion and instead provide two alternate implementations of notmuch_messages_t (one on top of a Xapian iterator and one on top of a message list). With this change, I tested a "notmuch search" returning *many* results as previously taking about 7 seconds before results started appearing, and now taking only 2 seconds.
2009-11-24Make bodies locally toggleableAlexander Botero-Lowry
Having actually implemented this, I realized that my initial approach of providing a function to configure a button was wrong. Instead I've replaced that with button types. This then makes it possible to provide the fully expanded view when all threads in a message are unread. It also has the potential to allow global-expansion functions if that is desireable
2009-11-24make a nice function for generating invisibility toggle buttonsAlexander Botero-Lowry
I realized I was replicating this code over and over again, so this way if I change my mind about something I only have to do it on one place.
2009-11-24cleanup a lot of left-overs from the global invisAlexander Botero-Lowry
Basically I'd left in a lot of the key-bindings and all the invisiblity spec variables so just rid the world of those
2009-11-24make headers locally expandable/collapsableAlexander Botero-Lowry
This is the same as with citations and signatures. I used an ellipsis here for the invisible region, which I think make it more obvious that there are extra headers. MH-e used this for extra long To/CC headers.
2009-11-23lib/query: Drop the first and max_messages arguments from search_messages.Carl Worth
These only existed to support the chunky-searching hack, but that was recently dropped anyway.
2009-11-23lib/query: Fix notmuch_threads_t to stream results rather than blocking.Carl Worth
Previously, notmuch_query_search_threads would do all the work, so the caller would block until all results were processed. Now, we do the work as we go, as the caller iterates with notmuch_threads_next. This means that once results start coming back from "notmuch search" they just keep continually streaming. There's still some initial blocking before the first results appear because the notmuch_messages_t object has the same bug (for now).
2009-11-23notmuch search: Remove the chunked-searching hack.Carl Worth
This was a poor workaround around the fact that the existing notmuch_threads_t object is implemented poorly. It's got a fine iterartor-based interface, but the implementation does all of the work up-front in _create rather than doing the work incrementally while iterating. So to start fixing this, first get rid of all the hacks we had working around this. This drops the --first and --max-threads options from the search command, (but hopefully nobody was using them anyway---notmuch.el certainly wasn't).
2009-11-23notmuch.el: Add TAB and M-TAB buttons to move between buttons.Carl Worth
Thanks to Alexander Botero-Lowry for pointing out the interesting functions to use here. This functionality was really easy to add.
2009-11-23Fix printing of literal '%' in help message.Carl Worth
I suppose I could have just used puts instead...
2009-11-23Make addresses case insensitive for the purpose of constructing replies.Jed Brown
The domain is alway case insensitive, but in principle the username is case sensitive. Few systems actually enforce this so I think a good default is to treat the entire address as case insensitive, it will eliminate a lot of superfluous self-addressed messages and reply from the correct address in these cases. Signed-off-by: Jed Brown <jed@59A2.org>
2009-11-23Stay out of tmp to respect the Maildir spec.Jed Brown
2009-11-23search : Extend "intial burst" optimization to return all results by chunksCarl Worth
This way, the user gets a steady (but bursty) stream of reults. We double the chunk size each time since each successive chunk has to redo work from all previous chunks. Of course, the overall time is thereby slower, as the price we pay for increased responsiveness. With a search returning about 17000 thread results I measured a total time of 48.8 seconds before this change and 58.4 seconds afterwards.
2009-11-23Add rudimentary date-based search.Carl Worth
The rudimentary aspect here is that the date ranges are specified with UNIX timestamp values (number of seconds since 1970-01-01 UTC). One thing that can help here is using the date program to determins timestamps, such as: $(date +%s -d 2009-10-01)..$(date +%s) Long-term, we'll probably need to do our own query parsing to be able to support directly-specified dates and also relative expressions like "since:'2 months ago'".
2009-11-23Add notmuch-folder mode to provide an overview of search matchesKeith Packard
Folder mode takes a (user-configurable) list of search patterns and produces a list of those patterns and the count of messages that they match. When an entry in this list is selected, a search window with the defined search is opened. The set of folders is defined as a list, each element contains the name of the folder and the query string to count. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-23Add 'notmuch count' command to show the count of matching messagesKeith Packard
Getting the count of matching threads or messages is a fairly expensive operation. Xapian provides a very efficient mechanism that returns an approximate value, so use that for this new command. This returns the number of matching messages, not threads, as that is cheap to compute. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-23Make mouse-1 click in search view show threadKeith Packard
Selecting text in the search view isn't all that useful, so instead, make mouse-1 clicks actually show the thread you click on. It's almost like direct manipulation or something. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-23TODO: Yet another idea.Carl Worth
This is an idea I've had "forever" (and is commented as such in the code already), but just came up on the mailing list. So note it here.
2009-11-23ANSI escapes in "new" only when output is a ttyAdrian Perez
When running "notmuch new --verbose", ANSI escapes are used. This may not be desirable when the output of the command is *not* being sent to a terminal (e.g. when piping output into another command). In that case each file processed is printed in a new line and ANSI escapes are not used at all.
2009-11-23fix notmuch-new bug when database path ends with a trailing /Bart Trojanowski
I configured my database.path with a trailing /, and after running notmuch new every notmuch search would fail with error messages like this: Error opening /inbox/cur/1258565257.000211.mbox:2,S: No such file or directory The actual bug was in the filename normalization for storage in the database. The database.path was removed from the full filename, but if the database.path from the config file contained a trailing /, the relative file name would retain an extra leading /... which made it look like an absolute path after it was read out from the DB. Signed-off-by: Bart Trojanowski <bart@jukie.net>
2009-11-23TODO: Add a couple of notes about things to do with/to Xapian.Carl Worth
I had these notes sitting in an uncommitted file that was cluttering up my "git status" output. This cleans that up, and also shares the ideas with the wider community.
2009-11-23makefile: Declare clean target as phony.Jan Janak
This ensures that make clean always proceeds, even if the user accidentally creates a file named 'clean'. Also, it ignores errors in rm and other commands. Signed-off-by: Jan Janak <jan@ryngle.com>
2009-11-23TODO: Capturing even more ideas.Carl Worth
Hopefully soon I can start implementing ideas rather than just writing them down.
2009-11-23TODO: A couple of more ideas for improving the emacs interface.Carl Worth
We're not likely to run out of work to do anytime soon...
2009-11-23Support multiple configuration files via $NOTMUCH_CONFIGAlec Berryman
If present, $NOTMUCH_CONFIG will be used as the configuration file location.
2009-11-23TODO: Add several ideas for improving the emacs interface.Carl Worth
These are from email messages on the notmuch mailing list and from IRC conversations in #notmuch.
2009-11-23Insert signature into repliesKeith Packard
When you compose a new message, message mode carefully inserts your mail signature at the bottom of the message; as notmuch constructs the reply all by itself, this doesn't happen then. Use the message mode function 'message-insert-signature' to add that to reply buffers. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-23Quote file names passed to the shellJed Brown
Prior to this, notmuch-show-pipe-message could not handle file names with spaces and similar.
2009-11-23Support for printing file paths in new commandAdrian Perez
For very large mail boxes, it is desirable to know which files are being processed e.g. when a crash occurs to know which one was the cause. Also, it may be interesting to have a better idea of how the operation is progressing when processing mailboxes with big messages. This patch adds support for printing messages as they are processed by "notmuch new": * The "new" command now supports a "--verbose" flag. * When running in verbose mode, the file path of the message about to be processed is printed in the following format: current/total: /path/to/message/file Where "current" is the number of messages processed so far and "total" is the total count of files to be processed. The status line is erased using an ANSI sequence "\033[K" (erase current line from the cursor to the end of line) each time it is refreshed. This should not pose a problem because nearly every terminal supports it. * The signal handler for SIGALRM and the timer are not enabled when running in verbose mode, because we are already printing progress with each file, periodical reports are not neccessary.
2009-11-23Merge remote branch 'drax/master'Carl Worth
2009-11-22switch to button-1, which seems to interact poorly with text-selection by mouseAlexander Botero-Lowry
2009-11-23TODO: Add a bunch of ideas that have been on my mind lately.Carl Worth
So get these out of my mind and out to the user community.
2009-11-22instead of trying to cause a redisplay, actually do a redisplayAlexander Botero-Lowry
2009-11-22put a newline after the headersAlexander Botero-Lowry
2009-11-22make header names bold in show-modeAlexander Botero-Lowry
2009-11-22Make expanding/collapsing signatures and citations local to themAlexander Botero-Lowry
This is the first step towards localizing all the expand/collapse operations in the show buffer
2009-11-22buttonize signatures as wellAlexander Botero-Lowry
2009-11-22Buttonize citation expander.Alexander Botero-Lowry
Currently the button has no action or special handling at all.
2009-11-22notmuch-show: Show message part using UTF-8.Kan-Ru Chen
Pass the message through the charset filter so that we can view messages wrote in different charset encoding. Signed-off-by: Kan-Ru Chen <kanru@kanru.info>
2009-11-22Missing final semi-colon in .desktop's Categories.James Rowe
"Those keys which have several values should have a semicolon as the trailing character." -- http://standards.freedesktop.org/desktop-entry-spec/1.0/ar01s03.html Signed-off-by: James Rowe <jnrowe@gmail.com> Reviewed-by: Jeffrey C. Ollie <jeff@ocjtech.us>
2009-11-22Fix invalid face reference.Kan-Ru Chen
To avoid the "Invalid face reference: cons [18 times]" kind of message goes on and on in the *Messages*. Signed-off-by: Kan-Ru Chen <kanru@kanru.info>