From: David Edmondson Date: Tue, 9 Feb 2016 20:31:05 +0000 (+0000) Subject: Re: [PATCH v4 4/7] emacs/show: Remove the 'no-buttons option of `notmuch-show-insert... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4352c9ef2dc8348579d9cc4a5c38e7ab67ab8cfd;p=notmuch-archives.git Re: [PATCH v4 4/7] emacs/show: Remove the 'no-buttons option of `notmuch-show-insert-bodypart' --- diff --git a/52/659c2b42fb4090ea8c69bb97b1e72ae1ebce8e b/52/659c2b42fb4090ea8c69bb97b1e72ae1ebce8e new file mode 100644 index 000000000..cc9d7bc17 --- /dev/null +++ b/52/659c2b42fb4090ea8c69bb97b1e72ae1ebce8e @@ -0,0 +1,120 @@ +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 485006DE1765 + for ; Tue, 9 Feb 2016 12:31:10 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.083 +X-Spam-Level: +X-Spam-Status: No, score=-0.083 tagged_above=-999 required=5 + tests=[AWL=-0.016, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, + RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, + RCVD_IN_MSPIKE_WL=-0.01, SPF_NEUTRAL=0.652, UNPARSEABLE_RELAY=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 HTMUQsKlIfIw for ; + Tue, 9 Feb 2016 12:31:08 -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 10ED16DE1635 for + ; Tue, 9 Feb 2016 12:31:08 -0800 (PST) +Received: by mail-wm0-f67.google.com with SMTP id g62so48966wme.2 + for ; Tue, 09 Feb 2016 12:31:07 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=dme-org.20150623.gappssmtp.com; s=20150623; + h=to:subject:in-reply-to:references:from:date:message-id:mime-version + :content-type; bh=NtIR1h+52vW3r1iPYVOaIofqE7rXZG24yMIACReV7i4=; + b=I1yXH6ZNhVbRW7ZM+7EUwtjpF7QYGqBYijo7dvUEJyDbE4ojpb/JY+g6lm9JJYoFm5 + So2G2aAX9PSn4ba33wbrCRxxoZENcAyBp1K2fz5SsMc2cZ7StbAmOt0jHBDk8ITxPyHq + EKaQfoIZ5azAYg2eEXhAolncEQnSPYRwgf21SyCZxh18PvUa3oGRImW3mLvALST0PQFw + GF3NZJElH3kKKSt2448NsdQfe7avWJixGkclgEd9UICNaFFBZNalamfpdqw0gZiceuE6 + MZ8O0LokkTypqbb84pvsOQbCYUsxBlIQgKp5ToB36Q7QYSjEWSUcA5OFf5fiWPOIp6zC + d9wg== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:to:subject:in-reply-to:references:from:date + :message-id:mime-version:content-type; + bh=NtIR1h+52vW3r1iPYVOaIofqE7rXZG24yMIACReV7i4=; + b=cq5XvcvLbqpxMWBNieiYzEhrj/lA+iZd2JtZ7akuvZmUzekWC/Cuz1YD02r+PuMWyk + 5kuJTXvIm+MDbZlGFVRcBZr4ZKrkxKSBe7uqoLPWRWOmSC7t4bhMfFPHVZh5eTRBzK3z + c4FEjytiLiG1+M4/sPJM/e/IN9ppgUc+xZRVuuKzu+qSKVN673EpLnModd0RZ03j54QB + ZnhwPcjQFGtlrk+1ofhjdchx5UG4+bY/bX5/qIbWAhlGnHnk+bZn0s1e1AT3aUB8xC3z + /ab7OLKTXE+p6J/PH3SfbSTe0qvMKZdwkV4lraG9vDX8GG3gPhNa9wjfGWa4H5jPM9t0 + ilBg== +X-Gm-Message-State: + AG10YOQM91+Yba6TEIxwfKDE3qJRZy4hCgYQaYnAVnAMVrqAlOy1TVzU0EWLwlskDiFhnw== +X-Received: by 10.28.145.7 with SMTP id t7mr7019661wmd.98.1455049866755; + Tue, 09 Feb 2016 12:31:06 -0800 (PST) +Received: from disaster-area.hh.sledj.net + ([2a01:348:1a2:1:ea39:35ff:fe2c:a227]) + by smtp.gmail.com with ESMTPSA id g126sm3942653wmf.16.2016.02.09.12.31.05 + (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Tue, 09 Feb 2016 12:31:05 -0800 (PST) +Received: from localhost (disaster-area.hh.sledj.net [local]) + by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id 634294d7; + Tue, 9 Feb 2016 20:31:05 +0000 (UTC) +To: Mark Walters , notmuch@notmuchmail.org +Subject: Re: [PATCH v4 4/7] emacs/show: Remove the 'no-buttons option of + `notmuch-show-insert-bodypart' +In-Reply-To: <1446894276-7814-5-git-send-email-markwalters1009@gmail.com> +References: <1446894276-7814-1-git-send-email-markwalters1009@gmail.com> + <1446894276-7814-5-git-send-email-markwalters1009@gmail.com> +From: David Edmondson +Date: Tue, 09 Feb 2016 20:31:05 +0000 +Message-ID: +MIME-Version: 1.0 +Content-Type: text/plain +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: Tue, 09 Feb 2016 20:31:10 -0000 + +On Sat, Nov 07 2015, Mark Walters wrote: +> From: David Edmondson +> +> No code uses the 'no-buttons argument to +> `notmuch-show-insert-bodypart', so remove it. + +Looks fine. +> --- +> 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