*** empty log message ***
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 4 Mar 1997 02:28:18 +0000 (02:28 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 4 Mar 1997 02:28:18 +0000 (02:28 +0000)
lisp/ChangeLog
lisp/gnus-msg.el
lisp/gnus-score.el
lisp/gnus.el
lisp/nndoc.el
lisp/nntp.el

index 1f0bd6a..8028b28 100644 (file)
@@ -1,3 +1,33 @@
+Wed Jun  7 15:04:20 1995  Lars Magne Ingebrigtsen  <larsi@gymir.ifi.uio.no>
+
+       * gnus.el (gnus-select-newsgroup): Don't add an extra 1 if there
+       already is one. 
+       (gnus-summary-reselect-current-group): Did not allow reselecting. 
+
+       * nndoc.el (nndoc-retrieve-headers): Would fetch headers
+       strangely. 
+
+       * gnus.el (gnus-summary-search-subject): Don't bug out on
+       psedu-articles. 
+       (gnus-score-score-files): Use file-exists instead of
+       file-readable because of os/2 bug. 
+       (gnus-select-newsgroup): Didn't remove the first fetched article
+       when not using nov. 
+
+Wed Jun  7 12:59:46 1995  Lars Ingebrigtsen  <lars@eyesore.no>
+
+       * gnus.el (gnus-configure-windows): Also make the selected buffer
+       in the selected window the current buffer.
+
+Mon Jun  5 23:04:27 1995  Lars Ingebrigtsen  <lars@eyesore.no>
+
+       * nntp.el: Anchor all lines with \n instead of $.
+
+Sun Jun  4 17:03:38 1995  Lars Ingebrigtsen  <lars@eyesore.no>
+
+       * gnus.el (gnus-summary-remove-lines-marked-with): Unbalanced
+       parens. 
+
 Sun Jun  4 00:48:38 1995  Lars Ingebrigtsen  <lars@eyesore.no>
 
        * gnus.el (gnus-group-catchup): Would not properly catchup all
@@ -6,6 +36,8 @@ Sun Jun  4 00:48:38 1995  Lars Ingebrigtsen  <lars@eyesore.no>
        * nndoc.el (nndoc-number-of-articles): Would totally bug out on
        mbox types. 
 
+       * gnus.el: 0.82 is released.
+
 Sat Jun  3 00:27:41 1995  Lars Ingebrigtsen  <lars@eyesore.no>
 
        * gnus.el (gnus-summary-sort): Re-send async info after sorting. 
index d848d74..3565aaf 100644 (file)
@@ -1328,6 +1328,23 @@ Customize the variable gnus-mail-forward-method to use another mailer."
   (interactive)
   (gnus-summary-mail-forward t))
 
+(defvar gnus-nastygram-message 
+  "The following article was inappropriately posted to %s.\n"
+  "Format string to insert in nastygrams.
+The current group name will be inserted at \"%s\".")
+
+(defun gnus-summary-mail-nastygram (n)
+  "Send a nastygram to the author of the current article."
+  (interactive "P")
+  (if (or gnus-expert-user
+         (gnus-y-or-n-p 
+          "Really send a nastygram to the author of the current article? "))
+      (let ((group gnus-newsgroup-name))
+       (gnus-summary-reply-with-original n)
+       (set-buffer "*mail*")
+       (insert (format gnus-nastygram-message group))
+       (gnus-mail-send-and-exit))))
+
 (defun gnus-summary-mail-other-window ()
   "Compose mail in other window.
 Customize the variable `gnus-mail-other-window-method' to use another
index 342a254..88bbcb7 100644 (file)
@@ -1421,7 +1421,7 @@ SCORE is the score to add."
            (setq match (funcall (car (car elem)) headers))
            (gnus-summary-score-entry 
             (nth 1 (car elem)) match
-            ;; Whether we use regexp or exact matches are controlled
+            ;; Whether we use substring or exact matches are controlled
             ;; here.  
             (if (or (not gnus-score-exact-adapt-limit)
                     (< (length match) gnus-score-exact-adapt-limit))
index e490d7b..2eeaa6a 100644 (file)
@@ -1281,9 +1281,9 @@ variable (string, integer, character, etc).")
 (defvar gnus-have-read-active-file nil)
 
 (defconst gnus-maintainer "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls & Boys)"
-  "The mail address of the Gnus maintainer.")
+  "The mail address of the Gnus maintainers.")
 
-(defconst gnus-version "(ding) Gnus v0.82"
+(defconst gnus-version "(ding) Gnus v0.83"
   "Version number for this version of Gnus.")
 
 (defvar gnus-info-nodes
@@ -2436,7 +2436,7 @@ If optional argument RE-ONLY is non-nil, strip `Re:' only."
     (or jump-buffer (error "Missing `point' in spec for %s" setting))
 
     (select-window (get-buffer-window jump-buffer))
-    jump-buffer))
+    (set-buffer jump-buffer)))
       
 (defun gnus-remove-some-windows ()
   (let ((buffers gnus-window-to-buffer)
@@ -5356,8 +5356,10 @@ The following commands are available:
   (let ((i 32))
     (while (>= (setq i (1- i)) 0)
       (aset gnus-summary-display-table i [??])))
-  ;; ... but not newline, of course.
+  ;; ... but not newline and cr, of course. (cr is necessary for the
+  ;; selective display).  
   (aset gnus-summary-display-table ?\n nil)
+  (aset gnus-summary-display-table ?\r nil)
   ;; We nix out any glyphs over 126 that are not set already.  
   (let ((i 256))
     (while (>= (setq i (1- i)) 127)
@@ -6162,8 +6164,10 @@ If READ-ALL is non-nil, all articles in the group are selected."
       (setq gnus-newsgroup-headers 
            (if (eq 'nov (setq gnus-headers-retrieved-by
                               (gnus-retrieve-headers 
-                               (if gnus-fetch-old-headers 
-                                   (cons 1 articles) articles) 
+                               (if (and gnus-fetch-old-headers 
+                                        (not (eq 1 (car articles))))
+                                   (cons 1 articles)
+                                 articles)
                                gnus-newsgroup-name)))
                (progn
                  (gnus-get-newsgroup-headers-xover articles))
@@ -6176,7 +6180,11 @@ If READ-ALL is non-nil, all articles in the group are selected."
           gnus-fetch-old-headers
           gnus-newsgroup-headers
           (/= (header-number (car gnus-newsgroup-headers)) (car articles))
-          (setq gnus-newsgroup-headers (cdr gnus-newsgroup-headers)))
+          (progn
+            (setcar (symbol-value 
+                     (intern (header-id (car gnus-newsgroup-headers)) 
+                             gnus-newsgroup-dependencies)) nil)
+            (setq gnus-newsgroup-headers (cdr gnus-newsgroup-headers))))
       ;; Remove cancelled articles from the list of unread articles.
       (setq gnus-newsgroup-unreads
            (gnus-set-sorted-intersection 
@@ -6960,7 +6968,7 @@ searched for."
                'next-single-property-change))
        (beg (point))
        (did t)
-       pos)
+       pos psubject)
     (beginning-of-line)
     (and gnus-summary-check-current unread
         (eq (get-text-property (point) 'gnus-mark) gnus-unread-mark)
@@ -6978,9 +6986,10 @@ searched for."
                           (eq (get-text-property (point) 'gnus-mark)
                               gnus-unread-mark))
                       (or (not subject)
-                          (equal (gnus-simplify-subject-re subject)
-                                 (gnus-simplify-subject-re
-                                  (gnus-summary-subject-string)))))))
+                          (and (setq psubject (gnus-summary-subject-string))
+                               (equal (gnus-simplify-subject-re subject)
+                                      (gnus-simplify-subject-re
+                                       psubject)))))))
           (if backward (if (bobp) nil (forward-char -1) t)
             (if (eobp) nil (forward-char 1) t)))))
     (if did
@@ -7184,7 +7193,7 @@ The prefix argument ALL means to select all articles."
   (gnus-set-global-variables)
   (let ((current-subject (gnus-summary-article-number))
        (group gnus-newsgroup-name))
-    (setq gnus-newsgroup-threads nil)
+    (setq gnus-newsgroup-begin nil)
     (gnus-summary-exit t)
     ;; We have to adjust the point of group mode buffer because the
     ;; current point was moved to the next unread newsgroup by
@@ -8998,11 +9007,11 @@ even ticked and dormant ones."
               (gnus-summary-subject-string)))
            ()
          (forward-line -1)
-         (gnus-delete-line))))))
+         (gnus-delete-line)))))
   (or (zerop (buffer-size))
       (if (eobp)
          (gnus-summary-prev-subject 1)
-       (gnus-summary-position-cursor)))
+       (gnus-summary-position-cursor))))
 
 (defun gnus-summary-expunge-below (score)
   "Remove articles with score less than SCORE."
@@ -11351,7 +11360,7 @@ The `-n' option line from .newsrc is respected."
                       ((eq do-sub 'ignore)
                        nil)
                       (t
-                       (setq groups (1+ groups))
+                       (setq groups (1+ groups))
                        (gnus-sethash group group gnus-killed-hashtb)
                        (if gnus-subscribe-hierarchical-interactive
                            (setq new-newsgroups (cons group new-newsgroups))
@@ -11663,7 +11672,7 @@ newsgroup."
 
 ;; Go though `gnus-newsrc-alist' and compare with `gnus-active-hashtb'
 ;; and compute how many unread articles there are in each group.
-(defun gnus-get-unread-articles (&optional level)
+(defun gnus-get-unread-articles (&optional level) 
   (let* ((newsrc (cdr gnus-newsrc-alist))
         (conditional level)
         (level (or level (1+ gnus-level-subscribed)))
@@ -13023,8 +13032,8 @@ score files in the \"/ftp.some-where:/pub/score\" directory.
   (setq gnus-kill-files-directory 
        (file-name-as-directory
         (or gnus-kill-files-directory "~/News/")))
-  ;; If er can't read it, there's no score files.
-  (if (not (file-readable-p (expand-file-name gnus-kill-files-directory)))
+  ;; If we can't read it, there are no score files.
+  (if (not (file-exists-p (expand-file-name gnus-kill-files-directory)))
       (setq gnus-score-file-list nil)
     (if (gnus-use-long-file-name 'not-score)
        ;; We want long file names.
index db82234..af112a6 100644 (file)
@@ -42,8 +42,8 @@
              "^------------------------------*[\n \t]+"
              "^------------------------------[\n \t]+"
              nil "^ ?$"   
-             "^------------------------------*[\n \t]+"
-             "End of"))
+             "^-----------------------------------------*[\n \t]+"
+             "^End of"))
   "Regular expressions for articles of the various types.")
 
 \f
@@ -90,7 +90,7 @@
   (save-excursion
     (set-buffer nntp-server-buffer)
     (erase-buffer)
-    (let ((prev 1)
+    (let ((prev 2)
          article p beg end lines)
       (nndoc-possibly-change-buffer newsgroup server)
       (if (stringp (car sequence))
        (while sequence
          (setq article (car sequence))
          (set-buffer nndoc-current-buffer)
-         (if (not (nndoc-forward-article (- article prev)))
+         (if (not (nndoc-forward-article (max 0 (- article prev))))
              ()
            (setq p (point))
-           (setq beg (or (re-search-backward nndoc-article-begin nil t)
+           (setq beg (or (and
+                          (re-search-backward nndoc-article-begin nil t)
+                          (match-end 0))
                          (point-min)))
            (goto-char p)
            (setq lines (count-lines 
 
            (set-buffer nntp-server-buffer)
            (insert (format "221 %d Article retrieved.\n" article))
-           (insert-buffer-substring nndoc-current-buffer beg end)
+           (insert-buffer-substring nndoc-current-buffer beg p)
            (goto-char (point-max))
            (insert (format "Lines: %d\n" lines))
            (insert ".\n"))
index 279f12a..daace79 100644 (file)
@@ -250,7 +250,7 @@ instead call function `nntp-status-message' to get status message.")
        (if (looking-at "^[23]")
            (while (progn
                     (goto-char (- (point-max) 3))
-                    (not (looking-at "^\\.\r?$")))
+                    (not (looking-at "^\\.\r?\n")))
              (nntp-accept-response)))
        (and (numberp nntp-large-newsgroup)
             (> number nntp-large-newsgroup)
@@ -308,7 +308,7 @@ instead call function `nntp-status-message' to get status message.")
              (if (looking-at "^[23]")
                  (while (progn
                           (goto-char (- (point-max) 3))
-                          (not (looking-at "^\\.\r?$")))
+                          (not (looking-at "^\\.\r?\n")))
                    (nntp-accept-response)))))
 
        ;; Now all replies are received. We remove CRs.
@@ -458,7 +458,7 @@ instead call function `nntp-status-message' to get status message.")
                  (art (or (and (numberp id) (int-to-string id)) id)))
              ;; If NEmacs, end of message may look like: "\256\215" (".^M")
              (prog1
-                 (nntp-send-command "^\\.\r?$" "ARTICLE" art)
+                 (nntp-send-command "^\\.\r?\n" "ARTICLE" art)
                (nntp-decode-text)
                (and nntp-async-articles (nntp-async-fetch-articles id)))))
        (if buffer (set-process-buffer 
@@ -470,7 +470,7 @@ instead call function `nntp-status-message' to get status message.")
   (prog1
       ;; If NEmacs, end of message may look like: "\256\215" (".^M")
       (nntp-send-command
-       "^\\.\r?$" "BODY" (or (and (numberp id) (int-to-string id)) id))
+       "^\\.\r?\n" "BODY" (or (and (numberp id) (int-to-string id)) id))
     (nntp-decode-text)))
 
 (defun nntp-request-head (id &optional newsgroup server)
@@ -478,18 +478,18 @@ instead call function `nntp-status-message' to get status message.")
   (nntp-possibly-change-server newsgroup server)
   (prog1
       (nntp-send-command 
-       "^\\.\r?$" "HEAD" (or (and (numberp id) (int-to-string id)) id))
+       "^\\.\r?\n" "HEAD" (or (and (numberp id) (int-to-string id)) id))
     (nntp-decode-text)))
 
 (defun nntp-request-stat (id &optional newsgroup server)
   "Request STAT of article ID (message-id or number)."
   (nntp-possibly-change-server newsgroup server)
   (nntp-send-command 
-   "^[23].*\r?$" "STAT" (or (and (numberp id) (int-to-string id)) id)))
+   "^[23].*\r?\n" "STAT" (or (and (numberp id) (int-to-string id)) id)))
 
 (defun nntp-request-group (group &optional server dont-check)
   "Select GROUP."
-  (nntp-send-command "^.*\r?$" "GROUP" group)
+  (nntp-send-command "^.*\r?\n" "GROUP" group)
   (save-excursion
     (set-buffer nntp-server-buffer)
     (goto-char (point-min))
@@ -514,13 +514,13 @@ instead call function `nntp-status-message' to get status message.")
      t)))
 
 (defun nntp-list-active-group (group &optional server)
-  (nntp-send-command "^.*\r?$" "LIST ACTIVE" group))
+  (nntp-send-command "^.*\r?\n" "LIST ACTIVE" group))
 
 (defun nntp-request-group-description (group &optional server)
   "Get description of GROUP."
   (if (nntp-possibly-change-server nil server)
       (prog1
-         (nntp-send-command "^.*\r?$" "XGTITLE" group)
+         (nntp-send-command "^.*\r?\n" "XGTITLE" group)
        (nntp-decode-text))))
 
 (defun nntp-close-group (group &optional server)
@@ -530,14 +530,14 @@ instead call function `nntp-status-message' to get status message.")
   "List active groups."
   (nntp-possibly-change-server nil server)
   (prog1
-      (nntp-send-command "^\\.\r?$" "LIST")
+      (nntp-send-command "^\\.\r?\n" "LIST")
     (nntp-decode-text)))
 
 (defun nntp-request-list-newsgroups (&optional server)
   "List groups."
   (nntp-possibly-change-server nil server)
   (prog1
-      (nntp-send-command "^\\.\r?$" "LIST NEWSGROUPS")
+      (nntp-send-command "^\\.\r?\n" "LIST NEWSGROUPS")
     (nntp-decode-text)))
 
 (defun nntp-request-newgroups (date &optional server)
@@ -551,36 +551,36 @@ instead call function `nntp-status-message' to get status message.")
                  (substring 
                   (aref date 3) 3 5) (substring (aref date 3) 6 8))))
     (prog1
-       (nntp-send-command "^\\.\r?$" "NEWGROUPS" time-string)
+       (nntp-send-command "^\\.\r?\n" "NEWGROUPS" time-string)
       (nntp-decode-text))))
 
 (defun nntp-request-list-distributions (&optional server)
   "List distributions."
   (nntp-possibly-change-server nil server)
   (prog1
-      (nntp-send-command "^\\.\r?$" "LIST DISTRIBUTIONS")
+      (nntp-send-command "^\\.\r?\n" "LIST DISTRIBUTIONS")
     (nntp-decode-text)))
 
 (defun nntp-request-last (&optional newsgroup server)
   "Decrease the current article pointer."
   (nntp-possibly-change-server newsgroup server)
-  (nntp-send-command "^[23].*\r?$" "LAST"))
+  (nntp-send-command "^[23].*\r?\n" "LAST"))
 
 (defun nntp-request-next (&optional newsgroup server)
   "Advance the current article pointer."
   (nntp-possibly-change-server newsgroup server)
-  (nntp-send-command "^[23].*\r?$" "NEXT"))
+  (nntp-send-command "^[23].*\r?\n" "NEXT"))
 
 (defun nntp-request-post (&optional server)
   "Post the current buffer."
   (nntp-possibly-change-server nil server)
-  (if (nntp-send-command "^[23].*\r?$" "POST")
+  (if (nntp-send-command "^[23].*\r?\n" "POST")
       (progn
        (nntp-encode-text)
        (nntp-send-region-to-server (point-min) (point-max))
        ;; 1.2a NNTP's post command is buggy. "^M" (\r) is not
        ;;  appended to end of the status message.
-       (nntp-wait-for-response "^[23].*$"))))
+       (nntp-wait-for-response "^[23].*\n"))))
 
 (defun nntp-request-post-buffer 
   (post group subject header article-buffer info follow-to respect-poster)
@@ -676,14 +676,14 @@ post to this group instead.  If RESPECT-POSTER, heed the special
 This function is supposed to be called from `nntp-server-opened-hook'.
 It will make innd servers spawn an nnrpd process to allow actual article
 reading."
-  (nntp-send-command "^.*\r?$" "MODE READER"))
+  (nntp-send-command "^.*\r?\n" "MODE READER"))
 
 (defun nntp-send-authinfo ()
   "Send the AUTHINFO to the nntp server.
 This function is supposed to be called from `nntp-server-opened-hook'.
 It will prompt for a password."
-  (nntp-send-command "^.*\r?$" "AUTHINFO USER" (user-login-name))
-  (nntp-send-command "^.*\r?$" "AUTHINFO PASS" (read-string "NNTP password: ")))
+  (nntp-send-command "^.*\r?\n" "AUTHINFO USER" (user-login-name))
+  (nntp-send-command "^.*\r?\n" "AUTHINFO PASS" (read-string "NNTP password: ")))
 
 (defun nntp-default-sentinel (proc status)
   "Default sentinel function for NNTP server process."
@@ -740,7 +740,7 @@ It will prompt for a password."
     ;; Delete `.' at end of the buffer (end of text mark).
     (goto-char (point-max))
     (forward-line -1)
-    (if (looking-at "^\\.$")
+    (if (looking-at "^\\.\n")
        (delete-region (point) (progn (forward-line 1) (point))))
     ;; Replace `..' at beginning of line with `.'.
     (goto-char (point-min))
@@ -915,7 +915,7 @@ It will prompt for a password."
            (while (progn
                     (goto-char (point-max))
                     (forward-line -1)
-                    (not (looking-at "^\\.\r?$")))
+                    (not (looking-at "^\\.\r?\n")))
              (nntp-accept-response)))
        
        ;; We remove any "." lines and status lines.
@@ -932,14 +932,14 @@ It will prompt for a password."
     (if (stringp nntp-server-xover)
        ;; If `nntp-server-xover' is a string, then we just send this
        ;; command. We do not wait for the reply.
-       (progn  
+       (progn
          (nntp-send-strings-to-server nntp-server-xover range)
          t)
       (let ((commands nntp-xover-commands))
        ;; `nntp-xover-commands' is a list of possible XOVER commands.
        ;; We try them all until we get at positive response. 
        (while (and commands (eq nntp-server-xover 'try))
-         (nntp-send-command "^\\.\r?$" (car commands) range)
+         (nntp-send-command "^\\.\r?\n" (car commands) range)
          (save-excursion
            (set-buffer nntp-server-buffer)
            (goto-char (point-min))
@@ -1022,7 +1022,7 @@ If SERVICE, this this as the port number."
           (setq nntp-address server)
           (setq status
                 (condition-case nil
-                    (nntp-wait-for-response "^[23].*\r?$" 'slow)
+                    (nntp-wait-for-response "^[23].*\r?\n" 'slow)
                   (error nil)
                   (quit nil)))
           (or status (nntp-close-server-internal server))