From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0NXVOFvYTmImJAAAgWs5BA (envelope-from ) for ; Thu, 07 Apr 2022 14:26:03 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id KJyNNVvYTmK6GQAAauVa8A (envelope-from ) for ; Thu, 07 Apr 2022 14:26:03 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id BE5759A5B for ; Thu, 7 Apr 2022 14:26:01 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 57CE45F6EC; Thu, 7 Apr 2022 12:25:59 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id F38505F6C3 for ; Thu, 7 Apr 2022 12:25:55 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1000) id 3A0E65FBD7; Thu, 7 Apr 2022 08:25:55 -0400 (EDT) From: David Bremner To: Alexander Adolf , notmuch@notmuchmail.org Subject: Re: [PATCH] emacs/smime: render decrypted MIME entities in notmuch-show In-Reply-To: <90f50b09c047913abad928c461b08412@condition-alpha.com> References: <9cc1c3dc135b5126efd210ee97b88d6b@condition-alpha.com> <87pmm43nig.fsf@tethera.net> <90f50b09c047913abad928c461b08412@condition-alpha.com> Date: Thu, 07 Apr 2022 08:25:55 -0400 Message-ID: <877d819j1o.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: H2CZ4K7CX3QPEXJLBWN57AHGU4FUAUOB X-Message-ID-Hash: H2CZ4K7CX3QPEXJLBWN57AHGU4FUAUOB X-MailFrom: david@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1649334361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=YXPeJ2fXiatyRt/2Cjm5d99DI7Sy+3/GsWVbAczOLy8=; b=BexmniQgJ5/RXfgdVSYoHEKdks27QtmEjqRQnvjxP4dsTcBedoGfkhzxe30In10ZdQ7V9o +mtaWN7mx6GZsTgkAiPNdVVtz5CbDBTGAZjqyDAw7g4o1g+yzoqSY4N7ThFrpyMERzugpn /fzAt8AlGwdE9Jovo2DziPx/iYcWhks6Z95zCXG6yjtAFQKDWgB/P1WTgOaMsxjSgOZRWU lceT5RplovaP2v68L+wUY+Mq8ugryShynoLVLd3bDzo4+qGaIeZB24fbt9cK4uorNOYveM 6uz4W9nX+OH/ydpajaReRu03t/HskvgX29qdmla17oXz6cpiqUvUk0qStROr6g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1649334361; a=rsa-sha256; cv=none; b=V6vc5jXFPoq8qTmSvhrHacVHxFdt0Yj/SKll+oqlrr4q72hI5otxevZVsNyCDSD/09XYi2 Co84e1l+TdJCMXbKcTDQOy4Ry2TIujJUVhhOIhN/TGvylqX9D+HG8SQZhjktXNVcYvSHml 5iCwtDPAgFxoKVd5pql9yNQzdXdmuq1+wWRJuwKbiHCiE6okIfsrR8IpbioS2omUzn3931 37AoaklRjTaN2Z33SaGqOaWW8zgPO88jD2mHkVGDsRWGyhD2W3jz7rkKn4zIO1T4mT16Zw XRZzFdqerx0IdnRHPCHHoSZWAX4US4Cjcekcquj2uetHohHK0bJ5ivREdIMzDA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.96 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: BE5759A5B X-Spam-Score: -1.96 X-Migadu-Scanner: scn0.migadu.com X-TUID: sPVu6u+lmKw1 Alexander Adolf 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