aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* Introduce a generic tree-like abstraction for MIME traversal.Gravatar Austin Clements2011-12-25
| | | | | | | | | | | | | | This wraps all of the complex MIME part handling in a single, simple function that gets part N from *any* MIME object, so traversing a MIME part tree becomes a two-line for loop. Furthermore, the MIME node structure provides easy access to envelopes for message parts as well as cryptographic information. This code is directly derived from the current show_message_body code (much of it is identical), but the control relation is inverted: instead of show_message_body controlling the traversal of the MIME structure and invoking callbacks, the caller controls the traversal of the MIME structure.
* show: Pass notmuch_message_t instead of path to show_message_body.Gravatar Austin Clements2011-12-25
| | | | | In addition to simplifying the code, we'll need the notmuch_message_t* in show_message_body shortly.
* emacs: fix docstring for `notmuch-search-line-faces'.Gravatar Dmitry Kurochkin2011-12-24
| | | | | | | | | | | | | | Examples in documentation for `notmuch-search-line-faces' had an extra quote, e.g.: '(\"unread\" . '(:foreground \"green\")) Which resulted in values like: (\"unread\" quote (:foreground \"green\")) And tons of "Invalid face reference: quote" errors in the messages buffer.
* emacs: call notmuch-show instead of notmuch-search in buttonised id: linksGravatar Jameson Graef Rollins2011-12-24
| | | | | | | Since message-ids necessarily match just a single message, there's no reason to do a search for the id before viewing the actual message; the search just becomes an extra screen to click through. Clicking on an id: links now just jumps straight to the message itself.
* Fix comments about what is stored in the databaseGravatar Thomas Jost2011-12-23
| | | | | | Commit 567bcbc2 introduced two new values for each message (content of the "From" and "Subject" headers), but the comments about the database schema had not been updated accordingly.
* emacs: fix off-by-one bug in notmuch-show-archiveGravatar Aaron Ecay2011-12-23
| | | | | | Text properties change between characters; prev-s-c-property-change returns the position after the change. Thus, it is still inside the invisible region.
* emacs: put the last search on top of recent searches in notmuch-helloGravatar Dmitry Kurochkin2011-12-22
| | | | | | | | Notmuch-hello stores a list of recent searches. Before the change, if a search from this list is repeated, the recent search list is not changed. The patch makes repeated recent searches move to the head of the list. I.e. the last search is always on top of the recent search list, which is what one would expect from a history list.
* test: add test for `notmuch-hello-refresh-hook'Gravatar Dmitry Kurochkin2011-12-22
| | | | | | | | Test that `notmuch-hello-refresh-hook' is called once when `notmuch-hello' is called and twice when calling `notmuch-hello-update' after that. The tests are very similar to tests for `notmuch-hello-mode-hook'.
* test: add general Emacs hook counterGravatar Dmitry Kurochkin2011-12-22
| | | | | Replace `notmuch-hello-mode-hook-counter' with general `hook-counter' and `add-hook-counter' functions to allow counting calls for any hook.
* emacs: Change the default thousands separator to a spaceGravatar Thomas Jost2011-12-22
| | | | | | | | | | | | | This had been discussed and decided on IRC. Rationale: Therefore the space is recommended in the SI/ISO 31-0 standard, and the International Bureau of Weights and Measures states that "for numbers with many digits the digits may be divided into groups of three by a thin space, in order to facilitate reading. Neither dots nor commas are inserted in the spaces between groups of three". (http://en.wikipedia.org/wiki/Decimal_separator#Digit_grouping)
* emacs: rename notmuch-decimal-separator to notmuch-hello-thousands-separatorGravatar Thomas Jost2011-12-22
| | | | In 123,456.78, "." is the decimal separator, but "," is the thousands separator.
* emacs: Don't prompt the user to choose from zero matching addresses.Gravatar David Edmondson2011-12-22
| | | | | | If the address matching function generates no matches, don't prompt the user to choose between them (!). Instead, generate a message to report that there were no matches.
* emacs: Fix notmuch-mua-user-agent defcustomGravatar Jani Nikula2011-12-22
| | | | | | | | | The :options keyword is not meaningful for function type. Also, it was not possible to enter nil value, contrary to the notmuch-mua-user-agent defcustom documentation. Specify the alternatives using choice type, taking nil into account. Signed-off-by: Jani Nikula <jani@nikula.org>
* emacs: Fix notmuch-hello-tag-list-make-query defcustomGravatar Jani Nikula2011-12-22
| | | | | | | It was not possible to define custom filters or filter functions because the types were const. Remove const to allow editing. Signed-off-by: Jani Nikula <jani@nikula.org>
* emacs: add notmuch-hello-refresh-hookGravatar Thomas Jost2011-12-21
| | | | This hook is called every time a notmuch-hello buffer is updated.
* notmuch: Quiet buildbot warnings.Gravatar David Edmondson2011-12-21
| | | | | Cast away the result of various *write functions. Provide a default value for some variables to avoid "use before set" warnings.
* Don't quote lambda formsGravatar Aaron Ecay2011-12-21
| | | | | | This generates byte-compiler warnings on (at least) current trunk versions of Emacs. The quote is not necessary; lambda forms are self-quoting.
* emacs: Add `notmuch-jump-to-recent-buffer'.Gravatar David Edmondson2011-12-20
| | | | | | | | | From a Carl Worth idea: add a function which will select the most recently used notmuch buffer (search, show or hello). If no recent buffer is found, run `notmuch'. It is expected that the user will global bind this command to a key sequence.
* emacs: do not call `notmuch-hello-mode' on updateGravatar Dmitry Kurochkin2011-12-20
| | | | | | | | | | | `notmuch-hello' should call `notmuch-hello-mode' function only when run for the first time. But before the change, `notmuch-hello' used `kill-all-local-variables' to remove editable widgets fields. This caused the major mode to be reset, and `notmuch-hello-mode' to be called every time. The patch manually deletes all editable widget fields and removes `kill-all-local-variables' call.
* test: add broken test for `notmuch-hello-mode-hook' called during updateGravatar Dmitry Kurochkin2011-12-20
| | | | | Test that `notmuch-hello-mode-hook' is not called during `notmuch-hello' buffer updates. The test is currently broken.
* test: add test for `notmuch-hello-mode-hook'Gravatar Dmitry Kurochkin2011-12-20
| | | | | Test that `notmuch-hello-mode-hook' is called once when `notmuch-hello' function is called.
* test: add `notmuch-hello-mode-hook-counter'Gravatar Dmitry Kurochkin2011-12-20
| | | | | | | Add `notmuch-hello-mode-hook-counter' hook to count how many times `notmuch-hello-mode-hook' was called. The counter function increments `notmuch-hello-mode-hook-counter' variable value if it is bount, otherwise it does nothing.
* Add an argument to notmuch-mua-mailGravatar Aaron Ecay2011-12-18
| | | | | | | | | | | | | | | | | | | | | From the emacs changelog: ** `compose-mail' now accepts an optional 8th arg, RETURN-ACTION, and passes it to the mail user agent function. This argument specifies an action for returning to the caller after finishing with the mail. This is currently used by Rmail to delete a mail window. Under Emacs 24, notmuch breaks when this argument is passed to it by a function in another part of Emacs. One example of a functon that does this is report-emacs-bug -- so notmuch users cannot file emacs bug reports! This patch also adds a &rest argument to the arg-list of this function, to future-proof against such changes. This is adapted from the approach taken by message-mail, a similar function built into emacs. This patch was originally submitted by richardmurri@gmail.com on Aug. 1: id:"877h6x6oor.fsf@veracitynetworks.com"
* build-system: use a shell variable for TMPFILE in debian-snapshotGravatar David Bremner2011-12-18
| | | | | | | | | | | | | | | Aaron Ecay points out in id:"1324136185-4509-1-git-send-email-aaronecay@gmail.com" that the mktemp in debian-snapshot: TMPFILE := $(shell mktemp) Is being evaluated for every target. As best I can tell, this is because make is evaluating the right hand side, even though it is not doing the assignment. Of course, it isn't quite as nice to edit with the line continuations, but it is ideomatic make.
* test: optionally print subtest numberGravatar David Bremner2011-12-18
| | | | | | | The idea is that $test_count could be used in tests to label intermediate files. The output enabled by this patch (and --debug) helps figure out which OUTPUT.nn file belongs to which test in case several subtests write to OUTPUT.$test_count
* Fix build with binutils-2.22Gravatar Thomas Jost2011-12-17
| | | | | | | | | | | | | | | | | | | binutils-2.22 changes the behaviour of ld by defaulting to --no-copy-dt-needed-entries, which means that required objects/libs are not "indirectly" linked through intermediate objects/libs anymore. As a consequence, when using binutils-2.22, building symbol-test fails with the following error: /usr/bin/ld: test/symbol-test.o: undefined reference to symbol 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()@@GLIBCXX_3.4' /usr/bin/ld: note: 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()@@GLIBCXX_3.4' is defined in DSO /usr/lib/libstdc++.so.6 so try adding it to the linker command line /usr/lib/libstdc++.so.6: could not read symbols: Invalid operation An easy fix is to link using CXX instead of CC.
* Ignore dynamic libraries on OS X.Gravatar Aaron Ecay2011-12-17
| | | | Parallel to ignoring .so for linux.
* emacs: Add notmuch-hello-mode-hookGravatar Ivy Foster2011-12-16
| | | | Functions called after entering `notmuch-hello-mode'
* emacs: Document notmuch-show-get-message-propertiesGravatar Daniel Schoepe2011-12-16
|
* emacs: Add a face for crypto parts headersGravatar Thomas Jost2011-12-15
| | | | | | Commit cb841878 introduced new parts handlers for crypto parts, but also hardcoded values for their headers face. This replaces these hardcoded values with a customizable face.
* Revert "test: add emacs test for hiding a message following an HTML part"Gravatar David Bremner2011-12-15
| | | | | | | | | | | This reverts commit c6a3a768fef9f59f483af04f4418d350efc27968. This test is unreliable, showing BROKEN in some environments and FIXED in others. The confusion seems to outweigh the benefits, for now. Conflicts: test/emacs
* notmuch: unref charset_filter to fix one memory leakGravatar Tomi Ollila2011-12-15
| | | | | | In my test case added g_object_unref(charset_filter) reduces memory consumption over 90% when 'notmuch show --format=text "*"' is executed (~11000 messages, RES ~330M -> ~25M).
* emacs: support "notmuch new" as a notmuch-poll-scriptGravatar Jani Nikula2011-12-15
| | | | | | | | | | | Support nil value for notmuch-poll-script to run "notmuch new" instead of an external script, and make this the new default. "notmuch new" is run using the configured notmuch-command. This allows taking better advantage of the "notmuch new" hooks from emacs without intermediate scripts. Signed-off-by: Jani Nikula <jani@nikula.org>
* debian: add upstream-tag and fix debian-tag configs for git-buildpackageGravatar Jameson Graef Rollins2011-12-15
| | | | Debian tags have been using '/', instead of '-' as a separator.
* command-line-arguments.[ch]: make arrays of keyword descriptors constGravatar David Bremner2011-12-13
| | | | | It seems like it should never be necessary to modify these arrays after initialization.
* test: add arg-test to .gitignoreGravatar David Bremner2011-12-12
| | | | This should have been done when the binary was added, oops.
* build-system: clean $(libutil_modules) rather than listing them individually.Gravatar David Bremner2011-12-12
| | | | This matches the way the other 'Makefile.local's work.
* cli: factor out config handling code to get/set lists.Gravatar 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 hooksGravatar Jani Nikula2011-12-11
| | | | Signed-off-by: Jani Nikula <jani@nikula.org>
* cli: add support for pre and post notmuch new hooksGravatar Jani 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 hooksGravatar Jani 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 availableGravatar Thomas 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 testsGravatar Thomas 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()Gravatar 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 testsGravatar Dmitry 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-argumentsGravatar David 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-argumentsGravatar David 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-argumentsGravatar David Bremner2011-12-08
| | | | | The output file is handled via positional arguments. There are currently no "normal" options.
* test: tests for command-line-arguments.cGravatar David 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.Gravatar 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.