From: Austin Clements Date: Fri, 18 Apr 2014 22:57:17 +0000 (+2000) Subject: [PATCH] emacs: Honor debug-on-error for part renderers X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=53280c9adaea82a2e2333459b13972f327f09409;p=notmuch-archives.git [PATCH] emacs: Honor debug-on-error for part renderers --- diff --git a/33/89a02a8709b654b130e6fcc4a385b43768e0bc b/33/89a02a8709b654b130e6fcc4a385b43768e0bc new file mode 100644 index 000000000..81707f23d --- /dev/null +++ b/33/89a02a8709b654b130e6fcc4a385b43768e0bc @@ -0,0 +1,99 @@ +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 B0395431FB6 + for ; Fri, 18 Apr 2014 15:57:40 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 NLUExHokv160 for ; + Fri, 18 Apr 2014 15:57:35 -0700 (PDT) +Received: from dmz-mailsec-scanner-1.mit.edu (dmz-mailsec-scanner-1.mit.edu + [18.9.25.12]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 008F0431FAF + for ; Fri, 18 Apr 2014 15:57:34 -0700 (PDT) +X-AuditID: 1209190c-f794a6d000000c27-2d-5351adde0cf3 +Received: from mailhub-auth-2.mit.edu ( [18.7.62.36]) + (using TLS with cipher AES256-SHA (256/256 bits)) + (Client did not present a certificate) + by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP + id 70.8E.03111.EDDA1535; Fri, 18 Apr 2014 18:57:34 -0400 (EDT) +Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) + by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id s3IMvVEC009980; + Fri, 18 Apr 2014 18:57:32 -0400 +Received: from drake.dyndns.org (26-4-172.dynamic.csail.mit.edu [18.26.4.172]) + (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s3IMvUjr000410 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); + Fri, 18 Apr 2014 18:57:31 -0400 +Received: from amthrax by drake.dyndns.org with local (Exim 4.77) + (envelope-from ) + id 1WbHis-0007tV-Ei; Fri, 18 Apr 2014 18:57:30 -0400 +From: Austin Clements +To: notmuch@notmuchmail.org +Subject: [PATCH] emacs: Honor debug-on-error for part renderers +Date: Fri, 18 Apr 2014 18:57:17 -0400 +Message-Id: <1397861837-30310-1-git-send-email-amdragon@mit.edu> +X-Mailer: git-send-email 1.9.1 +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFprBIsWRmVeSWpSXmKPExsUixG6nontvbWCwwdP7XBbXb85kdmD0eLbq + FnMAYxSXTUpqTmZZapG+XQJXxuYZa5kKjrNXHPswm7mB8QtrFyMHh4SAicSp+xxdjJxAppjE + hXvr2boYuTiEBGYzSVzaspMdwtnIKHFk1haozBEmia+zTjGCtAgJzGWUuNwtC2KzCWhIbNu/ + HCwuIiAtsfPubLANzAJqEn+6VEBMYQF7iYUzbEEqWARUJfoenWUHsXkFHCQefl3HAnGEnMTJ + Y5NZJzDyLmBkWMUom5JbpZubmJlTnJqsW5ycmJeXWqRrqJebWaKXmlK6iREUAJySPDsY3xxU + OsQowMGoxMO7ISAwWIg1say4MvcQoyQHk5Io76PFQCG+pPyUyozE4oz4otKc1OJDjBIczEoi + vFe7gHK8KYmVValF+TApaQ4WJXHet9ZWwUIC6YklqdmpqQWpRTBZGQ4OJQnefWuAGgWLUtNT + K9Iyc0oQ0kwcnCDDeYCGLwWp4S0uSMwtzkyHyJ9iVJQS520FSQiAJDJK8+B6YRH6ilEc6BVh + 3t0gVTzA6IbrfgU0mAlo8N8zASCDSxIRUlINjIWa7AzSafvP2f843Ln6w56SzbYvfoi8suVs + 09hh+sdO1VTklN6jv6wa66ML5XI/MbLMnfPE+lNx8gTftFrWJVeSJA5w7tlp/ZhD9WazRkbJ + nDWivo9O/lZ9y6wr3L3H+AV/zXuFkyZGqgYLL0ulGpiyXNrsdGKS93XH0+qLu74tZpxq3ii9 + S4mlOCPRUIu5qDgRAPpvlverAgAA +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: Fri, 18 Apr 2014 22:57:41 -0000 + +Previously, even if debug-on-error was non-nil, the debugger would not +trap on part renderer errors. This made debugging part renderer bugs +frustrating, so let the debugger trap these errors. +--- + emacs/notmuch-show.el | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el +index f6ca827..df10d4b 100644 +--- a/emacs/notmuch-show.el ++++ b/emacs/notmuch-show.el +@@ -785,7 +785,10 @@ (defun notmuch-show-insert-bodypart-internal (msg part content-type nth depth bu + (while (and handlers + (not (condition-case err + (funcall (car handlers) msg part content-type nth depth button) +- (error (progn ++ ;; Specifying `debug' here lets the debugger ++ ;; run if `debug-on-error' is non-nil. ++ ((debug error) ++ (progn + (insert "!!! Bodypart insert error: ") + (insert (error-message-string err)) + (insert " !!!\n") nil))))) +-- +1.9.1 +