[mew-dist 20713] '*', '@' mark
ARAI Shun-ichi
hermes at example.com
2002年 4月 3日 (水) 23:14:57 JST
あらいです。
唐突なメールで失礼します。
以前から思っていたのですが、現状(2.2 まで)での '*', '@' のマークの
位置付け/利用法に不満があります。
後で読み直そうと思って '*' マークを付けたとしても、'?'
(mew-summary-search-mark)などの使用により無茶苦茶になってしまうから
です。
複数のメールをまとめて処理するために「一時的に」付けるマークがなぜ
'*' なのか疑問です。
'm@'(mew-summary-mark-multi)や 'ms'(mew-summary-mark-swap)で待避
するという手もありますが、最初からそんな手間が不要なようになっていた方
がいいと思います。
というわけで、1.92.4 の頃にパッチを作って個人的に使っていたのですが、
今回 2.2 に対するパッチを作りました。今度は、せっかくなので非公式パッ
チとして公開することにしました。
基本的には、一時的に付けるマークを '@' に統一し、'*' マークは自分の
意思で '*'(mew-summary-review)により、もしくは 'm*'
(mew-summary-mark-review)により付ける以外はマークされないという方針
です。
ついでに、mew-summary-display-multi-down/up も作りました。名前からわ
かると思いますが、mew-summary-display-review-down/up の '@' マーク版で
す。ちょっと強引ですが、'M-N', 'M-P' に割り当ててあります。
#M-大文字って、許されるんでしょうか…?
もし、同じような不満をお持ちの方がいらしたら、使用(試用?)されてみ
るのもいいかも知れません。
まあいずれにしろ、'*' マークを付けておいても '@' マークで上書きされ
てしまうことがあるという点で不完全ではありますが。
ところで、この作業中に問題点を見つけました。ML の検索をしたのですが
見つからなかったので、未報告のものなのだと考え、報告させていただきます。
http://www.mew.org/ にあるマニュアルによると、'M-n', 'M-p'
(mew-summary-find-keyword-down/up)では、以前に 'C-u?'
(mew-summary-search-mark 引数付き)を実行していればその文字列を参照す
るはずですが、実際には '?'(mew-summary-search-mark 引数なし)で入力し
た文字列を探しているようですね。ソースを見ると、'?' では、
mew-input-pick-pattern-hist に値が残りますが、'C-u?' では入力した値は
どこにも残らないようです。で、'M-n', 'M-p' は
mew-input-pick-pattern-hist を参照しているようですね。
この件の解決法はちょっとややこしそうなので手を付けていません。とりあ
えず、ご報告まで。
--
新井 俊一 <ARAI Shun-ichi>
hermes at example.com
-------------- next part --------------
--- mew-key.el 2002-03-27 20:09:54+09 1.1
+++ mew-key.el 2002-03-27 20:10:19+09
@@ -74,6 +74,8 @@
(define-key mew-summary-mode-map "p" 'mew-summary-display-up)
(define-key mew-summary-mode-map "N" 'mew-summary-display-review-down)
(define-key mew-summary-mode-map "P" 'mew-summary-display-review-up)
+ (define-key mew-summary-mode-map "\eN" 'mew-summary-display-multi-down)
+ (define-key mew-summary-mode-map "\eP" 'mew-summary-display-multi-up)
(define-key mew-summary-mode-map "\en" 'mew-summary-find-keyword-down)
(define-key mew-summary-mode-map "\ep" 'mew-summary-find-keyword-up)
(define-key mew-summary-mode-map "w" 'mew-summary-send)
--- mew-mark.el 2002-03-27 13:13:42+09 1.1
+++ mew-mark.el 2002-03-27 20:16:19+09
@@ -448,7 +448,7 @@
;;;
(defun mew-summary-mark-all (&optional arg)
- "Put the '*' mark onto all messages which are not marked."
+ "Put the '@' mark onto all messages which are not marked."
(interactive "P")
(mew-decode-syntax-delete)
(if arg
@@ -457,11 +457,11 @@
(mew-summary-mark-region (point-min) (point-max))))
(defun mew-summary-mark-region (beg end)
- "Put the '*' mark onto all messages which are not marked between
+ "Put the '@' mark onto all messages which are not marked between
BEG and END."
(interactive "r")
(let ((regex (concat mew-regex-msg " "))
- (mark mew-mark-review) ;; someday ...
+ (mark mew-mark-multi)
fld msg alist)
(save-excursion
(goto-char beg)
@@ -476,11 +476,11 @@
(mew-summary-mark-in-physical-alist alist mark)))
(defun mew-summary-mark-regexp ()
- "Put the '*' mark onto all messages matched to a regular expression."
+ "Put the '@' mark onto all messages matched to a regular expression."
(interactive)
(mew-decode-syntax-delete)
(let ((regex (read-string "Regexp: "))
- (mark mew-mark-review) ;; someday ...
+ (mark mew-mark-multi)
(n 0)
fld msg alist)
(while (string= regex "")
@@ -613,15 +613,15 @@
(set-buffer-modified-p nil)
(mew-summary-mark-in-physical-alist alist newmark)))))
-(defun mew-summary-mark-delete () ;; * -> D
- "Put the delete mark onto all messages marked with '*'."
+(defun mew-summary-mark-delete () ;; @ -> D
+ "Put the delete mark onto all messages marked with '@'."
(interactive)
- (mew-summary-exchange-mark mew-mark-review mew-mark-delete))
+ (mew-summary-exchange-mark mew-mark-multi mew-mark-delete))
-(defun mew-summary-mark-unlink () ;; * -> X
- "Put the delete mark onto all messages marked with '*'."
+(defun mew-summary-mark-unlink () ;; @ -> X
+ "Put the delete mark onto all messages marked with '@'."
(interactive)
- (mew-summary-exchange-mark mew-mark-review mew-mark-unlink))
+ (mew-summary-exchange-mark mew-mark-multi mew-mark-unlink))
(defun mew-summary-mark-multi () ;; * -> @
"Change the '*' mark into the '@' mark."
@@ -975,6 +975,14 @@
(if (mew-summary-down-mark mew-mark-walk)
(mew-summary-display nil))))
+(defun mew-summary-display-multi-down (&optional arg)
+ "Jump to the message marked with '@' below."
+ (interactive "P")
+ (if arg
+ (mew-summary-set-walk-mark)
+ (if (mew-summary-down-mark mew-mark-multi)
+ (mew-summary-display nil))))
+
(defun mew-summary-up-mark (mark)
(let ((case-fold-search nil))
(cond
@@ -990,6 +998,14 @@
(if arg
(mew-summary-set-walk-mark)
(if (mew-summary-up-mark mew-mark-walk)
+ (mew-summary-display nil))))
+
+(defun mew-summary-display-multi-up (&optional arg)
+ "Jump to the message marked with '@' above."
+ (interactive "P")
+ (if arg
+ (mew-summary-set-walk-mark)
+ (if (mew-summary-up-mark mew-mark-multi)
(mew-summary-display nil))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
--- mew-pick.el 2002-03-27 13:27:14+09 1.1
+++ mew-pick.el 2002-04-02 18:18:08+09
@@ -14,7 +14,7 @@
(defun mew-summary-search-mark (&optional arg)
"Pick messages according to a pick pattern which you input,
-then put the '*' mark onto them. If called with '\\[universal-argument]',
+then put the '@' mark onto them. If called with '\\[universal-argument]',
execute 'mew-summary-pick-with-external'. Otherwise,
'mew-summary-pick-with-mewls' is called."
(interactive "P")
@@ -50,7 +50,7 @@
(setq linenum (- total (length linenum)))
(forward-line (- linenum preline))
(setq preline linenum)
- (mew-summary-mark-as mew-mark-review))
+ (mew-summary-mark-as mew-mark-multi))
(setq msgs (cdr msgs)))
(set-buffer-modified-p nil))
;; Physical folder
@@ -61,7 +61,7 @@
(setq msgs msgsback)
(while (and msgs (not (eobp)))
(when (re-search-forward (mew-regex-jmp-msg (car msgs)) nil t)
- (mew-summary-mark-as mew-mark-review)
+ (mew-summary-mark-as mew-mark-multi)
(forward-line))
(setq msgs (cdr msgs)))
(set-buffer-modified-p nil))))
@@ -146,7 +146,7 @@
;;;
(defun mew-summary-find-keyword-down (&optional arg)
- "Display a message marked with '*' and find a keyword and highlight
+ "Display a message marked with '@' and find a keyword and highlight
it in the forward direction. The keyword is stored in a buffer local
variable in Summary mode. If no keyword is set to the variable, this
command first asks you for a keyword. If you want to change the stored
@@ -167,15 +167,15 @@
"Keyword: " (or (car mew-input-pick-pattern-hist) key)))
(mew-sinfo-set-find-key key))
(cond
- ((and (equal mew-mark-review mark)
+ ((and (equal mew-mark-multi mark)
(or (not (string= fld ofld)) (not (string= msg omsg))))
(mew-summary-display-asis)
(setq top t))
((or (null mwin)
- (not (equal mew-mark-review mark))
+ (not (equal mew-mark-multi mark))
(or (not (string= fld ofld)) (not (string= msg omsg)))
(save-excursion (set-buffer mbuf) (eobp)))
- (if (not (mew-summary-down-mark mew-mark-review))
+ (if (not (mew-summary-down-mark mew-mark-multi))
(setq search nil)
(mew-summary-display-asis)
(setq top t))))
@@ -196,7 +196,7 @@
(select-window cwin)))))
(defun mew-summary-find-keyword-up (&optional arg)
- "Display a message marked with '*' and find a keyword and highlight
+ "Display a message marked with '@' and find a keyword and highlight
it in the backward direction. The keyword is stored in a buffer local
variable in Summary mode. If no keyword is set to the variable, this
command first asks you for a keyword. If you want to change the stored
@@ -217,15 +217,15 @@
"Keyword: " (or (car mew-input-pick-pattern-hist) key)))
(mew-sinfo-set-find-key key))
(cond
- ((and (equal mew-mark-review mark)
+ ((and (equal mew-mark-multi mark)
(or (not (string= fld ofld)) (not (string= msg omsg))))
(mew-summary-display-asis)
(setq bottom t))
((or (null mwin)
- (not (equal mew-mark-review mark))
+ (not (equal mew-mark-multi mark))
(or (not (string= fld ofld)) (not (string= msg omsg)))
(save-excursion (set-buffer mbuf) (bobp)))
- (if (not (mew-summary-up-mark mew-mark-review))
+ (if (not (mew-summary-up-mark mew-mark-multi))
(setq search nil)
(mew-summary-display-asis)
(setq bottom t))))
--- mew-refile.el 2002-03-27 13:28:56+09 1.1
+++ mew-refile.el 2002-03-27 14:11:24+09
@@ -655,7 +655,7 @@
(defun mew-summary-mark-refile ()
"\\<mew-summary-mode-map>
-Put the refile mark onto all messages marked with '*'.
+Put the refile mark onto all messages marked with '@'.
This is very convenient to refile all messages picked by '\\[mew-summary-search-mark]'."
(interactive)
(let ((after-change-functions nil)
@@ -665,7 +665,7 @@
(save-excursion
(save-window-excursion
(goto-char (point-min))
- (while (re-search-forward mew-regex-msg-review nil t)
+ (while (re-search-forward mew-regex-msg-multi nil t)
(setq last (mew-summary-refile-body last nil 'no-msg))
(forward-line))
(message "Mark refiling...done")))))
--- mew-scan.el 2002-03-27 14:15:36+09 1.1
+++ mew-scan.el 2002-03-27 14:15:55+09
@@ -472,14 +472,14 @@
(mew-pop-retrieve case 'get fld rtrs))))))))
(defun mew-summary-mark-retrieve-message (&optional rev-del)
- "Retrieve the rest of truncated('T') messages marked with '*'.
+ "Retrieve the rest of truncated('T') messages marked with '@'.
If 'mew-pop-delete' is 't', delete the message from the mailbox.
When executed with '\\[universal-argument]', 'mew-pop-delete' is considered reversed."
(interactive "P")
(mew-summary-only
(mew-summary-not-in-mdrop
(let* ((fld (mew-summary-folder-name 'ext))
- (msgs (mew-summary-mark-collect mew-mark-review))
+ (msgs (mew-summary-mark-collect mew-mark-multi))
msg usc xuidl uid siz case del rtr rtrs)
(if (null msgs)
(message "No marked messages")
--- mew.el 2002-03-27 14:11:12+09 1.1
+++ mew.el 2002-03-27 14:11:20+09
@@ -701,6 +701,7 @@
(setq mew-regex-msg-or-part (concat mew-regex-msg-show "\\|" mew-regex-part))
(setq mew-regex-msg-mark (concat mew-regex-msg mew-regex-mark))
(setq mew-regex-msg-review (mew-mark-regex mew-mark-review))
+ (setq mew-regex-msg-multi (mew-mark-regex mew-mark-multi))
(setq mew-regex-msg-delete (mew-mark-regex mew-mark-delete))
(setq mew-regex-attach-beg
(concat "^" mew-draft-attach-boundary-beg "$"))
Mew-dist メーリングリストの案内