From: yoichi Date: Thu, 2 May 2002 13:15:30 +0000 (+0000) Subject: * wl-summary.el (wl-summary-line-list-count): New function, merged X-Git-Tag: elmo-mark-root~163 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=549a9f02e7358b3dbbbd0750977ca32398a2f6ae;p=elisp%2Fwanderlust.git * wl-summary.el (wl-summary-line-list-count): New function, merged from my-wl-summary-subject-func-ml in samples/*/dot.wl. * wl-vars.el (wl-summary-line-format-spec-alist): Add entry for list counts. --- diff --git a/samples/en/dot.wl b/samples/en/dot.wl index 3506b04..a7ebe2f 100644 --- a/samples/en/dot.wl +++ b/samples/en/dot.wl @@ -193,40 +193,7 @@ "x-mail-count" "x-ml-count" "x-sequence")) ;; ML message displays ML name and ML sequence number in subject. -(setq wl-summary-subject-function 'my-wl-summary-subject-func-ml) -(defun my-wl-summary-subject-func-ml (subject-string) - (let ((folder wl-summary-buffer-folder-name) - (subj subject-string) (sequence) (ml-name) (ml-count)) - (setq sequence (elmo-msgdb-overview-entity-get-extra-field - entity "x-sequence") - ml-name (or (elmo-msgdb-overview-entity-get-extra-field - entity "x-ml-name") - (and sequence - (car (split-string sequence " ")))) - ml-count (or (elmo-msgdb-overview-entity-get-extra-field - entity "x-mail-count") - (elmo-msgdb-overview-entity-get-extra-field - entity "x-ml-count") - (and sequence - (cadr (split-string sequence " "))))) - (if (string-match - "^\\s(\\(\\S)+\\)[ :]\\([0-9]+\\)\\s)[ \t]*" - subject-string) - (progn - (setq subj (substring subject-string (match-end 0))) - (if (not ml-name) (setq ml-name (match-string 1 subject-string))) - (if (not ml-count) (setq ml-count (match-string 2 subject-string))))) - (condition-case nil - (if (and ml-name ml-count) - (if (string= folder wl-default-folder) - (format "(%s %05d) %s" - (car (split-string ml-name " ")) - (string-to-int ml-count) - subj) - (format "#%05d %s" - (string-to-int ml-count) subj)) - subj) - (error subj)))) +(setq wl-summary-line-format "%M/%D(%W)%h:%m %t%[%17F %] %# %s") ;; imput asynchronously. ;; (utils/im-wl.el is needed to be installed. diff --git a/samples/ja/dot.wl b/samples/ja/dot.wl index 4afc8b4..3c1fe28 100644 --- a/samples/ja/dot.wl +++ b/samples/ja/dot.wl @@ -193,40 +193,7 @@ ;; ML のメッセージであれば,サマリの Subject 表示に ;; ML名 や MLにおけるメッセージ番号も表示する -(setq wl-summary-subject-function 'my-wl-summary-subject-func-ml) -(defun my-wl-summary-subject-func-ml (subject-string) - (let ((folder wl-summary-buffer-folder-name) - (subj subject-string) (sequence) (ml-name) (ml-count)) - (setq sequence (elmo-msgdb-overview-entity-get-extra-field - entity "x-sequence") - ml-name (or (elmo-msgdb-overview-entity-get-extra-field - entity "x-ml-name") - (and sequence - (car (split-string sequence " ")))) - ml-count (or (elmo-msgdb-overview-entity-get-extra-field - entity "x-mail-count") - (elmo-msgdb-overview-entity-get-extra-field - entity "x-ml-count") - (and sequence - (cadr (split-string sequence " "))))) - (if (string-match - "^\\s(\\(\\S)+\\)[ :]\\([0-9]+\\)\\s)[ \t]*" - subject-string) - (progn - (setq subj (substring subject-string (match-end 0))) - (if (not ml-name) (setq ml-name (match-string 1 subject-string))) - (if (not ml-count) (setq ml-count (match-string 2 subject-string))))) - (condition-case nil - (if (and ml-name ml-count) - (if (string= folder wl-default-folder) - (format "(%s %05d) %s" - (car (split-string ml-name " ")) - (string-to-int ml-count) - subj) - (format "#%05d %s" - (string-to-int ml-count) subj)) - subj) - (error subj)))) +(setq wl-summary-line-format "%M/%D(%W)%h:%m %t%[%17F %] %# %s") ;; imput により非同期で送信する ;; (utils/im-wl.el をインストールしておく必要があります。 diff --git a/wl/ChangeLog b/wl/ChangeLog index 5cbdf90..8c4d823 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,10 @@ +2002-05-02 Yoichi NAKAYAMA + + * wl-summary.el (wl-summary-line-list-count): New function, merged + from my-wl-summary-subject-func-ml in samples/*/dot.wl. + * wl-vars.el (wl-summary-line-format-spec-alist): Add entry for + list counts. + 2002-05-02 Yuuichi Teranishi * wl-summary.el (wl-summary-create-line): Ignore errors while diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 8f8832e..6e44839 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -4097,6 +4097,42 @@ If ARG, exit virtual folder." (wl-summary-line-children-number) " " (wl-summary-line-from))) +(defun wl-summary-line-list-count () + (let ((folder wl-summary-buffer-folder-name) + (sequence) (ml-name) (ml-count) (subject-string)) + (setq sequence (elmo-msgdb-overview-entity-get-extra-field + wl-message-entity "x-sequence") + ml-name (or (elmo-msgdb-overview-entity-get-extra-field + wl-message-entity "x-ml-name") + (and sequence + (car (split-string sequence " ")))) + ml-count (or (elmo-msgdb-overview-entity-get-extra-field + wl-message-entity "x-mail-count") + (elmo-msgdb-overview-entity-get-extra-field + wl-message-entity "x-ml-count") + (and sequence + (cadr (split-string sequence " ")))) + subject-string + (elmo-delete-char ?\n + (or (elmo-msgdb-overview-entity-get-subject + wl-message-entity) + wl-summary-no-subject-message))) + (if (string-match + "^\\s(\\(\\S)+\\)[ :]\\([0-9]+\\)\\s)[ \t]*" + subject-string) + (progn + (if (not ml-name) (setq ml-name (match-string 1 subject-string))) + (if (not ml-count) (setq ml-count (match-string 2 subject-string))))) + (condition-case nil + (if (and ml-name ml-count) + (if (string= folder wl-default-folder) + (format "(%s %05d)" + (car (split-string ml-name " ")) + (string-to-int ml-count)) + (format "#%05d" (string-to-int ml-count))) + "") + (error "")))) + (defun wl-summary-create-line (wl-message-entity wl-parent-message-entity temp-mark diff --git a/wl/wl-vars.el b/wl/wl-vars.el index a0b9089..597b49f 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -188,7 +188,8 @@ If you don't have multiple e-mail addresses, you don't have to set this." (?S (wl-summary-line-size)) (?c (wl-summary-line-children-number)) (?f (wl-summary-line-from)) - (?F (wl-summary-line-children-and-from))) + (?F (wl-summary-line-children-and-from)) + (?# (wl-summary-line-list-count))) "An alist of format specifications that can appear in summary lines. Each element is a list of following: \(SPEC STRING-EXP\)