]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: Fix bug when parsing a subject cotaining: \[[0-9/]\]
authorCarl Worth <cworth@cworth.org>
Thu, 23 Sep 2010 20:21:03 +0000 (13:21 -0700)
committerCarl Worth <cworth@cworth.org>
Thu, 23 Sep 2010 20:21:03 +0000 (13:21 -0700)
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.

emacs/notmuch.el

index fe1041f013f864f56d0b49276e5b64eb079dddd6..42619b266ba347101445dd4e7de09eb6bfc2142c 100644 (file)
@@ -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))