From dacc8157c7be3fae1a141fbec47b6eb0c1301f74 Mon Sep 17 00:00:00 2001 From: hmurata Date: Thu, 8 Nov 2001 15:27:05 +0000 Subject: [PATCH] * elmo-pop3.el (elmo-folder-delete-messages-plugged): Renamed from `elmo-folder-delete-messages'. * elmo-nmz.el (elmo-nmz-index-alias-alist): New user option. (elmo-folder-initialize): Changed to expand alias into index path. * elmo-mime.el (elmo-mime-insert-sorted-header): Call `elmo-mime-insert-header-from-buffer' with 6th arg `sorted-fields'. --- elmo/ChangeLog | 12 ++++++++++ elmo/elmo-mime.el | 68 +++++++++++++++++++++++++++-------------------------- elmo/elmo-nmz.el | 26 +++++++++++++------- elmo/elmo-pop3.el | 4 ++-- 4 files changed, 66 insertions(+), 44 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 9135b09..2f4fae1 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,15 @@ +2001-11-08 Hiroya Murata + + * elmo-pop3.el (elmo-folder-delete-messages-plugged): Renamed from + `elmo-folder-delete-messages'. + + * elmo-nmz.el (elmo-nmz-index-alias-alist): New user option. + (elmo-folder-initialize): Changed to expand alias into index path. + + * elmo-mime.el (elmo-mime-insert-sorted-header): Call + `elmo-mime-insert-header-from-buffer' with 6th arg + `sorted-fields'. + 2001-11-08 Yuuichi Teranishi * mmimap.el (mmimap-entity-section): If node-id is nil, return "0". diff --git a/elmo/elmo-mime.el b/elmo/elmo-mime.el index 7705677..498944c 100644 --- a/elmo/elmo-mime.el +++ b/elmo/elmo-mime.el @@ -24,10 +24,10 @@ ;; ;;; Commentary: -;; +;; ;;; Code: -;; +;; (require 'elmo-vars) (require 'mmbuffer) (require 'mmimap) @@ -77,7 +77,7 @@ value is used." (mode-obj (mime-find-field-presentation-method 'wide)) field-decoder f-b p f-e field-name field field-body - vf-alist (sl sort-fields)) + vf-alist (sl sort-fields)) (save-excursion (set-buffer buffer) (save-restriction @@ -95,42 +95,42 @@ value is used." field-body (buffer-substring p f-e) field-decoder (inline (mime-find-field-decoder-internal field mode-obj))) - (setq vf-alist (append (list - (cons field-name - (list field-body field-decoder))) - vf-alist)))) - (and vf-alist - (setq vf-alist - (sort vf-alist - (function (lambda (s d) - (let ((n 0) re - (sf (car s)) - (df (car d))) - (catch 'done - (while (setq re (nth n sl)) - (setq n (1+ n)) - (and (string-match re sf) - (throw 'done t)) - (and (string-match re df) - (throw 'done nil))) - t))))))) - (with-current-buffer the-buf - (while vf-alist - (let* ((vf (car vf-alist)) - (field-name (car vf)) - (field-body (car (cdr vf))) - (field-decoder (car (cdr (cdr vf))))) - (insert field-name) + (setq vf-alist (append (list + (cons field-name + (list field-body field-decoder))) + vf-alist)))) + (and vf-alist + (setq vf-alist + (sort vf-alist + (function (lambda (s d) + (let ((n 0) re + (sf (car s)) + (df (car d))) + (catch 'done + (while (setq re (nth n sl)) + (setq n (1+ n)) + (and (string-match re sf) + (throw 'done t)) + (and (string-match re df) + (throw 'done nil))) + t))))))) + (with-current-buffer the-buf + (while vf-alist + (let* ((vf (car vf-alist)) + (field-name (car vf)) + (field-body (car (cdr vf))) + (field-decoder (car (cdr (cdr vf))))) + (insert field-name) (insert (if field-decoder (funcall field-decoder field-body - (string-width field-name) + (string-width field-name) (if (functionp elmo-mime-header-max-column) (funcall elmo-mime-header-max-column) elmo-mime-header-max-column)) ;; Don't decode field-body)) - (insert "\n")) - (setq vf-alist (cdr vf-alist))) + (insert "\n")) + (setq vf-alist (cdr vf-alist))) (run-hooks 'mmelmo-header-inserted-hook)))))) (luna-define-generic elmo-mime-insert-sorted-header (entity @@ -164,7 +164,9 @@ value is used." p-max (point-max)) (set-buffer the-buf) (elmo-mime-insert-header-from-buffer buf p-min p-max - invisible-fields visible-fields)))) + invisible-fields + visible-fields + sorted-fields)))) (luna-define-method mime-insert-text-content :around ((entity mime-elmo-buffer-entity)) diff --git a/elmo/elmo-nmz.el b/elmo/elmo-nmz.el index c13e505..d0c414d 100644 --- a/elmo/elmo-nmz.el +++ b/elmo/elmo-nmz.el @@ -24,10 +24,10 @@ ;; ;;; Commentary: -;; +;; ;;; Code: -;; +;; (require 'elmo) (require 'elmo-map) (require 'mime-edit) @@ -52,6 +52,12 @@ :type '(repeat string) :group 'elmo) +(defcustom elmo-nmz-index-alias-alist nil + "*Alist of ALIAS and INDEX-PATH." + :type '(repeat (cons (string :tag "Alias Name") + (directory :tag "Index Path"))) + :group 'elmo) + ;;; "namazu search" (eval-and-compile (luna-define-class elmo-nmz-folder @@ -69,12 +75,14 @@ (buffer-substring (+ 1 (point-min)) (- (point) 1))) - (elmo-nmz-folder-set-index-path-internal folder - (buffer-substring (point) - (point-max))) - (if (eq (length (elmo-nmz-folder-index-path-internal folder)) 0) - (elmo-nmz-folder-set-index-path-internal folder - elmo-nmz-default-index-path)) + (let ((index (buffer-substring (point) (point-max)))) + (elmo-nmz-folder-set-index-path-internal + folder + (cond ((cdr (assoc index elmo-nmz-index-alias-alist))) + ((eq (length index) 0) + elmo-nmz-default-index-path) + (t + index)))) folder)) (luna-define-method elmo-folder-expand-msgdb-path ((folder @@ -96,7 +104,7 @@ (elmo-msgdb-overview-entity-set-subject entity location) (setq uid (nth 2 (file-attributes location))) (elmo-msgdb-overview-entity-set-from entity - (concat + (concat (user-full-name uid) " <"(user-login-name uid) "@" (system-name) ">"))) diff --git a/elmo/elmo-pop3.el b/elmo/elmo-pop3.el index e210fd5..f6a1e91 100644 --- a/elmo/elmo-pop3.el +++ b/elmo/elmo-pop3.el @@ -889,8 +889,8 @@ Debug information is inserted in the buffer \"*POP3 DEBUG*\"") (error "Deleting message failed"))) (error "Deleting message failed"))))) -(luna-define-method elmo-folder-delete-messages ((folder elmo-pop3-folder) - msgs) +(luna-define-method elmo-folder-delete-messages-plugged + ((folder elmo-pop3-folder) msgs) (let ((loc-alist (elmo-pop3-folder-location-alist-internal folder)) (process (elmo-network-session-process-internal (elmo-pop3-get-session folder)))) -- 1.7.10.4