aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-01-30emacs: break up notmuch-show-archive-thread-internal into two more generally useful functionsJameson Graef Rollins
Break up notmuch-show-archive-thread-internal into two new functions: notmuch-show-tag-thread-internal: applies a tag to all messages in thread. If option remove flag is t, tags will be removed instead of added. notmuch-show-next-thread: moves to the next thread in the search result. If given a prefix, will show the next result, otherwise will just move to it in the search view. Two new interactive functions, notmuch-show-{add,remove}-tag-thread, are also added. Together, these provide a better suit of thread tagging and navigation tools. The higher level thread archiving functions are modified to use these new function.
2012-01-30emacs: use search-next-thread to move to next thread in show modeJameson Graef Rollins
We should always use the dedicated search mode navigation functions, in case navigation mechanics change down the line.
2012-01-30moved _config_(get|set)_list () functions earlier in the fileTomi Ollila
Moved static functions _config_get_list () and _config_set_list () closer to the beginning of file so that their definition is known (without adding forward declarations) in upcoming changes.
2012-01-27emacs: Don't mark messages as "unsaved" when printing.David Edmondson
`ps-print-buffer' notes that a buffer is unsaved unless `buffer-modified-p' returns `nil', so ensure that it does.
2012-01-27emacs: Another special case for `notmuch-show-clean-address'.David Edmondson
Remove backslashes.
2012-01-27test: Updated expected output for new `notmuch-show-clean-address'.David Edmondson
2012-01-27emacs: Avoid `mail-header-parse-address' in `notmuch-show-clean-address'.David Edmondson
`mail-header-parse-address' expects un-decoded mailbox parts, which is not what we have at this point. Replace it with simple string deconstruction. Mark the corresponding test as no longer broken. Minor whitespace cleanup.
2012-01-27emacs: Re-enable line wrapping in `notmuch-show-mode'.David Edmondson
Turn on `visual-line-mode' via a hook, so that those who so choose can avoid it.
2012-01-27emacs: `notmuch-search-operate-all' code cleanup, no functional changesDmitry Kurochkin
2012-01-27emacs: add completion to "tag all" operation ("*" binding)Dmitry Kurochkin
The patch adds <tab> completion to "tag all" operation bound to "*" (`notmuch-search-operate-all' function).
2012-01-26test: `notmuch-test-run' should protect against buffer switching.David Edmondson
The body of the test may cause the current buffer to change. Ensure that the output goes to the correct buffer by switching back before inserting it.
2012-01-26test: `visible-buffer-substring' should not return text properties.David Edmondson
When using `visible-buffer-substring' to examine a buffer, the text properties are not useful, so don't include them.
2012-01-26emacs: polish notmuch-hello help textDmitry Kurochkin
Make `=' binding description consistent with others.
2012-01-26emacs: Fix a notmuch-print.el compiler warning.David Edmondson
`notmuch-show-get-prop' should be declared.
2012-01-26emacs: Make the part content available to `mm-inlinable-p'.David Edmondson
The `mm-inlinable-p' function works better if it has access to the data of the relevant part, so load that content before calling it. Don't load the content for parts that the user has indicated no desire to inline. This fixes the display of attached image/jpeg parts, for example.
2012-01-25emacs: bind "s" to `notmuch-hello-search' in notmuch-hello bufferDmitry Kurochkin
`notmuch-hello-search' uses `notmuch-search' function but refreshes notmuch-hello buffer when the search buffer is closed.
2012-01-25emacs: use a single history for all searchesDmitry Kurochkin
There are two ways to do search in Emacs UI: search widget in notmuch-hello buffer and `notmuch-search' function bound to "s". Before the change, these search mechanisms used different history lists. The patch makes notmuch-hello search use the same history list as `notmuch-search' function.
2012-01-25emacs: bind "s" to `notmuch-search' in notmuch-hello bufferDmitry Kurochkin
Before the change, "s" in notmuch-hello buffer would jump to the search box. The patch changes the binding to `notmuch-search' which is consistent with all other notmuch buffers.
2012-01-25uncrustify.cfg: label indent, some known types, not, # and ##Tomi Ollila
Adjusted some uncrustify variables to get closer to prevailing style: * Label indent (for goto) relative to current indentation. * Registered GMimeObject and mime_node_t being as types. * Space after ! (not) operator. * No space after 'stringify' (#) preprosessor token. * No spacing change around ## (option not versatile enough). There are at least 3 cases where attention needs to be paid: * If there is newline between function name and open paren in function call, the paren (and args) are indented too far right. * #define HOUR (60 *MINUTE) -- i.e. no space after star (*). * void (*foo)(args) -- i.e no space between (name) and (args).
2012-01-25test: Add address cleaning tests.David Edmondson
2012-01-25test: Add more helpers for emacs tests.David Edmondson
2012-01-25test: Add `test_emacs_expect_t'.David Edmondson
Add a new test function to allow simpler testing of emacs functionality. `test_emacs_expect_t' takes one argument - a lisp expression to evaluate. The test passes if the expression returns `t', otherwise it fails and the output is reported to the tester.
2012-01-25test: Don't return the result of checking for running emacs to the tester.David Edmondson
When checking for a running emacs, test_emacs evaluates the empty list '()'. This returns 'nil' when emacs is running, which is then prepended to the actual test result. Given that it is not part of the actual test output the test harness can incorrectly report test failure (or success).
2012-01-25show: Introduce mime_node formatter callbackAustin Clements
This callback is the gateway to the new mime_node_t-based formatters. This maintains backwards compatibility so the formatters can be transitioned one at a time. Once all formatters are converted, the formatter structure can be reduced to only message_set_{start,sep,end} and part, most of show_message can be deleted, and all of show-message.c can be deleted.
2012-01-25mime node: Record depth-first part numbersAustin Clements
This makes the part numbers readily accessible to formatters. Hierarchical part numbering would be a more natural and efficient fit for MIME and may be the way to go in the future, but depth-first numbering maintains compatibility with what we currently do.
2012-01-25emacs: have notmuch-search-archive-thread use -next-thread functionJameson Graef Rollins
Use this standard function, to keep thread navigation in one place.
2012-01-23NEWS: update "Tag exclusion" sectionPieter Praet
2012-01-23setup: prompt user for search.exclude_tags valuePieter Praet
Allow users to customize the search.exclude_tags option during setup.
2012-01-23setup: Create functions for tag list printing and parsingAustin Clements
This refactors the tag list printing and parsing currently used for new.tags so that both can be reused for the new search.exclude_tags option.
2012-01-23config: only exclude messages if 'search.exclude_tags' is explicitly setPieter Praet
Currently, the 'search.exclude_tags' option is automatically set to "deleted;spam;" if it's missing from the config file. This violates the Principle of Least Surprise, so *only* set 'search.exclude_tags' to "deleted;spam;" if we didn't find a configuration file at all. This patch is actually Austin Clements' work: id:"20120117203211.GQ16740@mit.edu"
2012-01-23test: only exclude "deleted" messages from search if explicitly configuredPieter Praet
Currently, the 'search.exclude_tags' option is automatically set to "deleted;spam;" if it's missing from the config file. This violates the Principle of Least Surprise, so update the tests to *only* expect the exclusion of messages which are tagged "deleted" if the 'search.exclude_tags' option is explicitly set *and* contains that tag.
2012-01-23search: rename auto_exclude_tags to {search, }exclude_tagsPieter Praet
All other config-related functions and args include the section title in their name, so for the sake of consistency, mirror that. Also, the "auto"matic part is a given, so that was dropped.
2012-01-23Add a NEWS section for 0.11.1 and document the python error handling bugfixJustus Winter
2012-01-23python: fix error handlingJustus Winter
Before 3434d1940 the return values of libnotmuch functions were declared as c_void_p and the code checking for errors compared the returned value to None, which is the ctypes equivalent of a NULL pointer. But said commit wrapped all the data types in python classes and the semantic changed in a subtle way. If a function returns NULL, the wrapped python value is falsish, but no longer equal to None. Backported from master to 0.11.
2012-01-23show: Use consistent header ordering in the text formatAustin Clements
Previously, top-level message headers were printed as Subject, From, To, Date, while embedded message headers were printed From, To, Subject, Date. This makes both cases use the former order and updates the tests accordingly. Strangely, the raw format also uses this function, so this also fixes the two raw format tests affected by this change.
2012-01-23test/emacs-large-search-buffer: correct typo (EXPEXTED -> EXPECTED)Pieter Praet
introduced in commit 3b24b396
2012-01-22test: make (kill-emacs) from emacsclient work with emacs 23.(1|2)Tomi Ollila
emacsclient --eval '(kill-emacs)' makes emacs versions 23.1 and 23.2 ask user input from running emacs. Redefining yes-or-no-p function when kill-emacs is executed for these emacs versions in test-lib.el avoids this test problem.
2012-01-22test: whitespace-cleanup for most test/* filesTomi Ollila
Used emacs (whitespace-cleanup) function to "cleanup blank problems" in test files where that could be done without breaking tests; test/emacs was partially, and test/multipart was fully reverted.
2012-01-22.dir-locals.el: changed one-char comment prefix '; ' to two; '; ; 'Tomi Ollila
Like in emacs/*.el two comment chars (;;) is required so that (indent-region) doesn't break indentation.
2012-01-22show: don't use hex literals in JSON outputThomas Jost
JSON does not support hex literals (0x..) so numbers must be formatted as %d instead of %x. Currently, the possible values for the gmime error code are 1 (expired signature), 2 (no public key), 4 (expired key) and 8 (revoked key). The other possible value is 16 (unsupported algorithm) but obviously it is much more rare. If this happens, the current code will add '"errors": 10'. This is valid JSON (it looks like a decimal number) but it is incorrect (should be 16, not 10). Since this is just an issue in the JSON encoder, no changes are needed on the Emacs side (or in other UIs using the JSON output).
2012-01-22Fix NEWS about gmime 2.6Thomas Jost
Previous version had a typo ("they may be" instead of "there may be") and was lacking a proper description of the gmime bug.
2012-01-22python: fix error handlingJustus Winter
Before 3434d1940 the return values of libnotmuch functions were declared as c_void_p and the code checking for errors compared the returned value to None, which is the ctypes equivalent of a NULL pointer. But said commit wrapped all the data types in python classes and the semantic changed in a subtle way. If a function returns NULL, the wrapped python value is falsish, but no longer equal to None.
2012-01-21uncrustify.cfg: initial support for notmuch coding styleDavid Bremner
Uncrustify is a free (as in GPL2+) tool that indents and beautifies C/C++ code. It is similar to GNU indent in functionality although probably more configurable (in fairness, indent has better documentation). Uncrustify does not have the indent mis-feature of needing to have every typedef'ed type defined in the configuration (even standard types like size_t). This configuration starts with the linux-kernel style from the uncrustify config, disables aggressive re-indenting of structs, and fine tunes the handling 'else' and braces. In an ideal situation, running uncrustify on notmuch code would be NOP; currently this is not true for all files because 1) the configuration is not perfect 2) the coding style of notmuch is not completely consistent; in particular the treatment of braces after e.g. for (_) is not consistent. Some fine tuning by Tomi Olilla.
2012-01-21emacs/*.el: changed one-char comment prefix ';' to two; ';;'Tomi Ollila
In order for emacs (indent-region) to (re)indent emacs lisp properly there needs to be at least 2 comment characters (;;).
2012-01-21Make buttons for attachments allow viewing as well as savingMark Walters
Define a keymap for attachment buttons to allow multiple actions. Define 3 possible actions: save attachment: exactly as currently, view attachment: uses mailcap entry, view attachment with user chosen program Keymap on a button is: s for save, v for view and o for view with other program. Default (i.e. enter or mouse button) is save but this is configurable in notmuch customize. One implementation detail: the view attachment function forces all attachments to be "displayed" using mailcap even if emacs could display them itself. Thus, for example, text/html appears in a browser and text/plain asks whether to save (on a standard debian setup)
2012-01-21Update NEWS and INSTALL about gmime 2.6Thomas Jost
2012-01-21Add compatibility with gmime 2.6Thomas Jost
There are lots of API changes in gmime 2.6 crypto handling. By adding preprocessor directives, it is however possible to add gmime 2.6 compatibility while preserving compatibility with gmime 2.4 too. This is mostly based on id:"8762i8hrb9.fsf@bookbinder.fernseed.info". This was tested against both gmime 2.6.4 and 2.4.31. With gmime 2.4.31, the crypto tests all work fine (as expected). With gmime 2.6.4, one crypto test is currently broken (signature verification with signer key unavailable), most likely because of a bug in gmime which will hopefully be fixed in a future version.
2012-01-21emacs: add invisible dot instead of space at the end of notmuch-hello search boxDmitry Kurochkin
This makes `show-trailing-whitespace' happy, i.e. it does not mark the whole search box line as trailing spaces. Since the dot is invisible, this change makes no visible difference for `notmuch-hello'. Edited-by: Pieter Praet <pieter@praet.org> to fix the tests.
2012-01-21Silence buildbot warnings about unused resultsAustin Clements
This ignores the results of the two writes in sigint handlers even harder than before. While my libc lacks the declarations that trigger these warnings, this can be tested by adding the following to notmuch.h: __attribute__((warn_unused_result)) ssize_t write(int fd, const void *buf, size_t count);
2012-01-21show: Handle read and write errorsAustin Clements
For showing a message in raw format, rather than silently succeeding when a read or a write fails (or, probably, looping if a read fails), try to print an error message and exit with a non-zero status. This silences one of the buildbot warnings about unused results. While my libc lacks the declarations that trigger these warnings, this can be tested by adding the following to notmuch.h: __attribute__((warn_unused_result)) size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);