diff options
author | Austin Clements <amdragon@MIT.EDU> | 2013-05-29 21:13:46 -0400 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2013-05-31 22:01:02 -0300 |
commit | 1546387d723ec47cd281f3c2bf6da2fddf18c045 (patch) | |
tree | f573d6e051d797f8e15bba472b79f301c6c21f6f /test | |
parent | 04725cfbe5a8905651b3f6a4dcf1f3dce9a085e1 (diff) |
emacs: Simplify MIME part command implementation
This unifies the part button actions and the underlying part action
functions into single interactive command that simply applies to the
part containing point using the just-added part p-list text property
instead of button properties. Since all part actions can be performed
by applying the appropriate mm function to an mm-handle, this patch
abstracts out the creation of mm handles, making the implementations
of the part commands trivial. This also eliminates our special
handling for part save in favor of using the appropriate mm function.
This necessarily modifies the way we handle the default part button
action, but in a way that does not change the meaning of the
notmuch-show-part-button-default-action defcustom.
Since these commands are no longer specific to buttons, this patch
eliminates the extra metadata stored with each button. This also
eliminates one rather special-purpose macro for a collection of
general purpose part handling utilities.
Diffstat (limited to 'test')
-rwxr-xr-x | test/emacs | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -525,7 +525,9 @@ test_expect_equal_file attachment1.gz "$EXPECTED/attachment" test_begin_subtest "Save attachment from within emacs using notmuch-show-save-part" # save as archive to test that Emacs does not re-compress .gz test_emacs '(let ((standard-input "\"attachment2.gz\"")) - (notmuch-show-save-part "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com" 5))' + (notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com") + (search-forward "0001-Deal-with") + (notmuch-show-save-part))' test_expect_equal_file attachment2.gz "$EXPECTED/attachment" test_begin_subtest "Save 8bit attachment from within emacs using notmuch-show-save-attachments" |