X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fgnus-sync.el;h=fbdacdd2fbe1960797fbbea54fc4ac945bdca7ce;hb=6d225814ad9bb5ebd7047a4c3b2117ba6a4f5894;hp=ce43bbcf849dac3578dc0f986d0a5f14ea92fcd9;hpb=b499356f790bf8ff61d4d4e9c4f6ab3211d1680f;p=gnus diff --git a/lisp/gnus-sync.el b/lisp/gnus-sync.el index ce43bbcf8..fbdacdd2f 100644 --- a/lisp/gnus-sync.el +++ b/lisp/gnus-sync.el @@ -1,6 +1,6 @@ ;;; gnus-sync.el --- synchronization facility for Gnus -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Ted Zlatanov ;; Keywords: news synchronization nntp nnrss @@ -24,6 +24,11 @@ ;; This is the gnus-sync.el package. +;; It's due for a rewrite using gnus-after-set-mark-hook and +;; gnus-before-update-mark-hook, and my plan is to do this once No +;; Gnus development is done. Until then please consider it +;; experimental. + ;; Put this in your startup file (~/.gnus.el for instance) ;; possibilities for gnus-sync-backend: @@ -38,11 +43,17 @@ ;; TODO: -;; - after gnus-sync-read, the message counts are wrong +;; - after gnus-sync-read, the message counts are wrong. So it's not +;; run automatically, you have to call it with M-x gnus-sync-read + +;; - use gnus-after-set-mark-hook and gnus-before-update-mark-hook to +;; catch the mark updates ;;; Code: (eval-when-compile (require 'cl)) +(require 'gnus) +(require 'gnus-start) (require 'gnus-util) (defgroup gnus-sync nil @@ -211,13 +222,13 @@ synchronized, I believe). Also see `gnus-variable-list'." "Install the sync hooks." (interactive) ;; (add-hook 'gnus-get-new-news-hook 'gnus-sync-read) - (add-hook 'gnus-save-newsrc-hook 'gnus-sync-save) - (add-hook 'gnus-read-newsrc-el-hook 'gnus-sync-read)) + ;; (add-hook 'gnus-read-newsrc-el-hook 'gnus-sync-read) + (add-hook 'gnus-save-newsrc-hook 'gnus-sync-save)) (defun gnus-sync-unload-hook () "Uninstall the sync hooks." (interactive) - ;; (remove-hook 'gnus-get-new-news-hook 'gnus-sync-read) + (remove-hook 'gnus-get-new-news-hook 'gnus-sync-read) (remove-hook 'gnus-save-newsrc-hook 'gnus-sync-save) (remove-hook 'gnus-read-newsrc-el-hook 'gnus-sync-read))