from t.
* elmo-pop3.el (elmo-folder-exists-p): Return nil if unplugged.
* elmo-nntp.el (elmo-folder-exists-p-plugged): Divided plugged
case from `elmo-folder-exists-p'.
(elmo-folder-exists-p): Removed.
(elmo-folder-creatable-p) Ditto.
* elmo-net.el (elmo-folder-create): Defined.
(elmo-folder-create-unplugged): New function.
(elmo-folder-exists-p): Changed default value to nil from t.
* elmo-imap4.el (elmo-folder-creatable-p): Defined.
(elmo-folder-create-plugged): Renamed from `elmo-folder-create'.
* elmo-dop.el (elmo-folder-create-dop): Renamed from
`elmo-create-folder-dop' and append queue
'elmo-folder-create-dop-delayed instead of 'elmo-folder-create.
(elmo-folder-create-dop-delayed): New function.
* elmo-cache.el (elmo-folder-creatable-p): Ditto.
* elmo-shimbun.el (elmo-folder-creatable-p): Ditto.
* elmo-sendlog.el (elmo-folder-creatable-p): Ditto.
(elmo-folder-writable-p) : Ditto.
* wl-summary.el (wl-summary-refile-subr): Cause an error if FOLDER
is not writable.
* wl-folder.el (wl-folder-create-subr): Cause an error if FOLDER
is not creatable.
2002-04-03 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+ * elmo.el (elmo-folder-creatable-p): Changed default value to nil
+ from t.
+
+ * elmo-pop3.el (elmo-folder-exists-p): Return nil if unplugged.
+
+ * elmo-nntp.el (elmo-folder-exists-p-plugged): Divided plugged
+ case from `elmo-folder-exists-p'.
+ (elmo-folder-exists-p): Removed.
+ (elmo-folder-creatable-p) Ditto.
+
+ * elmo-net.el (elmo-folder-create): Defined.
+ (elmo-folder-create-unplugged): New function.
+ (elmo-folder-exists-p): Changed default value to nil from t.
+
+ * elmo-imap4.el (elmo-folder-creatable-p): Defined.
+ (elmo-folder-create-plugged): Renamed from `elmo-folder-create'.
+
+ * elmo-dop.el (elmo-folder-create-dop): Renamed from
+ `elmo-create-folder-dop' and append queue
+ 'elmo-folder-create-dop-delayed instead of 'elmo-folder-create.
+ (elmo-folder-create-dop-delayed): New function.
+
+ * elmo-cache.el (elmo-folder-creatable-p): Ditto.
+
+ * elmo-shimbun.el (elmo-folder-creatable-p): Ditto.
+
+ * elmo-sendlog.el (elmo-folder-creatable-p): Ditto.
+ (elmo-folder-writable-p) : Ditto.
+
* elmo-version.el (elmo-version): Up to 2.9.9.
2002-03-26 Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>
(when (file-exists-p file)
(insert-file-contents-as-binary file))))
-(luna-define-method elmo-folder-creatable-p ((folder elmo-cache-folder))
- nil)
-
(luna-define-method elmo-folder-writable-p ((folder elmo-cache-folder))
t)
'((elmo-folder-append-buffer-dop-delayed . "Append")
(elmo-folder-delete-messages-dop-delayed . "Delete")
(elmo-message-encache . "Encache")
- (elmo-create-folder . "Create")
+ (elmo-folder-create-dop-delayed . "Create")
(elmo-folder-mark-as-read . "Read")
(elmo-folder-unmark-read . "Unread")
(elmo-folder-mark-as-important . "Important")
(defsubst elmo-message-encache-dop (folder number &optional read)
(elmo-dop-queue-append folder 'elmo-message-encache (list number read)))
-(defsubst elmo-create-folder-dop (folder)
- (elmo-dop-queue-append folder 'elmo-folder-create nil))
+(defsubst elmo-folder-create-dop (folder)
+ (elmo-dop-queue-append folder 'elmo-folder-create-dop-delayed nil))
(defsubst elmo-folder-mark-as-read-dop (folder numbers)
(elmo-dop-queue-append folder 'elmo-folder-mark-as-read (list numbers)))
'message-id))))
number-alist))))
+(defun elmo-folder-create-dop-delayed (folder)
+ (unless (elmo-folder-exists-p folder)
+ (elmo-folder-create folder)))
+
;;; Util
(defun elmo-dop-msgdb (msgdb)
(list (mapcar (function
(elmo-imap4-folder-mailbox-internal folder)
'force 'notify-bye))))
+(luna-define-method elmo-folder-creatable-p ((folder elmo-imap4-folder))
+ t)
+
(luna-define-method elmo-folder-writable-p ((folder elmo-imap4-folder))
t)
(elmo-file-cache-path
cache-file)))))))
-(luna-define-method elmo-folder-create ((folder elmo-imap4-folder))
+(luna-define-method elmo-folder-create-plugged ((folder elmo-imap4-folder))
(elmo-imap4-send-command-wait
(elmo-imap4-get-session folder)
(list "create "
(append (elmo-net-port-info folder)
(list nil nil (quote (elmo-net-port-label folder)) add))))
+(luna-define-method elmo-folder-create ((folder elmo-net-folder))
+ (if (elmo-folder-plugged-p folder)
+ (elmo-folder-send folder 'elmo-folder-create-plugged)
+ (elmo-folder-send folder 'elmo-folder-create-unplugged)))
+
+(luna-define-method elmo-folder-create-unplugged ((folder elmo-net-folder))
+ (if elmo-enable-disconnected-operation
+ (elmo-folder-create-dop folder)
+ (error "Unplugged")))
+
(luna-define-method elmo-folder-exists-p ((folder elmo-net-folder))
(if (elmo-folder-plugged-p folder)
(elmo-folder-send folder 'elmo-folder-exists-p-plugged)
- t)) ; If unplugged, assume the folder exists.
+ nil)) ; If unplugged, assume the folder not exists.
(luna-define-method elmo-folder-status ((folder elmo-net-folder))
(if (elmo-folder-plugged-p folder)
(elmo-folder-set-killed-list-internal folder killed-list))
t)
-(luna-define-method elmo-folder-exists-p ((folder elmo-nntp-folder))
+(luna-define-method elmo-folder-exists-p-plugged ((folder elmo-nntp-folder))
(let ((session (elmo-nntp-get-session folder)))
- (if (elmo-folder-plugged-p folder)
- (progn
(elmo-nntp-send-command
session
(format "group %s"
(elmo-nntp-folder-group-internal folder)))
- (elmo-nntp-read-response session))
- t)))
+ (elmo-nntp-read-response session)))
(defun elmo-nntp-retrieve-field (spec field from-msgs)
"Retrieve FIELD values from FROM-MSGS.
(luna-define-method elmo-message-use-cache-p ((folder elmo-nntp-folder) number)
elmo-nntp-use-cache)
-(luna-define-method elmo-folder-creatable-p ((folder elmo-nntp-folder))
- nil)
-
(defun elmo-nntp-parse-newsgroups (string &optional subscribe-only)
(let ((nglist (elmo-parse string "[ \t\f\r\n,]*\\([^ \t\f\r\n,]+\\)"))
ngs)
(setq session (elmo-pop3-get-session folder))
(if session
(elmo-network-close-session session)))))
- t))
+ nil))
(defun elmo-pop3-parse-uidl-response (string)
(let ((buffer (current-buffer))
(insert-file-contents-as-binary filename)
(error "Now this message is not cached. Please s all"))))
-(luna-define-method elmo-folder-creatable-p ((folder elmo-sendlog-folder))
- nil)
-
-(luna-define-method elmo-folder-writable-p ((folder elmo-sendlog-folder))
- nil)
-
(luna-define-method elmo-folder-exists-p ((folder elmo-sendlog-folder))
t)
number)
elmo-shimbun-use-cache)
-(luna-define-method elmo-folder-creatable-p ((folder elmo-shimbun-folder))
- nil)
-
(luna-define-method elmo-folder-close-internal :after ((folder
elmo-shimbun-folder))
(shimbun-close-group
(elmo-folder-persistent-internal folder))
(luna-define-method elmo-folder-creatable-p ((folder elmo-folder))
- t) ; default is creatable.
+ nil) ; default is not creatable.
(luna-define-method elmo-folder-writable-p ((folder elmo-folder))
nil) ; default is not writable.
2002-04-03 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+ * wl-summary.el (wl-summary-refile-subr): Cause an error if FOLDER
+ is not writable.
+
+ * wl-folder.el (wl-folder-create-subr): Cause an error if FOLDER
+ is not creatable.
+
* Version number is increased to 2.9.9.
2002-04-03 Kenichi OKADA <okada@opaopa.org>
(kill-buffer bufname))))
(defun wl-folder-create-subr (folder)
+ (if (elmo-folder-creatable-p folder)
(if (y-or-n-p (format "Folder %s does not exist, create it? "
(elmo-folder-name-internal folder)))
(progn
wl-folder-entity-hashtb))
(unless (elmo-folder-create folder)
(error "Create folder failed")))
- (error "Folder %s is not created" (elmo-folder-name-internal folder))))
+ (error "Folder %s is not created" (elmo-folder-name-internal folder)))
+ (error "Folder %s does not exist" (elmo-folder-name-internal folder))))
(defun wl-folder-confirm-existence (folder &optional force)
(if force
(message "Force refile to %s." folder)))
(if (string= folder (wl-summary-buffer-folder-name))
(error "Same folder"))
- (if (or (string= folder wl-queue-folder)
+ (if (or (not (elmo-folder-writable-p (wl-folder-get-elmo-folder folder)))
+ (string= folder wl-queue-folder)
(string= folder wl-draft-folder))
(error "Don't %s messages to %s" copy-or-refile folder))
;; learn for refile.