Re: [PATCH] emacs/smime: render decrypted MIME entities in notmuch-show

Subject: Re: [PATCH] emacs/smime: render decrypted MIME entities in notmuch-show

Date: Thu, 07 Apr 2022 08:25:55 -0400

To: Alexander Adolf, notmuch@notmuchmail.org

Cc:

From: David Bremner


Alexander Adolf <alexander.adolf@condition-alpha.com> writes:

>
> I have had a look to both files, and I _think_ T450-emacs-show would
> seem more appropriate. It seems that T355-smime is more aimed at the
> pure mechanics of en-/decryption, and the handling of that in
> libnotmuch. Neither of these have been a problem for me.
>
> Further looking at T450-emacs-show, I find that it uses a somewhat
> extensive framework to implement its test cases. Any chances of giving
> me a fast start with this, or will it be down to "use the source, Luke"?
>

I think something like the following test (but with an smime encrypted
message instead of the existing PGP/MIME encrypted message.

    test_begin_subtest "process cryptographic MIME parts"
    ;; additional variables can be dynamically bound as needed, but this one
    ;; in particular is needed for decryption
    test_emacs '(let ((notmuch-crypto-process-mime t))
    ;; simulate the user action
            (notmuch-show
            "id:20091117203301.GV3165@dottiness.seas.harvard.edu")
    ;; this is the test framework, write the terminal display to a file
    ;; called OUTPUT        
            (test-visible-output))'
    test_expect_equal_file $EXPECTED/notmuch-show-process-crypto-mime-parts-on OUTPUT

you would also need to create a file with a "screen display" in
$EXPECTED, and add that as part of your patch.

I hope that helps,

David
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: