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 9B41C6DE02DA for ; Sat, 7 Jan 2017 13:25:12 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.067 X-Spam-Level: X-Spam-Status: No, score=0.067 tagged_above=-999 required=5 tests=[AWL=-0.063, 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 ifROnUVDVEF6 for ; Sat, 7 Jan 2017 13:25:11 -0800 (PST) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by arlo.cworth.org (Postfix) with ESMTPS id E26FC6DE02CD for ; Sat, 7 Jan 2017 13:25:10 -0800 (PST) Received: by mail-wm0-f66.google.com with SMTP id c85so12788130wmi.1 for ; Sat, 07 Jan 2017 13:25:10 -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; bh=EmRJ4Lw8vaHV1I5Jsolq81aMkuNqDd39KCbb9uEQ744=; b=g15W0f9cJd3DyRjHQ1Lzb55l9Tjf/w0qt1Ir0GCXhENz/G+KEuc612qH7cf9CA8/j8 BVGoIc5DZmySNuliyKb6GYFn1c+pW1gRa6BhcLw+w0QLlkpMAjX5LeL4tTDcs9S0W2tr clWD9TcDQlF12ko3TCe5DQ0MXIuZkUnVZ/m901UR+awZPR1OqWHkxk19juEJVjn3AZ8D YaOMrhN7rfpBkef7dqnW+MfBq2kkvsEJQCqappfg/6GJLMI+hEqUEU/aI4NoAUVavdvx sXmsT6aagFehEj5CKAAF72fz89xJq6WKSioz42+zQxRQtnx9onYq5Un3+O/p9kVElslk Ez6w== 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; bh=EmRJ4Lw8vaHV1I5Jsolq81aMkuNqDd39KCbb9uEQ744=; b=Mf37hS16HIeeVd6azWXKzN2a0L8sj3eu3JHWcT4OSwhzl0UpV7kCXWKlk1dhiatTSD bjKrDrn+0ZpNx4h+jDL9gMshS80MSx4KvDPW/fcGZRSPG0q1h7Peclw2rvMASfB6LDaW TYLYuBLSuNzp2qERVS9KJXnu++jxFk9rGYdD8UIUxkoJj49UcWi2oZDYh3aFOanBJFKs N9dIvg0QK5xsoEFQH+2ALSBnTtfk2OGgVW+jMh/bNxiBkLZcoWGI297Pa4RJorzWd+H4 8r7g5p13oNwzIuH9J3bAy9WBl1pIBHImAG4SBELnN1eSDXrcWbAH6IFplF4TubhxulBg Xy5w== X-Gm-Message-State: AIkVDXLgHs8NqbO5dATqG4gOEoNrNtcQMYrDWtW5TsW2bFWUY3B1xakb9nEQi9icnY37Aw== X-Received: by 10.223.150.118 with SMTP id c51mr7534334wra.190.1483824308782; Sat, 07 Jan 2017 13:25:08 -0800 (PST) Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162]) by smtp.gmail.com with ESMTPSA id x7sm115693874wjp.18.2017.01.07.13.25.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Jan 2017 13:25:08 -0800 (PST) From: Mark Walters To: notmuch@notmuchmail.org Subject: [PATCH] emacs: show: stop display of appliaction/* parts Date: Sat, 7 Jan 2017 21:25:05 +0000 Message-Id: <1483824305-5755-1-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 2.1.4 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, 07 Jan 2017 21:25:12 -0000 Gnus seems to display application/zip and application/tar by default. This doesn't seem desirable so we override it. We only override ifthe user has not customized mm-inline-override-types themselves. --- This was mentioned on irc today and this might be a reasonable way of doing this. It does mean that if a user adds, for example, image/* to mm-inline-override-types then application/* will be displayed again. It also makes it slightly awkward to allow all types (eg setting mm-inline-override-types to non/existent would do). Also I feel there ought to be a better way to tell if a variable has been customized (or otherwise set), but I didn't find one. 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..42734ac 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 appliacation/* + ;; parts from being displayed unless the user has customized + ;; it themselves. + (mm-inline-override-types + (if (equal (list mm-inline-override-types) + (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