aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* command-line-arguments.[ch]: make arrays of keyword descriptors constDavid Bremner2011-12-13
| | | | | It seems like it should never be necessary to modify these arrays after initialization.
* test: add arg-test to .gitignoreDavid Bremner2011-12-12
| | | | This should have been done when the binary was added, oops.
* build-system: clean $(libutil_modules) rather than listing them individually.David Bremner2011-12-12
| | | | This matches the way the other 'Makefile.local's work.
* cli: factor out config handling code to get/set lists.David Bremner2011-12-12
| | | | | | Two new internal routines are created _config_get_list and _config_set_list; the notmuch_config_get_* functions that deal with lists are simply wrappers for these functions.
* test: add tests for hooksJani Nikula2011-12-11
| | | | Signed-off-by: Jani Nikula <jani@nikula.org>
* cli: add support for pre and post notmuch new hooksJani Nikula2011-12-11
| | | | | | | | | | | | | | Run notmuch new pre and post hooks, named "pre-new" and "post-new", if present in the notmuch hooks directory. The hooks will be run before and after incorporating new messages to the database. Typical use cases for pre-new and post-new hooks are fetching or delivering new mail to the maildir, and custom tagging of the mail incorporated to the database. Also add command line option --no-hooks to notmuch new to bypass the hooks. Signed-off-by: Jani Nikula <jani@nikula.org>
* cli: introduce the concept of user defined hooksJani Nikula2011-12-11
| | | | | | | | | | | | Add mechanism for running user defined hooks. Hooks are executables or symlinks to executables stored under the new notmuch hooks directory, <database-path>/.notmuch/hooks. No hooks are introduced here, but adding support for a hook is now a simple matter of calling the new notmuch_run_hook() function at an appropriate location with the hook name. Signed-off-by: Jani Nikula <jani@nikula.org>
* test: use python2 instead of python if availableThomas Jost2011-12-11
| | | | | | Some distros (Arch Linux) ship Python as python2 and Python 3 as python. Checking for python2 is necessary for the Python tests to work on these platforms.
* test: add a function to run Python testsThomas Jost2011-12-11
| | | | | | | | | | | | | The new test_python() function makes writing Python tests a little easier: - it sets the environment variables as needed - it redirects stdout to the OUTPUT file (like test_emacs()). This commit also declares python as an external prereq. The stdout redirection is required to avoid trouble when running commands like "python 'script' | sort > OUTPUT": in such a case, any error due to a missing external prereq would be "swallowed" by sort, resulting to a failed test instead of a skipped one.
* Release memory allocated by internet_address_list_parse_string()Tomi Ollila2011-12-11
| | | | | | g_object_unref() releases the memory of the InternetAddressList object returned by internet_address_list_parse_string() -- when last (only) reference is released, internet_address_list_finalize() will do cleanup.
* test: cleanup gdb external dependency in atomicity testsDmitry Kurochkin2011-12-11
| | | | | Change atomicity tests to use the new external binary dependencies. This simplifies the code and makes output consistent.
* notmuch-search: convert to command-line-argumentsDavid Bremner2011-12-08
| | | | | | The switch on format_sel is slightly clunky, but it doesn't seem worth special casing argument processing for function pointers, when I think the function pointer approach will be modified/abandoned.
* notmuch-restore: convert to command-line-argumentsDavid Bremner2011-12-08
| | | | | | The new argument handling is a bit more concise, and bit more flexible. It allows the input file name to go before the --accumulate option.
* notmuch-dump: convert to command-line-argumentsDavid Bremner2011-12-08
| | | | | The output file is handled via positional arguments. There are currently no "normal" options.
* test: tests for command-line-arguments.cDavid Bremner2011-12-08
| | | | | This was needed because no current notmuch code exercises the NOTMUCH_OPT_STRING style arguments.
* command-line-arguments.[ch]: new argument parsing framework for notmuch.David Bremner2011-12-08
| | | | | | | | | | As we noticed when Jani kindly converted things to getopt_long, much of the work in argument parsing in notmuch is due to the the key-value style arguments like --format=(raw|json|text). The framework here provides positional arguments, simple switches, and --key=value style arguments that can take a value being an integer, a string, or one of a set of keywords.
* json: date_relative for threadspazz2011-12-07
| | | | | include the date_relative field in the json formated output of notmuch search
* test: date_relative in notmuch search json outputpazz2011-12-07
| | | | | | | | expect the date_relative field for thread entries in notmuch search's json output note from Commiter: we don't have to worry about the date changing because the date in question is more than 180 days old.
* emacs: do not call notmuch show for non-inlinable partsDmitry Kurochkin2011-12-07
| | | | | | | | | | | | | | Before the change, there was a workaround to avoid notmuch show calls for parts with application/* Content-Type. But non-inlinable parts are not limited to this Content-Type (e.g. mp3 files have audio/mpeg Content-Type and are not inlinable). For such parts `notmuch-show-insert-part-*/*' handler is called which unconditionally fetches contents for all parts. The patch moves content fetching from `notmuch-show-insert-part-*/*' to `notmuch-show-mm-display-part-inline' function after MIME inlinable checks are done to avoid useless notmuch show calls. The application/* hack is no longer needed and removed.
* test: check that Emacs UI does not call notmuch for non-inlinable partsDmitry Kurochkin2011-12-07
| | | | | | | | | | The patch adds two new test cases: * Do not call notmuch for non-inlinable application/mpeg parts * Do not call notmuch for non-inlinable audio/mpeg parts The application/mpeg test passes thanks to a workaround for application/* Content-Types. The audio/mpeg is currently broken.
* test: add functions to count how much times notmuch was calledDmitry Kurochkin2011-12-07
| | | | | | | | | | | | | | | | The patch adds two auxiliary functions and a variable: notmuch_counter_reset $notmuch_counter_command notmuch_counter_value They allow to count how many times notmuch binary is called. notmuch_counter_reset() function generates a script that counts how many times it is called and resets the counter to zero. The function sets $notmuch_counter_command variable to the path to the generated script that should be called instead of notmuch to do the counting. The notmuch_counter_value() function returns the current counter value.
* emacs: remove unused variable in `notmuch-show-insert-part-message/rfc822'Dmitry Kurochkin2011-12-07
| | | | | An obvious cleanup. I wonder why there was no warning about this during compilation.
* emacs: remove some code duplication in notmuch-showDmitry Kurochkin2011-12-07
| | | | | | Add optional props argument to `notmuch-show-get-header'. Use it to get headers in `notmuch-show-insert-part-multipart/signed' and `notmuch-show-insert-part-multipart/encrypted'.
* test/symbol-hiding: compare exported symbols with existing oneDavid Bremner2011-12-07
| | | | | We assume that any symbol starting with notmuch_ in lib/*.o should be exported, and that only those symbols should be exported.
* test/symbol-hiding: add some whitespace between testsDavid Bremner2011-12-07
| | | | This is in preparation for adding a third test to this file
* Merge branch 'release'David Bremner2011-12-06
|\ | | | | | | | | | | | | Conflicts: NEWS Conflicts resolved by inserting the 0.10.2 stanza before 0.11
| * test/python: set LD_LIBRARY_PATH and PYTHONPATH to use local notmuchDavid Bremner2011-12-05
| | | | | | | | | | Possibly this should be factored out into some kind of "run_python" function.
| * build system: allow decreasing debian versions for debian-snapshotDavid Bremner2011-12-05
| | | | | | | | | | This allows the debian-snapshot to continue working between when debian/changelog is updated and when the release is tagged.
| * NEWS: add news for 0.10.2David Bremner2011-12-05
| |
| * fixup for changelogDavid Bremner2011-12-05
| |
| * debian/changelog: add new changelog stanza for 0.10.2David Bremner2011-12-05
| |
| * version: bump for bugfix release 0.10.2David Bremner2011-12-05
| |
| * test: add tests for python bindingsDavid Bremner2011-12-05
| | | | | | | | | | | | We start modestly, with a (slightly modified) test case from Kazuo Teramoto. Originally it just made sure the bindings didn't crash; here we check that by comparing the output with that of notmuch search.
| * lib: call g_type_init from notmuch_database_openDavid Bremner2011-12-04
| | | | | | | | | | We want to make sure g_type_init is called before any GObject functionality is used.
* | fix format string in Message.__unicode__Patrick Totzke2011-12-06
| | | | | | | | | | | | | | Since 2b0116119160f2dc83, Message.__str__ doesn't construct a hash containing the thread data before constructing the formatstring. This changes the formatstring to accept positional parameters instead of a hash.
* | contrib/.gitattributes: removeDavid Bremner2011-12-06
| | | | | | | | | | Now that licensing of notmuch-deliver has been harmonized with notmuch, there is no reason not to export it.
* | notmuch-deliver: GPL-3+Ali Polatel2011-12-06
| |
* | notmuch-deliver: Import from maildrop-2.5.5Ali Polatel2011-12-06
| | | | | | | | | | maildrop-2.5.5 is GPL-3. No change in functionality, just a precaution before relicensing.
* | make release: remove LATEST-$(PACKAGE)-*Tomi Ollila2011-12-06
| | | | | | | | | | | | | | The tar file of particular package (notmuch in this case) is named as $(PACKAGE)-$(VERSION).tar.gz. Therefore the best way to remove previous link to LATEST is to remove all files beginning with LATEST-$(PACKAGE)- and not relying how $(VERSION) string is constructed.
* | have LATEST-notmuch-<version>.tar.gz on releases web pageTomi Ollila2011-12-06
| | | | | | | | | | | | | | | | | | | | The notmuchmail/releases page used to have LATEST-notmuch-<version> to link to the latest notmuch source tarball. This is confusing on web page and on disk when the file has been downloaded. This change looks a bit inconsistent with the 'rm' command just executed before. $(TAR_FILE) is defined (currently) as $(PACKAGE)-$(VERSION).tar.gz; as long as the prefix stays $(PACKAGE)-$(VERSION) and version begins with a digit then this line is good in execution point of view.
* | test: add test-binaries targetDavid Bremner2011-12-06
| | | | | | | | | | The goal here is to have a simple way of making sure all of the binaries needed to run tests are available.
* | python: Remove stray debug commentSebastian Spaeth2011-12-06
| | | | | | | | | | | | This slipped in wrongly in commit 71e0082eff (due to my fault). Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | python: use wrapped notmuch_*_t types instead of raw pointersThomas Jost2011-12-06
| | | | | | | | | | | | | | | | Now that types are checked correctly, we also need to make sure that all the arguments actually are instances of these types. Otherwise the function calls will fail and raise an exception similar to this one: ctypes.ArgumentError: argument 3: <type 'exceptions.TypeError'>: expected LP_LP_NotmuchMessageS instance instead of pointer to c_void_p
* | errors='ignore' when decode to unicodePatrick Totzke2011-12-06
| |
* | use __unicode__ for string representationPatrick Totzke2011-12-06
| |
* | clean up Thread.__str__Patrick Totzke2011-12-06
| |
* | python: Return a STATUS value in tags_to_flags and flags_to_tagsSebastian Spaeth2011-12-06
| | | | | | | | | | | | | | We were not returning anything at all, which does not match the API documentation. Fixed. Thanks to Patrick Totzke for the heads up. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | remove unused importsPatrick Totzke2011-12-06
| |
* | fix sphinx compile-time warningsPatrick Totzke2011-12-06
| | | | | | | | | | no changes to the code, only makes compiling the docs smoother as some rsT syntax errors were fixed
* | pep8 fixesPatrick Totzke2011-12-06
| | | | | | | | no changes to the code, only fixed stuff denounced by `pep8 *py`