Re: [PATCH] notmuch-emacs-mua: more options, some fixes
[notmuch-archives.git] / 33 / 89a02a8709b654b130e6fcc4a385b43768e0bc
1 Return-Path: <amdragon@mit.edu>\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 B0395431FB6\r
6         for <notmuch@notmuchmail.org>; Fri, 18 Apr 2014 15:57:40 -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.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 NLUExHokv160 for <notmuch@notmuchmail.org>;\r
16         Fri, 18 Apr 2014 15:57:35 -0700 (PDT)\r
17 Received: from dmz-mailsec-scanner-1.mit.edu (dmz-mailsec-scanner-1.mit.edu\r
18         [18.9.25.12])\r
19         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 008F0431FAF\r
22         for <notmuch@notmuchmail.org>; Fri, 18 Apr 2014 15:57:34 -0700 (PDT)\r
23 X-AuditID: 1209190c-f794a6d000000c27-2d-5351adde0cf3\r
24 Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
25         (using TLS with cipher AES256-SHA (256/256 bits))\r
26         (Client did not present a certificate)\r
27         by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP\r
28         id 70.8E.03111.EDDA1535; Fri, 18 Apr 2014 18:57:34 -0400 (EDT)\r
29 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
30         by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id s3IMvVEC009980; \r
31         Fri, 18 Apr 2014 18:57:32 -0400\r
32 Received: from drake.dyndns.org (26-4-172.dynamic.csail.mit.edu [18.26.4.172])\r
33         (authenticated bits=0)\r
34         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
35         by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s3IMvUjr000410\r
36         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
37         Fri, 18 Apr 2014 18:57:31 -0400\r
38 Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
39         (envelope-from <amdragon@mit.edu>)\r
40         id 1WbHis-0007tV-Ei; Fri, 18 Apr 2014 18:57:30 -0400\r
41 From: Austin Clements <amdragon@MIT.EDU>\r
42 To: notmuch@notmuchmail.org\r
43 Subject: [PATCH] emacs: Honor debug-on-error for part renderers\r
44 Date: Fri, 18 Apr 2014 18:57:17 -0400\r
45 Message-Id: <1397861837-30310-1-git-send-email-amdragon@mit.edu>\r
46 X-Mailer: git-send-email 1.9.1\r
47 X-Brightmail-Tracker:\r
48  H4sIAAAAAAAAA+NgFprBIsWRmVeSWpSXmKPExsUixG6nontvbWCwwdP7XBbXb85kdmD0eLbq\r
49         FnMAYxSXTUpqTmZZapG+XQJXxuYZa5kKjrNXHPswm7mB8QtrFyMHh4SAicSp+xxdjJxAppjE\r
50         hXvr2boYuTiEBGYzSVzaspMdwtnIKHFk1haozBEmia+zTjGCtAgJzGWUuNwtC2KzCWhIbNu/\r
51         HCwuIiAtsfPubLANzAJqEn+6VEBMYQF7iYUzbEEqWARUJfoenWUHsXkFHCQefl3HAnGEnMTJ\r
52         Y5NZJzDyLmBkWMUom5JbpZubmJlTnJqsW5ycmJeXWqRrqJebWaKXmlK6iREUAJySPDsY3xxU\r
53         OsQowMGoxMO7ISAwWIg1say4MvcQoyQHk5Io76PFQCG+pPyUyozE4oz4otKc1OJDjBIczEoi\r
54         vFe7gHK8KYmVValF+TApaQ4WJXHet9ZWwUIC6YklqdmpqQWpRTBZGQ4OJQnefWuAGgWLUtNT\r
55         K9Iyc0oQ0kwcnCDDeYCGLwWp4S0uSMwtzkyHyJ9iVJQS520FSQiAJDJK8+B6YRH6ilEc6BVh\r
56         3t0gVTzA6IbrfgU0mAlo8N8zASCDSxIRUlINjIWa7AzSafvP2f843Ln6w56SzbYvfoi8suVs\r
57         09hh+sdO1VTklN6jv6wa66ML5XI/MbLMnfPE+lNx8gTftFrWJVeSJA5w7tlp/ZhD9WazRkbJ\r
58         nDWivo9O/lZ9y6wr3L3H+AV/zXuFkyZGqgYLL0ulGpiyXNrsdGKS93XH0+qLu74tZpxq3ii9\r
59         S4mlOCPRUIu5qDgRAPpvlverAgAA\r
60 X-BeenThere: notmuch@notmuchmail.org\r
61 X-Mailman-Version: 2.1.13\r
62 Precedence: list\r
63 List-Id: "Use and development of the notmuch mail system."\r
64         <notmuch.notmuchmail.org>\r
65 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
66         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
67 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
68 List-Post: <mailto:notmuch@notmuchmail.org>\r
69 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
70 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
71         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
72 X-List-Received-Date: Fri, 18 Apr 2014 22:57:41 -0000\r
73 \r
74 Previously, even if debug-on-error was non-nil, the debugger would not\r
75 trap on part renderer errors.  This made debugging part renderer bugs\r
76 frustrating, so let the debugger trap these errors.\r
77 ---\r
78  emacs/notmuch-show.el | 5 ++++-\r
79  1 file changed, 4 insertions(+), 1 deletion(-)\r
80 \r
81 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
82 index f6ca827..df10d4b 100644\r
83 --- a/emacs/notmuch-show.el\r
84 +++ b/emacs/notmuch-show.el\r
85 @@ -785,7 +785,10 @@ (defun notmuch-show-insert-bodypart-internal (msg part content-type nth depth bu\r
86      (while (and handlers\r
87                 (not (condition-case err\r
88                          (funcall (car handlers) msg part content-type nth depth button)\r
89 -                      (error (progn\r
90 +                      ;; Specifying `debug' here lets the debugger\r
91 +                      ;; run if `debug-on-error' is non-nil.\r
92 +                      ((debug error)\r
93 +                       (progn\r
94                                 (insert "!!! Bodypart insert error: ")\r
95                                 (insert (error-message-string err))\r
96                                 (insert " !!!\n") nil)))))\r
97 -- \r
98 1.9.1\r
99 \r