From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CLx9BMq04WB1GwEAgWs5BA (envelope-from ) for ; Sun, 04 Jul 2021 15:16:58 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id GAcTAMq04WCDPwAAbx9fmQ (envelope-from ) for ; Sun, 04 Jul 2021 13:16:58 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (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 BC16C1F52C for ; Sun, 4 Jul 2021 15:16:57 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id A8F382905E; Sun, 4 Jul 2021 09:16:49 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id A993426B99 for ; Sun, 4 Jul 2021 09:16:45 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 4B2A65FD28; Sun, 4 Jul 2021 09:16:45 -0400 (EDT) Received: (nullmailer pid 3400888 invoked by uid 1000); Sun, 04 Jul 2021 13:16:43 -0000 From: David Bremner To: David Bremner , notmuch@notmuchmail.org Subject: [PATCH 3/3] emacs: dynamically bind gnus-newsgroup-charset Date: Sun, 4 Jul 2021 10:16:39 -0300 Message-Id: <20210704131639.3400795-4-david@tethera.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210704131639.3400795-1-david@tethera.net> References: <20210703201131.3184165-2-david@tethera.net> <20210704131639.3400795-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: V7RBVWFVZ6CEZVROAYVSOPZA5VCSFNWL X-Message-ID-Hash: V7RBVWFVZ6CEZVROAYVSOPZA5VCSFNWL X-MailFrom: bremner@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; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625404617; 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-unsubscribe:list-subscribe:list-post; bh=2+Sn4xW9zeVO0RQceHNpEcKgGLFRcaeMWXCNi/269hk=; b=QbumwaQCvRMDa5oT2cWTxf0HrhTZPdifXhwxfVDLBmEBrm7puRr7c3h9BSoiLPNAfzlAhT gqnIakUyz3Ov3Yxixrs7R2j1VZgxTSbg61YE6yS3a4n+Elo1YGIDDwxJ5ZWk3rTkrrBVtC LGhkSq7whFdy1NEjbwEctRE8x2e2c2evlmmtclVH98JD0TIcjZj06q6Y0pE3t2+Sa7cr00 v7SPzPfeW1DVh5cs4rogvdCyEtZ5A3sRAfw+1heSe0pWDPPwFxAtOehbsPZbhuR+vlD53o rc67+c3wcl7oGhxhdeXw9eGhFdFWWz8AXqNMtfV5OuJN2mNg8iZlgplyJqO9CA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625404617; a=rsa-sha256; cv=none; b=p8fsWbL0rT1VQP8oIuyYrkVcQc36TjF6ENZZnIvJL10WAYhrc4ooFMFyvVqo5nOXgulzR8 9xnIsot9ij0BRYE6U2fnsmb6zfKx7pbl8iBgLI60scQoAbld4K5PSRLENN1CIkYYh5REJI Jz75DhG+bgkRHFXf0PrMntZffPBYOncoq02W8yCHbMK/vUpUOU1KJvF4yt+7z5Vk8nWa51 /btHr0f91tx2TWaqrDTlHeGVQsp2bpl5fGaASsmM+vtPS8hMRRUuhLXdma9K8oHJKEjKLE F8cuUrMSyOW6g6rJPt31JXbeVOF1ModxSY+ANoPEcmslsvwPHOUFL09pdBlhYg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.03 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: BC16C1F52C X-Spam-Score: -1.03 X-Migadu-Scanner: scn0.migadu.com X-TUID: JVOYc8ZhCVuV This avoids requiring gnus-sum, which is currently where this variable is defined. --- emacs/notmuch-lib.el | 3 ++- test/T450-emacs-show.sh | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 8ca416d4..37fb4018 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -693,7 +693,8 @@ current buffer, if possible." (insert (notmuch-get-bodypart-binary msg part process-crypto))) (when (mm-inlinable-p handle) (set-buffer display-buffer) - (mm-display-part handle) + (notmuch-dlet ((gnus-newsgroup-charset nil)) + (mm-display-part handle)) ;; restore major mode if changed by gnus (notmuch-show-mode) t)))))) diff --git a/test/T450-emacs-show.sh b/test/T450-emacs-show.sh index 75a52640..7a731ac7 100755 --- a/test/T450-emacs-show.sh +++ b/test/T450-emacs-show.sh @@ -220,7 +220,6 @@ test_emacs '(notmuch-show "id:basic-encrypted@crypto.notmuchmail.org") test_expect_equal_file $EXPECTED/notmuch-show-decrypted-message OUTPUT test_begin_subtest "show encrypted rfc822 message" -test_subtest_known_broken test_emacs '(notmuch-show "id:encrypted-rfc822-attachment@crypto.notmuchmail.org") (test-visible-output)' count=$(fgrep -c '!!!' OUTPUT) -- 2.30.2