From 2a2b8860cb97fcf33b5b563a34dc1b5b418e7435 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 4 Feb 2014 02:45:32 +1600 Subject: [PATCH] [PATCH 0/2] --- 12/713552a741ec010273fd6818e351ba05b09b33 | 125 ++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 12/713552a741ec010273fd6818e351ba05b09b33 diff --git a/12/713552a741ec010273fd6818e351ba05b09b33 b/12/713552a741ec010273fd6818e351ba05b09b33 new file mode 100644 index 000000000..e4fd1a50e --- /dev/null +++ b/12/713552a741ec010273fd6818e351ba05b09b33 @@ -0,0 +1,125 @@ +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 11A8B431E64 + for ; Mon, 3 Feb 2014 02:55:03 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 1.625 +X-Spam-Level: * +X-Spam-Status: No, score=1.625 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, + SUBJ_ALL_CAPS=1.625] 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 hmsKK2g8SJWD for ; + Mon, 3 Feb 2014 02:54:56 -0800 (PST) +X-Greylist: delayed 487 seconds by postgrey-1.32 at olra; + Mon, 03 Feb 2014 02:54:56 PST +Received: from qmta15.westchester.pa.mail.comcast.net + (qmta15.westchester.pa.mail.comcast.net [76.96.59.228]) + by olra.theworths.org (Postfix) with ESMTP id 6287E431FDB + for ; Mon, 3 Feb 2014 02:54:56 -0800 (PST) +Received: from omta10.westchester.pa.mail.comcast.net ([76.96.62.28]) + by qmta15.westchester.pa.mail.comcast.net with comcast + id Mml01n0040cZkys5FmmoN5; Mon, 03 Feb 2014 10:46:48 +0000 +Received: from odin.tremily.us ([24.18.63.50]) + by omta10.westchester.pa.mail.comcast.net with comcast + id Mmmm1n00G152l3L3Wmmn6y; Mon, 03 Feb 2014 10:46:48 +0000 +Received: from mjolnir.tremily.us (unknown [192.168.0.140]) + by odin.tremily.us (Postfix) with ESMTPS id 37353FB4C69; + Mon, 3 Feb 2014 02:46:45 -0800 (PST) +Received: (nullmailer pid 31476 invoked by uid 1000); + Mon, 03 Feb 2014 10:45:48 -0000 +From: "W. Trevor King" +To: notmuch@notmuchmail.org +Subject: [PATCH 0/2] +Date: Mon, 3 Feb 2014 02:45:32 -0800 +Message-Id: +X-Mailer: git-send-email 1.8.5.2.8.g0f6c0d1 +In-Reply-To: <877g9chbay.fsf@qmul.ac.uk> +References: <877g9chbay.fsf@qmul.ac.uk> +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; + s=q20121106; t=1391424408; + bh=TpnJ9HjpB0UGthm9im+bFc4fZ3bxjNMLDBAnqrYPbhQ=; + h=Received:Received:Received:Received:From:To:Subject:Date: + Message-Id; + b=ehOuuUqui6CedZZFuO6PEfrkriNwAiPiwL85u8eGcyeRR/L2JmnulebCdf7vUK4ZT + ZYwQN04Xo1WSUIetcw6U5HGfREoPtDSY9eq7wRPwSwTGALFQKcrwY8xt+mBA6Zszrk + bs2QGBpzqN1tQDQDmw/Mg+UvqXbp842T20dmAxcev9H5ka3m0IccyIed1zaBdODMeY + 3VX+mmgI2EIghZ8P8KPTCOAQLFyleLDCKkWF0Uu4d6uxop9gWu2IgP4LAUy5l91Q2G + y9dJprfOtid1ZxNY+GWOy70eBSjy4OErr/u9ItZZlQvLkWK3ZX7wK01cZqWaMpcQZf + pRPzynCEVOC0A== +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, 03 Feb 2014 10:55:03 -0000 + +On Mon, Feb 03, 2014 at 08:04:21AM +0000, Mark Walters wrote: +> I think notmuch-show.c gets most of the header and related +> information directly from the mail file not from the database +> directly. I think we use gmime for that parsing so adding an extra +> output pair for content-description there should be +> sufficient. (This is lines 655-700 or so notmuch-show.c) + +Thanks, that's exactly what I needed :). + +> I think the emacs side should be roughly as above: we would need to +> check that the default filename offered when saving is still +> correct. + +notmuch-save-attachments is using: + + (assq 'filename disposition) + +and it looks like 'name' in notmuch-show-insert-part-header is only +used for the button text. + +> Stylistically I think +> + (name (or (plist-get part :content-description) +> + (plist-get part :filename))) +> +> is a little nicer. + +Thanks for clearing up my search-engine Lisp ;). Fixed in these +patches. + +Cheers, +Trevor + +p.s. I checked a few earlier patches on the list and didn't see +reviewer CCs. On the other hand, I didn't see any Reply-To headers +either, so I'm CCing my reviewers to be safe ;). Let me know if the +convention is to not CC reviewers, and I'll restrict future +submissions to notmuch@. + +W. Trevor King (2): + notmuch-show: Add content-description output pair + emacs: Prefer Content-Description over filename for part buttons + + NEWS | 9 +++ + emacs/notmuch-show.el | 4 +- + notmuch-show.c | 8 +++ + test/T160-json.sh | 4 +- + test/T170-sexp.sh | 4 +- + test/T450-emacs-show.sh | 12 ++++ + test/corpus/cur/24:2, | 1 + + .../notmuch-show-buttons-content-description | 84 ++++++++++++++++++++++ + .../notmuch-show-buttons-filename | 74 +++++++++++++++++++ + 9 files changed, 195 insertions(+), 5 deletions(-) + create mode 100644 test/emacs-show.expected-output/notmuch-show-buttons-content-description + create mode 100644 test/emacs-show.expected-output/notmuch-show-buttons-filename + +-- +1.8.5.2.8.g0f6c0d1 + -- 2.26.2