Synch with Oort Gnus.
authoryamaoka <yamaoka>
Sun, 21 Jul 2002 23:59:38 +0000 (23:59 +0000)
committeryamaoka <yamaoka>
Sun, 21 Jul 2002 23:59:38 +0000 (23:59 +0000)
lisp/ChangeLog
lisp/gnus-art.el
lisp/gnus-salt.el
lisp/gnus-sum.el
lisp/nnfolder.el
lisp/nnmail.el

index 2cde014..2ebd664 100644 (file)
@@ -1,3 +1,28 @@
+2002-07-21  Kai Gro\e,b_\e(Bjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+       From Nevin Kapur <nevin@jhu.edu>.
+
+       * nnmail.el (nnmail-fancy-expiry-target): Treat nonexisting
+       headers as empty headers.
+       
+2002-07-21  Kai Gro\e,b_\e(Bjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+       From Jochen Hein <jochen@jochen.org>.
+
+       * gnus-art.el (gnus-emphasis-alist): Add strikethrough and
+       correct typo.
+       (gnus-emphasis-strikethru): New face.
+
+2002-07-20  Kai Gro\e,b_\e(Bjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+       From Jason Merrill <jason@redhat.com>.
+
+       * nnfolder.el (nnfolder-retrieve-headers): Avoid searching the
+       entire file for each of a sequence of missing articles.
+
+       * gnus-salt.el (gnus-binary-display-article): Respect an existing
+       value for gnus-view-pseudos.
+
+       * gnus-sum.el (gnus-summary-insert-new-articles): Count down to
+       avoid nreverse.
+
 2002-07-14  Kai Gro\e,b_\e(Bjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
        From Ted Zlatanov <teodor.zlatanov@divine.com>.
 
index d8a68bc..163c87b 100644 (file)
@@ -322,6 +322,7 @@ directly.")
         '(("\\*" "\\*" bold)
           ("_" "_" underline)
           ("/" "/" italic)
+          ("-" "-" strikethru)
           ("_/" "/_" underline-italic)
           ("_\\*" "\\*_" underline-bold)
           ("\\*/" "/\\*" bold-italic)
@@ -387,7 +388,11 @@ and the latter avoids underlining any whitespace at all."
 (defface gnus-emphasis-underline-bold-italic
   '((t (:bold t :italic t :underline t)))
   "Face used for displaying underlined bold italic emphasized text.
-Esample: (_/*word*/_)."
+Example: (_/*word*/_)."
+  :group 'gnus-article-emphasis)
+
+(defface gnus-emphasis-strikethru '((t (:strikethru t)))
+  "Face used for displaying strike-through text (-word-)."
   :group 'gnus-article-emphasis)
 
 (defface gnus-emphasis-highlight-words
index 15b6fb9..44f45f1 100644 (file)
@@ -368,7 +368,7 @@ This must be bound to a button-down mouse event."
 (defun gnus-binary-display-article (article &optional all-header)
   "Run ARTICLE through the binary decode functions."
   (when (gnus-summary-goto-subject article)
-    (let ((gnus-view-pseudos 'automatic))
+    (let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic)))
       (gnus-uu-decode-uu))))
 
 (defun gnus-binary-show-article (&optional arg)
index beb7a93..2daea65 100644 (file)
@@ -11413,13 +11413,12 @@ If ALL is a number, fetch this number of articles."
            i new)
        (setq gnus-newsgroup-active
              (gnus-activate-group gnus-newsgroup-name 'scan))
-       (setq i (1+ (cdr old-active)))
-       (while (<= i (cdr gnus-newsgroup-active))
+       (setq i (cdr gnus-newsgroup-active))
+       (while (> i (cdr old-active))
          (push i new)
-         (incf i))
+         (decf i))
        (if (not new)
            (message "No gnus is bad news.")
-         (setq new (nreverse new))
          (gnus-summary-insert-articles new)
          (setq gnus-newsgroup-unreads
                (gnus-sorted-nunion gnus-newsgroup-unreads new))
index 876647f..013fb40 100644 (file)
@@ -160,7 +160,7 @@ the group.  Then the marks file will be regenerated properly by Gnus.")
   (save-excursion
     (set-buffer nntp-server-buffer)
     (erase-buffer)
-    (let (article start stop)
+    (let (article start stop num)
       (nnfolder-possibly-change-group group server)
       (when nnfolder-current-buffer
        (set-buffer nnfolder-current-buffer)
@@ -175,16 +175,53 @@ the group.  Then the marks file will be regenerated properly by Gnus.")
                            (nnfolder-existing-articles)))
            (while (setq article (pop articles))
              (set-buffer nnfolder-current-buffer)
-             (when (nnfolder-goto-article article)
-               (setq start (point))
-               (setq stop (if (search-forward "\n\n" nil t)
-                              (1- (point))
-                            (point-max)))
-               (set-buffer nntp-server-buffer)
-               (insert (format "221 %d Article retrieved.\n" article))
-               (insert-buffer-substring nnfolder-current-buffer start stop)
-               (goto-char (point-max))
-               (insert ".\n")))
+             (cond ((nnfolder-goto-article article)
+                    (setq start (point))
+                    (setq stop (if (search-forward "\n\n" nil t)
+                                   (1- (point))
+                                 (point-max)))
+                    (set-buffer nntp-server-buffer)
+                    (insert (format "221 %d Article retrieved.\n" article))
+                    (insert-buffer-substring nnfolder-current-buffer
+                                             start stop)
+                    (goto-char (point-max))
+                    (insert ".\n"))
+
+                   ;; If we couldn't find this article, skip over ranges
+                   ;; of missing articles so we don't search the whole file
+                   ;; for each of them.
+                   ((numberp article)
+                    (setq start (point))
+                    (and
+                     ;; Check that we are either at BOF or after an
+                     ;; article with a lower number.  We do this so we
+                     ;; won't be confused by out-of-order article numbers,
+                     ;; as caused by active file bogosity.
+                     (cond
+                      ((bobp))
+                      ((search-backward (concat "\n" nnfolder-article-marker)
+                                        nil t)
+                       (goto-char (match-end 0))
+                       (setq num (string-to-int
+                                  (buffer-substring
+                                   (point) (progn (end-of-line) (point)))))
+                       (goto-char start)
+                       (< num article)))
+                     ;; Check that we are before an article with a
+                     ;; higher number.
+                     (search-forward (concat "\n" nnfolder-article-marker)
+                                     nil t)
+                     (progn
+                       (setq num (string-to-int
+                                  (buffer-substring
+                                   (point) (progn (end-of-line) (point)))))
+                       (> num article))
+                     ;; Discard any article numbers before the one we're
+                     ;; now looking at.
+                     (while (and articles
+                                 (< (car articles) num))
+                       (setq articles (cdr articles))))
+                    (goto-char start))))
            (set-buffer nntp-server-buffer)
            (nnheader-fold-continuation-lines)
            'headers))))))
index e325b6a..fafa6e2 100644 (file)
@@ -1771,7 +1771,9 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
        (setq target (format-time-string (caddr regexp-target-pair) date)))
        ((and (not (equal header 'to-from))
             (string-match (cadr regexp-target-pair)
-                          (message-fetch-field header)))
+                          (or
+                           (message-fetch-field header)
+                           "")))
        (setq target
              (format-time-string (caddr regexp-target-pair) date)))))))