+2001-11-08 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * 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 <teranisi@gohome.org>
* mmimap.el (mmimap-entity-section): If node-id is nil, return "0".
;;
;;; Commentary:
-;;
+;;
;;; Code:
-;;
+;;
(require 'elmo-vars)
(require 'mmbuffer)
(require 'mmimap)
(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
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
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))
;;
;;; Commentary:
-;;
+;;
;;; Code:
-;;
+;;
(require 'elmo)
(require 'elmo-map)
(require 'mime-edit)
: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
(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
(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) ">")))
(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))))