aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch.el
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2010-02-10 11:40:56 -0800
committerGravatar Carl Worth <cworth@cworth.org>2010-02-10 11:44:15 -0800
commitca16b2225dd6323a3c1537d6c3e5ea0da8d63197 (patch)
tree73ca578b5402ea31e9441757522d1bac5a750a93 /notmuch.el
parentb611cc2319d44835d5da57ebe61bc359ab11f6e5 (diff)
notmuch.el: Avoid infinite loop marking up message with no parts.
The infinite loop was triggered by a message consisting of a single attachment within the body, (and no "part") tags. We need to do things in response to this bug (beyond this specific fix): 1. Create a test suite that exercises our emacs frontend so that bugs like this do not come back to haunt us after we fix them once. 2. Switch from our ad-hoc regexp based search of message-part delimeters to known-good code for parsing a structured document, (for example, the outstanding JSON patches).
Diffstat (limited to 'notmuch.el')
-rw-r--r--notmuch.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/notmuch.el b/notmuch.el
index c0bb5527..ff4a0bd0 100644
--- a/notmuch.el
+++ b/notmuch.el
@@ -752,7 +752,8 @@ is what to put on the button."
; determine whether we've left the current message.
(if (re-search-forward notmuch-show-part-begin-regexp nil t)
(beginning-of-line)))))
- (goto-char end))))
+ (goto-char end))
+ (goto-char end)))
(defun notmuch-show-markup-parts-region (beg end depth)
(save-excursion