From 02b9b6ba7a8d5efbf02a1ec97a8f8dff2da9f144 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Mon, 12 May 2014 23:18:29 +0100 Subject: [PATCH] Re: [PATCH v3 5/9] emacs/show: Remove the 'no-buttons option of `notmuch-show-insert-bodypart' --- 1d/e6b5e0b958d799da3c4531b75d45d3e2c186cb | 116 ++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 1d/e6b5e0b958d799da3c4531b75d45d3e2c186cb diff --git a/1d/e6b5e0b958d799da3c4531b75d45d3e2c186cb b/1d/e6b5e0b958d799da3c4531b75d45d3e2c186cb new file mode 100644 index 000000000..75977576f --- /dev/null +++ b/1d/e6b5e0b958d799da3c4531b75d45d3e2c186cb @@ -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 olra.theworths.org (Postfix) with ESMTP id 1ADFF431FC2 + for ; Mon, 12 May 2014 15:18:41 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.201 +X-Spam-Level: +X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, + RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id EmHcPX3ikwcc for ; + Mon, 12 May 2014 15:18:33 -0700 (PDT) +Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com + [209.85.212.180]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 9368A431FAF + for ; Mon, 12 May 2014 15:18:33 -0700 (PDT) +Received: by mail-wi0-f180.google.com with SMTP id hi2so5304364wib.1 + for ; Mon, 12 May 2014 15:18:32 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:subject:in-reply-to:references:user-agent:date:message-id + :mime-version:content-type; + bh=6A6OTx7djqhJ/kVwXJ/HVfQImNrTkqpToAi0Bu00olY=; + b=Op+7NskID5EKT/1M2FzF74cvsPUZtUUg6UvGypL5pGjv35mjZY60lOrKJ3rn3HtdlJ + kg1MR+TOUq8vlkptDxVy0ig1SRfeEZQP5al0nwjviDyazzHVJE1L7a3U7smiPdWijI0A + I7mucKs8mqgg2bY9qOJ1tORkAstmxPXiNLpfDF6srkL8YzcOyQrzkMPEOR2Xc2o/wHHk + Pipo2C4pHvjRCIPMa3w89eMRnE4Gvud6uHErMFw6qhrz1yJR7EToQpzFBvdqO4ba3Y5g + lQUAW6CI7JulDtQbrxeYfusg+SVKfFx6xmzQZ+B5T2fvqHBkK2H2NmaWyz6iQTLK9PRJ + mmXw== +X-Received: by 10.180.198.48 with SMTP id iz16mr17804746wic.29.1399933112434; + Mon, 12 May 2014 15:18:32 -0700 (PDT) +Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162]) + by mx.google.com with ESMTPSA id + dn4sm18384696wib.18.2014.05.12.15.18.31 for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Mon, 12 May 2014 15:18:31 -0700 (PDT) +From: Mark Walters +To: David Edmondson , notmuch@notmuchmail.org +Subject: Re: [PATCH v3 5/9] emacs/show: Remove the 'no-buttons option of + `notmuch-show-insert-bodypart' +In-Reply-To: <1399897769-26809-6-git-send-email-dme@dme.org> +References: <87sixdujkv.fsf@qmul.ac.uk> + <1399897769-26809-1-git-send-email-dme@dme.org> + <1399897769-26809-6-git-send-email-dme@dme.org> +User-Agent: Notmuch/0.15.2+615~g78e3a93 (http://notmuchmail.org) Emacs/23.4.1 + (x86_64-pc-linux-gnu) +Date: Mon, 12 May 2014 23:18:29 +0100 +Message-ID: <87k39qk5e2.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +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: Mon, 12 May 2014 22:18:41 -0000 + +On Mon, 12 May 2014, David Edmondson wrote: +> No code uses the 'no-buttons argument to +> `notmuch-show-insert-bodypart', so remove it. +> --- +> emacs/notmuch-show.el | 9 +++------ +> 1 file changed, 3 insertions(+), 6 deletions(-) +> +> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el +> index e511655..981b922 100644 +> --- a/emacs/notmuch-show.el +> +++ b/emacs/notmuch-show.el +> @@ -915,9 +915,7 @@ message at DEPTH in the current thread." +> +> 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)) +> @@ -926,9 +924,8 @@ useful for quoting in replies)." +> ;; Hide the part initially if HIDE is t. +> (show-part (not (equal hide t))) + +Just a triviality: we might as well make the above (not hide) now. + +MW + +> ;; 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)) +> - (funcall notmuch-show-insert-header-p-function part)) +> + ;; this is text/plain. +> + (button (when (funcall notmuch-show-insert-header-p-function part) +> (notmuch-show-insert-part-header nth mime-type content-type (plist-get part :filename)))) +> (content-beg (point))) +> +> -- +> 2.0.0.rc0 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2