aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* 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>
* Annotate internal_error with the attribute noreturnGravatar Justus Winter2012-09-27
| | | | | | | | | | | | | Annotating functions that do not return with the noreturn attribute (which is understood by both gcc and clang) prevents static analyzers from generating false positives (internal_error is used to terminate the process and is used extensively in error handling code paths). Remove the return statement that was placed there to appease the compiler. Functions annotated with noreturn are not supposed to return any values. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* Fix the COERCE_STATUS macroGravatar Justus Winter2012-09-27
| | | | | | | | | | Fix the COERCE_STATUS macro to handle _internal_error being declared as void function. Note that the function _internal_error does not return. Evaluating to NOTMUCH_STATUS_SUCCESS is done purely to appease the compiler. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* Extend compat/READMEGravatar Justus Winter2012-09-27
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* Provide a NORETURN_ATTRIBUTE macro similar to PRINTF_ATTRIBUTEGravatar Justus Winter2012-09-27
| | | | | | | | This attribute is understood by gcc since version 2.5. clang provides support for testing for function attributes using __has_attribute. For other compilers this macro evaluates to the empty string. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* Provide a __has_attribute compatibility macroGravatar Justus Winter2012-09-27
| | | | | | | | | __has_attribute is defined by clang and tests whether a given function attribute is supported by clang. Add a compatibility macro for other compilers. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* Run `notmuch-show-hook' after setting `header-line-format'Gravatar Damien Cassou2012-09-27
| | | | | | | This patch makes it possible for notmuch-show hooks to change the header line. Signed-off-by: Damien Cassou <damien.cassou@gmail.com>
* emacs: add support for reversing notmuch-show-mark-read tag changesGravatar Jani Nikula2012-09-19
| | | | | | | | | | Since marking a message as read can now be a user customized set of tag changes, make reversing this easier. Allow a prefix argument to notmuch-show-mark-read to reverse the marking as read, similar to the unarchiving in notmuch-show-archive-message. While at it, update the relevant documentation to match that of other automatic tagging (i.e. archive and reply).
* emacs: add support for reversing notmuch-search-archive-thread tag changesGravatar Jani Nikula2012-09-19
| | | | | | | Since archiving a thread can now be a user customized set of tag changes, make reversing this easier. Allow a prefix argument to notmuch-search-archive-thread to reverse the archiving, similar to the unarchiving in notmuch-show-archive-message.
* emacs: add support for custom tag changes on message/thread archiveGravatar Jani Nikula2012-09-19
| | | | | | | Add support for customization of the tag changes that are applied when a message or a thread is archived. Instead of hard-coded removal of the "inbox" tag, the user can now specify a list of tag changes to perform.
* emacs: use new tag change helper to mark messages as repliedGravatar Jani Nikula2012-09-19
| | | | Clarify documentation while at it.
* emacs: fix notmuch-message-replied-tags defcustom typeGravatar Jani Nikula2012-09-19
|
* emacs: add helper for tag change list manipulationGravatar Jani Nikula2012-09-19
| | | | Add a helper to create (and optionally reverse) a list of tag changes.
* {., man}/Makefile.local: edit/remove release-checks.sh related targetsGravatar Tomi Ollila2012-09-05
| | | | | | | Use new target release-checks in place of verify-version-debian, verify-version-python verify-version-manpage. This target executes devel/release-checks.sh which does all the verifications the three dropped targets did, and some more.
* devel: add release-checks.shGravatar Tomi Ollila2012-09-05
| | | | | | | | | | | | | | | | | | | | | | Currently Makefile.local contains some machine executable release checking functionality. This is unnecessarily complex way to do it: Multiline script functionality is hard to embed -- from Makefile point of view there is just one line split using backslashes and every line ends with ';'. It is hard to maintain such "script" when it gets longer. The embedded script does not fail as robust as separate script; set -eu could be added to get same level of robustness -- but the provided Bourne Again Shell (bash) script exceeds this with 'set -o pipefail', making the script to fail when any of the commands in pipeline fails (and not just the last one). Checking for release is done very seldom compared to all other use; The whole Makefile.local gets simpler and easier to grasp when most release checking targets are removed. When release checking is done, the steps are executed sequentially; nothing is allowed to be skipped due to some satisfied dependency.
* test/atomicity: use a more portable 'cp' formGravatar Mike Kelly2012-09-01
| | | | | | | | -a already implies -r/-R, so no need for both. FreeBSD's cp complains: cp: the -R and -r options may not be specified together
* test/basic: use portable args for findGravatar Mike Kelly2012-09-01
| | | | | `-executable` isn't available in FreeBSD's version of find, so use a more portable version, `-perm +111`.
* tests: Test against source man pages.Gravatar Mike Kelly2012-09-01
| | | | | Without this, help-test tests against the installed man pages, rather than the default ones.
* test/smtp-dummy.c: fix compilation on FreeBSDGravatar Mike Kelly2012-09-01
| | | | | Use the more portable netint/in.h, instead of netint/ip.h, to include htons(3), etc.
* test/Makefile.local: Use $(XAPIAN_LDFLAGS) for symbol-testGravatar Mike Kelly2012-09-01
| | | | | | On FreeBSD, and probably anywhere else someone installed xapian to some other prefix, we need to use XAPIAN_LDFLAGS to make the linker can actually find libxapian.
* configure: Add support for FreeBSD.Gravatar Mike Kelly2012-09-01
| | | | | This makes FreeBSD a recognized platform. Follow up patches make it work properly.
* test: make test_expect_equal_file() arguments flexibleGravatar Dmitry Kurochkin2012-09-01
| | | | | | | | | | | | | | | | | | | | | | | Before the change, test_expect_equal_file() function treated the first argument as "actual output file" and the second argument as "expected output file". When the test fails, the files are copied for later inspection. The first files was copied to "$testname.output" and the second file to "$testname.expected". The argument order for test_expect_equal_file() is often wrong which results in confusing diff output and incorrectly named files. The patch solves the issue by changing test_expect_equal_file() to treat arguments just as two files, without any special properties (like "actual" and "expected"). The file names for copying is now based on the given file name: "$testname.$file1" and "$testname.$file2". E.g. if test_expect_equal_file() is called with "OUTPUT" and "EXPECTED", the copied files can be named "emacs.1.OUTPUT" and "emacs.1.EXPECTED". The down side of this approach is that diff argument order depends on test_expect_equal_file() argument order. So sometimes we get diff from expected to actual results, and sometimes the other way around. But the files are always named correctly.
* emacs: correct `notmuch-search-mode's docstring wrt `notmuch-search-tag-all'Gravatar Pieter Praet2012-09-01
| | | | | | | * emacs/notmuch.el (notmuch-search-mode): `notmuch-search-tag-all' currently uses the current query string instead of `notmuch-search-find-thread-id-region-search', which might cause a race condition.
* cli: make the command line parser's errors more informative.Gravatar Mark Walters2012-09-01
| | | | | | | | | | | Previously, the cli parser was a little erratic in what errors it reported and would fail silently in many cases (for example, when no argument was passed to an integer option). This was particularly annoying as the user could not (easily) tell whether the command failed or just there were no search results. This patch tries to make the handling consistent and return a helpful error message in all cases.
* lib: fix NULL checks for filenames iteratorsGravatar Sascha Silbe2012-09-01
| | | | | | | | The API documentation (notmuch.h) states that the parameter may be NULL, but the implementation only checked the current element, potentially dereferencing a NULL pointer in the process. Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
* emacs: make notmuch-show return its bufferGravatar Mark Walters2012-09-01
| | | | | notmuch-pick uses the returned buffer to try and make sure it does not close the wrong buffer.
* contrib/nmbug/nmbug-status: if realname empty, use part of mailaddrGravatar Tomi Ollila2012-09-01
| | | | | | | When the From: field in patch email does not contain 'realname' field, the patch listing does not show anything as patch sender. In this case use the part before '@' in mail address as the sender identification in patch listing.
* test: use (format "%S") to print nil in emacs test.Gravatar David Bremner2012-08-30
| | | | | | | | The behaviour of "emacsclient --eval nil" changed from emacs23 to emacs24, and in emacs24 it prints 'nil' rather than an empty string. (format "%S" foo) produces a sexpr form of foo, and is consistent between the two versions.
* test: canonicalize content-type in "Sending a message via (fake) SMTP"Gravatar David Bremner2012-08-30
| | | | | | | The version of message.el in emacs24 omits the charset=us-ascii, causing the current version of this test to fail. With this patch, we accept either option. According to RFC 2046, they are semantically equivalent.
* test: emacs: run list-processes after accept-process-output in emacs 23.1Gravatar Tomi Ollila2012-08-29
| | | | | | | | | | | | | | When running emacs tests using emacs 23.1.1 the tests block (until timeout) when emacs function (notmuch-test-wait) is called. There is an emacs bug #2930 titled: 23.0.92; `accept-process-output' and `sleep-for' do not run sentinel It seems this is present in emacs 23.1. Calling list-processes after accept-process-output seems work around this problem; in case Emacs version is 23.1 a defadvice is activated to do just that.