["Write a message" wl-draft t]
["Write for current folder" wl-folder-write-current-folder t]
"----"
+ ["Wanderlust NEWS" wl-news t]
+ "----"
["Toggle Plug Status" wl-toggle-plugged t]
["Change Plug Status" wl-plugged-change t]
"----"
(or (, hashtb) wl-folder-elmo-folder-hashtb))))
(defmacro wl-folder-get-elmo-folder (entity &optional no-cache)
- "Get elmo folder structure from entity."
+ "Get elmo folder structure from ENTITY."
(` (if (, no-cache)
(elmo-make-folder (elmo-string (, entity)))
(or (wl-folder-elmo-folder-cache-get (, entity))
(forward-line 1))
(defun wl-folder-prev-entity-skip-invalid (&optional hereto)
- "move to previous entity. skip unsubscribed or removed entity."
+ "Move to previous entity. skip unsubscribed or removed entity."
(interactive)
(if hereto
(end-of-line))
(setq entities (nth 2 entity)))
((stringp entity)
(if (and (string= name entity)
- ;; don't use eq, `id' is string on Nemacs.
- (equal id (wl-folder-get-entity-id entity)))
+ (eq id (wl-folder-get-entity-id entity)))
(throw 'done last-entity))
(if (or (not unread)
(and (setq finfo (wl-folder-get-entity-info entity))
(> (+ (nth 0 finfo)(nth 1 finfo)) 0)))
(throw 'done entity))
(if (and (string= name entity)
- ;; don't use eq, `id' is string on Nemacs.
- (equal id (wl-folder-get-entity-id entity)))
+ (eq id (wl-folder-get-entity-id entity)))
(setq found t)))))
(unless entities
(setq entities (wl-pop entity-stack)))))))
(wl-plugged t)
emptied)
(if elmo-enable-disconnected-operation
- (elmo-dop-queue-flush 'force)) ; Try flushing all queue.
+ (elmo-dop-queue-flush))
(if (not (elmo-folder-list-messages
(wl-folder-get-elmo-folder wl-queue-folder)))
(message "No sending queue exists.")
(let ((cur-buf (current-buffer))
(wl-auto-select-first nil)
trash-buf emptied)
+ (wl-summary-goto-folder-subr wl-trash-folder 'force-update)
+ (setq trash-buf (wl-summary-get-buffer-create wl-trash-folder))
(if wl-stay-folder-window
- (wl-folder-select-buffer
- (wl-summary-get-buffer-create wl-trash-folder)))
- (wl-summary-goto-folder-subr wl-trash-folder 'force-update nil nil t)
- (setq trash-buf (current-buffer))
+ (wl-folder-select-buffer trash-buf)
+ (switch-to-buffer trash-buf))
(unwind-protect
(setq emptied (wl-summary-delete-all-msgs))
(when emptied
(goto-char wl-folder-buffer-cur-point))))
(defun wl-folder-set-current-entity-id (entity-id)
- (let ((buf (get-buffer wl-folder-buffer-name)))
+ (let* ((buf (get-buffer wl-folder-buffer-name))
+ (buf-win (get-buffer-window buf)))
(if buf
- (save-excursion
- (set-buffer buf)
- (setq wl-folder-buffer-cur-entity-id entity-id)
- (setq wl-folder-buffer-cur-path (wl-folder-get-path wl-folder-entity
- entity-id))
- (wl-highlight-folder-path wl-folder-buffer-cur-path)
- (and wl-folder-move-cur-folder
- wl-folder-buffer-cur-point
- (goto-char wl-folder-buffer-cur-point))))
- (if (eq (current-buffer) buf)
- (and wl-folder-move-cur-folder
- wl-folder-buffer-cur-point
- (goto-char wl-folder-buffer-cur-point)))))
+ (save-current-buffer
+ (save-selected-window
+ (if buf-win
+ (select-window buf-win)
+ (set-buffer buf))
+ (setq wl-folder-buffer-cur-entity-id entity-id)
+ (setq wl-folder-buffer-cur-path
+ (wl-folder-get-path wl-folder-entity entity-id))
+ (wl-highlight-folder-path wl-folder-buffer-cur-path)
+ (and wl-folder-move-cur-folder
+ wl-folder-buffer-cur-point
+ (goto-char wl-folder-buffer-cur-point)))))))
(defun wl-folder-check-current-entity ()
"Check folder at position.
(wl-summary-always-sticky-folder-p
folder))
wl-summary-highlight))
- wl-auto-select-first new unread)
+ wl-auto-select-first new unread sticky)
(setq new (or (car nums) 0))
(setq unread (or (cadr nums) 0))
(if (or (not unread-only)
(or (< 0 new) (< 0 unread)))
- (let ((wl-summary-buffer-name (concat
- wl-summary-buffer-name
- (symbol-name this-command)))
+ (let ((wl-summary-buffer-name
+ (if (setq sticky (get-buffer (wl-summary-sticky-buffer-name
+ (elmo-folder-name-internal
+ folder))))
+ ;; Sticky folder exists.
+ (wl-summary-sticky-buffer-name
+ (elmo-folder-name-internal folder))
+ (concat
+ wl-summary-buffer-name
+ (symbol-name this-command))))
(wl-summary-use-frame nil)
(wl-summary-always-sticky-folder-list nil))
(save-window-excursion
(wl-summary-get-sync-range
folder)
nil nil nil t)
- (wl-summary-exit)))))))))
+ (if sticky
+ (wl-summary-save-status)
+ (wl-summary-exit))))))))))
(defun wl-folder-sync-current-entity (&optional unread-only)
"Synchronize the folder at position.
(wl-summary-always-sticky-folder-p
folder))
wl-summary-highlight))
- wl-auto-select-first new unread)
+ wl-auto-select-first new unread sticky)
(setq new (or (car nums) 0))
(setq unread (or (cadr nums) 0))
(if (or (< 0 new) (< 0 unread))
(save-window-excursion
(save-excursion
- (let ((wl-summary-buffer-name (concat
- wl-summary-buffer-name
- (symbol-name this-command)))
+ (let ((wl-summary-buffer-name
+ (if (setq sticky (get-buffer
+ (wl-summary-sticky-buffer-name
+ (elmo-folder-name-internal
+ folder))))
+ ;; Sticky folder exists.
+ (wl-summary-sticky-buffer-name
+ (elmo-folder-name-internal folder))
+ (concat
+ wl-summary-buffer-name
+ (symbol-name this-command))))
(wl-summary-use-frame nil)
(wl-summary-always-sticky-folder-list nil))
(wl-summary-goto-folder-subr entity
(wl-summary-get-sync-range folder)
nil)
(wl-summary-mark-as-read-all)
- (wl-summary-exit))))
+ (if sticky
+ (wl-summary-save-status)
+ (wl-summary-exit)))))
(sit-for 0))))))
(defun wl-folder-mark-as-read-all-current-entity ()
(cond
((consp entity)
(if (and (or (not string) (string= string (car entity)))
- ;; don't use eq, `id' is string on Nemacs.
- (equal target-id (wl-folder-get-entity-id (car entity))))
+ (eq target-id (wl-folder-get-entity-id (car entity))))
(throw 'done
(wl-push target-id result-path))
(wl-push (wl-folder-get-entity-id (car entity)) result-path))
(setq entities (nth 2 entity)))
((stringp entity)
(if (and (or (not string) (string= string entity))
- ;; don't use eq, `id' is string on Nemacs.
- (equal target-id (wl-folder-get-entity-id entity)))
+ (eq target-id (wl-folder-get-entity-id entity)))
(throw 'done
(wl-push target-id result-path)))))
(unless entities
nil)))
(defun wl-folder-guess-mailing-list-by-refile-rule (entity)
- "Return ML address guess by FOLDER.
+ "Return ML address guess by ENTITY.
Use `wl-subscribed-mailing-list' and `wl-refile-rule-alist'."
(let ((flist
(elmo-folder-get-primitive-list
(elmo-string-matched-member tokey wl-subscribed-mailing-list t)))))
(defun wl-folder-guess-mailing-list-by-folder-name (entity)
- "Return ML address guess by FOLDER name's last hierarchy.
+ "Return ML address guess by ENTITY name's last hierarchy.
Use `wl-subscribed-mailing-list'."
(let ((flist
(elmo-folder-get-primitive-list
wl-summary-highlight))
wl-summary-exit-next-move
wl-auto-select-first ret-val
- count)
+ count sticky)
(setq count (or (car nums) 0))
(setq count (+ count (wl-folder-count-incorporates folder)))
(if (or (null (car nums)) ; unknown
(< 0 count))
(save-window-excursion
(save-excursion
- (let ((wl-summary-buffer-name (concat
- wl-summary-buffer-name
- (symbol-name this-command)))
+ (let ((wl-summary-buffer-name
+ (if (setq sticky (get-buffer
+ (wl-summary-sticky-buffer-name
+ (elmo-folder-name-internal
+ folder))))
+ ;; Sticky folder exists.
+ (wl-summary-sticky-buffer-name
+ (elmo-folder-name-internal folder))
+ (concat
+ wl-summary-buffer-name
+ (symbol-name this-command))))
(wl-summary-use-frame nil)
(wl-summary-always-sticky-folder-list nil))
(wl-summary-goto-folder-subr entity
folder)
nil)
(setq ret-val (wl-summary-incorporate))
- (wl-summary-exit)
+ (if sticky
+ (wl-summary-save-status)
+ (wl-summary-exit))
ret-val)))
(cons 0 0))))))