[Mew-dist 15331] Re: どこでも親探し
Hideyuki SHIRAI ( 白井秀行 )
shirai at example.com
2000年 12月 7日 (木) 15:29:18 JST
From: Hideyuki SHIRAI (白井秀行) <shirai at example.com> 曰く
Subject: [Mew-dist 15324] どこでも親探し
Message-ID: <20001207.134652.119270247.shirai at example.com>
Date: Thu, 7 Dec 2000 13:49:26 +0900
白井> "親探し" は thread folder より普通の folder の方がありがたみがあ
白井> ります。
姉妹品の "兄弟探し" です。同じ深さの message を探して表示します。
(defun mew-summary-thread-brother (&optional up)
"Search forward the brother message of the current message.
If called with '\\[universal-argument]', seach backward the brother message."
(interactive "P")
(mew-summary-msg
(let ((funcs '(re-search-forward re-search-backward))
(dir (if up 1 0))
(i 0)
pos id regex)
(beginning-of-line)
(setq pos (point))
(if (not (looking-at "[^\r]*\r[^<]+\\(<[^>]*>\\) \\(<[^>]*>\\)\n"))
()
(setq id (mew-match 2))
(setq regex (concat "\r[^<]+<[^>]*> " (regexp-quote id)))
(if (string= id "<>")
(message "No required header.")
(if (catch 'detect
(while (< i 2)
(cond
((and (= i 0) (= dir 0))
(forward-line 1))
((= i 1)
(if (= dir 0)
(goto-char (point-min))
(goto-char (point-max)))))
(if (funcall (nth dir funcs) regex nil t)
(throw 'detect t))
(setq i (1+ i))))
(progn
(beginning-of-line)
(if (= pos (point))
(message "No Brother detect in this folder.")
(mew-summary-display nil)
(message "Brother detect.")))
(goto-char pos)
(message "No Brother detect in this folder.")))))))
# keybind は "&" かしら。
--
白井秀行 (mailto:shirai at example.com)
Mew-dist メーリングリストの案内