[PATCH 1/1] emacs/notmuch-show.el: handle bodypart insert error
authorTomi Ollila <tomi.ollila@iki.fi>
Sun, 21 Oct 2012 12:58:56 +0000 (15:58 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:49:56 +0000 (09:49 -0800)
31/79ba19b6a2c363ce0df3ead7f1b0617eae2049 [new file with mode: 0644]

diff --git a/31/79ba19b6a2c363ce0df3ead7f1b0617eae2049 b/31/79ba19b6a2c363ce0df3ead7f1b0617eae2049
new file mode 100644 (file)
index 0000000..34ecc25
--- /dev/null
@@ -0,0 +1,88 @@
+Return-Path: <too@guru-group.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 68C23431FAF\r
+       for <notmuch@notmuchmail.org>; Sun, 21 Oct 2012 05:59:05 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id UdCDaXosseER for <notmuch@notmuchmail.org>;\r
+       Sun, 21 Oct 2012 05:59:01 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+       by olra.theworths.org (Postfix) with ESMTP id C9207431FAE\r
+       for <notmuch@notmuchmail.org>; Sun, 21 Oct 2012 05:59:01 -0700 (PDT)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+       id BE13D100372; Sun, 21 Oct 2012 15:59:04 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/1] emacs/notmuch-show.el: handle bodypart insert error\r
+Date: Sun, 21 Oct 2012 15:58:56 +0300\r
+Message-Id: <1350824336-11060-1-git-send-email-tomi.ollila@iki.fi>\r
+X-Mailer: git-send-email 1.7.1\r
+Cc: tomi.ollila@iki.fi\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://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: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 21 Oct 2012 12:59:05 -0000\r
+\r
+When inserting of email bodypart failes, insert a failure message\r
+to the buffer (and continue) instead of halting the insertion of\r
+the rest of that email thread in question.\r
+---\r
+\r
+The failure of inserting bodyparts can be experienced in thread\r
+starting with \r
+\r
+id:"m31ul3qo4w.fsf@quad.robs.office"\r
+\r
+the email id:"87d31artti.fsf@inf-8657.int-evry.fr"\r
+makes the halt happen -- when this patch is applied\r
+the message !!! bodypart insertion error !!! appears in the\r
+buffer.\r
+\r
+for example the email id:"87mwzgxq5l.fsf@inf-8657.int-evry.fr"\r
+\r
+is not shown in that thread until this patch is applied.\r
+\r
+Whenever everyone can read these emails we can try to figure\r
+out why id:"1349333712-18347-1-git-send-email-tomi.ollila@iki.fi"\r
+did not fix some calendar bodypart for Olivier.\r
+\r
+Tomi\r
+\r
+ emacs/notmuch-show.el |    4 +++-\r
+ 1 files changed, 3 insertions(+), 1 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index f273eb4..651a5ee 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -815,7 +815,9 @@ message at DEPTH in the current thread."\r
+     ;; Run the content handlers until one of them returns a non-nil\r
+     ;; value.\r
+     (while (and handlers\r
+-              (not (funcall (car handlers) msg part content-type nth depth declared-type)))\r
++              (not (condition-case nil\r
++                       (funcall (car handlers) msg part content-type nth depth declared-type)\r
++                     (error (progn (insert "!!! bodypart insert error !!!\n") nil)))))\r
+       (setq handlers (cdr handlers))))\r
+   t)\r
\r
+-- \r
+1.7.1\r
+\r