changeset 112432:27320025ed54

Merge chages made in Gnus trunk. mailcap.el (mailcap-mime-extensions): Rename text/org to text/x-org. gnus-draft.el (gnus-group-send-queue): Update the queue group in the group buffer after sending the queue. gnus-draft.el (gnus-group-send-queue): Really refresh the queue group after sending. gnus-agent.el (gnus-agent-send-mail): Ditto. gnus-group.el (gnus-group-refresh-group): New convenience function. message.el (message-bogus-addresses): Remove commented-out value. message.el (message-check-recipients): Display the encoded version of the bogus address if they differ. flow-fill.el (fill-flowed): Make `delete-space' option correspond to "DelSp" parameter in RFC3676. gnus-sum.el (gnus-summary-move-article): Protect against backends (i.e., nnimap) returning nil as the article number.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Sun, 23 Jan 2011 00:34:08 +0000
parents 7a578da192b9
children 7b649f6eac4f 4889fb6961b2
files lisp/gnus/ChangeLog lisp/gnus/flow-fill.el lisp/gnus/gnus-agent.el lisp/gnus/gnus-draft.el lisp/gnus/gnus-group.el lisp/gnus/gnus-start.el lisp/gnus/gnus-sum.el lisp/gnus/mailcap.el lisp/gnus/message.el
diffstat 9 files changed, 63 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Sat Jan 22 14:18:01 2011 -0800
+++ b/lisp/gnus/ChangeLog	Sun Jan 23 00:34:08 2011 +0000
@@ -1,3 +1,34 @@
+2011-01-22  Lars Ingebrigtsen  <larsi@gnus.org>
+
+	* gnus-sum.el (gnus-summary-move-article): Protect against backends
+	(i.e., nnimap) returning nil as the article number.
+
+2011-01-22  Kazuhiro Ito  <kzhr@d1.dion.ne.jp>
+
+	* flow-fill.el (fill-flowed): Make `delete-space' option correspond to
+	"DelSp" parameter in RFC3676.
+
+2011-01-22  Lars Ingebrigtsen  <larsi@gnus.org>
+
+	* message.el (message-check-recipients): Display the encoded version of
+	the bogus address if they differ.
+
+	* gnus-draft.el (gnus-group-send-queue): Really refresh the queue group
+	after sending.
+
+	* gnus-agent.el (gnus-agent-send-mail): Ditto.
+
+	* gnus-group.el (gnus-group-refresh-group): New convenience function.
+
+	* gnus-draft.el (gnus-group-send-queue): Update the queue group in the
+	group buffer after sending the queue.
+
+	* gnus-agent.el (gnus-agent-send-mail): Ditto.
+
+2011-01-22  Julien Danjou  <julien@danjou.info>
+
+	* mailcap.el (mailcap-mime-extensions): Rename text/org to text/x-org.
+
 2011-01-22  Lars Ingebrigtsen  <larsi@gnus.org>
 
 	* mm-decode.el (mm-preferred-alternative-precedence): Don't bug out on
--- a/lisp/gnus/flow-fill.el	Sat Jan 22 14:18:01 2011 -0800
+++ b/lisp/gnus/flow-fill.el	Sun Jan 23 00:34:08 2011 +0000
@@ -124,8 +124,6 @@
       (forward-line 1))
     (goto-char (point-min))
     (while (re-search-forward " $" nil t)
-      (when delete-space
-	(delete-char -1))
       (when (save-excursion
 	      (beginning-of-line)
 	      (looking-at "^\\(>*\\)\\( ?\\)"))
@@ -153,6 +151,8 @@
 	      (replace-match (if (string= (match-string 2) " ")
 				 "" "\\2")))
 	    (backward-delete-char -1)
+	    (when delete-space
+	      (delete-char -1))
 	    (end-of-line))
 	  (unless sig
 	    (condition-case nil
--- a/lisp/gnus/gnus-agent.el	Sat Jan 22 14:18:01 2011 -0800
+++ b/lisp/gnus/gnus-agent.el	Sun Jan 23 00:34:08 2011 +0000
@@ -731,7 +731,8 @@
      (concat "^" (regexp-quote mail-header-separator) "\n"))
     (replace-match "\n")
     (gnus-agent-insert-meta-information 'mail)
-    (gnus-request-accept-article "nndraft:queue" nil t t)))
+    (gnus-request-accept-article "nndraft:queue" nil t t)
+    (gnus-group-refresh-group "nndraft:queue")))
 
 (defun gnus-agent-insert-meta-information (type &optional method)
   "Insert meta-information into the message that says how it's to be posted.
--- a/lisp/gnus/gnus-draft.el	Sat Jan 22 14:18:01 2011 -0800
+++ b/lisp/gnus/gnus-draft.el	Sun Jan 23 00:34:08 2011 +0000
@@ -221,7 +221,8 @@
 	    (let ((message-sending-message
 		   (format "Sending message %d of %d..."
 			   (- total (length articles)) total)))
-	      (gnus-draft-send article))))))))
+	      (gnus-draft-send article))))))
+    (gnus-group-refresh-group "nndraft:queue")))
 
 ;;;###autoload
 (defun gnus-draft-reminder ()
--- a/lisp/gnus/gnus-group.el	Sat Jan 22 14:18:01 2011 -0800
+++ b/lisp/gnus/gnus-group.el	Sun Jan 23 00:34:08 2011 +0000
@@ -1678,6 +1678,13 @@
           " "))
     " "))
 
+
+(defun gnus-group-refresh-group (group)
+  (gnus-activate-group group)
+  (gnus-get-unread-articles-in-group (gnus-get-info group)
+				     (gnus-active group))
+  (gnus-group-update-group group t))
+
 (defun gnus-group-update-group (group &optional visible-only)
   "Update all lines where GROUP appear.
 If VISIBLE-ONLY is non-nil, the group won't be displayed if it isn't
--- a/lisp/gnus/gnus-start.el	Sat Jan 22 14:18:01 2011 -0800
+++ b/lisp/gnus/gnus-start.el	Sun Jan 23 00:34:08 2011 +0000
@@ -1509,7 +1509,7 @@
 			      (gnus-info-group info)))))
       (gnus-activate-group (gnus-info-group info) nil t))
 
-    ;; Allow backends to update marks, 
+    ;; Allow backends to update marks,
     (when gnus-use-backend-marks
       (let ((method (inline (gnus-find-method-for-group
 			     (gnus-info-group info)))))
--- a/lisp/gnus/gnus-sum.el	Sat Jan 22 14:18:01 2011 -0800
+++ b/lisp/gnus/gnus-sum.el	Sun Jan 23 00:34:08 2011 +0000
@@ -9836,7 +9836,8 @@
 	    (unless (member to-group to-groups)
 	      (push to-group to-groups))
 
-	    (unless (memq article gnus-newsgroup-unreads)
+	    (when (and (not (memq article gnus-newsgroup-unreads))
+		       (cdr art-group))
 	      (push 'read to-marks)
 	      (gnus-info-set-read
 	       info (gnus-add-to-range (gnus-info-read info)
@@ -9853,14 +9854,16 @@
 
 	      ;; Enter the article into the cache in the new group,
 	      ;; if that is required.
-	      (when gnus-use-cache
+	      (when (and to-article
+			 gnus-use-cache)
 		(gnus-cache-possibly-enter-article
 		 to-group to-article
 		 (memq article gnus-newsgroup-marked)
 		 (memq article gnus-newsgroup-dormant)
 		 (memq article gnus-newsgroup-unreads)))
 
-	      (when gnus-preserve-marks
+	      (when (and gnus-preserve-marks
+			 to-article)
 		;; Copy any marks over to the new group.
 		(when (and (equal to-group gnus-newsgroup-name)
 			   (not (memq article gnus-newsgroup-unreads)))
--- a/lisp/gnus/mailcap.el	Sat Jan 22 14:18:01 2011 -0800
+++ b/lisp/gnus/mailcap.el	Sun Jan 23 00:34:08 2011 +0000
@@ -911,7 +911,7 @@
     (".ai"    . "application/postscript")
     (".jpe"   . "image/jpeg")
     (".jpeg"  . "image/jpeg")
-    (".org"   . "text/org"))
+    (".org"   . "text/x-org"))
   "An alist of file extensions and corresponding MIME content-types.
 This exists for you to customize the information in Lisp.  It is
 merged with values from mailcap files by `mailcap-parse-mimetypes'.")
--- a/lisp/gnus/message.el	Sat Jan 22 14:18:01 2011 -0800
+++ b/lisp/gnus/message.el	Sun Jan 23 00:34:08 2011 +0000
@@ -4128,7 +4128,6 @@
     (nreverse regions)))
 
 (defcustom message-bogus-addresses
-  ;; '("noreply" "nospam" "invalid")
   '("noreply" "nospam" "invalid" "@@" "[^[:ascii:]].*@" "[ \t]")
   "List of regexps of potentially bogus mail addresses.
 See `message-check-recipients' how to setup checking.
@@ -4294,7 +4293,17 @@
 	    (and bog
 		 (not (y-or-n-p
 		       (format
-			"Address `%s' might be bogus.  Continue? " bog)))
+			"Address `%s'%s might be bogus.  Continue? "
+			bog
+			;; If the encoded version of the email address
+			;; is different from the unencoded version,
+			;; then we likely have invisible characters or
+			;; the like.  Display the encoded version,
+			;; too.
+			(let ((encoded (rfc2047-encode-string bog)))
+			  (if (string= encoded bog)
+			      ""
+			    (format " (%s)" encoded))))))
 		 (error "Bogus address"))))))))
 
 (custom-add-option 'message-setup-hook 'message-check-recipients)