From: teranisi Date: Fri, 12 May 2000 07:38:25 +0000 (+0000) Subject: * wl-thread.el (wl-thread-update-line-msgs): Added optional argument `no-msg'. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa7713caffce2ab4149220dac4e3987a22bc2c30;p=elisp%2Fwanderlust.git * wl-thread.el (wl-thread-update-line-msgs): Added optional argument `no-msg'. * wl-summary.el (wl-summary-delete-messages-on-buffer): Set no-msg argument of `wl-thread-update-line-msgs'. (wl-summary-set-parent): Added optional argument `parent-number'. (wl-summary-buffer-saved-message): New buffer local variable. (wl-summary-save-current-message): New command. (wl-summary-yank-saved-message): Ditto. (wl-summary-mode-map): Added key binding for `wl-summary-save-current-message' (\ew) and `wl-summary-yank-saved-message' (\C-y). --- diff --git a/wl/ChangeLog b/wl/ChangeLog index b614e4e..93bf596 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,17 @@ +2000-05-12 Yuuichi Teranishi + + * wl-thread.el (wl-thread-update-line-msgs): Added optional argument + `no-msg'. + * wl-summary.el (wl-summary-delete-messages-on-buffer): Set no-msg + argument of `wl-thread-update-line-msgs'. + (wl-summary-set-parent): Added optional argument `parent-number'. + (wl-summary-buffer-saved-message): New buffer local variable. + (wl-summary-save-current-message): New command. + (wl-summary-yank-saved-message): Ditto. + (wl-summary-mode-map): Added key binding for + `wl-summary-save-current-message' (\ew) and + `wl-summary-yank-saved-message' (\C-y). + 2000-05-11 Yuuichi Teranishi * wl-summary.el (wl-summary-mode-map): Added key binding for diff --git a/wl/wl-summary.el b/wl/wl-summary.el index e9efacd..ede8fb4 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -4,7 +4,7 @@ ;; Author: Yuuichi Teranishi ;; Keywords: mail, net news -;; Time-stamp: <00/05/11 13:13:04 teranisi> +;; Time-stamp: <2000-05-12 16:30:34 teranisi> ;; This file is part of Wanderlust (Yet Another Message Interface on Emacsen). @@ -93,6 +93,8 @@ (defvar wl-summary-buffer-copy-list nil) (defvar wl-summary-buffer-prev-refile-destination nil) (defvar wl-summary-buffer-prev-copy-destination nil) +(defvar wl-summary-buffer-saved-message nil) + (defvar wl-thread-indent-level-internal nil) (defvar wl-thread-have-younger-brother-str-internal nil) (defvar wl-thread-youngest-child-str-internal nil) @@ -140,6 +142,7 @@ 'wl-summary-buffer-persistent 'wl-summary-buffer-thread-nodes 'wl-summary-buffer-prev-refile-destination + 'wl-summary-buffer-saved-message 'wl-summary-scored 'wl-summary-default-score 'wl-summary-move-direction-downward @@ -408,6 +411,10 @@ (define-key wl-summary-mode-map "?" 'wl-summary-pick) (define-key wl-summary-mode-map "\ee" 'wl-summary-expire) + ;; copy & paste. + (define-key wl-summary-mode-map "\ew" 'wl-summary-save-current-message) + (define-key wl-summary-mode-map "\C-y" 'wl-summary-yank-saved-message) + ;; line commands (define-key wl-summary-mode-map "R" 'wl-summary-mark-as-read) (define-key wl-summary-mode-map "i" 'wl-summary-prefetch) @@ -1920,7 +1927,7 @@ If optional argument is non-nil, checking is omitted." (elmo-display-progress 'wl-summary-delete-messages-on-buffer "Deleting..." 100)) (when (eq wl-summary-buffer-view 'thread) - (wl-thread-update-line-msgs (elmo-uniq-list update-list))) + (wl-thread-update-line-msgs (elmo-uniq-list update-list) 'no-msg)) (wl-thread-cleanup-symbols msgs2) (wl-summary-count-unread (elmo-msgdb-get-mark-alist wl-summary-buffer-msgdb)) @@ -6016,17 +6023,20 @@ Reply to author if invoked with argument." (if wl-cache-prefetch-debug (message "Reading %d... done" msg)))))))))) -(defun wl-summary-set-parent () +(defun wl-summary-set-parent (&optional parent-number) "Set current message's parent interactively." (interactive) (let ((number (wl-summary-message-number)) - (dst-parent (read-from-minibuffer "Parent Message (No.): ")) + (dst-parent (if (interactive-p) + (read-from-minibuffer "Parent Message (No.): "))) (overview (elmo-msgdb-get-overview wl-summary-buffer-msgdb)) entity dst-parent-entity src-parent buffer-read-only) (if (string= dst-parent "") (setq dst-parent nil) - (setq dst-parent (string-to-int dst-parent))) + (if (interactive-p) + (setq dst-parent (string-to-int dst-parent)) + (setq dst-parent parent-number))) (setq entity (wl-thread-get-entity number)) (when (and number entity) (let* (older-brothers younger-brothers parent-entity beg) @@ -6065,6 +6075,24 @@ Reply to author if invoked with argument." (append (and src-parent (list src-parent)) (list (or dst-parent number))))))) +(defun wl-summary-save-current-message () + "Save current message for `wl-summary-yank-saved-message'." + (interactive) + (let ((number (wl-summary-message-number))) + (setq wl-summary-buffer-saved-message number) + (and number (message "No: %s is saved." number)))) + +(defun wl-summary-yank-saved-message () + "Set current message as a parent of the saved message." + (interactive) + (if wl-summary-buffer-saved-message + (let ((number (wl-summary-message-number))) + (save-excursion + (wl-thread-jump-to-msg wl-summary-buffer-saved-message) + (wl-summary-set-parent number)) + (setq wl-summary-buffer-saved-message nil)) + (message "There's no saved message."))) + (provide 'wl-summary) ;;; wl-summary.el ends here diff --git a/wl/wl-thread.el b/wl/wl-thread.el index d3850b0..efedec4 100644 --- a/wl/wl-thread.el +++ b/wl/wl-thread.el @@ -4,7 +4,7 @@ ;; Author: Yuuichi Teranishi ;; Keywords: mail, net news -;; Time-stamp: <00/05/09 19:34:25 teranisi> +;; Time-stamp: <2000-05-12 10:32:53 teranisi> ;; This file is part of Wanderlust (Yet Another Message Interface on Emacsen). @@ -646,17 +646,17 @@ the closed parent will be opened." (if (not (wl-thread-entity-get-opened entity)) (wl-thread-entity-get-children-num entity)))) -(defun wl-thread-update-line-msgs (msgs) +(defun wl-thread-update-line-msgs (msgs &optional no-msg) (wl-delete-all-overlays) (let ((count 0)) - (message "Updating deleted thread...") + (unless no-msg (message "Updating deleted thread...")) (while msgs (setq msgs (wl-thread-update-line-on-buffer (car msgs) nil msgs)) (setq count (1+ count)) - (message (concat "Updating deleted thread..." - (make-string (/ count 5) ?.)))) - (message "Updating deleted thread...done."))) + (unless no-msg (message (concat "Updating deleted thread..." + (make-string (/ count 5) ?.))))) + (unless no-msg (message "Updating deleted thread...done.")))) (defsubst wl-thread-update-line-on-buffer-sub (entity msg &optional parent-msg) (let ((number-alist (elmo-msgdb-get-number-alist wl-summary-buffer-msgdb))