Re: [PATCH v4 13/16] add indexopts to notmuch python bindings.
[notmuch-archives.git] / ca / 117065b07709b70e4bf528281efd4d37721c2d
1 Return-Path: <too@guru-group.fi>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 7C8F8431FAF\r
6         for <notmuch@notmuchmail.org>; Sun, 21 Oct 2012 06:35:08 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id AioeRUbLvQay for <notmuch@notmuchmail.org>;\r
16         Sun, 21 Oct 2012 06:35:08 -0700 (PDT)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id EE7CB431FAE\r
19         for <notmuch@notmuchmail.org>; Sun, 21 Oct 2012 06:35:07 -0700 (PDT)\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)\r
21         id 05E92100372; Sun, 21 Oct 2012 16:35:10 +0300 (EEST)\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>\r
23 To: notmuch@notmuchmail.org\r
24 Subject: [PATCH 1/1] emacs/notmuch-show.el: handle bodypart insert error\r
25 Date: Sun, 21 Oct 2012 16:35:09 +0300\r
26 Message-Id: <1350826509-12119-1-git-send-email-tomi.ollila@iki.fi>\r
27 X-Mailer: git-send-email 1.7.1\r
28 Cc: tomi.ollila@iki.fi\r
29 X-BeenThere: notmuch@notmuchmail.org\r
30 X-Mailman-Version: 2.1.13\r
31 Precedence: list\r
32 List-Id: "Use and development of the notmuch mail system."\r
33         <notmuch.notmuchmail.org>\r
34 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
35         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
36 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
37 List-Post: <mailto:notmuch@notmuchmail.org>\r
38 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
39 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
40         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
41 X-List-Received-Date: Sun, 21 Oct 2012 13:35:08 -0000\r
42 \r
43 When inserting of email bodypart failes, insert a failure message\r
44 to the buffer (and continue) instead of halting the insertion of\r
45 the rest of that email thread in question.\r
46 ---\r
47 This is (now real !!!) alternative to\r
48 \r
49 id:"1350824336-11060-1-git-send-email-tomi.ollila@iki.fi"\r
50 \r
51 This adds error message string to the output, error message in\r
52 id:"87d31artti.fsf@inf-8657.int-evry.fr" is shown as\r
53 \r
54   !!! Bodypart insert error: Wrong type argument: stringp, nil !!!\r
55 \r
56 See id:"1350824336-11060-1-git-send-email-tomi.ollila@iki.fi"\r
57 for more discussion.\r
58 \r
59  emacs/notmuch-show.el |    7 ++++++-\r
60  1 files changed, 6 insertions(+), 1 deletions(-)\r
61 \r
62 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
63 index f273eb4..d061367 100644\r
64 --- a/emacs/notmuch-show.el\r
65 +++ b/emacs/notmuch-show.el\r
66 @@ -815,7 +815,12 @@ message at DEPTH in the current thread."\r
67      ;; Run the content handlers until one of them returns a non-nil\r
68      ;; value.\r
69      (while (and handlers\r
70 -               (not (funcall (car handlers) msg part content-type nth depth declared-type)))\r
71 +               (not (condition-case err\r
72 +                        (funcall (car handlers) msg part content-type nth depth declared-type)\r
73 +                      (error (progn\r
74 +                               (insert "!!! Bodypart insert error: ")\r
75 +                               (insert (error-message-string err))\r
76 +                               (insert " !!!\n") nil)))))\r
77        (setq handlers (cdr handlers))))\r
78    t)\r
79  \r
80 -- \r
81 1.7.1\r
82 \r