[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r101068: Optimizations for gnus-sync.
From: |
Katsumi Yamaoka |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r101068: Optimizations for gnus-sync.el. |
Date: |
Fri, 13 Aug 2010 11:03:19 +0000 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 101068
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Fri 2010-08-13 11:03:19 +0000
message:
Optimizations for gnus-sync.el.
From Ted Zlatanov <address@hidden>.
* gnus-sync.el: Add docs about gnus-sync-backend
possibilities.
(gnus-sync-save): Remove unnecessary message.
(gnus-sync-read): Optimize and show what groups were skipped.
modified:
lisp/gnus/ChangeLog
lisp/gnus/gnus-sync.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog 2010-08-13 10:58:21 +0000
+++ b/lisp/gnus/ChangeLog 2010-08-13 11:03:19 +0000
@@ -1,5 +1,14 @@
2010-08-12 Teodor Zlatanov <address@hidden>
+ Optimizations for gnus-sync.el.
+
+ * gnus-sync.el: Add docs about gnus-sync-backend
+ possibilities.
+ (gnus-sync-save): Remove unnecessary message.
+ (gnus-sync-read): Optimize and show what groups were skipped.
+
+2010-08-12 Teodor Zlatanov <address@hidden>
+
Minor bug fixes for gnus-sync.el.
* gnus-sync.el (gnus-sync-unload-hook, gnus-sync-install-hooks): Don't
=== modified file 'lisp/gnus/gnus-sync.el'
--- a/lisp/gnus/gnus-sync.el 2010-08-13 10:58:21 +0000
+++ b/lisp/gnus/gnus-sync.el 2010-08-13 11:03:19 +0000
@@ -27,6 +27,11 @@
;; Put this in your startup file (~/.gnus.el for instance)
+;; possibilities for gnus-sync-backend:
+;; Tramp over SSH: /ssh:address@hidden:/path/to/filename
+;; Tramp over IMAP: /imaps:address@hidden:/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
;; gnus-sync-global-vars `(gnus-newsrc-last-checked-date)
;; gnus-sync-newsrc-groups `("nntp" "nnrss")
@@ -85,7 +90,6 @@
(defun gnus-sync-save ()
"Save the Gnus sync data to the backend."
(interactive)
- (gnus-message 6 "Saving the Gnus sync data")
(cond
((stringp gnus-sync-backend)
(gnus-message 7 "gnus-sync: saving to backend %s" gnus-sync-backend)
@@ -162,21 +166,31 @@
(load gnus-sync-backend nil t)
(error
(error "Error in %s: %s" gnus-sync-backend (cadr var)))))
- (let ((valid-nodes
- (loop for node in gnus-sync-newsrc-loader
- if (gnus-gethash (car node) gnus-newsrc-hashtb)
- collect node)))
- (dolist (node valid-nodes)
- (loop for store in (cdr node)
- do (setf (nth (car store)
- (assoc (car node) gnus-newsrc-alist))
+ (let ((valid-count 0)
+ invalid-groups)
+ (dolist (node gnus-sync-newsrc-loader)
+ (if (gnus-gethash (car node) gnus-newsrc-hashtb)
+ (progn
+ (incf valid-count)
+ (loop for store in (cdr node)
+ do (setf (nth (car store)
+ (assoc (car node) gnus-newsrc-alist))
(cdr store))))
+ (push (car node) invalid-groups)))
(gnus-message
7
"gnus-sync: loaded %d groups (out of %d) from %s"
- (length valid-nodes)
- (length gnus-sync-newsrc-loader)
+ valid-count (length gnus-sync-newsrc-loader)
gnus-sync-backend)
+ (when invalid-groups
+ (gnus-message
+ 7
+ "gnus-sync: skipped %d groups (out of %d) from %s"
+ (length invalid-groups)
+ (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)))
(nil))
;; make the hashtable again because the newsrc-alist may have been modified
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r101068: Optimizations for gnus-sync.el.,
Katsumi Yamaoka <=