aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* show: More aggressively document the presence of devel/schemataGravatar Austin Clements2012-11-08
| | | | | | | Previously, the only mention of devel/schemata was a comment at the top of format_part_json, but the JSON output code is spread across several functions that are distributed across notmuch-show.c. Add references from the other three key JSON output functions.
* devel: Add Reply-to to the schemataGravatar Austin Clements2012-11-08
| | | | The code got out of sync with the documentation in 7d3c06dc.
* emacs/notmuch-show.el: handle bodypart insert errorGravatar Tomi Ollila2012-11-07
| | | | | | When inserting of email bodypart failes, insert a failure message to the buffer (and continue) instead of halting the insertion of the rest of that email thread in question.
* test: add test for showing Reply-To headersGravatar Peter Wang2012-11-07
| | | | | Test that show --format=json now outputs Reply-To header fields when present.
* show: include Reply-To header in json outputGravatar Peter Wang2012-11-07
| | | | | | | Output the Reply-To header field if present in a message. I want to be able to see what the sender intended in my mail client, before hitting the reply key. Only json output is changed, like the recently added Bcc field.
* uncrustify.cfg: added 3 new types for uncrustify to knowGravatar Tomi Ollila2012-11-07
| | | | | | | Added FILE, notmuch_show_params_t and sprinter_t to be types when uncrustifying sources. This affect spacing when uncrustify is deciding for type declaration instead of binary multiplication operation.
* test: add tests for date:since..until range queriesGravatar Jani Nikula2012-10-31
| | | | A brief initial test set.
* NEWS: date range search supportGravatar Jani Nikula2012-10-31
|
* man: document the date:since..until range queriesGravatar Jani Nikula2012-10-31
|
* lib: add date range query supportGravatar Jani Nikula2012-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a custom value range processor to enable date and time searches of the form date:since..until, where "since" and "until" are expressions understood by the previously added date/time parser, to restrict the results to messages within a particular time range (based on the Date: header). If "since" or "until" describes date/time at an accuracy of days or less, the values are rounded according to the accuracy, towards past for "since" and towards future for "until". For example, date:november..yesterday would match from the beginning of November until the end of yesterday. Expressions such as date:today..today means since the beginning of today until the end of today. Open-ended ranges are supported (since Xapian 1.2.1), i.e. you can specify date:..until or date:since.. to not limit the start or end date, respectively. CAVEATS: Xapian does not support spaces in range expressions. You can replace the spaces with '_', or (in most cases) '-', or (in some cases) leave the spaces out altogether. Entering date:expr without ".." (for example date:yesterday) will not work as you might expect. You can achieve the expected result by duplicating the expr both sides of ".." (for example date:yesterday..yesterday). Open-ended ranges won't work with pre-1.2.1 Xapian, but they don't produce an error either. Signed-off-by: Jani Nikula <jani@nikula.org>
* build: build parse-time-string as part of the notmuch lib and static cliGravatar Jani Nikula2012-10-31
|
* test: add smoke tests for the date/time parser moduleGravatar Jani Nikula2012-10-31
| | | | | | | | Test the date/time parser module directly, independent of notmuch, using the parse-time test tool. Credits to Michal Sojka <sojkam1@fel.cvut.cz> for writing most of the tests.
* test: add new test tool parse-time for date/time parserGravatar Jani Nikula2012-10-31
| | | | | | | | Add a smoke testing tool to support testing the date/time parser module directly and independent of the rest of notmuch. Credits to Michal Sojka <sojkam1@fel.cvut.cz> for the stdin parsing idea and consequent massive improvement in testability.
* parse-time-string: add a date/time parser to notmuchGravatar Jani Nikula2012-10-31
| | | | | | | | | Add a date/time parser to notmuch, to be used for adding date range query support for notmuch lib later on. Add the parser to a directory of its own to make it independent of the rest of the notmuch code base. Signed-off-by: Jani Nikula <jani@nikula.org>
* build: drop the -Wswitch-enum warningGravatar Jani Nikula2012-10-31
| | | | | | | | | | | | | | -Wswitch-enum is a bit awkward if a switch statement is intended to handle just some of the named codes of an enumeration especially, and leave the rest to the default label. We already have -Wall, which enables -Wswitch by default, and per GCC documentation, "The only difference between -Wswitch and this option [-Wswitch-enum] is that this option gives a warning about an omitted enumeration code even if there is a default label." Drop -Wswitch-enum to not force listing all named codes of enumerations in switch statements that have a default label.
* emacs: Move the incremental JSON parser to notmuch-lib.elGravatar Mark Walters2012-10-28
| | | | | | | This just moves the newly split out incremental json parser (together with its state variables) to lib. There should be no functional change.
* emacs: Rename incremental JSON internal variablesGravatar Mark Walters2012-10-28
| | | | | | This patch just renames the internal variables for the JSON parser now it is no longer specific to search mode. It also fixes up the white space after the previous patch. There should be no functional changes.
* emacs: Split out the incremental json parser into its own functionGravatar Mark Walters2012-10-28
| | | | | | | | | | | | | | | | | This patch splits out the incremental json parser into its own function. It moves the main logic of the parser to happen inside the parse buffer rather than inside the results buffer, but makes sure all results and all errors are displayed in the results buffer. It also changes the local parser variables from being buffer local to the results buffer to being buffer local to the parse buffer, and sets them up automatically so the caller does not need to. Finally to keep the diff small this patch does not fix the whitespace, nor complete the code movement (these are done in subsequent patches) but it should contain all the functional changes.
* contrib: add pick TODO fileGravatar Mark Walters2012-10-28
|
* contrib: add pick README.Gravatar Mark Walters2012-10-28
|
* contrib: add notmuch-pick.el file itselfGravatar Mark Walters2012-10-28
| | | | This adds the main notmuch-pick.el file.
* Support OpenBSDGravatar Austin Clements2012-10-27
| | | | | | | | OpenBSD's build flags are identical to FreeBSD, except that libraries need to be explicitly linked against libc. No code changes are necessary. From: Cody Cutler <ccutler@csail.mit.edu>
* emacs: Escape tag queries suggested by tab completionGravatar Austin Clements2012-10-27
|
* emacs: Escape tag queries performed by helloGravatar Austin Clements2012-10-27
|
* emacs: Introduce generic boolean term escaping functionGravatar Austin Clements2012-10-27
| | | | | | | Currently, we only properly escape stashed id queries, but there are other places where the Emacs UI constructs queries for boolean terms. Since this escaping function is meant to be used in other places, it avoids escaping strings that don't need escaping.
* News for restrictions on tag namesGravatar Austin Clements2012-10-27
|
* tag: Disallow adding malformed tags to messagesGravatar Austin Clements2012-10-27
| | | | | | | | | | | | This disallows adding empty tags, since nothing but confusion follows in their wake, and disallows adding tags that begin with "-" because they are also confusing, the tag "-" is impossible to remove using the CLI, and because the syntax for removing such tags conflicts with long argument syntax. This does not place any restrictions on what tags can be removed, as that would make it difficult for people who have the misfortune of already having malformed tags to remove these tags.
* contrib/nmbug/nmbug-status: combine thread messagesGravatar Tomi Ollila2012-10-24
| | | | | | | | | | | Newer patch email containing In-Reply-To: to an email sent some time ago (i.e. to a "thread") was not visible in that "thread" in patch view when another patch "thread" was submitted in between. This change collects all messages in every (notmuch-created) thread together before printing all these threads out in a patch view. Thanks to Ethan Glasser-Camp for initial review and suggestions with code examples.
* contrib/nmbug/nmbug-status: added table of viewsGravatar Tomi Ollila2012-10-24
| | | | | | | In latest configuration quite a few long views were added to the Notmuch Patches page. To ease navigating to the views a 'Views' section was added to the beginning of page containing hyperlink to every view.
* notmuch-show: include Bcc header in json outputGravatar Michal Nazarewicz2012-10-22
| | | | | With this change, emacs users can use notmuch-message-headers variable to configure notmuch-show display Bcc header.
* test: new: Fix intermittent test failures with --debugGravatar Ethan Glasser-Camp2012-10-22
| | | | | | | | | | | | | Although messages are created in a particular order, it seems that when they are created on a tmpfs, they do not always come back in the same order, leading to the same files being ignored but being output in a different order. This causes the test to fail because the outputs being compared are the same. Fix the failures by sorting the output of notmuch --debug and comparing this to a hand-sorted version of its output. Signed-off-by: Ethan Glasser-Camp <ethan@betacantrips.com>
* test/test-lib.sh: take the --background feature in smtp-dummy into useGravatar Tomi Ollila2012-10-20
| | | | | | | | | | | | | | The use of --background option (instead of shell '&') ensures that smtp-dummy is listening its server socket until execution of shell script can continue, thus the client will always have socket where to connect. smtp-dummy outputs smtp_dummy_pid variable in shell assignment format; eval'ing that output makes that variable available for the shell. As the smtp-dummy instance is no longer child process of the script the SIGKILL signal sent to it will ensure it is going away in case the mail sender fails to connect to smtp-dummy.
* test/smtp-dummy: add --background option and functionalityGravatar Tomi Ollila2012-10-20
| | | | | | | | | | | | When shell executes background process using '&' the scheduling of that new process is arbitrary. It could be that smtp-dummy doesn't get execution time to listen() it's server socket until some other process attempts to connect() to it. The --background option in smtp-dummy makes it to go background *after* it started to listen its server socket. When --background option is used, the line "smtp_dummy_pid='<pid>'" is printed to stdout from where shell can eval it.
* test: another test wrt ignoring user-specified files and directoriesGravatar Pieter Praet2012-10-20
| | | | | | | | Demonstrates that *every* file/directory which matches one of the values in 'new.ignore' will be ignored, independent of its depth/location in the mail store. Signed-off-by: Ethan Glasser-Camp <ethan@betacantrips.com>
* test-lib.sh: pass 'NOTMUCH_NEW's args down to 'notmuch new'Gravatar Pieter Praet2012-10-20
| | | | | | | Obviates the need to create a 'NOTMUCH_NEW' clone which runs 'notmuch new --debug'. This will be used in a later patch. Doesn't cause any issues for other tests.
* cli: notmuch new: optionally output debug information when ignoring ↵Gravatar Pieter Praet2012-10-20
| | | | | | | files/directories When running 'notmuch new' with the '--debug' option, output debug information regarding explicitly ignored files and directories.
* cli: add '--debug' option to 'notmuch new'Gravatar Pieter Praet2012-10-20
| | | | | This will be used in later patches to test the 'new.ignore' config option more thoroughly.
* emacs: rename `notmuch-show-toggle-headers' to ↵Gravatar Pieter Praet2012-10-20
| | | | | | | | | | | | | | | | | | | | | | | | `notmuch-show-toggle-visibility-headers' * emacs/notmuch-show.el (notmuch-show-toggle-headers): Rename to `notmuch-show-toggle-visibility-headers'. (notmuch-show-mode-map): Update "h" binding wrt renamed `notmuch-show-toggle-headers'. (notmuch-message-headers): Update docstring wrt renamed `notmuch-show-toggle-headers'. (notmuch-message-headers-visible): Update docstring wrt renamed `notmuch-show-toggle-headers'. Also fixed a small typo. * test/emacs: Update subtest wrt renamed `notmuch-show-toggle-headers': - "notmuch-show: hide message headers (w/ notmuch-show-toggle-headers)"
* test: emacs: new tests "notmuch-show: {, un}collapse all messages in thread"Gravatar Pieter Praet2012-10-20
| | | | | | | | | | | | * test/emacs: - New subtest "notmuch-show: collapse all messages in thread": `notmuch-show-open-or-close-all' with prefix arg ("C-u M-RET") collapses all messages in thread. - New subtest "notmuch-show: uncollapse all messages in thread": `notmuch-show-open-or-close-all' without prefix arg ("M-RET") uncollapses all messages in thread.
* test: emacs: new tests "notmuch-show: {show, hide} message headers"Gravatar Pieter Praet2012-10-20
| | | | | | | | | | | | | | | | | | | * test/emacs: - New subtest "notmuch-show: show message headers": Setting `notmuch-message-headers-visible' to t causes all headers defined in `notmuch-message-headers' to be shown. - New subtest "notmuch-show: hide message headers": Setting `notmuch-message-headers-visible' to nil causes all headers defined in `notmuch-message-headers' to be hidden. ("Subject:" may be an exception; See the use of `headers-start' in `notmuch-show-insert-msg') - New subtest "notmuch-show: hide message headers (w/ notmuch-show-toggle-headers)": Setting `notmuch-message-headers-visible' to t causes all headers defined in `notmuch-message-headers' to be shown, but they can be hidden for the current message by running `notmuch-show-toggle-headers'.
* test: Move tests from emacs to emacs-showGravatar Ethan Glasser-Camp2012-10-18
| | | | | | | | | | | | | | | | | | | | | This requires changing the contents of the crypto tests, as one thread that was marked read by the earlier tests in test/emacs is no longer marked read. This moves tests for: - 09d19ac "test: emacs: toggle eliding of non-matching messages in `notmuch-show'", which should have actually read: "test: emacs: toggle processing of cryptographic MIME parts in `notmuch-show'". See commit 19ec74c5. - 5ea1dbe "test: emacs: toggle eliding of non-matching messages in `notmuch-show'" - 345faab "test: emacs: toggle thread content indentation in `notmuch-show'" Signed-off-by: Ethan Glasser-Camp <ethan@betacantrips.com>
* test: handle filenames that have directories in themGravatar Ethan Glasser-Camp2012-10-18
| | | | | | | | Since $TEST_DIRECTORY is an absolute path, any filenames generated with it will be complete paths. Only use the basename to generate suffixes for filenames. Signed-off-by: Ethan Glasser-Camp <ethan@betacantrips.com>
* test: emacs: toggle thread content indentation in `notmuch-show'Gravatar Pieter Praet2012-10-17
| | | | See commit c205e8ff.
* test: emacs: toggle eliding of non-matching messages in `notmuch-show'Gravatar Pieter Praet2012-10-17
| | | | See commits 44a544ed, 866ce8b1, 668b66ec.
* test: emacs: toggle eliding of non-matching messages in `notmuch-show'Gravatar Pieter Praet2012-10-17
| | | | | | See commits 44a544ed, 866ce8b1, 668b66ec. Signed-off-by: Ethan Glasser-Camp <ethan@betacantrips.com>
* emacs: Work around gnus-inhibit-images bug in mm-shrGravatar Austin Clements2012-09-30
| | | | | | | | | | | | | Emacs 24's mm-shr HTML email renderer fails to load gnus-art before referencing gnus-inhibit-images, resulting in a void-variable error when notmuch attempts to render an HTML email with inline images. This works around this bug by advising mm-shr to load gnus-art. mm-shr is the only function outside of gnus-art itself that references gnus-inhibit-images, so this workaround should be correct. If this ever changes, hopefully they will have fixed this bug upstream first. This fixes the "Rendering HTML mail with images" test for Emacs 24.
* test: Add a test for HTML email with inline imagesGravatar Austin Clements2012-09-30
| | | | | Currently this test passes in Emacs 23 but fails in Emacs 24 (at least on some Linux distributions).
* test: Clear test-output output file before running Emacs testsGravatar Austin Clements2012-09-30
| | | | | | | | | | | | Most Emacs tests end with a call to (test-output), which saves the buffer to a filed called OUTPUT. Previously, if the test code failed with an exception before this call, the test framework would then compare against the OUTPUT file from the last Emacs test, resulting in confusing diffs. This requires one tweak to an emacs test that made two calls to test_emacs and expected an OUTPUT file from the first call. We simply reverse the order of the test_emacs calls.
* emacs: simplify point placement in notmuch-hello refreshGravatar Jani Nikula2012-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | notmuch-hello (called also through notmuch-hello-update, bound to '=' by default) tries to find the widget under or following point before refresh, and put the point back to the widget afterwards. The code has grown quite complicated, and has at least the following issues: 1) All the individual section functions have to include code to support point placement. If there is no such support, point is dropped to the search box. Only saved searches and all tags sections support point placement. 2) Point placement is based on widget-value. If there are two widgets with the same widget-value (for example a saved search with the same name as a tag) the point is moved to the earlier one, even if point was on the later one. 3) When first entering notmuch-hello notmuch-hello-target is nil, and point is dropped to the search box. Moving the point to the search box is annoying because the user is required to move the point before being able to enter key bindings. Simplify the code by removing all point placement based on widgets, as it does not work properly, and trying to fix that would unnecessarily complicate the code. Save current line and column before refresh, and restore them afterwards. Sometimes, if notmuch-show-empty-saved-searches is nil, and the refresh adds or removes saved searches from the list, this has the appearance of moving the point relative to the nearest widgets. This is a much smaller and less frequent problem than the ones listed above.
* Avoid potentially dereferencing a NULL pointerGravatar Justus Winter2012-09-27
| | | | | | | | | | | | GMIME_IS_MULTIPART and GMIME_IS_MESSAGE both handle NULL pointers gracefully, but the G_OBJECT_TYPE used in the error handling block dereferences it without checking it first. Fix this by checking whether parent->part is valid. Found using the clang static analyzer. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>