summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatsumi Yamaoka <yamaoka@jpl.org>2010-08-14 10:45:32 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2010-08-14 10:45:32 +0000
commit8c33070780a535bf499b28e0d2350300e07c90c5 (patch)
tree1684496d65a6b03b93115c43ab708fbda40070ae
parentb482d923a7a2c86bfc5ab4e11c7d04a9f019339d (diff)
downloademacs-8c33070780a535bf499b28e0d2350300e07c90c5.tar.gz
Doc fixes and keep unknown groups.
From Ted Zlatanov <tzz@lifelogs.com>. * gnus-sync.el: Fix docs. (gnus-sync-save): Keep unknown groups in `gnus-sync-newsrc-loader'. (gnus-sync-read): Don't wipe `gnus-sync-newsrc-loader' after reading.
-rw-r--r--lisp/gnus/ChangeLog8
-rw-r--r--lisp/gnus/gnus-sync.el29
2 files changed, 24 insertions, 13 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index f964e6f5a9d..0d3cfd64a60 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -2,6 +2,14 @@
* gnus-sync.el (gnus-sync): Fix defgroup version.
+2010-08-13 Teodor Zlatanov <tzz@lifelogs.com>
+
+ Doc fixes and keep unknown groups.
+
+ * gnus-sync.el: Fix docs.
+ (gnus-sync-save): Keep unknown groups in `gnus-sync-newsrc-loader'.
+ (gnus-sync-read): Don't wipe `gnus-sync-newsrc-loader' after reading.
+
2010-08-12 Teodor Zlatanov <tzz@lifelogs.com>
Optimizations for gnus-sync.el.
diff --git a/lisp/gnus/gnus-sync.el b/lisp/gnus/gnus-sync.el
index 394dab4fb41..c704ed73ff8 100644
--- a/lisp/gnus/gnus-sync.el
+++ b/lisp/gnus/gnus-sync.el
@@ -31,10 +31,10 @@
;; Tramp over IMAP: /imaps:user@yourhosthere.com:/INBOX.test/filename
;; ...or any other file Tramp and Emacs can handle...
-;; (setq gnus-sync-backend `("/remote:/path.gpg") ; will use Tramp+EPA if loaded
+;; (setq gnus-sync-backend "/remote:/path.gpg" ; will use Tramp+EPA if loaded
;; gnus-sync-global-vars `(gnus-newsrc-last-checked-date)
;; gnus-sync-newsrc-groups `("nntp" "nnrss")
-;; gnus-sync-newsrc-vars `(read marks))
+;; gnus-sync-newsrc-offsets `(2 3))
;; TODO:
@@ -95,15 +95,19 @@ synchronized, I believe). Also see `gnus-variable-list'."
;; populate gnus-sync-newsrc-loader from all but the first dummy
;; entry in gnus-newsrc-alist whose group matches any of the
;; gnus-sync-newsrc-groups
- (let ((gnus-sync-newsrc-loader
- (loop for entry in (cdr gnus-newsrc-alist)
- when (gnus-grep-in-list
- (car entry) ;the group name
- gnus-sync-newsrc-groups)
- collect (cons (car entry)
- (mapcar (lambda (offset)
- (cons offset (nth offset entry)))
- gnus-sync-newsrc-offsets)))))
+ (let* ((loader
+ (loop for entry in (cdr gnus-newsrc-alist)
+ when (gnus-grep-in-list
+ (car entry) ;the group name
+ gnus-sync-newsrc-groups)
+ collect (cons (car entry)
+ (mapcar (lambda (offset)
+ (cons offset (nth offset entry)))
+ gnus-sync-newsrc-offsets))))
+ (gnus-sync-newsrc-loader
+ (nunion gnus-sync-newsrc-loader
+ (set-difference gnus-sync-newsrc-loader loader :key 'car)
+ :key 'car)))
(with-temp-file gnus-sync-backend
(progn
@@ -189,8 +193,7 @@ synchronized, I believe). Also see `gnus-variable-list'."
(length gnus-sync-newsrc-loader)
gnus-sync-backend)
(gnus-message 9 "gnus-sync: skipped groups: %s"
- (mapconcat 'identity invalid-groups ", ")))
- (setq gnus-sync-newsrc-loader nil)))
+ (mapconcat 'identity invalid-groups ", ")))))
(nil))
;; make the hashtable again because the newsrc-alist may have been modified
(when gnus-sync-newsrc-offsets