From: Carl Worth Date: Thu, 23 Sep 2010 20:21:03 +0000 (-0700) Subject: emacs: Fix bug when parsing a subject cotaining: \[[0-9/]\] X-Git-Tag: 0.4~77 X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=31a5e5a12595c4130d3a7b95b53567003de0b2c9;p=notmuch emacs: Fix bug when parsing a subject cotaining: \[[0-9/]\] That is, a subject with a bracketed set of digits (and optionally a slash), for example "[2010]" would cause the emacs code to misparse the search results. Fix this by tweaking the regular expression. --- diff --git a/emacs/notmuch.el b/emacs/notmuch.el index fe1041f0..42619b26 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -691,7 +691,7 @@ matching will be applied." (more t) (inhibit-read-only t)) (while more - (if (string-match "^\\(thread:[0-9A-Fa-f]*\\) \\(.*\\) \\(\\[[0-9/]*\\]\\) \\([^;]*\\); \\(.*\\) (\\([^()]*\\))$" string line) + (if (string-match "^\\(thread:[0-9A-Fa-f]*\\) \\([^][]*\\) \\(\\[[0-9/]*\\]\\) \\([^;]*\\); \\(.*\\) (\\([^()]*\\))$" string line) (let* ((thread-id (match-string 1 string)) (date (match-string 2 string)) (count (match-string 3 string))