]> code.delx.au - gnu-emacs/commitdiff
(mh-narrow-to-subject): Remove Re: string from subject so that pick
authorBill Wohler <wohler@newt.com>
Wed, 1 Mar 2006 06:19:59 +0000 (06:19 +0000)
committerBill Wohler <wohler@newt.com>
Wed, 1 Mar 2006 06:19:59 +0000 (06:19 +0000)
can find originating message (closes SF #1438369).

lisp/mh-e/ChangeLog
lisp/mh-e/mh-limit.el

index b94c2522477b2d26f781aadc6c1fa6ac3a7b83f8..fa39c7988f4457534f953936f51a30ccb46038a5 100644 (file)
@@ -5,6 +5,8 @@
        to subjects with special characters by quoting regular expression
        characters in pick expression derived from existing subjects and
        other fields (closes SF #1432548).
+       (mh-narrow-to-subject): Remove Re: string from subject so that
+       pick can find originating message (closes SF #1438369).
 
        * mh-utils.el (mh-image-load-path): Rename variable to
        mh-image-directory.
index f2609263b919892ccfa9a21bc85e0f9a8a4dd718..64a61ce499afb93608d0ced125e43d881026fece 100644 (file)
@@ -121,11 +121,16 @@ Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command."
 (defun mh-narrow-to-subject (&optional pick-expr)
   "Limit to messages with same subject.
 With a prefix argument, edit PICK-EXPR.
+The string Re: is removed from the search.
 
 Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command."
   (interactive
    (list (mh-edit-pick-expr
           (mh-quote-pick-expr (mh-current-message-header-field 'subject)))))
+  (setq pick-expr
+        (let ((case-fold-search t))
+          (loop for s in pick-expr
+                collect (mh-replace-regexp-in-string "re: *" "" s))))
   (mh-narrow-to-header-field 'subject pick-expr))
 
 ;;;###mh-autoload