aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* 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.
* test: Add test showing notmuch corrupts a part with a CRLF pair in itGravatar Carl Worth2011-05-31
| | | | | | | | | | | | Since commit 2f8871df6ea3c0b44f85a0fc1b4f58a6b70b0a0e notmuch has been using a function (show_part_content) originally written only for text parts to save all MIME parts. The problem with this is that this function converts CRLF pairs to LF only and optionally converts to UTF-8 encoding. These two conversions have the potential to corrupt binary data when passed through the function. This test demonstrates that corruption, and so fails currently, until we fix the bug.
* test: Fix a misspelling in one of our test cases.Gravatar Carl Worth2011-05-31
| | | | | | | Not that it affects the correctness of the test, but it's nice to use proper spelling. This kind of change could invalidate a signature on the test message, but I think that would have happened previously when the HTML part was added in the first place.
* test: add test for saving attachments using notmuch-show-save-partGravatar Dmitry Kurochkin2011-05-31
| | | | | | | | Use .gz filenames for saved attachments in the tests to check that Emacs does not re-compress the file. Use test_expect_equal_file instead of test_expect_equal to avoid binary output on the console.
* test: copy files in test_expect_equal_file instead of moving themGravatar Dmitry Kurochkin2011-05-31
| | | | | | | | | | | Before the change, test_expect_equal_file moved files it compared in case of failure. The patch changes it to copy the files instead. This allows testing non-temporary files which are stored in git. Note: the change should not result in new temporary files left after the tests. Test_expect_equal_file used to move files only on failure, so callers had to cleanup them anyway.
* Don't re-compress .gz & al. in notmuch-show-save-part.Gravatar Dmitry Kurochkin2011-05-31
| | | | | | | | | | | | | | | | | | | | | | | | Write-region handles some file names specially, see Emacs Lisp manual section 25.11 Making Certain File Names "Magic" [1]. This is a nice feature for normal text editing, but it is not desirable if we need to save raw file content (e.g. attachment). In particular, this affects archives and may result in corrupted attachments saved with notmuch-show-save-part (attachment button click handler). Turns out, smart GNUS folks encountered the same problem and implemented write-region wrapper which inhibits some file name handlers. In particular, this wrapper is used in mm-save-part, which is why notmuch-save-attachments that uses it works fine with archives. The patch replaces write-region with mm-write-region in notmuch-show-save-part. Also it removes coding-system-for-write and require-final-newline setting in notmuch-show-save-part. The former is set in mm-write-region. The latter seems to be unneeded because mm-save-part does not use it. [1] http://www.gnu.org/s/emacs/manual/html_node/elisp/Magic-File-Names.html
* emacs: Give mutlipart/{signed, encrypted} their own part handler.Gravatar Jameson Graef Rollins2011-05-27
| | | | | | | | This is the best way to make the displayed output for decrypted/verified messages clearer. The special sigstatus and encstatus buttons are now displayed under the part header button. The part header button is also tweaked to provide information to user about how to proces crypto.
* emacs: Do not attempt to render arbitrary application parts.Gravatar Jameson Graef Rollins2011-05-27
| | | | | | | We probably shouldn't have been doing this anyway, but we do it here specifically because we don't want the content of the application/pgp-encrypted parts to be displayed and cluttering the message show.
* Render all parts of multipart/encrypted when decrypting.Gravatar Jameson Graef Rollins2011-05-27
| | | | | | | | | | | | The primary goal here is to keep the decrypted output as similarly structured as undecrypted output as possible. Now, when decrypting parts, only the original encrypted part is replaced by the it's decrypted content. If this part isn't itself a multipart, then all part numbering should remain consistent during decryption. The only draw back here is that the useless application/pgp-encrypted sub-part of the multipart/encrypted part is also emitted. But this part can be easily ignored by clients.
* Do not replace multipart/signed part with content part when doing verification.Gravatar Jameson Graef Rollins2011-05-27
| | | | | | | | | | | Some folks have complained about the part renumbering that occurs when the entire multipart/signed part is replaced with the part contents after verification. This is primarily because it incurs an additional computational cost to retrieve individual parts, since verification has to be performed again to ensure that part numbering is consistent. This patch simply leaves the full multipart/signed part as is. The emacs crypto test is also updated to reflect this change.
* tag signed/encrypted during notmuch newGravatar Jameson Graef Rollins2011-05-27
| | | | | | | | This patch adds the tag "signed" to messages with any multipart/signed parts, and the tag "encrypted" to messages with any multipart/encrypted parts. This only occurs when messages are indexed during notmuch new, so a database rebuild is required to have old messages tagged.
* emacs: Add support for PGP/MIME verification/decryptionGravatar Jameson Graef Rollins2011-05-27
| | | | | | | | | | | | | A new emacs configuration variable "notmuch-crypto-process-mime" controls the processing of PGP/MIME signatures and encrypted parts. When this is set true, notmuch-query will use the notmuch show --decrypt flag to decrypt encrypted messages and/or calculate the sigstatus of signed messages. If sigstatus is available, notmuch-show will place a specially color-coded header at the begining of the signed message. Also included is the ability to switch decryption/verification on/off on the fly, which is bound to M-RET in notmuch-search-mode.
* Add decryption of PGP/MIME-encrypted parts with --decrypt.Gravatar Jameson Graef Rollins2011-05-27
| | | | | | | | | | | | | This adds support for decrypting PGP/MIME-encrypted parts to notmuch-show and notmuch-reply. The --decrypt option implies --verify. Once decryption (and possibly signature verification) is done, a new part_encstatus formatter is emitted, the part_sigstatus formatter is emitted, and the entire multipart/encrypted part is replaced by the contents of the encrypted part. At the moment only a json part_encstatus formatting function is available, even though decryption is done for all formats. Emacs support to follow.
* Add signature verification of PGP/MIME-signed parts with --verify.Gravatar Jameson Graef Rollins2011-05-27
| | | | | | | | | | | | | | | | This is primarily for notmuch-show, although the functionality is added to show-message. Once signatures are processed a new part_sigstatus formatter is emitted, and the entire multipart/signed part is replaced with the contents of the signed part. At the moment only a json part_sigstatus formatting function is available. Emacs support to follow. The original work for this patch was done by Daniel Kahn Gillmor <dkg@fifthhorseman.net> whose help with this functionality I greatly appreciate.
* test: add crypto tests for signature verification and decryptionGravatar Jameson Graef Rollins2011-05-27
| | | | | | | | | | | | | | | | | | | This adds a new "crypto" test script to the test suite to test PGP/MIME signature verification and message decryption. Included here is a test GNUPGHOME with a test secret key (passwordless), and test for: * signing/verification * signing/verification with full owner trust * verification with signer key unavailable * encryption/decryption * decryption failure with missing key * encryption/decryption + signing/verfifying * reply to encrypted message * verification of signature from revoked key These tests are not expected to pass now, but will as crypto functionality is included.
* test: add notmuch_show_sanitize_all function that is a little more aggressive.Gravatar Jameson Graef Rollins2011-05-27
| | | | | | The old notmuch_show_sanitize function only scrubed part of the filename. This one scrubs the full filename, as well as the message id.
* test: new test-lib function to test for equality between filesGravatar Jameson Graef Rollins2011-05-27
| | | | | | | | | | We need to be able to test for the presence of a newline at the end of output. There's no good way to capture trailing newlines in bash, so redirecting output to a file is the next best thing. This new function should be used when testing for output that is expected to have trailing newlines. The next commit will demonstrate the use of this.
* Break up format->part function into part_start and part_content functions.Gravatar Jameson Graef Rollins2011-05-27
| | | | | | | Future improvements (eg. crypto support) will require adding new part header. By breaking up the output of part headers from the output of part content, we can easily out new part headers with new formatting functions.
* Use empty strings instead of NULL in format_reply structure.Gravatar Jameson Graef Rollins2011-05-27
| | | | | | This keeps things consistent with notmuch-show, and prevents having to check for the existence of the field pointer for simple string output formats.
* Integrate reply_part_content function into reply_part function.Gravatar Jameson Graef Rollins2011-05-27
| | | | | | | | After the last patch to eliminate some redundant code paths in reply_part, the reply_part_content function was only being called once. Disolving the function and integrating its contents into the reply_part function makes things a little simpler, and frees up some name space that will be needed in the next patch.
* Simplify reply_part function to eliminate redundant code paths.Gravatar Jameson Graef Rollins2011-05-27
| | | | This is the same logic but with less code.
* test: use `princ' instead of `message' calls in emacs testsGravatar Dmitry Kurochkin2011-05-27
| | | | | | | | | | | | | | | | The patch replaces all (message (buffer-string)) calls in emacs tests with (princ (buffer-string)). This avoids accidentally interpreting '%' as format specifiers and makes code simpler because we do not need to capture stderr. Also, the patch works around an Emacs (23.3+1-1 on current Debian Unstable) segfault in "Ensure that emacs doesn't drop results" test. Note: the segfault does not happen on every test run. Though, it seems to be consistently reproducible if the test uses 300 messages instead of 30. Hopefully, it is the crash described in Emacs bug #8545 [1] which is already fixed. [1] http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8545
* Update some more recent tests to use /usr/bin/env to find bashGravatar Carl Worth2011-05-27
| | | | | The recentl-applied patch had grown stale, so update the tests that had been created since it was originally written.
* test: change "#!/bin/bash" to "#!/usr/bin/env bash" enhances portabilityGravatar Joel Borggrén-Franck2011-05-27
| | | | | | Change #!/bin/bash at start of tests to "#!/usr/bin/env bash". That way systems running on bash < 4 can prepend bash >= 4 to path before running the tests.
* Fix check of sysconf return in get_name/username_from_passwd_fileGravatar Matthias Guedemann2011-05-26
| | | | | | | Fix to check the value returned by sysconf(_SC_GETPW_R_SIZE_MAX) before using the value. This fixes a core dump on DragonFlyBSD where this function returns -1.
* emacs: Make the queries used in the all-tags section configurableGravatar Daniel Schoepe2011-05-26
| | | | | | | | | | This patch adds a customization variable that controls what queries are used to construct the all-tags section in notmuch-hello. It allows the user to specify a function to construct the query given a tag or a string that is used as a filter for each tag. It also adds a variable to hide various tags from the all-tags section. Signed-off-by: Daniel Schoepe <daniel.schoepe@googlemail.com>
* test: add test-lib.el file with `visible-buffer-string' functionGravatar Dmitry Kurochkin2011-05-26
| | | | | | | | | | | | | The patch adds test-lib.el file for Emacs tests auxiliary stuff. Currently, it implements two functions: `visible-buffer-string' and `visible-buffer-substring'. These are similar to standard counterparts without "visible-" prefix but exclude invisible text. The functions are not used anywhere at the moment but should be useful for testing hiding/showing in the Emacs interface. Edited-by: Carl Worth <cworth@cworth.org> Fixed "basic" test to ignore new test-lib.el file.
* emacs: Add a customization allowing to always prompt for the "From" address ↵Gravatar Thomas Jost2011-05-26
| | | | when composing a new message
* emacs: Allow the user to choose the "From" address when replying to a messageGravatar Thomas Jost2011-05-26
| | | | When pressing C-u r, the user will be prompted for the identity to use.
* emacs: Allow the user to choose the "From" address when forwarding a messageGravatar Thomas Jost2011-05-26
| | | | When pressing C-u f, the user will be prompted for the identity to use.
* emacs: Allow the user to choose the "From" address when composing a new messageGravatar Thomas Jost2011-05-26
| | | | When pressing C-u m, the user will be prompted for the identity to use.
* emacs: Helpers needed for the user to be able to choose the "From" address ↵Gravatar Thomas Jost2011-05-26
| | | | | | | | | | | | | | | when composing a new message This adds functions and variables needed for this feature to be implemented. Once it's done, the user will be able to use a prefix argument (e.g. pressing C-u m instead of m) and be able to select a From address. By default the list of names/addresses to be used during completion will be automatically generated by the settings in the notmuch configuration file. The user can customize the notmuch-identities variable to provide an alternate list. This is based on a previous patch by Carl Worth (id:"87wrhfvk6a.fsf@yoom.home.cworth.org" and follow-ups).
* Carefully manage save/restore of point in ↵Gravatar Dmitry Kurochkin2011-05-24
| | | | | | | | | | | | `notmuch-wash-toggle-invisible-action'. Before the change, save-excursion was used to save the point. But the marker saved by save-excursion was inside a region that was deleted, so that approach is unreliable, (leading to point jumping to a new position past the button). This patch instead saves point in an integer variable, and when restoring, carefully avoids moving point past the button, (in case the new button label is shorter than the old button label).
* test: add test for hiding/showing signature in notmuch-show viewGravatar Dmitry Kurochkin2011-05-24
|
* test: fix expected output for emacs tests after the wash button label changesGravatar Dmitry Kurochkin2011-05-24
|
* Use different labels for wash buttons when text is visible or hidden.Gravatar Dmitry Kurochkin2011-05-24
| | | | | | | | | Before the change, citation and signature wash buttons used the same label in both visible and hidden states. Sometimes it is very convenient when you can determine if the text is hidden or shown without reading the context and/or clicking the button. The patch makes it easy to see if the text is shown or hidden by explicitly saying what the button does (shows or hides the text).
* emacs: Add an accessor function for emacs code to get at user.other_emailGravatar Carl Worth2011-05-24
| | | | | This is like the other notmuch-config accessor functions except that it converts the newline-separated string into an actual lisp list.
* emacs: add notmuch-before- and notmuch-after-tag-hookGravatar Daniel Schoepe2011-05-24
| | | | | | | | This patch adds hooks that are run before/after messages are tagged From the emacs interface. In order to implement this and to avoid having hooks parse all the arguments to the notmuch binary again, I created a `notmuch-tag' function that other modules should use instead of running (notmuch-call-notmuch-process "tag" ...) directly.
* python: Update README to talkabout notmuch, not cnotmuchGravatar Carl Worth2011-05-24
| | | | | | The old instructions were telling users to do "easy_install cnotmuch" which installed some old, stale bindings. The new instructions should be much more effective.
* man page: Eliminate two warningsGravatar Carl Worth2011-05-24
| | | | | | | Manually turn off both filling and justification for the one exceedingly-long URL which was blowing groff's mind. Also, adjust the position of 'text' to not be at the beginning of a line so it is not mistaken for a macro.
* notmuch: Implement search-tags as an alias for "search --output=tags *"Gravatar Carl Worth2011-05-24
| | | | | | | | | | | Ever since we added support for "notmuch search --output=tags" the "notmuch search-tags" command has been redundant. The recent addition of alias support makes it easy to drop the explicit search-tags command in favor of a simple alias that runs "notmuch search --output=tags *". So there's no longer any documentation of the search-tags command, but existing scripts will not break at all.
* test: Expand multipart test to cover "notmuch reply" as wellGravatar Carl Worth2011-05-24
| | | | | This gives coverage for the segmentation fault in "notmuch reply" that was just fixed with the previous commit.