--- /dev/null
+Return-Path: <dme@dme.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id E2C676DE1401\r
+ for <notmuch@notmuchmail.org>; Tue, 8 Mar 2016 09:13:08 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.141\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.141 tagged_above=-999 required=5\r
+ tests=[AWL=-0.074, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,\r
+ RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01,\r
+ RCVD_IN_MSPIKE_WL=-0.01, SPF_NEUTRAL=0.652, UNPARSEABLE_RELAY=0.001]\r
+ autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id JqKq9Z7nJzQp for <notmuch@notmuchmail.org>;\r
+ Tue, 8 Mar 2016 09:13:07 -0800 (PST)\r
+Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com\r
+ [74.125.82.65]) by arlo.cworth.org (Postfix) with ESMTPS id CC0B26DE1006 for\r
+ <notmuch@notmuchmail.org>; Tue, 8 Mar 2016 09:13:06 -0800 (PST)\r
+Received: by mail-wm0-f65.google.com with SMTP id p65so5345034wmp.1\r
+ for <notmuch@notmuchmail.org>; Tue, 08 Mar 2016 09:13:06 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=dme-org.20150623.gappssmtp.com; s=20150623;\r
+ h=from:to:subject:date:message-id:in-reply-to:references;\r
+ bh=KJEei7sQakby4keHh2jgIWB4Ki1uq8SAK2PIrYc1xsc=;\r
+ b=aPuDm2aeCXfXNIXXb2507U5I73p09dcLIZgj0DJyW7NsLvTlkjInHvHaLBpJhU8s47\r
+ pJp31JqWP12rMdZV+o2uCWp1rICM/Rpwor22JswXnCemKs0TIuarG8kXFXAK7cgBe5k0\r
+ jYOfvQhfcGXlP1QJKi3ZjvUt7gNFSQKEKV+cOErQ/sVhDkebW+M/sL7eK6TIb9ArP17z\r
+ lDGWmhn0/qETuM7RqizDP44CpYVThhOZOcSz1YEjcFZADAjC6rmsApbCuqetKm+gsoZ4\r
+ 6B6TR4swaPTmjMwubB05+nMj+X8HmO2ZKVZGSgqC6O0+hGl2FHzMY7HrXT+aWsf9Fb93\r
+ iKDg==\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=1e100.net; s=20130820;\r
+ h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to\r
+ :references;\r
+ bh=KJEei7sQakby4keHh2jgIWB4Ki1uq8SAK2PIrYc1xsc=;\r
+ b=Zb5k/AS6YbdF+APzaQfjRBjsDOVuajAfqfsdGiIC+JivcJ7w9vC1pLaC8rfU1uED5l\r
+ 4qFKdK/vZIdca+Fmr2SLB6Gz2kerTPl/MXyYYP0UZ17THcYMPBjpMlgzpXNQ7CpKUS5T\r
+ otasiUz/EGV4eeDQFAmF861bPn7VCLtw7n3u0f4UEc6TDThidLmgQmiZA0DY5mtQrZ0P\r
+ nHQfG6Ua4+DV+kOLH2hG7+SLfjn4ouO+Rjp9Tl8+pvcSLy/mIcdih6PjypDX1jjcsApQ\r
+ /xe4uHQznUR54lDaxS1HsOFCao1rCzo8080JhEpGvYQqiAbbdPko7v7izRGvrDtBvSY/\r
+ BxIg==\r
+X-Gm-Message-State:\r
+ AD7BkJLUzaI0B7YWV54Fj5zVnY7p0yrSYM9+8HVwRXZQezeE3cEcnkM8jH52qnQ/yO9Dzw==\r
+X-Received: by 10.194.83.134 with SMTP id q6mr29769965wjy.131.1457457185410;\r
+ Tue, 08 Mar 2016 09:13:05 -0800 (PST)\r
+Received: from disaster-area.hh.sledj.net\r
+ ([2a01:348:1a2:1:ea39:35ff:fe2c:a227])\r
+ by smtp.gmail.com with ESMTPSA id j18sm19966565wmd.2.2016.03.08.09.13.02\r
+ for <notmuch@notmuchmail.org>\r
+ (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Tue, 08 Mar 2016 09:13:04 -0800 (PST)\r
+Received: from localhost (disaster-area.hh.sledj.net [local])\r
+ by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id 233c1941\r
+ for <notmuch@notmuchmail.org>; Tue, 8 Mar 2016 17:12:59 +0000 (UTC)\r
+From: David Edmondson <dme@dme.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v1 2/3] emacs: Neaten `notmuch-show-insert-bodypart-internal'.\r
+Date: Tue, 8 Mar 2016 17:12:58 +0000\r
+Message-Id: <1457457179-4707-3-git-send-email-dme@dme.org>\r
+X-Mailer: git-send-email 2.1.4\r
+In-Reply-To: <1457457179-4707-1-git-send-email-dme@dme.org>\r
+References: <1457457179-4707-1-git-send-email-dme@dme.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 08 Mar 2016 17:13:09 -0000\r
+\r
+---\r
+ emacs/notmuch-show.el | 25 ++++++++++---------------\r
+ 1 file changed, 10 insertions(+), 15 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index 6e268f9..f739987 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -848,21 +848,16 @@ will return nil if the CID is unknown or cannot be retrieved."\r
+ ;; \f\r
+\r
+ \r
+ (defun notmuch-show-insert-bodypart-internal (msg part content-type nth depth button)\r
+- (let ((handlers (notmuch-show-handlers-for content-type)))\r
+- ;; Run the content handlers until one of them returns a non-nil\r
+- ;; value.\r
+- (while (and handlers\r
+- (not (condition-case err\r
+- (funcall (car handlers) msg part content-type nth depth button)\r
+- ;; Specifying `debug' here lets the debugger\r
+- ;; run if `debug-on-error' is non-nil.\r
+- ((debug error)\r
+- (progn\r
+- (insert "!!! Bodypart insert error: ")\r
+- (insert (error-message-string err))\r
+- (insert " !!!\n") nil)))))\r
+- (setq handlers (cdr handlers))))\r
+- t)\r
++ ;; Run the handlers until one of them succeeds.\r
++ (loop for handler in (notmuch-show-handlers-for content-type)\r
++ until (condition-case err\r
++ (funcall handler msg part content-type nth depth button)\r
++ ;; Specifying `debug' here lets the debugger run if\r
++ ;; `debug-on-error' is non-nil.\r
++ ((debug error)\r
++ (insert "!!! Bodypart handler `" (prin1-to-string handler) "' threw an error:\n"\r
++ "!!! " (error-message-string err) "\n")\r
++ nil))))\r
+ \r
+ (defun notmuch-show-create-part-overlays (button beg end)\r
+ "Add an overlay to the part between BEG and END"\r
+-- \r
+2.1.4\r
+\r