aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-09-27Annotate internal_error with the attribute noreturnJustus Winter
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>
2012-09-27Fix the COERCE_STATUS macroJustus Winter
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>
2012-09-27Extend compat/READMEJustus Winter
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-09-27Provide a NORETURN_ATTRIBUTE macro similar to PRINTF_ATTRIBUTEJustus Winter
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>
2012-09-27Provide a __has_attribute compatibility macroJustus Winter
__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>
2012-09-27Run `notmuch-show-hook' after setting `header-line-format'Damien Cassou
This patch makes it possible for notmuch-show hooks to change the header line. Signed-off-by: Damien Cassou <damien.cassou@gmail.com>
2012-09-19emacs: add support for reversing notmuch-show-mark-read tag changesJani Nikula
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).
2012-09-19emacs: add support for reversing notmuch-search-archive-thread tag changesJani Nikula
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.
2012-09-19emacs: add support for custom tag changes on message/thread archiveJani Nikula
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.
2012-09-19emacs: use new tag change helper to mark messages as repliedJani Nikula
Clarify documentation while at it.
2012-09-19emacs: fix notmuch-message-replied-tags defcustom typeJani Nikula
2012-09-19emacs: add helper for tag change list manipulationJani Nikula
Add a helper to create (and optionally reverse) a list of tag changes.
2012-09-05{., man}/Makefile.local: edit/remove release-checks.sh related targetsTomi Ollila
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.
2012-09-05devel: add release-checks.shTomi Ollila
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.
2012-09-01test/atomicity: use a more portable 'cp' formMike Kelly
-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
2012-09-01test/basic: use portable args for findMike Kelly
`-executable` isn't available in FreeBSD's version of find, so use a more portable version, `-perm +111`.
2012-09-01tests: Test against source man pages.Mike Kelly
Without this, help-test tests against the installed man pages, rather than the default ones.
2012-09-01test/smtp-dummy.c: fix compilation on FreeBSDMike Kelly
Use the more portable netint/in.h, instead of netint/ip.h, to include htons(3), etc.
2012-09-01test/Makefile.local: Use $(XAPIAN_LDFLAGS) for symbol-testMike Kelly
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.
2012-09-01configure: Add support for FreeBSD.Mike Kelly
This makes FreeBSD a recognized platform. Follow up patches make it work properly.
2012-09-01test: make test_expect_equal_file() arguments flexibleDmitry Kurochkin
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.
2012-09-01emacs: correct `notmuch-search-mode's docstring wrt `notmuch-search-tag-all'Pieter Praet
* 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.
2012-09-01cli: make the command line parser's errors more informative.Mark Walters
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.
2012-09-01lib: fix NULL checks for filenames iteratorsSascha Silbe
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>
2012-09-01emacs: make notmuch-show return its bufferMark Walters
notmuch-pick uses the returned buffer to try and make sure it does not close the wrong buffer.
2012-09-01contrib/nmbug/nmbug-status: if realname empty, use part of mailaddrTomi Ollila
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.
2012-08-30test: use (format "%S") to print nil in emacs test.David Bremner
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.
2012-08-30test: canonicalize content-type in "Sending a message via (fake) SMTP"David Bremner
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.
2012-08-29test: emacs: run list-processes after accept-process-output in emacs 23.1Tomi Ollila
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.
2012-08-29test: emacs: call accept-process-output in notmuch-test-waitTomi Ollila
notmuch-test-wait called sleep-for in a loop to wait unconditionally 0.1 seconds while waiting for process to exit. accept-process-output returns as soon as there is any data available from process, so using it avoids unnecessary fixed delays. Both of these functions run process sentinels.
2012-08-29notmuch-show: add notmuch-show-mark-read-tags optionMichal Nazarewicz
The `notmuch-show-mark-read-tags' lists tags that are to be applied when message is read. By default, the only value is "-unread" which will remove the unread tag. Among other uses, this variable can be used to stop notmuch-show from modifying tags when message is shown (by setting the variable to an empty list).
2012-08-29NEWS: 2 minor consistency changes in sections 0.13.1 and 0.13.2Tomi Ollila
0.13.2: `contrib/notmuch-deliver` is in backticks elsewhere in NEWS file. Commands are generally written in backticks in latest NEWS entries. 0.13.1: Dropped period at the end of Title 'Fix compilation of ruby bindings', as all other titles do not end with a period.
2012-08-21debian: mention some upstream news in changelogdebian/0.14-10.14David Bremner
2012-08-21debian: set distribution to experimentalDavid Bremner
This is to simplify potential bugfix uploads during Debian freeze.
2012-08-21version: propagate version changesDavid Bremner
These are the result of running "make update-versions"
2012-08-20debian: set date for changelog.David Bremner
Make d/changelog match NEWS
2012-08-20NEWS: set date for release.David Bremner
2012-08-20version: bump primary versionDavid Bremner
The date for man pages is taken from the last commit, so in this case it makes sense to do this in two commits.
2012-08-14News for new 'previous' behaviorAustin Clements
2012-08-12emacs: Make moving to the previous message move to the previous boundaryAustin Clements
Previously, notmuch-show-previous-message would move to the beginning of the message before the message containing point. This patch makes it instead move to the previous message *boundary*. That is, if point isn't already at the beginning of the message, it moves to the beginning of the current message. This is consistent with notmuch-show-next-message, which can be thought of as moving to the next message boundary. Several people have expressed a preference for this.
2012-08-12reply: Convert JSON format to use sprinterAustin Clements
Almost all of reply was already being formatted using the sprinter. This patch converts the top-level dictionary to use the sprinter interface.
2012-08-12cli: Remove now-unused json.cAustin Clements
The string buffer quoting functions in json.c have been superseded by the new sprinter interface and are no longer used. Remove them.
2012-08-12emacs: notmuch search bugfixMark Walters
The recent change to use json for notmuch-search.el introduced a bug in the code for keeping position on refresh. The problem is a comparison between (plist-get result :thread) and a thread-id returned by notmuch-search-find-thread-id: the latter is prefixed with "thread:" We fix this by adding an option to notmuch-search-find-thread-id to return the bare thread-id. It appears that notmuch-search-refresh-view is the only caller of notmuch-search that supplies a thread-id so this change should be safe (but could theoretically break users .emacs functions).
2012-08-12sprinters: bugfix when NULL passed for a string.Mark Walters
The string function in a sprinter may be called with a NULL string pointer (eg if a header is absent). This causes a segfault. We fix this by checking for a null pointer in the string functions and update the sprinter documentation. At the moment some output when format=text is done directly rather than via an sprinter: in that case a null pointer is passed to printf or similar and a "(null)" appears in the output. That behaviour is not changed in this patch.
2012-08-12test: Add test for messages with missing headersAustin Clements
Currently the JSON tests for search and show are broken because notmuch attempts to dereference a NULL pointer.
2012-08-12emacs: Fix "not defined at runtime" warningAustin Clements
Previously, the Emacs byte compiler produced the warning the function `remove-if-not' might not be defined at runtime. because we only required cl at compile-time (not runtime). This fixes this warning by requiring cl at runtime, ensuring that the definition of remove-if-not is available.
2012-08-06NEWS: discuss changes for dump and restore syntax.David Bremner
The duplication in NEWS.Debian is so that Debian users will be warned during upgrade.
2012-08-06notmuch-restore: replace positional argument for input with optionDavid Bremner
Since notmuch dump doesn't use positional arguments anymore, it seems better to be consistent.
2012-08-06notmuch-dump: remove deprecated positional argument for output fileDavid Bremner
The syntax --output=filename is a smaller change than deleting the output argument completely, and conceivably useful e.g. when running notmuch under a debugger.
2012-08-05debian: alternately depend on emacs24 for notmuch-emacs, buildDavid Bremner
This should allow users to install notmuch-emacs with only emacs24 installed on their system. For good measure, allow building with emacs24 as a 4th choice.