From 32d811de00585285415f2e74f7c6f6540f7776de Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Sat, 20 Feb 2016 18:24:39 +0000 Subject: [PATCH] [PATCH v6 5/6] emacs/show: Remove the 'no-buttons option of `notmuch-show-insert-bodypart' --- 28/2e2234c1a782cf5ae82b4c50343f803d67135b | 116 ++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 28/2e2234c1a782cf5ae82b4c50343f803d67135b diff --git a/28/2e2234c1a782cf5ae82b4c50343f803d67135b b/28/2e2234c1a782cf5ae82b4c50343f803d67135b new file mode 100644 index 000000000..e9bf5565d --- /dev/null +++ b/28/2e2234c1a782cf5ae82b4c50343f803d67135b @@ -0,0 +1,116 @@ +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 8973D6DE187B + for ; Sat, 20 Feb 2016 10:25:10 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.283 +X-Spam-Level: +X-Spam-Status: No, score=-0.283 tagged_above=-999 required=5 tests=[AWL=0.287, + 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 f3CkXgS71J1j for ; + Sat, 20 Feb 2016 10:25:08 -0800 (PST) +Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com + [74.125.82.45]) by arlo.cworth.org (Postfix) with ESMTPS id 693886DE186E for + ; Sat, 20 Feb 2016 10:24:56 -0800 (PST) +Received: by mail-wm0-f45.google.com with SMTP id g62so107921917wme.0 + for ; Sat, 20 Feb 2016 10:24:56 -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=EAXBYUl71fhbS6OiyyBabpTmArfujc13gDf7pA1YNPU=; + b=Gs6EPepGa1jE8AatOwaGya3NZ7ENFHy6f8c+wQTr6qXbNeHeV9u45aijUbI5dae4f5 + 0UkkHkIQHmgswOxUXoCxqLOPKMiVdnHijmvalcSPGjTClNYPUorBbFHRujWgzaZlReI9 + p6EneFqgQMttl7Eh9rEoIjkX93+S53jj8TihF5fYnucTgUFnAP+FMPgSWhc3TEehcZrK + zBkFg4xj0vhGnn2LljmdNaEM+jMmK7kKxrUlU+iNaHZHZAggZ4uMXl4a+OxgALyaG5QI + pV2RAfeH+346jGJ/Zd5DQaPkXgmxh5/5iNurWO5hPSWWkIzyuYU0GlRCGUb6eYcOwSK6 + l3Gg== +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=EAXBYUl71fhbS6OiyyBabpTmArfujc13gDf7pA1YNPU=; + b=QTvDBk+R/fHBmeeAHLGKnEA+X4tCLp3fQyCuHkoCEteWoKYhjUgmddFGmZ4JhN2Kno + CuxRRDpF/RagEGRT8x9k1fVnR9NZnM2WLw7Y8kmUHZ6RYKErxRoRcz9/a72pvDWAU5hv + jbePlFIYa5AiA/e539+tByWmwP9XX6m5L/VgZyvXO3ZkwIuj1FLq52EQwe3MArTU31pc + hP93hGa+libeVvRFF1P5ajr6nJVAf7z6YBWnEV/vlG+rNqzwrhxvndc6albZX2QOoLKF + zRVgwKgUZCUu67YUwbQIJh91k717Apg2AnQhXSIA42Qpr3OQADZPm9EPU6qbREKH8YBg + f2GA== +X-Gm-Message-State: + AG10YORKp7jNlhA2PtRfLfADRxZfzV+Gi4HC/cxx9Oq8iwR7Lcl1wqMrgZxk5GNQu+PzcA== +X-Received: by 10.28.146.145 with SMTP id u139mr3709360wmd.76.1455992695212; + Sat, 20 Feb 2016 10:24:55 -0800 (PST) +Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162]) + by smtp.gmail.com with ESMTPSA id t12sm13044826wmt.20.2016.02.20.10.24.54 + (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Sat, 20 Feb 2016 10:24:54 -0800 (PST) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH v6 5/6] emacs/show: Remove the 'no-buttons option of + `notmuch-show-insert-bodypart' +Date: Sat, 20 Feb 2016 18:24:39 +0000 +Message-Id: <1455992680-24978-6-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 2.1.4 +In-Reply-To: <1455992680-24978-1-git-send-email-markwalters1009@gmail.com> +References: <1455992680-24978-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, 20 Feb 2016 18:25:10 -0000 + +From: David Edmondson + +No code uses the 'no-buttons argument to +`notmuch-show-insert-bodypart', so remove it. +--- + emacs/notmuch-show.el | 10 +++------- + 1 file changed, 3 insertions(+), 7 deletions(-) + +diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el +index 8222f0d..2a81ec1 100644 +--- a/emacs/notmuch-show.el ++++ b/emacs/notmuch-show.el +@@ -959,9 +959,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)) +@@ -972,12 +970,10 @@ (defun notmuch-show-insert-bodypart (msg part depth &optional hide) + (beg (point)) + ;; This default header-p function omits the part button for + ;; the first (or only) part if this is text/plain. +- (button (when (and (not (equal hide 'no-buttons)) +- (funcall notmuch-show-insert-header-p-function part hide)) ++ (button (when (funcall notmuch-show-insert-header-p-function 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