aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* python: Add binding for notmuch_query_add_tag_excludeGravatar Thibaut Horel2014-09-23
| | | | | Implemented as the method `exclude_tag` of the class `Query`. This method takes one argument, a string containing the name of the tag to exclude.
* emacs: Fix coding system in `notmuch-show-view-raw-message'Gravatar Austin Clements2014-09-21
| | | | | This fixes the known-broken test of viewing 8bit messages added by the previous commit.
* test: New tests for Emacs charset handlingGravatar Austin Clements2014-09-21
| | | | | | The test of viewing 8bit messages is known-broken. The rest pass, but for very fragile reasons. The next several commits will fix the known-broken test and make our charset handling robust.
* emacs: Remove redundant NTH argument from `notmuch-get-bodypart-content'.Gravatar Austin Clements2014-09-21
| | | | | | This can be derived from the PART argument (which is arguably canonical), so there's no sense in giving the caller an extra foot gun.
* test/emacs: globally force the html renderer to html2textGravatar David Bremner2014-09-21
| | | | | | Previously we did this for a single test, but some other proposed tests ( id:1398105468-14317-3-git-send-email-amdragon@mit.edu ) show similar breakage when switching renderers.
* debian: re-enable atomicity test on arm64Gravatar David Bremner2014-09-20
| | | | | | | | | according to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757454 the kernel problem which caused this test to fail should be fixed now
* debian: bump SONAMEGravatar David Bremner2014-09-16
| | | | | | Note that this is one of those cases where an ABI change is not obvious from the symbols file. Several previously void functions now have return codes.
* python: bump SONAMEGravatar David Bremner2014-09-16
| | | | | | | This should have happened in commit 6754ad9f9, but oops. This was not caught by our test suite because it uses an installed notmuch library of it cannot find the just built one.
* cli: refactor insertGravatar Peter Wang2014-09-16
| | | | | | Change insert_message into write_message and move its responsibilities for indexing the message into the main function, to simplify the control flow.
* ruby: handle return status of database closeGravatar Peter Wang2014-09-16
| | | | Throw an exception if notmuch_database_destroy fails.
* go: add return status to database close methodGravatar Peter Wang2014-09-16
| | | | | Add return status to the Database.Close() method that calls notmuch_database_destroy.
* python: handle return status of database close and destroyGravatar Peter Wang2014-09-16
| | | | | Throw an exception if notmuch_database_close or notmuch_database_destroy fail.
* lib: bump sonameGravatar Peter Wang2014-09-16
| | | | | Adding return values to notmuch_database_close and notmuch_database_destroy may require bumping the soname.
* test: simplify T360-symbol-hiding, use nm instead of objdumpGravatar David Bremner2014-09-13
| | | | | | | | | | | | | | | After yet another variation in objdump output caused this test to fail (on a Debian port, no less), I decided whatever putative benefit we get from looking at the object files instead of the library isn't worth the maintenence headache. This version uses nm -P. nm -P should be portable, and fixed format. It purposely doesn't use the -D argument, since that is non-POSIX and nm on GNU/Linux seems do the right thing without it. It still won't work out of the box on e.g. Mac OS/X. I think the right thing to do there is to move some more configuration information into sh.config.
* notmuch_thread_get_authors: document match grouping with |Gravatar Gaute Hope2014-09-13
| | | | | | | | | | | | | | as stated in thread.cc:115 /* Construct an authors string from matched_authors_array and * authors_array. The string contains matched authors first, then * non-matched authors (with the two groups separated by '|'). Within * each group, authors are listed in date order. */ this is, however, not reflected in the public API documentation in notmuch.h:970. This patch a paragraph explaining how | separates the group of authors of messages matching the query and those of messages that do not, but are still contained in the thread.
* emacs: jump: sort-order bugfixGravatar Mark Walters2014-09-07
| | | | | | | | | | | | | | | | | | | default-value needs its argument to be quoted. Slightly strangely default-value of 't or nil is 't or nil respectively so the code (default-value notmuch-search-oldest-first) just gives the current value of notmuch-search-oldest-first rather than intended default-value of this variable. The symptom is that if you are in a search buffer and use notmuch jump to run a saved search which does not have an explicitly set sort order then the sort order of the saved-search is inherited from the current search buffer rather than being the default search order. Thanks to Jani for finding the bug.
* cli: Be more helpful when .notmuch-config does not existGravatar Austin Clements2014-09-07
| | | | | | | | | | | | Previously, if the user ran any subcommand that required a configuration (e.g., notmuch new) but didn't have a configuration, notmuch would give the rather un-friendly and un-actionable message Error reading configuration file .notmuch-config: No such file or directory Since this condition is expected for new users, this patch adds specific handling for the file-not-found case to give a message that is friendly and actionable.
* doc: 'rm -f' potential doxygen temporary output fileGravatar Tomi Ollila2014-09-02
| | | | Some (older) Doxygen versions do not create such a temporary file.
* lib: Fix endless upgrade problemGravatar Austin Clements2014-09-01
| | | | | | | | | | | | | | 48db8c8 introduced a disagreement between when notmuch_database_needs_upgrade returned TRUE and when notmuch_database_upgrade actually performed an upgrade. As a result, if a database had a version less than 3, but no new features were required, notmuch new would call notmuch_database_upgrade to perform an upgrade, but notmuch_database_upgrade would return immediately without updating the database version. Hence, the next notmuch new would do the same, and so on. Fix this by ensuring that the upgrade-required logic is identical between the two.
* lib: Update doc of notmuch_database_{needs_upgrade,upgrade}Gravatar Austin Clements2014-08-30
| | | | | | Clients are no longer required to call these functions after opening a database in read/write mode (which is good, because almost none of them do!).
* lib: Return an error from operations that require an upgradeGravatar Austin Clements2014-08-30
| | | | | | | | | | | | | | | | | Previously, there was no protection against a caller invoking an operation on an old database version that would effectively corrupt the database by treating it like a newer version. According to notmuch.h, any caller that opens the database in read/write mode is supposed to check if the database needs upgrading and perform an upgrade if it does. This would protect against this, but nobody (even the CLI) actually does this. However, with features, it's easy to protect against incompatible operations on a fine-grained basis. This lightweight change allows callers to safely operate on old database versions, while preventing specific operations that would corrupt the database with an informative error message.
* lib: Support empty header values in databaseGravatar Austin Clements2014-08-30
| | | | | | | | | | | | | | | | | Commit 567bcbc2 introduced support for storing various headers in document values. However, doing so in a backwards-compatible way meant that genuinely empty header values could not be distinguished from the old behavior of not storing the headers at all, so these required parsing the original message. Now that we have database features, new databases can declare that all messages have header values, so if we have this feature flag, we can use the stored header value even if it's the empty string. This requires slight cleanup to notmuch_message_get_header, since the code previously couldn't distinguish between empty headers and headers that are never stored in the database (previously this distinction didn't matter).
* lib: Report progress for combined upgrade operationGravatar Austin Clements2014-08-30
| | | | | | | | | Previously, some parts of upgrade didn't report progress and for others it was possible for the progress meter to restart at 0 part way through the upgrade because each stage was reported separately. Fix this by computing the total amount of work that needs to be done up-front and updating completed work monotonically.
* lib: Reorganize upgrade around document typesGravatar Austin Clements2014-08-30
| | | | | | | | Rather than potentially making multiple passes over the same type of data in the database, reorganize upgrade around each type of data that may be upgraded. This eliminates code duplication, will make multi-version upgrades faster, and will let us improve progress reporting.
* lib: Use database features to drive upgradeGravatar Austin Clements2014-08-30
| | | | | | Previously, we had database version information hard-coded in the upgrade code. Slightly re-organize the upgrade process around the set of new database features to be enabled by the upgrade.
* lib: Simplify upgrade code using a transactionGravatar Austin Clements2014-08-30
| | | | | | | | | | | | Previously, the upgrade was organized as two passes -- an upgrade pass, and a separate cleanup pass -- so the database was always in a valid state. This change substantially simplifies this code by performing the upgrade in a transaction and combining both passes in to one. This 1) eliminates a lot of duplicate code between the passes, 2) speeds up the upgrade process, 3) makes progress reporting more accurate, 4) eliminates the potential for stale data if the upgrade is interrupted during the cleanup pass, and 5) makes it easier to reason about the safety of the upgrade code.
* test: Tests for future version and unknown feature handlingGravatar Austin Clements2014-08-30
|
* test: Tool to build DB with specific version and featuresGravatar Austin Clements2014-08-30
| | | | This will let us test basic version and feature handling.
* lib: Database version 3: Introduce fine-grained "features"Gravatar Austin Clements2014-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, our database schema was versioned by a single number. Each database schema change had to occur "atomically" in Notmuch's development history: before some commit, Notmuch used version N, after that commit, it used version N+1. Hence, each new schema version could introduce only one change, the task of developing a schema change fell on a single person, and it all had to happen and be perfect in a single commit series. This made introducing a new schema version hard. We've seen only two schema changes in the history of Notmuch. This commit introduces database schema version 3; hopefully the last schema version we'll need for a while. With this version, we switch from a single version number to "features": a set of named, independent aspects of the database schema. Features should make backwards compatibility easier. For many things, it should be easy to support databases both with and without a feature, which will allow us to make upgrades optional and will enable "unstable" features that can be developed and tested over time. Features also make forwards compatibility easier. The features recorded in a database include "compatibility flags," which can indicate to an older version of Notmuch when it must support a given feature to open the database for read or for write. This lets us replace the old vague "I don't recognize this version, so something might go wrong, but I promise to try my best" warnings upon opening a database with an unknown version with precise errors. If a database is safe to open for read/write despite unknown features, an older version will know that and issue no message at all. If the database is not safe to open for read/write because of unknown features, an older version will know that, too, and can tell the user exactly which required features it lacks support for.
* new: Don't report version after upgradeGravatar Austin Clements2014-08-30
| | | | | | | | | | The version number has always been pretty meaningless to the user and it's about to become even more meaningless with the introduction of "features". Hopefully, the database will remain on version 3 for some time to come; however, the introduction of new features over time in version 3 will necessitate upgrades within version 3. It would be confusing if we always tell the user they've been "upgraded to version 3". If the user wants to know what's new, they should read the news.
* completion: fail silently if _init_completion is not foundGravatar Jani Nikula2014-08-22
| | | | | | | | | | | The completion script depends on bash-completion 1.90 or later, with _init_completion function. If that's not present, for some reason, the completion currently fails with an ugly message, messing up user's command line: $ notmuch -bash: _init_completion: command not found It's better to just not complete
* Make parsing of References and In-Reply-To header less error proneGravatar Michal Sojka2014-08-16
| | | | | | | | | | | | | | | | According to RFC2822 References and In-Reply-To headers are supposed to contain one or more Message-IDs, however older RFC822 allowed almost any content. When both References and In-Reply-To headers ends with something else that a Message-ID (see e.g. [1]), the thread structure presented by notmuch is incorrect. The reason is that notmuch treats this case as if the email contained no "replyto" information (see _notmuch_database_link_message_to_parents). This patch changes the parse_references() function to return the last valid Message-ID encountered rather than NULL resulting from the last hunk of text not being the Message-ID. [1] https://lkml.org/lkml/headers/2014/5/19/864
* Add test for incorrect threading of messagesGravatar Michal Sojka2014-08-16
| | | | | | This happens when there is some garbage after the last Message-ID in the References header. See for example https://lkml.org/lkml/headers/2014/5/19/864.
* emacs: Improved compatibility for window-body-width in Emacs < 24Gravatar Austin Clements2014-08-16
| | | | | | | Fix byte compiler warning "Warning: the function `window-body-width' is not known to be defined." by moving our compatibility wrapper before its use and simplify the definition to a defalias for the old name of the function.
* Merge tag 'debian/0.18.1-2'Gravatar David Bremner2014-08-09
|\ | | | | | | uploaded to Debian unstable
| * debian: re-enable atomicity tests on armhfGravatar David Bremner2014-08-09
| | | | | | | | | | Commit a33ec9c seems to have fixed the problem on the armhf porterbox (harris.debian.org).
| * debian: build with emacs24 by default, disable gdb on arm64Gravatar David Bremner2014-08-09
| | | | | | | | | | | | | | | | From wookey@debian.org id:20140808012130.GT7605@stoneboat.aleph1.co.uk Fixes for the port in progress of debian to arm64.
* | notmuch-config: talloc_strdup MAILDIR and NAME environment variablesGravatar Tomi Ollila2014-08-07
| | | | | | | | | | When defined -- the pointer is soon given to talloc_free() which expects it to be allocated by talloc.
* | util: Const version of strtok_lenGravatar Austin Clements2014-08-06
| | | | | | | | | | | | | | | | | | Because of limitations in the C type system, we can't a strtok_len that can work on both const string and non-const strings. The C library solves this by taking a const char* and returning a char* in functions like this (e.g., strchr), but that's not const-safe. Solve it by introducing strtok_len_c, a version of strtok_len for const strings.
* | test: Include generated dependencies for test sourcesGravatar Austin Clements2014-08-06
| | | | | | | | | | | | | | | | Previously the build system was generating automatic header dependencies for test sources, but only smtp-dummy was in SRCS, so only its dependencies were being included. Add all of the test sources to SRCS so that the root Makefile.local includes their dependencies.
* | new: Report and abort on upgrade failureGravatar Austin Clements2014-08-06
| | | | | | | | | | Previously the return status of notmuch_database_upgrade went completely unchecked.
* | lib: Improve documentation of _notmuch_message_create_for_message_idGravatar Austin Clements2014-08-05
| | | | | | | | | | | | Clarify the state of the returned message when _notmuch_message_create_for_message_id returns NOTMUCH_PRIVATE_STATUS_NO_DOCUMENT_FOUND.
* | emacs: Expand default saved searches and add shortcut keysGravatar Austin Clements2014-08-05
| | | | | | | | | | | | This should help new users off to a better start with the addition of more sensible saved searches and default shortcut keys. Most existing users have probably customized this variable and won't be affected.
* | emacs: Introduce notmuch-jump: shortcut keys to saved searchesGravatar Austin Clements2014-08-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces notmuch-jump, which is like a user-friendly, user-configurable global prefix map for saved searches. This provides a non-modal and much faster way to access saved searches than notmuch-hello. A user configures shortcut keys in notmuch-saved-searches, which are immediately accessible from anywhere in Notmuch under the "j" key (for "jump"). When the user hits "j", the minibuffer immediately shows a helpful table of bindings reminiscent of a completions buffer. This code is a combination of work from myself (originally, "notmuch-go"), David Edmondson, and modifications from Mark Walters.
* | travis: Only notify IRC on success if the previous build failedGravatar Austin Clements2014-08-05
| | | | | | | | | | Without this, Travis is rather spammy. Travis will continue to notify the IRC channel on each build failure, which seems desirable.
* | lib: Fix slight misinformation in the database schema docGravatar Austin Clements2014-08-04
| | | | | | | | | | | | The database schema documentation made it sound like each mail document had exactly one on-disk message file, which hasn't been true for a long time.
* | lib: Invalidate message metadata in _notmuch_message_gen_termsGravatar Austin Clements2014-08-04
| | | | | | | | | | | | | | | | Previously, we invalidated stored message metadata in _notmuch_message_add_term and _notmuch_message_remove_term, but not in _notmuch_message_gen_terms. This doesn't currently result in any bugs because of our limited uses of _notmuch_message_gen_terms, but it may could cause trouble in the future.
* | config: read database.path from $MAILDIR if setGravatar Mark Oteiza2014-07-31
| | | | | | | | | | Try to read the config parameter database.path from $MAILDIR before falling back to $HOME/mail
* | config: read user.name from $NAME if setGravatar Mark Oteiza2014-07-31
| | | | | | | | | | Try to read the config parameter user.name from $NAME before taking the user name from /etc/passwd.
* | util: Make string-util.h C++-compatibleGravatar Austin Clements2014-07-31
| |