summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <larsi@gnus.org>2011-05-30 22:11:52 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2011-05-30 22:11:52 +0000
commitb5244046e1ea76b26b7acd516929502463b05eaf (patch)
treefea243d35ae0e2e457bc2adfcd2c2548aa6e3de1 /lisp
parent1257e75502973fcdf4c2bbedaad4df0240171071 (diff)
downloademacs-b5244046e1ea76b26b7acd516929502463b05eaf.tar.gz
Merge changes made in Gnus trunk.
gnus-group.el (gnus-group-mark-article-read): It's possible that we want to have `gnus-newsgroup-unselected' kept sorted. If this isn't done, then unselected articles may be marked as read. pop3.el (pop3-open-server): Erase the buffer after the greeting, since not doing this seems to lead to a race condition in pop3-logon. nnvirtual.el (nnvirtual-request-article): Bind `gnus-command-method' so that the call chain it correct when we call "upwards". gnus-sum.el (gnus-select-newsgroup): Auto-expiry doesn't make sense in read-only groups. gnus-group.el (gnus-group-mark-article-read): Ditto. message.el (message-cite-reply-position): Doc string fix. nnimap.el (nnimap-transform-headers): Simplify regexp to hopefully avoid regexp overflow. (nnimap-transform-split-mail): Ditto. pop3.el (pop3-retr): Error out if the server closes the connection.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/gnus/ChangeLog25
-rw-r--r--lisp/gnus/gnus-group.el8
-rw-r--r--lisp/gnus/gnus-sum.el3
-rw-r--r--lisp/gnus/message.el2
-rw-r--r--lisp/gnus/nnimap.el4
-rw-r--r--lisp/gnus/nnvirtual.el9
-rw-r--r--lisp/gnus/pop3.el3
7 files changed, 43 insertions, 11 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 5a7ea842153..dcbc647950f 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,28 @@
+2011-05-30 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-group.el (gnus-group-mark-article-read): It's possible that we
+ want to have `gnus-newsgroup-unselected' kept sorted. If this isn't
+ done, then unselected articles may be marked as read.
+
+ * pop3.el (pop3-open-server): Erase the buffer after the greeting,
+ since not doing this seems to lead to a race condition in pop3-logon.
+
+ * nnvirtual.el (nnvirtual-request-article): Bind `gnus-command-method'
+ so that the call chain it correct when we call "upwards".
+
+ * gnus-sum.el (gnus-select-newsgroup): Auto-expiry doesn't make sense
+ in read-only groups.
+
+ * gnus-group.el (gnus-group-mark-article-read): Ditto.
+
+ * message.el (message-cite-reply-position): Doc string fix.
+
+ * nnimap.el (nnimap-transform-headers): Simplify regexp to hopefully
+ avoid regexp overflow.
+ (nnimap-transform-split-mail): Ditto.
+
+ * pop3.el (pop3-retr): Error out if the server closes the connection.
+
2011-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
* mml1991.el (mml1991-mailcrypt-encrypt): Remove use of ill-designed
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 65192bf173e..4c474b0aa23 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -3567,7 +3567,8 @@ or nil if no action could be taken."
(gnus-add-marked-articles group 'tick nil nil 'force)
(gnus-add-marked-articles group 'dormant nil nil 'force))
;; Do auto-expirable marks if that's required.
- (when (gnus-group-auto-expirable-p group)
+ (when (and (gnus-group-auto-expirable-p group)
+ (not (gnus-group-read-only-p group)))
(gnus-range-map
(lambda (article)
(gnus-add-marked-articles group 'expire (list article))
@@ -4630,10 +4631,11 @@ This command may read the active file."
(push n gnus-newsgroup-unselected))
(setq n (1+ n)))
(setq gnus-newsgroup-unselected
- (nreverse gnus-newsgroup-unselected)))))
+ (sort gnus-newsgroup-unselected '<)))))
(gnus-activate-group group)
(gnus-group-make-articles-read group (list article))
- (when (gnus-group-auto-expirable-p group)
+ (when (and (gnus-group-auto-expirable-p group)
+ (not (gnus-group-read-only-p group)))
(gnus-add-marked-articles
group 'expire (list article))))))
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 3ec443743df..2d75c35158a 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -5715,7 +5715,8 @@ If SELECT-ARTICLES, only select those articles from GROUP."
(gnus-summary-remove-list-identifiers)
;; Check whether auto-expire is to be done in this group.
(setq gnus-newsgroup-auto-expire
- (gnus-group-auto-expirable-p group))
+ (and (gnus-group-auto-expirable-p group)
+ (not (gnus-group-read-only-p group))))
;; Set up the article buffer now, if necessary.
(unless (and gnus-single-article-buffer
(equal gnus-article-buffer "*Article*"))
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 4d08baa674c..58740c32e9c 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -1091,7 +1091,7 @@ Note: Many newsgroups frown upon nontraditional reply styles. You
probably want to set this variable only for specific groups,
e.g. using `gnus-posting-styles':
- (eval (set (make-local-variable 'message-cite-reply-above) 'above))"
+ (eval (set (make-local-variable 'message-cite-reply-position) 'above))"
:type '(choice (const :tag "Reply inline" 'traditional)
(const :tag "Reply above" 'above)
(const :tag "Reply below" 'below))
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index 6882ed63135..dc8b38b8f9a 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -190,7 +190,7 @@ textual parts.")
(let (article bytes lines size string)
(block nil
(while (not (eobp))
- (while (not (looking-at "^\\* [0-9]+ FETCH.*UID \\([0-9]+\\)"))
+ (while (not (looking-at "\\* [0-9]+ FETCH.+UID \\([0-9]+\\)"))
(delete-region (point) (progn (forward-line 1) (point)))
(when (eobp)
(return)))
@@ -1904,7 +1904,7 @@ textual parts.")
(let (article bytes)
(block nil
(while (not (eobp))
- (while (not (looking-at "^\\* [0-9]+ FETCH.*UID \\([0-9]+\\)"))
+ (while (not (looking-at "\\* [0-9]+ FETCH.+UID \\([0-9]+\\)"))
(delete-region (point) (progn (forward-line 1) (point)))
(when (eobp)
(return)))
diff --git a/lisp/gnus/nnvirtual.el b/lisp/gnus/nnvirtual.el
index 0cc53ad2332..ea64c247d99 100644
--- a/lisp/gnus/nnvirtual.el
+++ b/lisp/gnus/nnvirtual.el
@@ -194,10 +194,11 @@ component group will show up when you enter the virtual group.")
(when buffer
(set-buffer buffer))
(let* ((gnus-override-method nil)
- (method (gnus-find-method-for-group
- nnvirtual-last-accessed-component-group)))
- (funcall (gnus-get-function method 'request-article)
- article nil (nth 1 method) buffer)))))
+ (gnus-command-method
+ (gnus-find-method-for-group
+ nnvirtual-last-accessed-component-group)))
+ (funcall (gnus-get-function gnus-command-method 'request-article)
+ article nil (nth 1 gnus-command-method) buffer)))))
;; This is a fetch by number.
(let* ((amap (nnvirtual-map-article article))
(cgroup (car amap)))
diff --git a/lisp/gnus/pop3.el b/lisp/gnus/pop3.el
index 6f12d3d63e1..90e11b3ca8f 100644
--- a/lisp/gnus/pop3.el
+++ b/lisp/gnus/pop3.el
@@ -319,6 +319,7 @@ Returns the process associated with the connection."
(substring response (or (string-match "<" response) 0)
(+ 1 (or (string-match ">" response) -1)))))
(pop3-set-process-query-on-exit-flag (car result) nil)
+ (erase-buffer)
(car result)))))
;; Support functions
@@ -514,6 +515,8 @@ Otherwise, return the size of the message-id MSG"
(let ((start pop3-read-point) end)
(with-current-buffer (process-buffer process)
(while (not (re-search-forward "^\\.\r\n" nil t))
+ (unless (memq (process-status process) '(open run))
+ (error "pop3 server closed the connection"))
(pop3-accept-process-output process)
(goto-char start))
(setq pop3-read-point (point-marker))