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 05076429E25 for ; Sun, 27 Nov 2011 18:52:56 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[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 7ec3o2bG15OL for ; Sun, 27 Nov 2011 18:52:55 -0800 (PST) Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU [18.7.68.36]) by olra.theworths.org (Postfix) with ESMTP id 6D105431FB6 for ; Sun, 27 Nov 2011 18:52:55 -0800 (PST) X-AuditID: 12074424-b7ef76d0000008dc-94-4ed2f78774bd Received: from mailhub-auth-2.mit.edu ( [18.7.62.36]) by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP id 7B.95.02268.787F2DE4; Sun, 27 Nov 2011 21:52:55 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id pAS2qs0t008516; Sun, 27 Nov 2011 21:52:55 -0500 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id pAS2qrTC024647 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Sun, 27 Nov 2011 21:52:54 -0500 (EST) Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) (envelope-from ) id 1RUrMx-0000Rz-TZ; Sun, 27 Nov 2011 21:54:59 -0500 From: Austin Clements To: Dmitry Kurochkin , notmuch@notmuchmail.org Subject: Re: [PATCH 3/3] emacs: do not call notmuch show for non-inlinable parts In-Reply-To: <1322271878-32614-3-git-send-email-dmitry.kurochkin@gmail.com> References: <1322271878-32614-1-git-send-email-dmitry.kurochkin@gmail.com> <1322271878-32614-3-git-send-email-dmitry.kurochkin@gmail.com> User-Agent: Notmuch/0.9+77~gfdb7dac (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu) Date: Sun, 27 Nov 2011 21:54:59 -0500 Message-ID: <87d3cd2by4.fsf@awakening.csail.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrEIsWRmVeSWpSXmKPExsUixG6notv+/ZKfwe7jbBZXt/azW1y/OZPZ gclj56y77B7PVt1iDmCK4rJJSc3JLEst0rdL4Mr4few2c0ETZ8WhA49ZGxhXs3cxcnJICJhI PJq2jxHCFpO4cG89WxcjF4eQwD5GiWcv7zFBOBsYJQ72fWeBcE4ySfQuWsIM4SxhlLj5aiIT SD+bgIbEtv3LwWaJCHhJfLrewQxiCwsESOz/fxqom4ODU8BbYsesQojeTkaJi8vfg9WLCsRK vJ09EayeRUBVYsnUn2wgNi/QfcfOH4ayBSVOznzCAmIzC2hJ3Pj3kmkCo8AsJKlZSFILGJlW Mcqm5Fbp5iZm5hSnJusWJyfm5aUW6Zrr5WaW6KWmlG5iBAeli8oOxuZDSocYBTgYlXh4N1y+ 5CfEmlhWXJl7iFGSg0lJlNf4G1CILyk/pTIjsTgjvqg0J7X4EKMEB7OSCG/PUaAcb0piZVVq UT5MSpqDRUmc12ang5+QQHpiSWp2ampBahFMVoaDQ0mC9ynIUMGi1PTUirTMnBKENBMHJ8hw HqDhsSA1vMUFibnFmekQ+VOMilLivO9AEgIgiYzSPLheWNJ4xSgO9Iow7zWQKh5gwoHrfgU0 mAloMMfMCyCDSxIRUlINjNOFV6U0dURtdH6tWlCspP1ftWYCT80UlcPsqz99X7zXLMRK9sSc /es17hpf/jH/++4/bGXCVRyZ615seD3rVt/zafolMwS4Dx8+enfFKb37V42eLGvN+JBUNK9M O7TvcipzuLHQ5G+6f3b6/NsfdjLj+Y2HIrqHmfcemXXdPHaR69NGtd+ec+cqsRRnJBpqMRcV JwIAsVVhOPUCAAA= 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, 28 Nov 2011 02:52:56 -0000 LGTM. We should probably be paying attention to the content disposition, but this is a definite improvement on what we do now. As an interesting side-note, this lets us inline a handful of types that we previously wouldn't, like application/emacs-lisp. On Sat, 26 Nov 2011 05:44:38 +0400, Dmitry Kurochkin wrote: > Before the change, there was a workaround to avoid notmuch show calls > for parts with application/* Content-Type. But non-inlinable parts > are not limited to this Content-Type (e.g. mp3 files have audio/mpeg > Content-Type and are not inlinable). For such parts > `notmuch-show-insert-part-*/*' handler is called which unconditionally > fetches contents for all parts. > > The patch moves content fetching from `notmuch-show-insert-part-*/*' > to `notmuch-show-mm-display-part-inline' function after MIME inlinable > checks are done to avoid useless notmuch show calls. The > application/* hack is no longer needed and removed. > --- > emacs/notmuch-show.el | 17 +++++------------ > test/emacs | 1 - > 2 files changed, 5 insertions(+), 13 deletions(-) Yay!