From 53b59e661fd8905eab12bf6167343412845300ec Mon Sep 17 00:00:00 2001 From: teranisi Date: Sun, 20 Mar 2005 13:10:05 +0000 Subject: [PATCH] Synch up with main trunk. --- elmo/ChangeLog | 5 +++++ elmo/elmo-flag.el | 14 ++++++++------ wl/ChangeLog | 31 +++++++++++++++++++++++++++++++ wl/wl-draft.el | 14 +++++++------- wl/wl-fldmgr.el | 42 ++++++++++++++++++++++++++++-------------- wl/wl-folder.el | 10 +++++----- wl/wl-summary.el | 44 ++++++++++++++++++++++++-------------------- wl/wl-thread.el | 10 +++------- 8 files changed, 111 insertions(+), 59 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index f5fc68f..0cf41af 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2005-03-14 Yoichi NAKAYAMA + + * elmo-flag.el (elmo-global-flags-initialize): Don't include + member of elmo-local-flags. + 2005-03-13 Yuuichi Teranishi * elmo-version.el (elmo-version): Up to 2.14.0. diff --git a/elmo/elmo-flag.el b/elmo/elmo-flag.el index cb2ebdc..826cd7d 100644 --- a/elmo/elmo-flag.el +++ b/elmo/elmo-flag.el @@ -444,12 +444,14 @@ If optional IGNORE-PRESERVED is non-nil, preserved flags (defun elmo-global-flags-initialize (&optional additional-flags) (let ((dir (expand-file-name "flag" elmo-msgdb-directory))) (setq elmo-global-flags - (elmo-uniq-list - (append - elmo-global-flags - additional-flags - (mapcar 'intern - (delete ".." (delete "." (directory-files dir))))))))) + (elmo-list-delete + elmo-local-flags + (elmo-uniq-list + (append + elmo-global-flags + additional-flags + (mapcar 'intern + (delete ".." (delete "." (directory-files dir)))))))))) ;;; To migrate from global mark folder (defvar elmo-global-mark-filename "global-mark" diff --git a/wl/ChangeLog b/wl/ChangeLog index f93c17e..3ffe128 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,34 @@ +2005-03-20 Yoichi NAKAYAMA + + * wl-fldmgr.el (wl-fldmgr-add): Create folder after testing parent + group is access or not (it is not strict, like wl-fldmgr-rename). + +2005-03-17 Yoichi NAKAYAMA + + * wl-thread.el (wl-thread-update-line-on-buffer-sub): Avoid + duplicate call of `wl-summary-print-argument' on the wrong line. + +2005-03-17 Hiroya Murata + + * wl-summary.el (wl-summary-jump-to-msg): Don't interactive input + even if argument `number' is nil. + (wl-summary-insert-line): Print action argument if current message + has it. + +2005-03-16 Hiroya Murata + + * wl-draft.el (wl-draft-forward): Call `wl-draft' with number. + (wl-draft-reply): Ditto. + (wl-draft): Add optional argument `parent-number' and call + `wl-draft-create-buffer' with it. + (wl-draft-create-buffer): Add optional argument + `parent-number'. Set wl-draft-parent-number as it. + +2005-03-13 Yoichi NAKAYAMA + + * wl-folder.el (wl-folder-set-persistent-mark): If summary + buffer is not for given folder, don't use it. + 2005-03-13 Yuuichi Teranishi * Version number is increased to 2.14.0. diff --git a/wl/wl-draft.el b/wl/wl-draft.el index 13ba443..3f7af61 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -293,8 +293,7 @@ e.g. (wl-draft (list (cons 'To "") (cons 'Subject subject) (cons 'References references)) - nil nil nil nil parent-folder)) - (setq wl-draft-parent-number number) + nil nil nil nil parent-folder number)) (goto-char (point-max)) (wl-draft-insert-message) (mail-position-on-field "To") @@ -463,8 +462,7 @@ Reply to author if WITH-ARG is non-nil." (cons 'In-Reply-To in-reply-to) (cons 'References references) (cons 'Mail-Followup-To mail-followup-to)) - nil nil nil nil parent-folder) - (setq wl-draft-parent-number number) + nil nil nil nil parent-folder number) (setq wl-draft-reply-buffer buf) (setq wl-draft-config-variables (append wl-draft-parent-variables @@ -1634,7 +1632,8 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" (defun wl-draft (&optional header-alist content-type content-transfer-encoding body edit-again - parent-folder) + parent-folder + parent-number) "Write and send mail/news message with Wanderlust." (interactive) (require 'wl) @@ -1648,7 +1647,7 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" (wl-set-save-drafts) (let (buffer header-alist-internal) - (setq buffer (wl-draft-create-buffer parent-folder)) + (setq buffer (wl-draft-create-buffer parent-folder parent-number)) (unless (cdr (assq 'From header-alist)) (setq header-alist (append (list (cons 'From wl-from)) header-alist))) @@ -1690,7 +1689,7 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" (goto-char (point-max)))) buffer)) -(defun wl-draft-create-buffer (&optional parent-folder) +(defun wl-draft-create-buffer (&optional parent-folder parent-number) (let* ((draft-folder (wl-draft-get-folder)) (parent-folder (or parent-folder (wl-summary-buffer-folder-name))) (summary-buf (wl-summary-get-buffer parent-folder)) @@ -1746,6 +1745,7 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" (setq wl-sent-message-queued nil) (setq wl-draft-config-exec-flag t) (setq wl-draft-parent-folder (or parent-folder "")) + (setq wl-draft-parent-number parent-number) (or (eq this-command 'wl-folder-write-current-folder) (setq wl-draft-buffer-cur-summary-buffer summary-buf)) buffer)) diff --git a/wl/wl-fldmgr.el b/wl/wl-fldmgr.el index 821e144..ec79f5b 100644 --- a/wl/wl-fldmgr.el +++ b/wl/wl-fldmgr.el @@ -831,20 +831,34 @@ return value is diffs '(-new -unread -all)." (setq indent (wl-fldmgr-make-indent (nth 1 tmp))) (or name (setq name (wl-fldmgr-read-string - (wl-summary-read-folder wl-default-folder "to add")))) - ;; maybe add elmo-plugged-alist. - (elmo-folder-set-plugged (wl-folder-get-elmo-folder - (if (listp name) (car name) name)) - wl-plugged t) - (when (setq diffs - (wl-add-entity - path (list name) wl-folder-entity (nth 3 tmp) t)) - (wl-folder-insert-entity indent name) - (wl-fldmgr-update-group path diffs) - (setq wl-fldmgr-modified t) - (set-buffer-modified-p nil) - (setq ret-val t))) - ret-val))) + (wl-summary-read-folder wl-default-folder + "to add" nil t)))) + (let ((parent (nth 2 (wl-fldmgr-get-path-from-buffer)))) + (if (eq (cdr parent) 'access) + (if (string-match + (format "^%s" (regexp-quote (car parent))) name) + ;; force update access group + (progn + (wl-folder-confirm-existence + (wl-folder-get-elmo-folder name)) + (wl-folder-open-close) + (wl-folder-jump-to-current-entity t) + (setq ret-val t)) + (error "Can't insert folder under access group")) + (wl-folder-confirm-existence (wl-folder-get-elmo-folder name)) + ;; maybe add elmo-plugged-alist. + (elmo-folder-set-plugged (wl-folder-get-elmo-folder + (if (listp name) (car name) name)) + wl-plugged t) + (when (setq diffs + (wl-add-entity + path (list name) wl-folder-entity (nth 3 tmp) t)) + (wl-folder-insert-entity indent name) + (wl-fldmgr-update-group path diffs) + (setq wl-fldmgr-modified t) + (set-buffer-modified-p nil) + (setq ret-val t))) + ret-val))))) (defun wl-fldmgr-delete () (interactive) diff --git a/wl/wl-folder.el b/wl/wl-folder.el index 835715d..7225042 100644 --- a/wl/wl-folder.el +++ b/wl/wl-folder.el @@ -513,14 +513,14 @@ Default HASHTB is `wl-folder-elmo-folder-hashtb'." (defun wl-folder-set-persistent-mark (folder number flag) "Set a persistent mark which corresponds to the specified flag on message." - (let ((buffer (wl-summary-get-buffer folder)) - elmo-folder) - (if buffer + (let ((buffer (wl-summary-get-buffer folder))) + (if (and buffer + (with-current-buffer buffer + (string= wl-summary-buffer-folder-name folder))) (with-current-buffer buffer (wl-summary-set-persistent-mark flag number)) ;; Parent buffer does not exist. - (when (setq elmo-folder (and folder - (wl-folder-get-elmo-folder folder))) + (let ((elmo-folder (wl-folder-get-elmo-folder folder))) (elmo-folder-open elmo-folder 'load-msgdb) (elmo-folder-set-flag elmo-folder (list wl-draft-parent-number) flag) (elmo-folder-close elmo-folder))))) diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 0d481ef..63bf3c8 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -2138,26 +2138,24 @@ This function is defined for `window-scroll-functions'" (funcall wl-summary-buffer-mode-line-formatter))) (defun wl-summary-jump-to-msg (&optional number beg end) - (interactive "NJump to Number:") - (let ((num (or number - (string-to-int - (read-from-minibuffer "Jump to Message(No.): ")))) - (pos (point)) - regexp) - (setq regexp (concat "\r" (int-to-string num) "[^0-9]")) - (if (and beg end (or (< pos beg) (< end pos))) - (progn - (goto-char beg) - (if (re-search-forward regexp end t) - (progn (backward-char 1) (beginning-of-line) t) - (goto-char pos) - nil)) - (beginning-of-line) - (if (or (and (re-search-forward regexp end t) - (progn (backward-char 1) t)) - (re-search-backward regexp beg t)) - (progn (beginning-of-line) t) - nil)))) + (interactive "NJump to Message (No.): ") + (when number + (let ((pos (point)) + regexp) + (setq regexp (concat "\r" (int-to-string number) "[^0-9]")) + (if (and beg end (or (< pos beg) (< end pos))) + (progn + (goto-char beg) + (if (re-search-forward regexp end t) + (progn (backward-char 1) (beginning-of-line) t) + (goto-char pos) + nil)) + (beginning-of-line) + (if (or (and (re-search-forward regexp end t) + (progn (backward-char 1) t)) + (re-search-backward regexp beg t)) + (progn (beginning-of-line) t) + nil))))) (defun wl-summary-highlight-msgs (msgs) (save-excursion @@ -2610,6 +2608,12 @@ If ARG, without confirm." (save-excursion (end-of-line)(point)) 'mouse-face nil)) (insert line "\n") + (save-excursion + (forward-line -1) + (let* ((number (wl-summary-message-number)) + (mark-info (wl-summary-registered-temp-mark number))) + (when (and mark-info (nth 2 mark-info)) + (wl-summary-print-argument number (nth 2 mark-info))))) (if wl-use-highlight-mouse-line ;; remove 'mouse-face of current line. (put-text-property diff --git a/wl/wl-thread.el b/wl/wl-thread.el index 655407a..0d48474 100644 --- a/wl/wl-thread.el +++ b/wl/wl-thread.el @@ -367,15 +367,14 @@ ENTITY is returned." (parent-msg (or parent-msg (wl-thread-entity-get-parent entity))) (buffer-read-only nil) (inhibit-read-only t) - message-entity temp-mark summary-line invisible-top dest-pair) + message-entity temp-mark summary-line invisible-top) (if (wl-thread-delete-line-from-buffer msg) (progn (cond ((memq msg wl-summary-buffer-target-mark-list) (setq temp-mark "*")) ((setq temp-mark (wl-summary-registered-temp-mark msg)) - (setq dest-pair (cons (nth 0 temp-mark)(nth 2 temp-mark)) - temp-mark (nth 1 temp-mark))) + (setq temp-mark (nth 1 temp-mark))) (t (setq temp-mark (wl-summary-get-score-mark msg)))) (when (setq message-entity (elmo-message-entity wl-summary-buffer-elmo-folder @@ -394,10 +393,7 @@ ENTITY is returned." nil (wl-thread-maybe-get-children-num msg)) (wl-thread-make-indent-string entity) - (wl-thread-entity-get-linked entity))) - (if dest-pair - (wl-summary-print-argument (car dest-pair) - (cdr dest-pair))))) + (wl-thread-entity-get-linked entity))))) ;; insert thread (moving thread) (if (not (setq invisible-top (wl-thread-entity-parent-invisible-p entity))) -- 1.7.10.4