From 352e6a4ce63e5c76da201d3d3d6937b9fb0abaf2 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Sun, 14 Feb 2016 18:39:56 +0000 Subject: [PATCH] [PATCH v5 4/7] emacs/show: Remove the 'no-buttons option of `notmuch-show-insert-bodypart' --- b9/6266522c50e6ccceceb6a24199be25d69c7ddc | 118 ++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 b9/6266522c50e6ccceceb6a24199be25d69c7ddc diff --git a/b9/6266522c50e6ccceceb6a24199be25d69c7ddc b/b9/6266522c50e6ccceceb6a24199be25d69c7ddc new file mode 100644 index 000000000..98ba70959 --- /dev/null +++ b/b9/6266522c50e6ccceceb6a24199be25d69c7ddc @@ -0,0 +1,118 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 985B76DE1AC9 + for ; Sun, 14 Feb 2016 10:40:26 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.246 +X-Spam-Level: +X-Spam-Status: No, score=-0.246 tagged_above=-999 required=5 tests=[AWL=0.324, + 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_LOW=-0.7, + 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 b5tEXwp5bzlt for ; + Sun, 14 Feb 2016 10:40:24 -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 5AA0B6DE178F for + ; Sun, 14 Feb 2016 10:40:21 -0800 (PST) +Received: by mail-wm0-f66.google.com with SMTP id c200so12198355wme.0 + for ; Sun, 14 Feb 2016 10:40:21 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:cc:subject:date:message-id:in-reply-to:references; + bh=kFeY4ZGuadODd7xi/GwwU2A3lRHUI5qALY2L6Gt+GLQ=; + b=A/kq1aZ8yeBCqFh+tYYeP8nfekfLYz0NQIhstIfA8hX6E+9s51bkJypjPi7+At0f8b + NWPwmpkhF3D+upRij9gf+Q1s1es1MgFmPybiWQhp9V7CSo0PWM4sN+q/gqg6y0ihfiXO + jjGBRnzqQkKDxYAQChsqSt3EqYpm0jzM+hm1NvJ6LqZ3nOT9OmB1C84X2078ZQPWeKc4 + +pyBLCSfdTbCm7JtztiyJw6mej16VjpPMaw59j7J3/z3szHIHJrHE1bYtWQUaCsUvQm9 + G4yLJCI0VeK3oHNigFmNZe3gJIBfeW5pHyAVC2qIRh0qolq8hQLMg0rd1D46Aluc2ZQH + vRKg== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to + :references; + bh=kFeY4ZGuadODd7xi/GwwU2A3lRHUI5qALY2L6Gt+GLQ=; + b=OmVZCBJuPl1VcWLFzQzBmHEJCJMA8CKnnQ4JmzrBozdY9pXiVJyzmSkjCQDaVMU0b6 + 5Y89uiNHJjsROoFU/8huQ6jSL9d7h/m4+rg8+74pTG2N19JjrULTNmz5n2iLEv79TBve + WBPVCeD35qqoc+XooYrf0g8HWa3S24Bl+MdRVURvf5931cpLvqmo5RHhOgwc8dp3uSNy + h3VADjb3OwHO2Hm5Sv24qXZRmA1LFU5Qu2pLP3hz8Us5ASvK0PjMgLt+Q+tQ338fYpPf + lNdc3aufuDY/ZipcS0X1vdrcy09fJsqwyfFSs6yYX97o1RcmzUCNiCU+sEgHLzqVGhAV + 65jw== +X-Gm-Message-State: + AG10YORIty2zY/7tdelPMQnMUMuy2HD6vrkNiChAst+vUjYYQ0ePYPljnzgvEUWrLmkveQ== +X-Received: by 10.28.221.68 with SMTP id u65mr8852256wmg.95.1455475220083; + Sun, 14 Feb 2016 10:40:20 -0800 (PST) +Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162]) + by smtp.gmail.com with ESMTPSA id v66sm12004978wmb.18.2016.02.14.10.40.19 + (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Sun, 14 Feb 2016 10:40:19 -0800 (PST) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH v5 4/7] emacs/show: Remove the 'no-buttons option of + `notmuch-show-insert-bodypart' +Date: Sun, 14 Feb 2016 18:39:56 +0000 +Message-Id: <1455475199-32622-5-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 2.1.4 +In-Reply-To: <1455475199-32622-1-git-send-email-markwalters1009@gmail.com> +References: <1455475199-32622-1-git-send-email-markwalters1009@gmail.com> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +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: Sun, 14 Feb 2016 18:40:26 -0000 + +From: David Edmondson + +No code uses the 'no-buttons argument to +`notmuch-show-insert-bodypart', so remove it. +--- + emacs/notmuch-show.el | 12 +++--------- + 1 file changed, 3 insertions(+), 9 deletions(-) + +diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el +index 37ed74d..f0bbff0 100644 +--- a/emacs/notmuch-show.el ++++ b/emacs/notmuch-show.el +@@ -955,9 +955,7 @@ will return nil if the CID is unknown or cannot be retrieved." + + HIDE determines whether to show or hide the part and the button + as follows: If HIDE is nil, show the part and the button. If HIDE +-is t, hide the part initially and show the button. If HIDE is +-'no-buttons, show the part but do not add any buttons (this is +-useful for quoting in replies)." ++is t, hide the part initially and show the button." + + (let* ((content-type (downcase (plist-get part :content-type))) + (mime-type (notmuch-show-mime-type part)) +@@ -966,14 +964,10 @@ useful for quoting in replies)." + (> notmuch-show-max-text-part-size 0) + (> (length (plist-get part :content)) notmuch-show-max-text-part-size))) + (beg (point)) +- ;; We show the part button if notmuch-show-insert-header-p +- ;; says to, unless HIDE is 'no-buttons. +- (button (when (and (not (equal hide 'no-buttons)) +- (notmuch-show-insert-header-p part hide)) ++ (button (when (notmuch-show-insert-header-p part hide) + (notmuch-show-insert-part-header nth mime-type content-type (plist-get part :filename)))) + ;; Hide the part initially if HIDE is t, or if it is too long +- ;; and we have a button to allow toggling (thus reply which +- ;; uses 'no-buttons automatically includes long parts) ++ ;; and we have a button to allow toggling. + (show-part (not (or (equal hide t) + (and long button)))) + (content-beg (point))) +-- +2.1.4 + -- 2.26.2