From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 1BDCC6DE00E8 for ; Sat, 28 Jan 2017 01:47:59 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.068 X-Spam-Level: X-Spam-Status: No, score=0.068 tagged_above=-999 required=5 tests=[AWL=-0.062, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id S2Btf1FH-8KD for ; Sat, 28 Jan 2017 01:47:48 -0800 (PST) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by arlo.cworth.org (Postfix) with ESMTPS id E2B836DE00AC for ; Sat, 28 Jan 2017 01:47:47 -0800 (PST) Received: by mail-wm0-f67.google.com with SMTP id r126so63763080wmr.3 for ; Sat, 28 Jan 2017 01:47:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mNEn5n1q4yipa/fe7n9dt7A+preWY4urVTdo26+Msfk=; b=cJDO4Qp7SxVCd4TeVRVrcpBh1DdOAhD+Tt/TcGYy5PpQa4L1Sd94kTjaWSYh2979dP IAVxrhqY+E2gK7c16LgkXOCN7yHvqixCtSp1bmUQKU/5eT2Vcn9RGHJbL9UtSrgfaOHN 6240MQ9o4xa07kgRCObXcZgSA7po5Vn7EQNARbZYc/Sr5D1FMH6iq6hmpRLbs3jufEKP /DXxd1jBKS8nPZ55KvEX2xPNQfGOHTQJxqLqjTvQqKAvffVTxH6ZUyAcT69uVpbn1Fez yxz8cfhVVbPNWqGb7g7Utoo3Jp5SptHRcLcTcpGPlRbRIVStj0EImVxa7DjImSYEzREP Udxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mNEn5n1q4yipa/fe7n9dt7A+preWY4urVTdo26+Msfk=; b=IjD5CpWZaa5i996rMaeNO8ZgufnchuOUKMwTvrI9Z70hRgxa5Zxz1iBO2Lz1zfj7nq aiRg7u/nI6eaXjQiCvM6p9E1CZVpZNzPP5N6bkLg8vBUVSWAXZtneXZMSTfRCQ8dvuUC DDpvdZf62qKAzU7TSCh6VBo8Fv9VruD2f2MrKFx7QEFRvkc/8GMx8I/JXN62F4tLTO+9 wTmjhfbu8Vum53irAoHWbVApJ9EhNtAa2bX+KjhH+Ey/mjbRue9GaG9Gm+sqewaywvTN eL/ZooOCDfzy01Ac4Ug6BQC0QKh/6VvsqAxjZx+2pFRNL4yBNJZmtGyaH9Ntp9Hodqhn /fkA== X-Gm-Message-State: AIkVDXJa6AOxGlMQJpFvWzfse/jEIc9xHV+CN7a5rtDQpMTW+vpT28OZfynNCniedgZFEg== X-Received: by 10.223.130.204 with SMTP id 70mr10654366wrc.128.1485596866449; Sat, 28 Jan 2017 01:47:46 -0800 (PST) Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162]) by smtp.gmail.com with ESMTPSA id k43sm12047495wrc.46.2017.01.28.01.47.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Jan 2017 01:47:45 -0800 (PST) From: Mark Walters To: notmuch@notmuchmail.org Subject: [PATCH v2] emacs: show: stop display of application/* parts Date: Sat, 28 Jan 2017 09:47:42 +0000 Message-Id: <1485596862-32326-1-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Jan 2017 09:47:59 -0000 Gnus seems to display application/zip and application/tar by default. This doesn't seem desirable so we override it. We only override if the user has not customized mm-inline-override-types themselves. --- I think this fixes all the bugs (and typos). Thanks to Tomas and Tomi for finding and verifying the correct way to get the default value of a defcustom variable. It's only lightly tested but seems to work. Best wishes Mark emacs/notmuch-show.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 364004b..c670160 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -1227,7 +1227,15 @@ matched." (interactive "sNotmuch show: \nP") (let ((buffer-name (generate-new-buffer-name (or buffer-name - (concat "*notmuch-" thread-id "*"))))) + (concat "*notmuch-" thread-id "*")))) + ;; We override mm-inline-override-types to stop application/* + ;; parts from being displayed unless the user has customized + ;; it themselves. + (mm-inline-override-types + (if (equal mm-inline-override-types + (eval (car (get 'mm-inline-override-types 'standard-value)))) + (cons "application/*" mm-inline-override-types) + mm-inline-override-types))) (switch-to-buffer (get-buffer-create buffer-name)) ;; No need to track undo information for this buffer. (setq buffer-undo-list t) -- 2.1.4