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