[mew-dist 24217] tr -- mew-summary-regexp-make-thread
KOIE Hidetaka ( 鯉江英隆 )
hide at example.com
2003年 12月 8日 (月) 14:33:25 JST
mr + mt の組み合わせをよくつかうのですが
すでにマークが付いてると思った通りの動作をしないので
コマンド tr をつくりました。
サマリバッファから指定した正規表現にマッチするものを抜き出して
それらをスレッド表示するだけです。
--
鯉江英隆 <hide at example.com>
-------------- next part --------------
Index: mew-thread.el
===================================================================
RCS file: /cvsmew/mew/mew-thread.el,v
retrieving revision 1.103
diff -d -u -F^( -r1.103 mew-thread.el
--- mew-thread.el 23 Oct 2003 09:15:26 -0000 1.103
+++ mew-thread.el 8 Dec 2003 05:24:56 -0000
@@ -211,7 +211,20 @@ (defun mew-summary-make-thread (&optiona
(t
(mew-summary-thread-region (point-min) (point-max) nil msg))))))
-(defun mew-summary-thread-region (beg end &optional mark disp-msg)
+(defun mew-summary-regexp-make-thread ()
+ "XXX mr + mt = tr"
+ (interactive)
+ (mew-decode-syntax-delete)
+ (let ((regex "") fld msg alist iter)
+ (while (string= regex "")
+ (setq regex (read-string "Regexp: ")))
+ (setq iter
+ (function
+ (lambda ()
+ (re-search-forward regex nil t))))
+ (mew-summary-thread-region (point-min) (point-max) 'mark nil iter)))
+
+(defun mew-summary-thread-region (beg end &optional mark disp-msg iter)
"Make threads for messages in a region. If you want to know how
threads are created, see 'mew-use-complete-thread'."
(interactive "r")
@@ -245,6 +258,8 @@ (defun mew-summary-thread-region (beg en
(setq func (lambda ()
(re-search-forward mew-regex-msg-review nil t)))
(setq func (lambda () (not (eobp)))))
+ (if iter
+ (setq func iter))
(setq tm1 (current-time))
(while (funcall func)
(beginning-of-line)
Index: mew-key.el
===================================================================
RCS file: /cvsmew/mew/mew-key.el,v
retrieving revision 1.64
diff -d -u -F^( -r1.64 mew-key.el
--- mew-key.el 28 Oct 2003 08:22:37 -0000 1.64
+++ mew-key.el 8 Dec 2003 05:24:56 -0000
@@ -148,6 +148,7 @@ (unless mew-summary-mode-map
(define-key mew-summary-mode-map "t\ed" 'mew-thread-mark-unlink)
(define-key mew-summary-mode-map "tu" 'mew-thread-unmark)
(define-key mew-summary-mode-map "tg" 'mew-thread-glue)
+ (define-key mew-summary-mode-map "tr" 'mew-summary-regexp-make-thread)
(define-key mew-summary-mode-map "z" (make-sparse-keymap))
(define-key mew-summary-mode-map "z8" 'mew-summary-toggle-8bit)
(define-key mew-summary-mode-map "zc" 'mew-summary-cache-clean-up)
Mew-dist メーリングリストの案内