Mercurial > emacs
comparison lisp/mh-e/mh-limit.el @ 69221:7db1bc48b98c
* mh-limit.el (mh-narrow-to-cc, mh-narrow-to-from)
(mh-narrow-to-subject, mh-narrow-to-to): Fix inability to narrow to
subjects with special characters by quoting regular expression
characters in pick expression derived from existing subjects and other
fields (closes SF #1432548).
* mh-utils.el (mh-pick-regexp-chars, mh-quote-pick-expr): New variable
and function for quoting pick regular expression characters (closes SF
#1432548).
author | Bill Wohler <wohler@newt.com> |
---|---|
date | Wed, 01 Mar 2006 05:33:18 +0000 |
parents | 7daec5f4a289 |
children | f6aa586588ea |
comparison
equal
deleted
inserted
replaced
69220:1c12656cdcb0 | 69221:7db1bc48b98c |
---|---|
87 "Limit to messages with the same \"Cc:\" field. | 87 "Limit to messages with the same \"Cc:\" field. |
88 With a prefix argument, edit PICK-EXPR. | 88 With a prefix argument, edit PICK-EXPR. |
89 | 89 |
90 Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command." | 90 Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command." |
91 (interactive | 91 (interactive |
92 (list (mh-edit-pick-expr (mh-current-message-header-field 'cc)))) | 92 (list (mh-edit-pick-expr |
93 (mh-quote-pick-expr (mh-current-message-header-field 'cc))))) | |
93 (mh-narrow-to-header-field 'cc pick-expr)) | 94 (mh-narrow-to-header-field 'cc pick-expr)) |
94 | 95 |
95 ;;;###mh-autoload | 96 ;;;###mh-autoload |
96 (defun mh-narrow-to-from (&optional pick-expr) | 97 (defun mh-narrow-to-from (&optional pick-expr) |
97 "Limit to messages with the same \"From:\" field. | 98 "Limit to messages with the same \"From:\" field. |
98 With a prefix argument, edit PICK-EXPR. | 99 With a prefix argument, edit PICK-EXPR. |
99 | 100 |
100 Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command." | 101 Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command." |
101 (interactive | 102 (interactive |
102 (list (mh-edit-pick-expr (mh-current-message-header-field 'from)))) | 103 (list (mh-edit-pick-expr |
104 (mh-quote-pick-expr (mh-current-message-header-field 'from))))) | |
103 (mh-narrow-to-header-field 'from pick-expr)) | 105 (mh-narrow-to-header-field 'from pick-expr)) |
104 | 106 |
105 ;;;###mh-autoload | 107 ;;;###mh-autoload |
106 (defun mh-narrow-to-range (range) | 108 (defun mh-narrow-to-range (range) |
107 "Limit to RANGE. | 109 "Limit to RANGE. |
120 "Limit to messages with same subject. | 122 "Limit to messages with same subject. |
121 With a prefix argument, edit PICK-EXPR. | 123 With a prefix argument, edit PICK-EXPR. |
122 | 124 |
123 Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command." | 125 Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command." |
124 (interactive | 126 (interactive |
125 (list (mh-edit-pick-expr (mh-current-message-header-field 'subject)))) | 127 (list (mh-edit-pick-expr |
128 (mh-quote-pick-expr (mh-current-message-header-field 'subject))))) | |
126 (mh-narrow-to-header-field 'subject pick-expr)) | 129 (mh-narrow-to-header-field 'subject pick-expr)) |
127 | 130 |
128 ;;;###mh-autoload | 131 ;;;###mh-autoload |
129 (defun mh-narrow-to-to (&optional pick-expr) | 132 (defun mh-narrow-to-to (&optional pick-expr) |
130 "Limit to messages with the same \"To:\" field. | 133 "Limit to messages with the same \"To:\" field. |
131 With a prefix argument, edit PICK-EXPR. | 134 With a prefix argument, edit PICK-EXPR. |
132 | 135 |
133 Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command." | 136 Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command." |
134 (interactive | 137 (interactive |
135 (list (mh-edit-pick-expr (mh-current-message-header-field 'to)))) | 138 (list (mh-edit-pick-expr |
139 (mh-quote-pick-expr (mh-current-message-header-field 'to))))) | |
136 (mh-narrow-to-header-field 'to pick-expr)) | 140 (mh-narrow-to-header-field 'to pick-expr)) |
137 | 141 |
138 | 142 |
139 | 143 |
140 ;;; Support Routines | 144 ;;; Support Routines |