From 40873c6f7c6130cc40d42e669b2e0760250f9d93 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Sat, 7 Nov 2015 11:04:33 +0000 Subject: [PATCH] [PATCH v4 4/7] emacs/show: Remove the 'no-buttons option of `notmuch-show-insert-bodypart' --- 6b/e0e60da8ae21cf9decbed06342426e305b7e9e | 99 +++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 6b/e0e60da8ae21cf9decbed06342426e305b7e9e diff --git a/6b/e0e60da8ae21cf9decbed06342426e305b7e9e b/6b/e0e60da8ae21cf9decbed06342426e305b7e9e new file mode 100644 index 000000000..4e8cf6281 --- /dev/null +++ b/6b/e0e60da8ae21cf9decbed06342426e305b7e9e @@ -0,0 +1,99 @@ +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 3FD986DE1744 + for ; Sat, 7 Nov 2015 03:05:05 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.145 +X-Spam-Level: +X-Spam-Status: No, score=-0.145 tagged_above=-999 required=5 tests=[AWL=0.425, + 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 AIEEqRYGe3iu for ; + Sat, 7 Nov 2015 03:05:03 -0800 (PST) +Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com + [209.85.212.179]) + by arlo.cworth.org (Postfix) with ESMTPS id 8A0126DE1916 + for ; Sat, 7 Nov 2015 03:04:51 -0800 (PST) +Received: by wikq8 with SMTP id q8so43978314wik.1 + for ; Sat, 07 Nov 2015 03:04:50 -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=JENGZov6KU97kg39mFI3k+XMtL72CPFJ5HLoSW6v6u8=; + b=IcIpx8BYY0z97ccF+QTJ5bDhbw1EEiaOeBklYbuO5uGXlYsxtABbpAwwC6DSWHCTmy + a/icgGFA827x/9ICZ5mrh4mO10cfqnsBoJnkRvq1/zakY4y824ecRj5Cc13yOWmRteBS + Kvs0dZUYKcB+nkDwjRYUYSLXVa2bGl4LDe72STAttI3kkMQpxmg9INyOPZnPdRMbuUSi + qGDqCfjZ1t33Co78S1fPvNlOERj2DZpjE0dn1qZWF7/IfYnZ3aSCNiY9zdelYbcmy+2e + BtSqr3QKVN9lAlujxTsl8gx4xJFfzyR+t+x8j5UyN+lM+2VxZlTgIkLvkOE2iSTJujgX + pKiQ== +X-Received: by 10.194.105.38 with SMTP id gj6mr18731440wjb.130.1446894290017; + Sat, 07 Nov 2015 03:04:50 -0800 (PST) +Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162]) + by smtp.gmail.com with ESMTPSA id vr10sm4538429wjc.38.2015.11.07.03.04.48 + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Sat, 07 Nov 2015 03:04:49 -0800 (PST) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH v4 4/7] emacs/show: Remove the 'no-buttons option of + `notmuch-show-insert-bodypart' +Date: Sat, 7 Nov 2015 11:04:33 +0000 +Message-Id: <1446894276-7814-5-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 2.1.4 +In-Reply-To: <1446894276-7814-1-git-send-email-markwalters1009@gmail.com> +References: <1446894276-7814-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: Sat, 07 Nov 2015 11:05:05 -0000 + +From: David Edmondson + +No code uses the 'no-buttons argument to +`notmuch-show-insert-bodypart', so remove it. +--- + emacs/notmuch-show.el | 7 ++----- + 1 file changed, 2 insertions(+), 5 deletions(-) + +diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el +index 9fc79e0..f8184e2 100644 +--- a/emacs/notmuch-show.el ++++ b/emacs/notmuch-show.el +@@ -956,9 +956,7 @@ (defun notmuch-show-insert-bodypart (msg part depth &optional hide) + + 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)) +@@ -969,8 +967,7 @@ (defun notmuch-show-insert-bodypart (msg part depth &optional hide) + (beg (point)) + ;; We omit the part button for the first (or only) part if + ;; this is text/plain, or 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 +-- +2.1.4 + -- 2.26.2