HCoop
/
bpt
/
emacs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Spelling fixes.
[bpt/emacs.git]
/
lisp
/
gnus
/
gnus-agent.el
diff --git
a/lisp/gnus/gnus-agent.el
b/lisp/gnus/gnus-agent.el
index
2c215e8
..
bf7f31e
100644
(file)
--- a/
lisp/gnus/gnus-agent.el
+++ b/
lisp/gnus/gnus-agent.el
@@
-1,7
+1,6
@@
;;; gnus-agent.el --- unplugged support for Gnus
;;; gnus-agent.el --- unplugged support for Gnus
-;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-;; 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2011 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; This file is part of GNU Emacs.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; This file is part of GNU Emacs.
@@
-203,8
+202,7
@@
queue. Otherwise, queue if and only if unplugged."
(const :format "When unplugged" t)))
(defcustom gnus-agent-prompt-send-queue nil
(const :format "When unplugged" t)))
(defcustom gnus-agent-prompt-send-queue nil
- "If non-nil, `gnus-group-send-queue' will prompt if called when
-unplugged."
+ "If non-nil, `gnus-group-send-queue' will prompt if called when unplugged."
:version "22.1"
:group 'gnus-agent
:type 'boolean)
:version "22.1"
:group 'gnus-agent
:type 'boolean)
@@
-443,7
+441,7
@@
manipulated as follows:
(setf (gnus-agent-cat-groups old-category)
(delete group (gnus-agent-cat-groups
old-category))))))
(setf (gnus-agent-cat-groups old-category)
(delete group (gnus-agent-cat-groups
old-category))))))
- ;; Purge cache as prece
e
ding loop invalidated it.
+ ;; Purge cache as preceding loop invalidated it.
(setq gnus-category-group-cache nil))
(setcdr (or (assq 'agent-groups category)
(setq gnus-category-group-cache nil))
(setcdr (or (assq 'agent-groups category)
@@
-731,7
+729,8
@@
Optional arg GROUP-NAME allows to specify another group."
(concat "^" (regexp-quote mail-header-separator) "\n"))
(replace-match "\n")
(gnus-agent-insert-meta-information 'mail)
(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.
(defun gnus-agent-insert-meta-information (type &optional method)
"Insert meta-information into the message that says how it's to be posted.
@@
-1131,7
+1130,7
@@
article's mark is toggled."
(setq alist (cdr alist)))
((> a h)
;; Headers that are not in the alist should be
(setq alist (cdr alist)))
((> a h)
;; Headers that are not in the alist should be
- ;; fictious (see nnagent-retrieve-headers); they
+ ;; ficti
ti
ous (see nnagent-retrieve-headers); they
;; imply that this article isn't in the agent.
(gnus-agent-append-to-list tail-undownloaded h)
(gnus-agent-append-to-list tail-unfetched h)
;; imply that this article isn't in the agent.
(gnus-agent-append-to-list tail-undownloaded h)
(gnus-agent-append-to-list tail-unfetched h)
@@
-1196,7
+1195,7
@@
downloadable."
(mapc #'gnus-summary-remove-process-mark
(gnus-sorted-ndifference gnus-newsgroup-processable gnus-newsgroup-undownloaded))
(mapc #'gnus-summary-remove-process-mark
(gnus-sorted-ndifference gnus-newsgroup-processable gnus-newsgroup-undownloaded))
- ;; The prece
e
ding call to (gnus-agent-summary-fetch-group)
+ ;; The preceding call to (gnus-agent-summary-fetch-group)
;; updated the temporary gnus-newsgroup-downloadable to
;; remove each article successfully fetched. Now, I
;; update the real gnus-newsgroup-downloadable to only
;; updated the temporary gnus-newsgroup-downloadable to
;; remove each article successfully fetched. Now, I
;; update the real gnus-newsgroup-downloadable to only
@@
-1369,7
+1368,7
@@
downloaded into the agent."
;; disable the set read each time this server is opened.
;; NOTE: Opening this group will restore the valid local
;; range but it will also expand the local range to
;; disable the set read each time this server is opened.
;; NOTE: Opening this group will restore the valid local
;; range but it will also expand the local range to
- ;;
i
ncompass the new active range.
+ ;;
e
ncompass the new active range.
(gnus-agent-set-local group agent-min (1- active-min)))))))
(defun gnus-agent-save-group-info (method group active)
(gnus-agent-set-local group agent-min (1- active-min)))))))
(defun gnus-agent-save-group-info (method group active)
@@
-1521,14
+1520,14
@@
downloaded into the agent."
header-number)
;; Check each article
(while (setq article (pop articles))
header-number)
;; Check each article
(while (setq article (pop articles))
- ;; Skip alist entries prece
e
ding this article
+ ;; Skip alist entries preceding this article
(while (> article (or (caar alist) (1+ article)))
(setq alist (cdr alist)))
;; Prune off articles that we have already fetched.
(unless (and (eq article (caar alist))
(cdar alist))
(while (> article (or (caar alist) (1+ article)))
(setq alist (cdr alist)))
;; Prune off articles that we have already fetched.
(unless (and (eq article (caar alist))
(cdar alist))
- ;; Skip headers prece
e
ding this article
+ ;; Skip headers preceding this article
(while (> article
(setq header-number
(let* ((header (car headers)))
(while (> article
(setq header-number
(let* ((header (car headers)))
@@
-1926,14
+1925,15
@@
article numbers will be returned."
(setq articles (gnus-list-range-intersection
articles (list (cons low high)))))))
(setq articles (gnus-list-range-intersection
articles (list (cons low high)))))))
- (gnus-message
- 10 "gnus-agent-fetch-headers: undownloaded articles are '%s'"
- (gnus-compress-sequence articles t))
+ (when articles
+ (gnus-message
+ 10 "gnus-agent-fetch-headers: undownloaded articles are '%s'"
+ (gnus-compress-sequence articles t)))
(with-current-buffer nntp-server-buffer
(if articles
(progn
(with-current-buffer nntp-server-buffer
(if articles
(progn
- (gnus-message
7
"Fetching headers for %s..."
+ (gnus-message
8
"Fetching headers for %s..."
(gnus-agent-decoded-group-name group))
;; Fetch them.
(gnus-agent-decoded-group-name group))
;; Fetch them.
@@
-2614,7
+2614,9
@@
modified) original contents, they are first saved to their own file."
(gnus-dribble-enter
(concat "(gnus-group-set-info '"
(gnus-prin1-to-string info)
(gnus-dribble-enter
(concat "(gnus-group-set-info '"
(gnus-prin1-to-string info)
- ")"))))))))))))
+ ")")
+ (concat "^(gnus-group-set-info '(\""
+ (regexp-quote group) "\""))))))))))))
;;;
;;; Agent Category Mode
;;;
;;; Agent Category Mode
@@
-3230,7
+3232,7
@@
FORCE is equivalent to setting the expiration predicates to true."
;; Convert the keep lists to elements that look like (article#
;; nil keep_flag nil) then append it to the expanded dlist
;; Convert the keep lists to elements that look like (article#
;; nil keep_flag nil) then append it to the expanded dlist
- ;; These statements are sorted by ascending prec
i
dence of the
+ ;; These statements are sorted by ascending prec
e
dence of the
;; keep_flag.
(setq dlist (nconc dlist
(mapcar (lambda (e)
;; keep_flag.
(setq dlist (nconc dlist
(mapcar (lambda (e)
@@
-3438,7
+3440,7
@@
missing NOV entry. Run gnus-agent-regenerate-group to restore it.")))
;; If considering all articles is set, I can only
;; expire article IDs that are no longer in the
;; If considering all articles is set, I can only
;; expire article IDs that are no longer in the
- ;; active range (That is, articles that prece
ed
the
+ ;; active range (That is, articles that prece
de
the
;; first article in the new alist).
(if (and gnus-agent-consider-all-articles
(>= article-number (car active)))
;; first article in the new alist).
(if (and gnus-agent-consider-all-articles
(>= article-number (car active)))
@@
-3558,7
+3560,7
@@
articles in every agentized group? "))
units (cdr units)))
(format "Expiry recovered %d NOV entries, deleted %d files,\
units (cdr units)))
(format "Expiry recovered %d NOV entries, deleted %d files,\
- and freed %f %s."
+ and freed %
.
f %s."
(nth 0 stats)
(nth 1 stats)
size (car units)))
(nth 0 stats)
(nth 1 stats)
size (car units)))
@@
-3611,7
+3613,7
@@
articles in every agentized group? "))
(setq r d
d (directory-file-name d)))
;; if ANY ancestor was NOT in keep hash and
(setq r d
d (directory-file-name d)))
;; if ANY ancestor was NOT in keep hash and
- ;; it
it
's already in to-remove, add it to
+ ;; it's already in to-remove, add it to
;; to-remove.
(if (and r
(not (member r to-remove)))
;; to-remove.
(if (and r
(not (member r to-remove)))
@@
-3716,7
+3718,7
@@
has been fetched."
(gnus-agent-append-to-list tail-uncached v1))
(setq arts (cdr arts))
(setq ref (cdr ref)))
(gnus-agent-append-to-list tail-uncached v1))
(setq arts (cdr arts))
(setq ref (cdr ref)))
- (t ; reference article (v2) prece
ed
s the list being filtered
+ (t ; reference article (v2) prece
de
s the list being filtered
(setq ref (cdr ref))))))
(while arts
(gnus-agent-append-to-list tail-uncached (pop arts)))
(setq ref (cdr ref))))))
(while arts
(gnus-agent-append-to-list tail-uncached (pop arts)))
@@
-3876,6
+3878,15
@@
has been fetched."
(insert-file-contents file))
t))))
(insert-file-contents file))
t))))
+(defun gnus-agent-store-article (article group)
+ (let* ((gnus-command-method (gnus-find-method-for-group group))
+ (file (gnus-agent-article-name (number-to-string article) group))
+ (file-name-coding-system nnmail-pathname-coding-system)
+ (coding-system-for-write gnus-cache-coding-system))
+ (when (not (file-exists-p file))
+ (gnus-make-directory (file-name-directory file))
+ (write-region (point-min) (point-max) file nil 'silent))))
+
(defun gnus-agent-regenerate-group (group &optional reread)
"Regenerate GROUP.
If REREAD is t, all articles in the .overview are marked as unread.
(defun gnus-agent-regenerate-group (group &optional reread)
"Regenerate GROUP.
If REREAD is t, all articles in the .overview are marked as unread.
@@
-4021,7
+4032,7
@@
If REREAD is not nil, downloaded articles are marked as unread."
;; article (with the exception of the last ID in the list - it's
;; special) that no longer appears in the overview. In this
;; situtation, the last article ID in the list implies that it,
;; article (with the exception of the last ID in the list - it's
;; special) that no longer appears in the overview. In this
;; situtation, the last article ID in the list implies that it,
- ;; and every article ID prece
e
ding it, have been fetched from the
+ ;; and every article ID preceding it, have been fetched from the
;; server.
(if gnus-agent-consider-all-articles
;; server.
(if gnus-agent-consider-all-articles