aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
...
* Set message invisibility spec properties before inserting the body.Gravatar Dmitry Kurochkin2011-06-15
| | | | | This would allow body-inserting code (in particular, wash button-inserting code) to use message invisibility specs.
* Pass message to the `notmuch-show-insert-text/plain-hook' hook.Gravatar Dmitry Kurochkin2011-06-15
| | | | | | | | Before the change, the `notmuch-show-insert-text/plain-hook' was given only the `depth' argument. The patch adds another one - the message. Currently, the new message argument is not used by any on the hooks. But it will be used later to get access to message invisibility specs when wash buttons are inserted.
* Workaround for Emacs bug #8721.Gravatar Dmitry Kurochkin2011-06-15
| | | | | | | | | | | The emacs bug is that isearch cannot search through invisible text when the 'invisible' property is a list. The patch adds `notmuch-isearch-range-invisible' function which is the same as `isearch-range-invisible' but with fixed Emacs bug #8721. Advice added for `isearch-range-invisible' which calls `notmuch-isearch-range-invisible' instead of the original `isearch-range-invisible' when in `notmuch-show-mode'.
* test emacs: Add tests for hiding messages in notmuch-show viewGravatar Dmitry Kurochkin2011-06-15
| | | | | This test is expected to fail as it exposes a current bug, (which we hope to fix soon).
* python: Implement Message.__cmp__ and __hash__Gravatar Sebastian Spaeth2011-06-15
| | | | | | | | | | We can now do: if msg1 == msg2, and we can use set arithmetic on Messages(): s1, s2= msgs1, msgs2 s1.union(s2) s2 -= s1 Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* python: Remove Messages().__len__Gravatar Sebastian Spaeth2011-06-15
| | | | | | | | | | | Messages.__len__() exhausted the iterator and list() inherently calls len(), so we could not invoke list(msgs) without getting errors. Fix this by implementing __nonzero__ but removing __len__ on Messages. Use Query.count_messages() or len(list(msgs)) if you need to know the number. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* test: Fix from-guessing to actually span Received headers over multiple linesGravatar Carl Worth2011-06-10
| | | | | | | | | | The intent was always to make these Received headers span multiple lines. But the escapes were causing the shell to ignore the newlines, so that the result instead was long Received headers on a single line each. Fixing the intent here doesn't actually change the test-suite results at all.
* Fix appending of Received headersGravatar Stewart Smith2011-06-10
| | | | | | | We're not properly concatenating the Received headers if we parse them while requesting a header that isn't Received. this fixes notmuch-reply address detection in a bunch of situations.
* test: Extend from-guessing test with a test with multiple Received headersGravatar Carl Worth2011-06-10
| | | | | | | This is much more realistic, as most messages in the wild will have multiple Received headers. Also, this demonstrates a current bug in the Received header parsing, (multiple Received headers are not properly concatenated depending on the order in which headers are parsed in a message).
* test: Add test that emacs detects and hides top-post quotes of original messagesGravatar Carl Worth2011-06-10
| | | | | | | This tests the recently-added detection/hiding of top-posted quotations and in the testing, it takes advantage of the less-recently-added visible-buffer-string function for emitting only the visible text from a buffer.
* notmuch.el: hide original message in top posted replies.Gravatar David Bremner2011-06-10
| | | | | | | | | | | | | This code treats top posted copies essentially like signatures, except that it doesn't sanity check their length, since neither do their senders. New user-visible variables: notmuch-wash-button-original-hidden-format notmuch-wash-button-original-visible-format Rebased-by: Carl Worth <cworth@cworth.org>
* Use stock GMimeSession by defaultGravatar Daniel Kahn Gillmor2011-06-03
| | | | | | | | | | | | Our use of GMimeSession was unneeded boilerplate, and we weren't doing anything with it. This simplifies and clarifies that assumption. If we want to do anything fancier later, the examples in the gmime source are a reasonable source to work from in defining a new GMimeSession derivative. Since GMimeSession is going away in GMime 2.6, though, i don't recommend using it.
* show: Avoid inadvertently closing stdoutGravatar Jameson Graef Rollins2011-06-03
| | | | | | | | | | | | | | | | | | | | | | | GMime has a nasty habit of taking ownership by default of any FILE* handed to it va g_mime_stream_file_new. Specifically it will close the FILE* when the stream is destroyed---even though GMime didn't open the file itself. To avoid this bad behavior, we have to carefully set_owner(FALSE) after calling g_mime_stream_file_new. In the format_part_content_text function, since commit d92146d3a6809f8ad940302af49cd99a0820665e we've been calling g_mime_stream_file_new unconditionally, but only calling g_mime_stream_file_set_owner(FALSE) conditionally. This led to the FILE* being closed early when notmuch show output was redirected to a file. Fixing this fixes the test-suite cases that broke with the previous commit, (which added redirected "notmuch show" calls to the test suite to expose this bug). Edited-by: Carl Worth <cworth@cworth.org> with a new commit message to explain the bug and fix.
* test: modify multipart test to use test_expect_equal_fileGravatar Jameson Graef Rollins2011-06-03
| | | | | | Again, this is a much cleaner and more thorough test, and in fact exposes a bug in the format=text output, that will be fixed the next commit. Because of this, some of the multipart tests currently fail.
* test: update emacs test to use test_expect_equal_fileGravatar Jameson Graef Rollins2011-06-03
| | | | | | | | | | This is a much cleaner way to do the emacs tests, since we're actually comparing output against existing files with expected output. We also won't miss any trailing newlines this way. And speaking of which, one of the expected output files was actually missing a trailing blank line that was actually in one of the original messages, so this was fixed.
* Make `notmuch-show-clean-address' parsing-error-proof.Gravatar Dmitry Kurochkin2011-06-03
| | | | | | | | Mail-header-parse-address may fail for an invalid address. Before the change, this would result in empty notmuch-show buffer with an error message like: Scan error: "Unbalanced parentheses". The patch wraps the function in condition-case and returns unchanged address in case of error.
* test: add "notmuch-show for message with invalid From" testGravatar Dmitry Kurochkin2011-06-03
|
* emacs: Cleaner interface when prompting for sender addressGravatar Thomas Jost2011-06-03
| | | | | | Most of the time, every entry in the list of identities has the same user name part. It can then be filled in automatically, and the user can only be prompted for the email address, which makes the interface much cleaner.
* emacs: Don't always prompt for the "From" address when replyingGravatar Thomas Jost2011-06-03
| | | | | When replying, the From: address is already filled in by notmuch reply, so most of the time there is no need to prompt the user for it.
* emacs: fix notmuch-show-part-button to not include newlineGravatar Jameson Graef Rollins2011-06-03
| | | | | This makes the button cleaner, so that it doesn't include the entire rest of the line that the button is on.
* Fix misspelling in search output sanitization test.Gravatar Austin Clements2011-06-03
| | | | | | A simple spelling fix in the text description. Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
* avoid segfault when calling sanitize_string() on NULLGravatar Daniel Kahn Gillmor2011-06-03
| | | | Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
* lib/message-file: plug three memleaks.Gravatar Anton Khirnov2011-06-03
| | | | Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
* Use message-field-value instead of message-fetch-field in FCC header setup.Gravatar Dmitry Kurochkin2011-06-03
| | | | | | | | | | | | | | For message-fetch-field the buffer is expected to be narrowed to just the header of the message. That is not the case when notmuch-fcc-header-setup is run, hence a wrong header value may be returned. E.g. when forwarding an email, (message-fetch-field "From") returns the From header value of the forwarded email. Message-field-value is the same as message-fetch-field, only narrows the buffer to the headers first. Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
* bindings/python: Bump bindings version to 0.6Gravatar Sebastian Spaeth2011-06-02
| | | | | | | | To match the upcoming release, and with the updated API to match the current libnotmuch, bump the python version number (notmuch.__VERSION__) to 0.6. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* bindings/python: Implement Tags().__nonzero__()Gravatar Sebastian Spaeth2011-06-02
| | | | | | | | Analog to Threads.__nonzero__ this allows us to perform list() on a Threads() object and to repeatedly call "if Tags():" or "bool(Tags())" without implicitly invoking len(), thus exhausting our iterator. While touching this code, I added a small micro-optimization to the Tag next() function. There is no need to explicitly check _is_valid, as _get implicitly does check for validness and returns None, if there is no more Tag to fetch. This avoids some roundtrips into the library when iterating through Tags. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* bindings/python: implement Threads().__nonzero__Gravatar Sebastian Spaeth2011-06-02
| | | | | | | | | | | | | __nonzero__ checks if Threads() contains at least one more valid thread The existence of this function makes 'if Threads(): foo' work, as that previously implicitely called len() exhausting the iterator. This function makes `bool(Threads())` work repeatedly. For further info, see http://docs.python.org/reference/datamodel.html. Credits for the hint go to Brian May. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* bindings/python: Include the new get_filenames in the API docsGravatar Sebastian Spaeth2011-06-02
| | | | | | | They had accidentally been left out, so we should also include the function docs for get_messages in the API docs. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* bindings/python: Implement Message().get_filenames()Gravatar Sebastian Spaeth2011-06-02
| | | | | | | | | | | | | | | | | | | | Message().get_filenames() will return a generator that allows to iterator over the recorded filenames for a certain Message. Do ntoe that as all generators, these are one-time use only. You will have to reget them to perform various actions. So this works:: len(Message().get_filenames()) list(Message().get_filenames()) for n in Message().get_filenames(): print n But this won't:: names = Message().get_filenames() len(names) #uses up the iterator list(names) #outch, already used up... Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* emacs: Use "message-cited-text" instead of "message-cited-text-face"Gravatar Pieter Praet2011-06-01
| | | | | | | | | (describe-face 'message-cited-text-face) > message-cited-text-face is an alias for the face `message-cited-text'. > This face is obsolete since 22.1; use `message-cited-text' instead. Signed-off-by: Pieter Praet <pieter@praet.org> Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
* test: cleanup search-output test names (no functional change)Gravatar Jameson Graef Rollins2011-06-01
| | | | Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
* test: add test for sanitized notmuch-search outputGravatar Florian Friesdorf2011-06-01
| | | | | | | | | | | This feature was recently added, so it of course needs a test now. Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net> Edited-by: Carl Worth <cworth@cworth.org> Fixed test to use notmuch_search_sanitize in order to be robust against unpredictable thread ID numbers, (due to unpredictable order in which the filesystem presents files).
* Sanitize "Subject:" and "Author:" fields to not contain control characters ↵Gravatar Andreas Amann2011-06-01
| | | | | | | | | | | | in notmuch-search When a Subject field contained encoded CRLF sequences, these sequences would appear unfiltered in the output of notmuch search. This confused the notmuch emacs interface leading to "Unexpected Output" messages. This is now fixed by replacing all characters with ASCII code less than 32 with a question mark. Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
* emacs: Define several faces for the crypto-status buttonGravatar Thomas Jost2011-06-01
| | | | | | | Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net> jrollins modified this patch to conform to recent changes in the crypto processing since this patch was originally sent in.
* test: Create and set temporary home directoryGravatar Florian Friesdorf2011-06-01
| | | | | | | | | | | | | | In the master branch in test/emacs two tests access the build users home directory, so does emacs_deliver_message in the crypto branch. The tests should not touch the build user's home directory. The patch creates a directory in the temporary test directory and sets home accordingly. In case of a non-existent home directory, the tests are failing without this patch. Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
* test: remove json test for search null result, since it's being more ↵Gravatar Jameson Graef Rollins2011-06-01
| | | | | | | properly tested in search-output The test in json was inferior to the one in search-output, since it wasn't properly testing for the presence of a trailing newline.
* test: move utf-8 subject search test from json to search test scriptGravatar Jameson Graef Rollins2011-06-01
| | | | | | This test doesn't have anything to do with json, and has everything to do with testing search capability, so I'm not sure why it was in the wrong place.
* test: Move a test from search to search-output, and add a similar json testGravatar Jameson Graef Rollins2011-06-01
| | | | | | | | | The "Search for non-existent message prints nothing" test fits better with the existing tests in search-output, so move it there. Also add a similar test for the --format=json case. These tests also use the new test_expect_equal_file function, (to ensure that the presence of a trailing newline is correctly tested).
* Fix missing final newline in notmuch search outputGravatar Jameson Graef Rollins2011-06-01
| | | | | | | | | | | | | | A previous commit to fix json formatting for null results (0b1ddc5f6652bde99d63d9d553777b3d926694cf) accidentally introduced a regression that removed trailing newlines for non-json output. (There wasn't a good test for this previously, but there is now). The problem is due to the fundamental differences in formatting between the json and non-json outputs. The only way to fix this was to add a new formatting field that represents the string to output at the end of a null result. All output formatting tests should pass now, (in particular, the 4 recent test failures introduced to show this bug).
* test: modify search-output test to use the new test_expect_equal_file functionGravatar Jameson Graef Rollins2011-06-01
| | | | | | | These test now properly test for the presence of a newline at the end of all output. Right now some of these test will fail because the search output is currently broken to *not* produce proper newlines in some cases.
* add note about updating the debian symbols file to the RELEASE fileGravatar Jameson Graef Rollins2011-06-01
|
* configure: Fix detection of libdir in ldconfig configurationGravatar Carl Worth2011-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | Ever since commit b4b5e9ce4dac62111ec11da6d22b7e618056801f the detection of libdir in the ldconfig configuration has been broken, resulting in RPATH being set when not needed and not wanted. The cause was a change from an IFS setting of: IFS="$(printf '\n\t')" to a new setting of: IFS="$(printf '\n')" That looks desirable since we want to split the output of ldconfig based on newlines, (and not split on any filename that might have an embedded tab in it). The subtle bug in the above is that the shell trims any trailing newlines when performing command substitution so the final statement above was equivalent to: IFS='' which prevented any splitting of the ldconfig output at all. Fix this by avoiding command substitution and just using a literal newline in the source file for setting this variable.
* vim: add delete commandsGravatar Felipe Contreras2011-05-31
| | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
* vim: add support for delete in search viewGravatar Felipe Contreras2011-05-31
| | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
* vim: add support to mark as read in search viewGravatar Felipe Contreras2011-05-31
| | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
* vim: add support to mark as read in show viewGravatar Felipe Contreras2011-05-31
| | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
* Rename signerstatustostring to signer_status_to_stringGravatar Carl Worth2011-05-31
| | | | Otherwise, it's fartoohardformetoreadthis code.
* Reduce some excessive indentation.Gravatar Carl Worth2011-05-31
| | | | | I prefer checking a condition and returning early rather than making large blocks of code within a function conditional.
* show: Remove some dead code from show_text_part_contentGravatar Carl Worth2011-05-31
| | | | | | Now that this function registers an internal error if called with a non-text part, we can remove the conditions for multipart and message-part content types.
* notmuch show: Don't do text conversions for non-text partsGravatar Carl Worth2011-05-31
| | | | | | | | | | | This fixes the recently-added test case (in test/multipart) demonstrating corruption of binary parts that happen to contain CRLF pairs. We restore the original code from show_one_part_content to format_part_content_raw. Then, for good measure, we rename show_part_content to the more descriptive show_text_part_content and add an internal error if it is ever called with a non-text part.