summaryrefslogtreecommitdiff
path: root/lisp/gnus/gnus-agent.el
diff options
context:
space:
mode:
authorGnus developers <ding@gnus.org>2012-06-11 22:35:02 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2012-06-11 22:35:02 +0000
commit71cca84d57cd7b90c2cb9040fc703cdbe78e024c (patch)
tree237655075b3ac71985cce9629789d02d4ef1ea53 /lisp/gnus/gnus-agent.el
parent09e06855caeb0ca4fe201c39264a5fc1463da3ab (diff)
downloademacs-71cca84d57cd7b90c2cb9040fc703cdbe78e024c.tar.gz
Merge bugfixes done in Gnus trunk
Those changes fix only the bugs having appeared in the bug list. Many other Gnus changes not yet merged to Emacs are in: ftp://ftp.jpl.org/pub/tmp/MaGnus-to-Emacs.patch (or http://www.jpl.org/ftp/pub/tmp/MaGnus-to-Emacs.patch) 2012-06-11 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus.texi (Group Timestamp): Mention where to find documentation for the `gnus-tmp-' variables (bug#11601). 2012-04-14 Wolfgang Jenkner <wjenkner@inode.at> * gnus-agent.el (gnus-agent-retrieve-headers): Recalculate the range of articles when fetch-old is non-nil (bug#11370).
Diffstat (limited to 'lisp/gnus/gnus-agent.el')
-rw-r--r--lisp/gnus/gnus-agent.el17
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el
index bbd3c95265d..0d469b174bf 100644
--- a/lisp/gnus/gnus-agent.el
+++ b/lisp/gnus/gnus-agent.el
@@ -3742,6 +3742,13 @@ has been fetched."
(gnus-make-directory (nnheader-translate-file-chars
(file-name-directory file) t))
+ (when fetch-old
+ (setq articles (gnus-uncompress-range
+ (cons (if (numberp fetch-old)
+ (max 1 (- (car articles) fetch-old))
+ 1)
+ (car (last articles))))))
+
;; Populate temp buffer with known headers
(when (file-exists-p file)
(with-current-buffer gnus-agent-overview-buffer
@@ -3778,12 +3785,7 @@ has been fetched."
(set-buffer nntp-server-buffer)
(let* ((fetched-articles (list nil))
(tail-fetched-articles fetched-articles)
- (min (cond ((numberp fetch-old)
- (max 1 (- (car articles) fetch-old)))
- (fetch-old
- 1)
- (t
- (car articles))))
+ (min (car articles))
(max (car (last articles))))
;; Get the list of articles that were fetched
@@ -3858,8 +3860,7 @@ has been fetched."
(not (numberp fetch-old)))
t ; Don't remove anything.
(nnheader-nov-delete-outside-range
- (if fetch-old (max 1 (- (car articles) fetch-old))
- (car articles))
+ (car articles)
(car (last articles)))
t)