Synch with Oort Gnus.
authoryamaoka <yamaoka>
Thu, 17 Jan 2002 13:27:41 +0000 (13:27 +0000)
committeryamaoka <yamaoka>
Thu, 17 Jan 2002 13:27:41 +0000 (13:27 +0000)
lisp/ChangeLog
lisp/gnus-agent.el
lisp/gnus-art.el
texi/ChangeLog
texi/gnus-ja.texi
texi/gnus.texi

index d1d6510..0b78888 100644 (file)
@@ -1,3 +1,10 @@
+2002-01-17  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * gnus-agent.el (gnus-agent-retrieve-headers): Use correct buffer.
+       (gnus-agent-braid-nov): Switch back to nntp-server-buffer. Remove
+       duplications.
+       (gnus-agent-batch): Bind gnus-agent-confirmation-function.
+
 2002-01-16  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * gnus-sum.el (gnus-summary-initial-limit): Inline
index 98c9d0f..52a2bbe 100644 (file)
@@ -1107,11 +1107,16 @@ the actual number of articles toggled is returned."
       (unless (eobp)
        (gnus-agent-copy-nov-line (car articles))
        (setq articles (cdr articles))))
+    (set-buffer nntp-server-buffer)
     (when articles
       (let (b e)
        (set-buffer gnus-agent-overview-buffer)
        (setq b (point)
              e (point-max))
+       (while (and (not (eobp))
+                   (<= (read (current-buffer)) (car articles)))
+         (forward-line 1)
+         (setq b (point)))
        (set-buffer nntp-server-buffer)
        (insert-buffer-substring gnus-agent-overview-buffer b e)))))
 
@@ -1809,8 +1814,9 @@ The following commands are available:
   (let ((init-file-user "")
        (gnus-always-read-dribble-file t))
     (gnus))
-  (gnus-group-send-queue)
-  (gnus-agent-fetch-session))
+  (let ((gnus-agent-confirmation-function 'gnus-agent-batch-confirmation))
+    (gnus-group-send-queue)
+    (gnus-agent-fetch-session)))
 
 (defun gnus-agent-retrieve-headers (articles group &optional fetch-old)
   (save-excursion
@@ -1832,36 +1838,38 @@ The following commands are available:
              (push (read (current-buffer)) cached-articles))
            (forward-line 1))
          (setq cached-articles (sort cached-articles '<))))
-      (when (setq uncached-articles
-                 (gnus-set-difference articles cached-articles))
+      (if (setq uncached-articles
+               (gnus-set-difference articles cached-articles))
+         (progn
+           (set-buffer nntp-server-buffer)
+           (erase-buffer)
+           (let (gnus-agent-cache)
+             (unless (eq 'nov
+                         (gnus-retrieve-headers
+                          uncached-articles group fetch-old))
+               (nnvirtual-convert-headers)))
+           (set-buffer gnus-agent-overview-buffer)
+           (erase-buffer)
+           (set-buffer nntp-server-buffer)
+           (copy-to-buffer gnus-agent-overview-buffer (point-min) (point-max))
+           (when (and uncached-articles (file-exists-p file))
+             (gnus-agent-braid-nov group uncached-articles file))
+           (set-buffer nntp-server-buffer)
+           (write-region-as-coding-system gnus-agent-file-coding-system
+                                          (point-min) (point-max)
+                                          file nil 'silent)
+           (gnus-agent-load-alist group)
+           (gnus-agent-save-alist group uncached-articles nil)
+           (gnus-agent-open-history)
+           (setq gnus-agent-current-history (gnus-agent-history-buffer))
+           (gnus-agent-enter-history
+            "last-header-fetched-for-session"
+            (list (cons group (nth (- (length  articles) 1) articles)))
+            (time-to-days (current-time)))
+           (gnus-agent-save-history))
        (set-buffer nntp-server-buffer)
        (erase-buffer)
-       (let (gnus-agent-cache)
-         (unless (eq 'nov
-                     (gnus-retrieve-headers
-                      uncached-articles group fetch-old))
-           (nnvirtual-convert-headers)))
-       (set-buffer gnus-agent-overview-buffer)
-       (erase-buffer)
-       (set-buffer nntp-server-buffer)
-       (copy-to-buffer gnus-agent-overview-buffer (point-min) (point-max))
-       (when (and uncached-articles (file-exists-p file))
-         (gnus-agent-braid-nov group uncached-articles file))
-       (write-region-as-coding-system gnus-agent-file-coding-system
-                                      (point-min) (point-max)
-                                      file nil 'silent)
-       (gnus-agent-load-alist group)
-       (gnus-agent-save-alist group uncached-articles nil)
-       (gnus-agent-open-history)
-       (setq gnus-agent-current-history (gnus-agent-history-buffer))
-       (gnus-agent-enter-history
-        "last-header-fetched-for-session"
-        (list (cons group (nth (- (length  articles) 1) articles)))
-        (time-to-days (current-time)))
-       (gnus-agent-save-history)))
-    (set-buffer nntp-server-buffer)
-    (erase-buffer)
-    (insert-buffer-substring gnus-agent-overview-buffer)
+       (insert-buffer-substring gnus-agent-overview-buffer)))
     (if (and fetch-old
             (not (numberp fetch-old)))
        t                               ; Don't remove anything.
index cef1e4a..b9877ae 100644 (file)
@@ -316,23 +316,23 @@ directly.")
 
 (defcustom gnus-emphasis-alist
   (let ((format
-        "\\(\\s-\\|^\\|[-\"]\\|\\s(\\)\\(%s\\(\\w+\\(\\s-+\\w+\\)*[.,]?\\)%s\\)\\(\\s-\\|[-,;:\"]\\s-\\|[?!.]+\\s-\\|\\s)\\)")
+        "\\(\\s-\\|^\\|\\=\\|[-\"]\\|\\s(\\)\\(%s\\(\\w+\\(\\s-+\\w+\\)*[.,]?\\)%s\\)\\(\\([-,.;:\"]\\|\\s)\\)+\\s-\\|[?!.]\\s-\\|\\s)\\|\\s-\\)")
        (types
-        '(("_" "_" underline)
+        '(("\\*" "\\*" bold)
+          ("_" "_" underline)
           ("/" "/" italic)
-          ("\\*" "\\*" bold)
           ("_/" "/_" underline-italic)
           ("_\\*" "\\*_" underline-bold)
           ("\\*/" "/\\*" bold-italic)
           ("_\\*/" "/\\*_" underline-bold-italic))))
-    `(("\\(\\s-\\|^\\)\\(_\\(\\(\\w\\|_[^_]\\)+\\)_\\)\\(\\s-\\|[?!.,;]\\)"
-       2 3 gnus-emphasis-underline)
-      ,@(mapcar
+    `(,@(mapcar
         (lambda (spec)
           (list
            (format format (car spec) (car (cdr spec)))
            2 3 (intern (format "gnus-emphasis-%s" (nth 2 spec)))))
-        types)))
+        types)
+       ("\\(\\s-\\|^\\)\\(_\\(\\(\\w\\|_[^_]\\)+\\)_\\)\\(\\s-\\|[?!.,;]\\)"
+        2 3 gnus-emphasis-underline)))
   "*Alist that says how to fontify certain phrases.
 Each item looks like this:
 
index ad18e66..385986f 100644 (file)
@@ -1,3 +1,8 @@
+2002-01-17  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * gnus.texi (Agent Commands): Use gnus-agent-batch instead of
+       gnus-agent-batch-fetch.
+
 2002-01-15 Tue  Jari Aalto  <jari.aalto@poboxes.com>
 
        * gnus.texi (Really Various Summary Commands): Added commands how
index 14540d0..b5a7598 100644 (file)
@@ -15863,12 +15863,12 @@ file
 * Server Agent Commands::       
 @end menu
 
-\e$B40A4$J0l3g<hF@$r9T$&$K$O!"%3%^%s%I9T$+$i0J2<$N$*$^$8$J$$$r\e(B
-\e$B<B9T$9$l$P$G$-$^$9!#\e(B
+\e$B40A4$K%P%C%A$GF0:n$5$;$k$K$O!"%3%^%s%I9T$+$i0J2<$N$*$^$8$J$$$r<B9T$9$l$P\e(B
+\e$B$G$-$^$9!#\e(B
 
-@cindex gnus-agent-batch-fetch
+@cindex gnus-agent-batch
 @example
-$ emacs -batch -l ~/.gnus.el -f gnus-agent-batch-fetch
+$ emacs -batch -l ~/.gnus.el -f gnus-agent-batch
 @end example
 
 @node Group Agent Commands
index 103c44d..fff2dbd 100644 (file)
@@ -16236,12 +16236,12 @@ toggles the plugged/unplugged state of the Gnus Agent.
 * Server Agent Commands::       
 @end menu
 
-You can run a complete batch fetch from the command line with the
+You can run a complete batch command from the command line with the
 following incantation:
 
-@cindex gnus-agent-batch-fetch
+@cindex gnus-agent-batch
 @example
-$ emacs -batch -l ~/.gnus.el -f gnus-agent-batch-fetch
+$ emacs -batch -l ~/.gnus.el -f gnus-agent-batch
 @end example