]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: Simplify subjects more aggressively.
authorDavid Edmondson <dme@dme.org>
Mon, 8 Nov 2010 10:50:29 +0000 (10:50 +0000)
committerCarl Worth <cworth@cworth.org>
Fri, 12 Nov 2010 01:04:35 +0000 (17:04 -0800)
Remove 're: ' or 'Re: ' from anywhere within a subject line rather
than just at the beginning. This is to accommodate threads where a
mailing list sometimes inserts a subject prefix.

For example, if a thread has the subjects:

    [Orgmode] org-indent, org-inlinetask: patches on github
    Re: [Orgmode] org-indent, org-inlinetask: patches on github
    [Orgmode] Re: org-indent, org-inlinetask: patches on github

the last of these would not have been considered the same and would
therefore have been shown.

emacs/notmuch-show.el

index 9c5c3cc45509088f01592d89b4b415dd290204e8..3a394d0f385a8468e64231b9b006595d7c43bcc5 100644 (file)
@@ -382,7 +382,7 @@ current buffer, if possible."
   (make-symbol (concat "notmuch-show-" type)))
 
 (defun notmuch-show-strip-re (string)
   (make-symbol (concat "notmuch-show-" type)))
 
 (defun notmuch-show-strip-re (string)
-  (replace-regexp-in-string "^\\([Rr]e: *\\)+" "" string))
+  (replace-regexp-in-string "\\([Rr]e: *\\)+" "" string))
 
 (defvar notmuch-show-previous-subject "")
 (make-variable-buffer-local 'notmuch-show-previous-subject)
 
 (defvar notmuch-show-previous-subject "")
 (make-variable-buffer-local 'notmuch-show-previous-subject)