+2001-02-27 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * elmo-vars.el (elmo-inhibit-number-mapping): New variable.
+
+ * elmo-util.el (elmo-make-file-cache): Moved position of
+ some macros.
+
+ * elmo-pop3.el (elmo-pop3-inhibit-uidl): Eliminated.
+ (elmo-pop3-get-session): Use `elmo-inhibit-number-mapping'
+ instead of `elmo-pop3-inhibit-uidl'.
+ (elmo-folder-exists-p): Ditto.
+ (elmo-pop3-folder-list-messages): Ditto.
+
+ * elmo-pipe.el (elmo-pipe-drain): Use `elmo-inhibit-number-mapping'
+ instead of `elmo-pop3-inhibit-uidl'.
+ (elmo-folder-status): Ditto.
+
+ * elmo-dop.el (elmo-dop-folder): New variable.
+ (elmo-dop-lock-message): Eliminated.
+ (elmo-dop-unlock-message): Ditto.
+ (elmo-dop-lock-list-load): Ditto.
+ (elmo-dop-lock-list-save): Ditto.
+ (elmo-dop-delete-folder): Ditto.
+ (elmo-dop-rename-folder): Ditto.
+
+ * elmo.el: Removed incomplete commentary.
+
2001-02-25 TAKAHASHI Kaoru <kaoru@kaisei.org>
* elmo.el (toplevel): Require 'elmo-version first;
(require 'elmo-util)
(require 'elmo)
(require 'elmo-map)
-(require 'elmo-dop)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
"A list of (folder-name function-to-be-called argument-list).
Automatically loaded/saved.")
-(defun elmo-dop-queue-append (folder function argument)
+(defvar elmo-dop-folder (concat "+" (expand-file-name "dop"
+ elmo-msgdb-dir))
+ "A folder for `elmo-folder-append-messages' disconnected operations.")
+
+(defun elmo-dop-queue-append (folder function arguments)
(let ((operation (list (elmo-folder-name-internal folder)
- function argument)))
- (elmo-dop-queue-load)
+ function arguments)))
(unless (member operation elmo-dop-queue) ;; don't append same operation
(setq elmo-dop-queue
(append elmo-dop-queue
"Flush Disconnected operations.
If optional argument FORCE is non-nil, try flushing all operation queues
even an operation concerns the unplugged folder."
- (elmo-dop-queue-load) ; load cache.
(elmo-dop-queue-merge)
(let ((queue elmo-dop-queue)
(count 0)
(member (cadr que) elmo-dop-merge-funcs)
(setq match-queue
(car (delete nil
- (mapcar '(lambda (new-queue)
- (if (and
- (string= (car que) (car new-queue))
- (string= (cadr que) (cadr new-queue)))
- new-queue))
- new-queue)))))
+ (mapcar
+ (lambda (new-queue)
+ (if (and
+ (string= (car que) (car new-queue))
+ (string= (cadr que) (cadr new-queue)))
+ new-queue))
+ new-queue)))))
(setcar (cddr match-queue)
(append (nth 2 match-queue) (nth 2 que)))
(setq new-queue (append new-queue (list que))))
elmo-msgdb-dir)
elmo-dop-queue)))
-(defun elmo-dop-lock-message (message-id &optional lock-list)
- (let ((locked (or lock-list
- (elmo-object-load
- (expand-file-name
- elmo-msgdb-lock-list-filename
- elmo-msgdb-dir)))))
- (setq locked (cons message-id locked))
- (elmo-object-save
- (expand-file-name elmo-msgdb-lock-list-filename
- elmo-msgdb-dir)
- locked)))
-
-(defun elmo-dop-unlock-message (message-id &optional lock-list)
- (let ((locked (or lock-list
- (elmo-object-load
- (expand-file-name elmo-msgdb-lock-list-filename
- elmo-msgdb-dir)))))
- (setq locked (delete message-id locked))
- (elmo-object-save
- (expand-file-name elmo-msgdb-lock-list-filename
- elmo-msgdb-dir)
- locked)))
-
-(defun elmo-dop-lock-list-load ()
- (elmo-object-load
- (expand-file-name elmo-msgdb-lock-list-filename
- elmo-msgdb-dir)))
-
-(defun elmo-dop-lock-list-save (lock-list)
- (elmo-object-save
- (expand-file-name elmo-msgdb-lock-list-filename
- elmo-msgdb-dir)
- lock-list))
-
(defun elmo-dop-append-list-load (folder &optional resume)
(elmo-object-load
(expand-file-name (if resume
(error "Unplugged"))
(elmo-call-func folder "create-folder")))
-(defun elmo-dop-delete-folder (folder)
- (error "Unplugged"))
-
-(defun elmo-dop-rename-folder (old-folder new-folder)
- (error "Unplugged"))
-
(defun elmo-dop-append-msg (folder string message-id &optional msg)
(if elmo-enable-disconnected-operation
(if message-id
(defun elmo-pipe-drain (src dst)
"Move all messages of SRC to DST."
- (let ((elmo-pop3-inhibit-uidl t)) ; No need to use UIDL
+ (let ((elmo-inhibit-number-mapping t)) ; No need to use UIDL
(message "Checking %s..." (elmo-folder-name-internal src))
(elmo-folder-open-internal src)
(elmo-folder-move-messages src (elmo-folder-list-messages src) dst))
(luna-define-method elmo-folder-status ((folder elmo-pipe-folder))
(elmo-folder-open-internal (elmo-pipe-folder-src-internal folder))
(elmo-folder-open-internal (elmo-pipe-folder-dst-internal folder))
- (let* ((elmo-pop3-inhibit-uidl t)
+ (let* ((elmo-inhibit-number-mapping t)
(src-length (length (elmo-folder-list-messages
(elmo-pipe-folder-src-internal folder))))
(dst-list (elmo-folder-list-messages
(defvar elmo-pop3-use-uidl-internal t
"(Internal switch for using UIDL on POP3).")
-(defvar elmo-pop3-inhibit-uidl nil
- "(Internal switch for using UIDL on POP3).")
(defvar elmo-pop3-use-cache t
"Use cache in pop3 folder.")
(delete-process (elmo-network-session-process-internal session))))
(defun elmo-pop3-get-session (folder &optional if-exists)
- (let ((elmo-pop3-use-uidl-internal (if elmo-pop3-inhibit-uidl
+ (let ((elmo-pop3-use-uidl-internal (if elmo-inhibit-number-mapping
nil
(elmo-pop3-folder-use-uidl-internal
folder))))
(elmo-folder-plugged-p folder))
(save-excursion
(let (elmo-auto-change-plugged ; don't change plug status.
- elmo-pop3-inhibit-uidl ; No need to use uidl.
+ (elmo-inhibit-number-mapping t) ; No need to use uidl.
session)
(prog1
(setq session (elmo-pop3-get-session folder))
(error "POP3: Error in list")))))
(defsubst elmo-pop3-folder-list-messages (folder)
- (if (and (not elmo-pop3-inhibit-uidl)
+ (if (and (not elmo-inhibit-number-mapping)
(elmo-pop3-folder-use-uidl-internal folder))
(elmo-pop3-list-by-uidl-subr folder)
(elmo-pop3-list-by-list folder)))
(nreverse list)))
;;; File cache.
+(defmacro elmo-make-file-cache (path status)
+ "PATH is the cache file name.
+STATUS is one of 'section, 'entire or nil.
+ nil means no cache exists.
+'section means partial section cache exists.
+'entire means entire cache exists.
+If the cache is partial file-cache, TYPE is 'partial."
+ (` (cons (, path) (, status))))
+
+(defmacro elmo-file-cache-path (file-cache)
+ "Returns the file path of the FILE-CACHE."
+ (` (car (, file-cache))))
+
+(defmacro elmo-file-cache-status (file-cache)
+ "Returns the status of the FILE-CACHE."
+ (` (cdr (, file-cache))))
+
(defsubst elmo-cache-to-msgid (filename)
(concat "<" (elmo-recover-string-from-filename filename) ">"))
(write-region-as-binary (point-min) (point-max)
path nil 'no-msg))))
-(defmacro elmo-make-file-cache (path status)
- "PATH is the cache file name.
-STATUS is one of 'section, 'entire or nil.
- nil means no cache exists.
-'section means partial section cache exists.
-'entire means entire cache exists.
-If the cache is partial file-cache, TYPE is 'partial."
- (` (cons (, path) (, status))))
-
-(defmacro elmo-file-cache-path (file-cache)
- "Returns the file path of the FILE-CACHE."
- (` (car (, file-cache))))
-
-(defmacro elmo-file-cache-status (file-cache)
- "Returns the status of the FILE-CACHE."
- (` (cdr (, file-cache))))
-
(defun elmo-file-cache-get (msgid &optional section)
"Returns the current file-cache object associated with MSGID.
MSGID is the message-id of the message.
(defvar elmo-display-progress-threshold 20
"*Displaying progress gauge if number of messages are more than this value.")
+(defvar elmo-inhibit-number-mapping nil
+ "Global switch to inhibit number mapping (e.g. Inhibit UIDL on POP3).")
+
(require 'product)
(product-provide (provide 'elmo-vars) (require 'elmo-version))
;;; Commentary:
;;
-;; APIs which can be used before opened:
-
-;; elmo-make-folder
-;; elmo-folder-diff
-;; elmo-folder-open
;;; Code:
;;
+2001-02-27 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * wl-draft.el (wl-draft-queue-flush): Don't call
+ `elmo-dop-unlock-message'.
+ * wl-draft.el (wl-draft-queue-append): Don't call
+ `elmo-dop-lock-message'.
+
+ * wl-summary.el (wl-summary-buffer-msgdb): Revival (for compatibility).
+ (wl-summary-buffer-folder-name): Ditto.
+ (wl-summary-message-regexp): Added '-' (all other related portions
+ are changed).
+ (wl-summary-goto-folder-subr): Set wl-summary-buffer-msgdb and
+ wl-summary-buffer-folder-name.
+
+2001-02-26 "A. SAGATA" <sagata@nttvdt.hil.ntt.co.jp>
+
+ * wl-folder.el (wl-folder-check-one-entity): Fixed problem that
+ the number of mails in the folder buffer is not updated by wl-biff.
+
2000-02-26 Kenichi OKADA <okada@opaopa.org>
* wl-summary.el (wl-summary-default-subject-filter): Fix for `Re>'.
(message-id (std11-field-body "Message-ID")))
(if (elmo-folder-append-buffer folder t)
(progn
- (if message-id
- (elmo-dop-lock-message message-id))
(wl-draft-queue-info-operation
(car (elmo-folder-status folder))
'save wl-sent-message-via)
(elmo-folder-delete-messages
queue-folder (cons (car msgs) nil))
(wl-draft-queue-info-operation (car msgs) 'delete)
- (elmo-dop-unlock-message (std11-field-body "Message-ID"))
(setq performed (+ 1 performed)))
(setq msgs (cdr msgs)))
(kill-buffer buffer)
(elmo-folder-msgdb-path
folder)))))
(cdr nums))
- (current-buffer)))
+ (get-buffer wl-folder-buffer-name)))
(setq wl-folder-info-alist-modified t)
(sit-for 0)
(list (if wl-folder-notify-deleted
(defvar wl-summary-mode-map nil)
(defvar wl-current-summary-buffer nil)
-;; (defvar wl-summary-buffer-msgdb nil) obsolete.
-;; (defvar wl-summary-buffer-folder-name nil) obsolete.
(defvar wl-summary-buffer-elmo-folder nil)
(defmacro wl-summary-buffer-folder-name ()
(defvar wl-summary-buffer-next-folder-func nil)
(defvar wl-summary-buffer-exit-func nil)
(defvar wl-summary-buffer-number-list nil)
+(defvar wl-summary-buffer-msgdb nil)
+(defvar wl-summary-buffer-folder-name nil)
(defvar wl-thread-indent-level-internal nil)
(defvar wl-thread-have-younger-brother-str-internal nil)
(defvar wl-summary-get-petname-func 'wl-address-get-petname-1)
-(defvar wl-summary-message-regexp "^ *\\([0-9]+\\)")
+(defvar wl-summary-message-regexp "^ *\\([0-9-]+\\)")
(defvar wl-summary-shell-command-last "")
(make-variable-buffer-local 'wl-summary-buffer-next-folder-func)
(make-variable-buffer-local 'wl-summary-buffer-exit-func)
(make-variable-buffer-local 'wl-summary-buffer-number-list)
+(make-variable-buffer-local 'wl-summary-buffer-msgdb)
+(make-variable-buffer-local 'wl-summary-buffer-folder-name)
;; internal functions (dummy)
(unless (fboundp 'wl-summary-append-message-func-internal)
(goto-char (point-min))
(while (not (eobp))
(beginning-of-line)
- (when (looking-at "^ *\\([0-9]+\\)[^0-9]\\([^0-9]\\)")
+ (when (looking-at "^ *\\([0-9-]+\\)[^0-9]\\([^0-9]\\)")
(setq mark (wl-match-buffer 2))
(setq msg (string-to-int (wl-match-buffer 1)))
(if (or (and (null prefetch-marks)
(save-excursion
(save-match-data
(beginning-of-line)
- (when (looking-at "^ *\\([0-9]+\\)[^0-9]\\([^0-9]\\)")
+ (when (looking-at "^ *\\([0-9-]+\\)[^0-9]\\([^0-9]\\)")
(goto-char (match-beginning 2))
(let ((inhibit-read-only t)
(buffer-read-only nil)
(elmo-folder-mark-as-read folder (wl-summary-collect-unread mark-alist))
(save-excursion
(goto-char (point-min))
- (while (re-search-forward "^ *\\([0-9]+\\)[^0-9]\\([^0-9 ]\\)" nil t)
+ (while (re-search-forward "^ *\\([0-9-]+\\)[^0-9]\\([^0-9 ]\\)" nil t)
(setq msg (string-to-int (wl-match-buffer 1)))
(setq mark (wl-match-buffer 2))
(when (and (not (string= mark wl-summary-important-mark))
mark number unread new-mark)
;;; (re-search-backward "^ *[0-9]+..[0-9]+/[0-9]+" nil t) ; set cursor line
(beginning-of-line)
- (when (looking-at "^ *\\([0-9]+\\)[^0-9]\\([^0-9]\\)")
+ (when (looking-at "^ *\\([0-9-]+\\)[^0-9]\\([^0-9]\\)")
(progn
(setq mark (wl-match-buffer 2))
(cond
(message "Resuming cache status...")
(save-excursion
(goto-char (point-min))
- (while (re-search-forward "^ *\\([0-9]+\\)[^0-9]\\([^0-9]\\)" nil t)
+ (while (re-search-forward "^ *\\([0-9-]+\\)[^0-9]\\([^0-9]\\)" nil t)
(setq msg (string-to-int
(wl-match-buffer 1)))
(setq mark (wl-match-buffer 2))
(buffer-read-only nil)
msg-num
cur-mark)
- (when (looking-at "^ *\\([0-9]+\\)\\([^0-9]\\)")
+ (when (looking-at "^ *\\([0-9-]+\\)\\([^0-9]\\)")
(setq msg-num (string-to-int (wl-match-buffer 1)))
(setq cur-mark (wl-match-buffer 2))
(when (member cur-mark (list " "
(defun wl-summary-message-number ()
(save-excursion
(beginning-of-line)
- (if (looking-at "^ *\\([0-9]+\\)")
+ (if (looking-at "^ *\\([0-9-]+\\)")
(string-to-int (wl-match-buffer 1))
nil)))
wl-summary-buffer-message-modified
wl-summary-buffer-mark-modified
wl-summary-buffer-thread-modified
- wl-summary-buffer-number-list)
+ wl-summary-buffer-number-list
+ wl-summary-buffer-msgdb
+ wl-summary-buffer-folder-name)
(and (eq wl-summary-buffer-view 'thread)
'(wl-thread-entity-hashtb
wl-thread-entities
(buffer-read-only nil))
;; Select folder
(elmo-folder-open folder)
+ ;; For compatibility
+ (setq wl-summary-buffer-msgdb (elmo-folder-msgdb folder))
+ (setq wl-summary-buffer-folder-name (elmo-folder-name-internal
+ folder))
(erase-buffer)
;; Resume summary view
(if wl-summary-cache-use
(setq wl-summary-buffer-number-column
(or
(if (and update
- (setq end (if (re-search-forward "^ *[0-9]+[^0-9]" nil t)
+ (setq end (if (re-search-forward "^ *[0-9-]+[^0-9]" nil t)
(point))))
(- end (progn (beginning-of-line) (point)) 1))
(wl-get-assoc-list-value wl-summary-number-column-alist