From: dmaus Date: Sun, 4 Dec 2011 20:06:43 +0000 (+0000) Subject: Merge trunk to elmo-imap4-compliance X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=0f3588d0f0c12640f668fc459bd3992a6a829c40;p=elisp%2Fwanderlust.git Merge trunk to elmo-imap4-compliance --- diff --git a/NEWS b/NEWS index 863c00f..9b83aa9 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,12 @@ + Wanderlust NEWS -- User-visible changes in Wanderlust. * Changes in 2.16.0 from 2.14.x +** Added support for sending mail with sendmail package + +** Prevent accidental loss of messages when renaming IMAP folder + ** Put spam mark on the message registered as spam. ** Remove spam mark from the message registered as non-spam. diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 2d8a602..9286da1 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -3,6 +3,12 @@ * elmo-maildir.el (elmo-folder-append-buffer): Correctly get the number of the appended message. +2011-07-03 David Maus + + * elmo-imap4.el (elmo-imap4-session-unselect-mailbox): New + function. Leave selected state without silent EXPUNGE. + (elmo-folder-rename-internal): Use function. + 2011-06-03 David Maus * elmo-imap4.el (elmo-imap4-fetch-callback-1-subr): Don't mark diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index bfdfb0c..bb5a030 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -763,8 +763,8 @@ Returns response value if selecting folder succeed. " (format "Select %s failed" mailbox))))))) (and result response)))) -(defun elmo-imap4-session-deselect-mailbox (session mailbox) - "Deselect MAILBOX in SESSION. +(defun elmo-imap4-session-unselect-mailbox (session mailbox) + "Unselect MAILBOX in SESSION. Deselecting will exit selected state without causing silent EXPUNGE for deleted messages." (if (elmo-imap4-session-capable-p session 'unselect) @@ -772,9 +772,7 @@ EXPUNGE for deleted messages." (elmo-imap4-send-command-wait session (list "examine " (elmo-imap4-mailbox mailbox))) - (elmo-imap4-send-command-wait session "close")) - (elmo-imap4-session-set-current-mailbox-internal session nil) - (elmo-imap4-session-set-current-mailbox-size-internal session nil)) + (elmo-imap4-send-command-wait session "close"))) (defun elmo-imap4-check-validity (spec validity-file) ;;; Not used. @@ -2198,11 +2196,14 @@ Return nil if no complete line has arrived." (luna-define-method elmo-folder-rename-internal ((folder elmo-imap4-folder) new-folder) (let ((session (elmo-imap4-get-session folder))) - (if (elmo-imap4-mailbox-selected-p - (elmo-imap4-folder-mailbox-internal folder) session) - (elmo-imap4-session-deselect-mailbox - session - (elmo-imap4-folder-mailbox-internal folder))) + ;; make sure the folder is selected. + (elmo-imap4-session-select-mailbox session + (elmo-imap4-folder-mailbox-internal + folder)) + (elmo-imap4-session-unselect-mailbox session + (elmo-imap4-folder-mailbox-internal + folder)) + (elmo-imap4-send-command-wait session "close") (elmo-imap4-send-command-wait session (list "rename " diff --git a/wl/ChangeLog b/wl/ChangeLog index 2786da9..dee0544 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,25 @@ +2011-07-20 Katsumi Yamaoka + + * wl-e21.el (wl-e21-make-toolbar-buttons): No need to take care of + the tool-bar default bindings for Emacs 24. + +2011-07-19 Katsumi Yamaoka + + * wl-e21.el (wl-e21-make-toolbar-buttons): Work around the Emacs + 24 error: "`keymap' is reserved for embedded parent maps" + +2011-07-15 Herbert J. Skuhra + + * wl-folder.el (wl-folder-open-unread-folder): Fix typo in + message. + +2011-07-10 David Maus + + * wl-draft.el (wl-draft-send-mail-with-sendmail): New + function. Send mail with sendmail package. + * wl-vars.el (wl-draft-send-mail-function): Add function to list + of prepared send mail functions. + 2011-06-05 David Maus * wl-draft.el (wl-draft-save): Obtain number of appended draft diff --git a/wl/wl-draft.el b/wl/wl-draft.el index 2e3faae..d7176a8 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -1126,6 +1126,22 @@ non-nil." (signal (car error) (cdr error)))))) (wl-draft-send-mail-with-smtp)) +(defun wl-draft-send-mail-with-sendmail () + "Send the prepared message buffer with `sendmail-send-it'. +The function `sendmail-send-it' uses the external program +`sendmail-program'." + (let ((id (std11-field-body "message-id")) + (to (std11-field-body "to"))) + (run-hooks 'wl-mail-send-pre-hook) + (require 'sendmail) + (condition-case err + (sendmail-send-it) + (error + (wl-draft-write-sendlog 'failed 'sendmail nil (list to) id) + (signal (car err) (cdr err)))) + (wl-draft-set-sent-message 'mail 'sent) + (wl-draft-write-sendlog 'ok 'sendmail nil (list to) id))) + (defun wl-draft-insert-required-fields (&optional force-msgid) "Insert Message-ID, Date, and From field. If FORCE-MSGID, insert message-id regardless of `wl-insert-message-id'." diff --git a/wl/wl-e21.el b/wl/wl-e21.el index 89bdaa7..c2487c5 100644 --- a/wl/wl-e21.el +++ b/wl/wl-e21.el @@ -223,9 +223,10 @@ ;; Invalidate the default bindings. (let ((keys (cdr (key-binding [tool-bar] t))) item) - (while (setq item (pop keys)) - (when (setq item (car-safe item)) - (define-key keymap (vector 'tool-bar item) 'undefined)))) + (unless (eq (caar keys) 'keymap) ;; Emacs >= 24 + (while (setq item (pop keys)) + (when (setq item (car-safe item)) + (define-key keymap (vector 'tool-bar item) 'undefined))))) (let ((n (length defs)) def) (while (>= n 0) diff --git a/wl/wl-folder.el b/wl/wl-folder.el index 7eac53f..33b3dc9 100644 --- a/wl/wl-folder.el +++ b/wl/wl-folder.el @@ -2418,7 +2418,7 @@ Use `wl-subscribed-mailing-list'." (while path-list (wl-folder-open-folder-sub (car path-list)) (setq path-list (cdr path-list))) - (message "%s unread folder" + (message "%s unread message(s)" (if (> unread 0) unread "No"))))) (defun wl-folder-open-unread-current-entity () diff --git a/wl/wl-vars.el b/wl/wl-vars.el index 568be98..170d744 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -898,8 +898,10 @@ reasons of system internal to accord facilities for the Emacs variants.") (defcustom wl-draft-send-mail-function 'wl-draft-send-mail-with-smtp "A function to send mail. Prepared candidates are 'wl-draft-send-mail-with-smtp, -'wl-draft-send-mail-with-qmail and 'wl-draft-send-mail-with-pop-before-smtp." +'wl-draft-send-mail-with-sendmail, 'wl-draft-send-mail-with-qmail +and 'wl-draft-send-mail-with-pop-before-smtp." :type '(radio (function-item wl-draft-send-mail-with-smtp) + (function-item wl-draft-send-mail-with-sendmail) (function-item wl-draft-send-mail-with-qmail) (function-item wl-draft-send-mail-with-pop-before-smtp) (function :tag "Other"))