aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-06-06ruby: fix documentation of DB.upgrade!Ali Polatel
2010-06-06Initial ruby bindingsAli Polatel
2010-06-05Fix minor style issues in show_part_content function.Carl Worth
I was recently editing the code in this function and decided to clean it up a bit.
2010-06-05Avoid giving GMime a NULL MIME-stream filter.Carl Worth
Micah Anderson reported an issue where a message failed to display in the emacs interface, (it instead gave an error, "json-read-string: Bad string format"). Micah tracked this down to the json output from "notmuch show" being interrupted by a GMime error message: gmime-CRITICAL **: g_mime_stream_filter_add: assertion `GMIME_IS_FILTER (filter) I tracked this down further to notmuch passing a NULL value to g_mime_stream_filter_add. And this was due to calling g_mime_filter_charset_new with a value of "unknown-8bit". So we add a test message withe a Conten-Type of "text/plain; charset=unknown-8bit" from Micah's message. Then we fix "notmuch show" to test for NULL before calling g_mime_stream_filter_add. Bug fixed.
2010-06-04Add C-tab binding in notmuch-search mode as well.Carl Worth
We recently added this to notmuch-hello mode so we might as well support it in this mode as well for consistency.
2010-06-04make install: Run ldconfig or install a DT_RUNPATH in binary as appropriate.Carl Worth
Various users were confused as to why they couldn't run notmuch immediately after "make install", (with linker errors saying that libnotmuch.so could not be found). The errors came from two different causes: 1. The user had installed to a system library directory, but had not yet run ldconfig. 2. The user had installed to some non-system directory, and had not set the LD_LIBRARY_PATH variable. With this change we fix both problems (on Linux) without the user having to do anything additional. We first use ldconfig to find the system library directories. If the user is installing to one of these, then we run ldconfig as part of "make install". For case (2) we use the -rpath and --enable-new-dtags linker options to install a DT_RUNPATH entry in the binary. This entry tells the dynamic linker where to find libnotmuch. Without the --enable-new-dtags option only a DT_RPATH option would be installed, (which has the drawback of not allowing any override with the LD_LIBRARY_PATH variable). Distributions (such as Debian and Fedora) don't want to see binaries packaged with a DT_RPATH or DT_RUNPATH entry. This should be avoided automatically as long as the packages install to standard locations, (such as /usr/lib).
2010-06-04configure: Remove space from IFS (using tab as necessary)Carl Worth
The idea here is to more easily support filenames with spaces in them in various loops. We're about to add a loop over the paths configured by the dynamic linker. Hopefully, they wouldn't contain spaces, but one never knows so we might as well be prepared.
2010-06-04Add support (and tests) for messages with really long message IDs.Carl Worth
Scott Henson reported an internal error that occurred when he tried to add a message that referenced another message with a message ID well over 300 characters in length. The bug here was running into a Xapian limit for the length of metadata key names, (which is even more restrictive than the Xapian limit for the length of terms). We fix this by noticing long message ID values and instead using a message ID of the form "notmuch-sha1-<sha1_sum_of_message_id>". That is, we use SHA1 to generate a compressed, (but still unique), version of the message ID. We add support to the test suite to exercise this fix. The tests add a message referencing the long message ID, then add the message with the long message ID, then finally add another message referencing the long ID. Each of these tests exercise different code paths where the special handling is implemented. A final test ensures that all three messages are stitched together into a single thread---guaranteeing that the three code paths all act consistently.
2010-06-04test suite: Generate message filenames from count, not Message-Id.Carl Worth
We're about to add a test with an excessively long message-id, (512 characters or so). This exceeds filename length limits, so just always the simple counter to generate the filenames, (which we were doing for messages with non-custom IDs anyway).
2010-06-04test suite: Add support for custom references header in generated messages.Carl Worth
In the same style as several other existing headers.
2010-06-04Avoid database corruption by not adding partially-constructed mail documents.Carl Worth
Previously we were using Xapian's add_document to allocate document ID values for notmuch_message_t objects. This had the drawback of adding a partially constructed mail document to the database. If notmuch was subsequently interrupted before fully populating this document, then later runs would be quite confused when seeing the partial documents. There are reports from the wild of people hitting internal errors of the form "Message ... has no thread ID" for example, (which is currently an unrecoverable error). We fix this by manually allocating document IDs without adding documents. With this change, we never call Xapian's add_document method, but only replace_document with either the current document ID of a message or a new one that we have allocated.
2010-06-04Fix misnamed function in internal documentation.Carl Worth
The documentation for several functions mentioned _notmuch_message_set_sync which doesn't exist. Fix these to reference _notmuch_message_sync instead.
2010-06-03emacs: Tags should be shown with `notmuch-tag-face'.David Edmondson
Use the same face for tags in `notmuch-show' mode as that used in `notmuch-search' mode.
2010-06-03emacs: In search mode, truncate authors using invisible text.David Edmondson
Rather than discarding authors when truncated to fit the defined column width, mark the text beyond the end of the column as invisible and allow `isearch' to be used over the text so hidden. This allows us to retain the compact display whilst enabling a user to find the elided text.
2010-06-03emacs: Adjust comment to avoid confusing font-lock.David Edmondson
Comments with an open bracket in the first column confuse `font-lock' mode, so avoid them.
2010-06-03emacs: Allow the display of absolute dates in the header line.David Edmondson
Add `notmuch-show-relative-dates' to control whether the summary line in `notmuch-show' mode displays relative dates (e.g. '26 mins. ago') or the full date string from the message. Default to `t' for compatibility with the previous behaviour.
2010-06-03emacs: Bind <backtab> (shift-TAB) to notmuch-show-previous-buttonNelson Elhage
Shift-TAB is standard "opposite" of TAB -- in GUI interfaces they typically cycle through input elements in opposite orders -- so it makes sense to behave the same way. Signed-off-by: Nelson Elhage <nelhage@ksplice.com>
2010-06-03emacs: More functionality for `notmuch-wash-tidy-citations'.David Edmondson
Add: - Insert a blank line before a citation if there isn't one, - Insert a blank line after a citation if there isn't one.
2010-06-03emacs: Pretty print the numbers of matching messages.David Edmondson
Insert a separator every three digits when outputting numbers. Allow the user to choose the separator by customizing `notmuch-decimal-separator'. Widen the space allocated for message counts accordingly.
2010-06-03emacs: notmuch-hello: Make widget-keymap a parent of notmuch-hello-keymapNelson Elhage
This lets us pick up later changes to widget-keymap if the user customizes it in some way. This is the recommended way to use `widget-keymap', according to its help.
2010-06-03add missing docstring for functionsSebastian Spaeth
The '?' key bindings uses them for the help window and these are currently empty. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2010-06-03Make notmuch-hello a mode.Sebastian Spaeth
This enables the nifty '?' key binding to work in notmuch-hello (although for some strange reasons I don't see any descriptions for specific key bindings yet. Not sure how that is supposed to work though. But this starts, runs and behaves identical to the existing code. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2010-06-03emacs: Remove notmuch-hello-roundup functionSebastian Spaeth
as it does the same as (ceiling number divisor) which is already provided in elisp.
2010-06-03Add support for the Solaris platformTomas Carnecky
Like on Mac OS X, the linker doesn't automatically resolve dependencies. Signed-off-by: Tomas Carnecky <tom@dbservice.com>
2010-06-03configure: Respect LDFLAGS from the environment.Tomas Carnecky
The configure usage string documents that it respects LDFLAGS, but currently it doesn't do anything with the configure-time LDFLAGS value. Signed-off-by: Tomas Carnecky <tom@dbservice.com> [Tomas and Nelson sent almost identical patches which I've merged together here.]
2010-06-03emacs: In hello mode, bind `C-tab' to move backwards through widgets.David Edmondson
`C-tab' is now the inverse operation to `tab'.
2010-06-03emacs: Reuse rather than reinvent message header filteringSebastian Spaeth
In notmuch-mua-reply we were filtering out the Subject and To headers manually in a loop, but message mode offers a nice function for exactly that. Simplify the code by using it. Also, as notmuch-mua-mail already sorts and hides headers that we want sorted and hidden, we can safely remove those 2 functions from here as well. Also remove the (require 'cl), the only reason for its existence was the now removed "loop" function. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2010-06-03emacs: Allow tuning of the tag/saved search layout.David Edmondson
Add `notmuch-column-control', which has three potential sets of values: - t: automatically calculate the number of columns per line based on the tags to be shown and the window width, - an integer: a lower bound on the number of characters that will be used to display each column, - a float: a fraction of the window width that is the lower bound on the number of characters that should be used for each column. So: - if you would like two columns of tags, set this to 0.5. - if you would like a single column of tags, set this to 1.0. - if you would like tags to be 30 characters wide, set this to 30. - if you don't want to worry about all of this nonsense, leave this set to `t'.
2010-06-03emacs: Allow control over faces for search mode columns.David Edmondson
Add face declarations for the date, count, matching author and subject columns in search mode and apply those faces when building the search mode display. Approved-by: Jameson Rollins <jrollins@finestructure.net>
2010-06-03emacs: Set the `face' property rather than `font-lock-face'.David Edmondson
Avoid using face properties reserved for the font-lock package.
2010-06-03emacs: Display non-matching authors with a different face.David Edmondson
In search mode some messages don't match the search criteria. Show their authors names with a different face - generally darker than those that do match.
2010-06-03NEWS: describe easier FCC configurationSebastian Spaeth
I know I should be writing something witty here to make cworth happy, but I can't think for any verbose justification of this patch beyond that submitting a NEWS blurb will make cworth happy too. So let's make him happy. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2010-06-03Easier way to define a fcc directorySebastian Spaeth
In the common case that a user only has one FCC (save outgoing mail in the Mail directory, it is now possible to simply configure a string such as "Sent" in the notmuch-fcc-dirs variable. More complex options, depending on a users email address, are possible and described in the variable customization help text. The whole function notmuch-fcc-header-setup has been cleaned up a little while working on that. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2010-06-03emacs: Usability improvements for `notmuch-hello'.David Edmondson
- If no saved searches exist or are displayed, don't signal an error, - If no saved searches exist or are displayed, leave the cursor in the search bar, - Minor layout improvements.
2010-06-03Add a test case for the previous commit.Carl Worth
The commit said it fixed a problem with headers >200 characters long. But examination of the code suggests that it was a header of exactly 200 characters long that caused the problem. So we add a test case for that here. Before the fix in the previous commit, valgrind would detect many errors when replying to the message created with this test case. After that commit, those errors are gone.
2010-06-01notmuch: Fix off-by-one errors if a header is >200 characters long.David Edmondson
If a single header is more than 200 characters long a set of 'off by one' errors cause memory corruption. When allocating memory with: a = malloc (len); the last usable byte of the memory is 'a + len - 1' rather than 'a + len'. Fix the same bug when calculating the current offset should the buffer used for collecting the output header need to be reallocated.
2010-06-01Makefile: Improve the "what to do now" message from "make install"Carl Worth
This was already telling the user how to run notmuch within emacs, but not how to just run the notmuch command-line interface, (which, as it turns out, is a prerequisite for running the emacs interface anyway). So add a small paragraph here.
2010-06-01INSTALL/README: Clean up the description of how to run the emacs interface.Carl Worth
The INSTALL file still had old information about the "make install-emacs" command which no longer exists. README was also giving pointers on how to develop a real interface, (which is not the right thing since README should be addressed to users, not coders). So remove the stale and misplaced information, and instead add a new "Running notmuch" section to the README describing how to run the notmuch command-line interface and how to run the emacs interface.
2010-06-01INSTALL: Note the advantages of Xapian 1.0.18+ and 1.1.4+Carl Worth
These versions provide greatly desired performance advantages for notmuch. Previously, theses details existed in an old NEWS entry, but most users are unlikely to find those details there. Put them here where we mention the Xapian dependency.
2010-06-01TODO: Add idea for fixing "notmuch count" to always be exact.Carl Worth
I had previously thought Xapian only offered an estimate for the number of results that might match a search. But Olly let me know that we can easily ask for Xapian to provide the exact count.
2010-06-01TODO: Add a note that 'a'rchive should only affect open messages.Carl Worth
To avoid accidentally archiving messages that have not been read.
2010-05-18python: have docs reflect current return value behaviorSebastian Spaeth
Database.find_message() used to be able to reliably indicate whether a message exists or not (in which case it returns None). However, the recent API change of the notmuch library means we will return None even for all Xapian exceptions, which happens e.g. when the current Database has been modified by another project. Therefore the return value of None cannot be reliably be used to indicate whether a message exists or not. Make the docs state that explicitely. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2010-04-27Merge branch '0.3.x' immediately after the 0.3.1 releaseCarl Worth
This brings one bug fix into master that was originally applied directly to the 0.3.x branch.
2010-04-27debian: Instruct git-buildpackage that it's OK to build from this branch0.3.1Carl Worth
I wish I had something with better support for a native Debian package here. I shouldn't ever have to configure any branch---I just want it to build a package from the current branch. Instead it makes me tell it (twice!) what the current branch actually is.
2010-04-27debian/changelog: Copy in content from the NEWS file.Carl Worth
Someday we'll automate this step.
2010-04-27Increment version to 0.3.1Carl Worth
For our 0.3.1 bug-fix release.
2010-04-27NEWS: Reword the latest bug description slightly.Carl Worth
"Still needs to be handled correctly" could be misread to suggest that the bug has not actually been fixed yet. So clarify what is actually meant here, (that the bug is unlikely but we're still motivated to fix it).
2010-04-27Update NEWS to reflect the SEGV bugfixDirk Hohndel
Signed-off-by: Dirk Hohndel <hohndel@infradead.org>
2010-04-27Fix SEGV in _thread_cleanup_author if author ends with ', 'Dirk Hohndel
Admittedly, an author name ending in ',' guarantees this is spam, and indeed this was triggered by a spam email, but that doesn't mean we shouldn't handle this case correctly. We now check that there is actually a component of the name (presumably the first name) after the comma in the author name. Signed-off-by: Dirk Hohndel <hohndel@infradead.org>
2010-04-27Merge branch '0.3.x'Carl Worth
This doesn't pull in any code, (everything in 0.3.x was originally cherry-picked from master anyway). But the merge does give us a correct NEWS file showing which fixes are included in 0.3.1 and which features have been commited "since" then, (topologically, not chronologically).