*** empty log message ***
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 4 Mar 1997 03:55:28 +0000 (03:55 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 4 Mar 1997 03:55:28 +0000 (03:55 +0000)
lisp/ChangeLog
lisp/gnus-cache.el
lisp/gnus-msg.el
lisp/gnus-uu.el
lisp/gnus.el
lisp/nneething.el
lisp/nntp.el

index 973138e..6c90883 100644 (file)
@@ -1,5 +1,46 @@
+Sat Sep 16 06:44:33 1995  Lars Magne Ingebrigtsen  <larsi@surt.ifi.uio.no>
+
+       * gnus.el (gnus-group-make-group): Be able to create native
+               groups. 
+               (gnus-group-set-info): Create native groups.
+
+       * gnus-msg.el (gnus-post-news): Just use Cc to do the
+               `gnus-auto-mail-to-author'. 
+
+       * gnus-uu.el (gnus-uu-grab-articles): Widen the article buffer.
+
+       * gnus.el (gnus-group-get-new-news): Check more groups.
+       (gnus-score-find-bnews): "nntp+" score files were not recognized. 
+       (gnus-summary-search-subject): Unhide thread.
+
+       * nneething.el (nneething-retrieve-headers): Didn't work over
+               ange-ftp. 
+
+       * gnus.el (gnus-group-read-only-p): New function.
+       (gnus-summary-edit-article): Take a prefix argument to force.
+       (gnus-summary-edit-article-done): Warn when editing in a read-only
+               group.
+
+Fri Sep 15 15:42:28 1995  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+       * nntp.el (nntp-request-post-buffer): Did the opposite of what the
+       user wanted w.r.t. (eq respect-poster 'ask).
+
+Sat Sep 16 06:28:35 1995  Lars Magne Ingebrigtsen  <larsi@surt.ifi.uio.no>
+
+       * gnus-msg.el (gnus-inews-article): Bind the newsgroup name by
+               looking at the Newsgroups line.
+
+       * gnus-cache.el (gnus-cache-possibly-enter-article): Don't bug out
+               so much on malformed lines.
+
+       * gnus-uu.el (gnus-uu-save-article): Didn't make buffer
+               non-read-only. 
+
 Fri Sep 15 11:09:52 1995  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
 
+       * gnus.el: 5.0.3 is released.
+       
        * gnus.el (gnus-summary-catchup): Would make all dormants read. 
 
        * gnus-msg.el (gnus-article-mail-with-original): Removed function.
index 3b8b817..8358d81 100644 (file)
          (set-buffer (cdr gnus-cache-buffer))
          (goto-char (point-max))
          (forward-line -1)
-         (while (and (not (bobp))
-                     (> (read (current-buffer)) number))
+         (while (condition-case ()
+                    (and (not (bobp))
+                         (> (read (current-buffer)) number))
+                  (error
+                   ;; The line was malformed, so we just remove it!!
+                   (gnus-delete-line)
+                   t))
            (forward-line -1))
          (if (bobp) 
              (if (not (eobp))
index 1616e9d..5321106 100644 (file)
 (defvar gnus-organization-file "/usr/lib/news/organization"
   "*Local news organization file.")
 
+(defvar gnus-prepare-article-hook (list 'gnus-inews-insert-signature)
+  "*A hook called after preparing body, but before preparing header headers.
+The default hook (`gnus-inews-insert-signature') inserts a signature
+file specified by the variable `gnus-signature-file'.")
+
 (defvar gnus-post-prepare-function nil
   "*Function that is run after a post buffer has been prepared.
 It is called with the name of the newsgroup that is posted to. It
@@ -478,13 +483,12 @@ Type \\[describe-mode] in the buffer to get a list of commands."
                                   (gnus-fetch-field "reply-to"))
                                 from)))))
            (if to
-               (progn
-                 (if (mail-fetch-field "To")
-                     (progn
-                       (beginning-of-line)
-                       (insert "Cc: " to "\n"))
-                   (mail-position-on-field "To")
-                   (insert to)))))
+               (if (mail-fetch-field "To")
+                   (progn
+                     (beginning-of-line)
+                     (insert "Cc: " to "\n"))
+                 (mail-position-on-field "To")
+                 (insert to))))
          ;; Handle author copy using BCC field.
          (if (and gnus-mail-self-blind
                   (not (mail-fetch-field "bcc")))
@@ -995,7 +999,11 @@ will attempt to use the foreign server to post the article."
         (concat "^" (regexp-quote mail-header-separator) "$"))
        (replace-match "" t t)
        ;; This hook may insert a signature.
-       (run-hooks 'gnus-prepare-article-hook)
+       (save-excursion
+         (goto-char (point-min))
+         (let ((gnus-newsgroup-name (or (mail-fetch-field "newsgroups")
+                                        gnus-newsgroup-name)))
+           (run-hooks 'gnus-prepare-article-hook)))
        ;; Run final inews hooks.  This hook may do FCC.
        ;; The article must be saved before being posted because
        ;; `gnus-request-post' modifies the buffer.
@@ -1142,7 +1150,8 @@ string is used instead of the variable `gnus-signature-file'.
 In either case, if the string is a file name, this file is
 inserted. If the string is not a file name, the string itself is
 inserted. 
-If you never want any signature inserted, set both those variables to
+
+If you never want any signature inserted, set both of these variables to
 nil."
   (save-excursion
     (let ((signature 
index 47c08a7..9ccba3d 100644 (file)
@@ -677,10 +677,11 @@ The headers will be included in the sequence they are matched.")
        (save-excursion
          (save-restriction
            (set-buffer buffer)
-           (set-text-properties (point-min) (point-max) nil)
-           ;; These two are necessary for XEmacs 19.12 fascism.
-           (put-text-property (point-min) (point-max) 'invisible nil)
-           (put-text-property (point-min) (point-max) 'intangible nil)
+           (let (buffer-read-only)
+             (set-text-properties (point-min) (point-max) nil)
+             ;; These two are necessary for XEmacs 19.12 fascism.
+             (put-text-property (point-min) (point-max) 'invisible nil)
+             (put-text-property (point-min) (point-max) 'intangible nil))
            (goto-char (point-min))
            (re-search-forward "\n\n")
            (setq body (buffer-substring (1- (point)) (point-max)))
@@ -1074,6 +1075,7 @@ The headers will be included in the sequence they are matched.")
            (if (stringp nntp-server-buffer)
                (setq article-buffer nntp-server-buffer)
              (setq article-buffer (buffer-name nntp-server-buffer))))
+       (gnus-summary-stop-page-breaking)
        (setq article-buffer gnus-article-buffer))
 
       (buffer-disable-undo article-buffer)
index 8d36616..c804902 100644 (file)
@@ -1194,11 +1194,6 @@ following hook:
 It is meant to be used for highlighting the article in some way.  It
 is not run if `gnus-visual' is nil.")
 
-(defvar gnus-prepare-article-hook (list 'gnus-inews-insert-signature)
-  "*A hook called after preparing body, but before preparing header headers.
-The default hook (`gnus-inews-insert-signature') inserts a signature
-file specified by the variable `gnus-signature-file'.")
-
 (defvar gnus-exit-group-hook nil
   "*A hook called when exiting (not quitting) summary mode.")
 
@@ -1354,7 +1349,7 @@ variable (string, integer, character, etc).")
   "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls + Boys)"
   "The mail address of the Gnus maintainers.")
 
-(defconst gnus-version "Gnus v5.0.3"
+(defconst gnus-version "Gnus v5.0.4"
   "Version number for this version of Gnus.")
 
 (defvar gnus-info-nodes
@@ -2758,6 +2753,13 @@ If nothing is specified, use the variable gnus-overload-functions."
        (and (= (car fdate) (car date))
             (> (nth 1 fdate) (nth 1 date))))))
 
+(defun gnus-group-read-only-p (&optional group)
+  "Check whether GROUP supports editing or not.
+If GROUP is nil, `gnus-newsgroup-name' will be checked instead.  Note
+that that variable is buffer-local to the summary buffers."
+  (let ((group (or group gnus-newsgroup-name)))
+    (not (gnus-check-backend-function 'request-replace-article group))))
+
 ;; Two silly functions to ensure that all `y-or-n-p' questions clear
 ;; the echo area.
 (defun gnus-y-or-n-p (prompt)
@@ -3582,10 +3584,7 @@ If REGEXP, only list groups matching REGEXP."
             (prin1-to-string (car (nth 4 info)))
             (nth 1 (nth 4 info)))
          ;; It's a native group.
-         (gnus-group-make-group
-          (car info)
-          (prin1-to-string (car gnus-select-method))
-          (nth 1 gnus-select-method)))
+         (gnus-group-make-group (car info)))
        (gnus-message 6 "Note: New group created")
        (setq entry 
              (gnus-gethash (gnus-group-prefixed-name 
@@ -4094,7 +4093,7 @@ If EXCLUDE-GROUP, do not go to that group."
   (gnus-configure-windows 'server)
   (gnus-server-prepare))
 
-(defun gnus-group-make-group (name method &optional address)
+(defun gnus-group-make-group (name &optional method address)
   "Add a new newsgroup.
 The user will be prompted for a NAME, for a select METHOD, and an
 ADDRESS."
@@ -4113,8 +4112,8 @@ ADDRESS."
                  ""))
        (list method nil)))))
   
-  (let* ((meth (if address (list (intern method) address) method))
-        (nname (gnus-group-prefixed-name name meth))
+  (let* ((meth (and method (if address (list (intern method) address) method)))
+        (nname (if method (gnus-group-prefixed-name name meth) name))
         info)
     (and (gnus-gethash nname gnus-newsrc-hashtb)
         (error "Group %s already exists" nname))
@@ -4692,9 +4691,7 @@ specify which levels you are interested in re-scanning."
       (progn
        (gnus-read-active-file)
        (gnus-get-unread-articles (or arg (1+ gnus-level-subscribed))))
-    (let ((gnus-read-active-file (not arg))
-         (gnus-have-read-active-file 
-          (and (not arg) gnus-have-read-active-file)))
+    (let ((gnus-read-active-file (if arg nil gnus-read-active-file)))
       (gnus-get-unread-articles (or arg (1+ gnus-level-subscribed)))))
   (gnus-group-list-groups))
 
@@ -7543,6 +7540,7 @@ searched for."
        (progn (goto-char beg) nil)
       (prog1
          (get-text-property (point) 'gnus-number)
+       (gnus-summary-show-thread)
        (gnus-summary-position-cursor)))))
 
 (defun gnus-summary-pseudo-article ()
@@ -9099,12 +9097,14 @@ delete these instead."
     (gnus-summary-position-cursor)
     not-deleted))
 
-(defun gnus-summary-edit-article ()
+(defun gnus-summary-edit-article (&optional force)
   "Enter into a buffer and edit the current article.
-This will have permanent effect only in mail groups."
-  (interactive)
-  (or (gnus-check-backend-function 
-       'request-replace-article gnus-newsgroup-name)
+This will have permanent effect only in mail groups.
+If FORCE is non-nil, allow editing of articles even in read-only
+groups."
+  (interactive "P")
+  (or force
+      (not (gnus-group-read-only-p))
       (error "The current newsgroup does not support article editing."))
   (gnus-summary-select-article t)
   (gnus-configure-windows 'article)
@@ -9122,19 +9122,24 @@ This will have permanent effect only in mail groups."
 (defun gnus-summary-edit-article-done ()
   "Make edits to the current article permanent."
   (interactive)
-  (let ((buf (buffer-substring-no-properties (point-min) (point-max))))
-    (erase-buffer)
-    (insert buf)
-    (if (not (gnus-request-replace-article 
-             (cdr gnus-article-current) (car gnus-article-current) 
-             (current-buffer)))
-       (error "Couldn't replace article.")
-      (gnus-article-mode)
-      (use-local-map gnus-article-mode-map)
-      (setq buffer-read-only t)
-      (buffer-disable-undo (current-buffer))
-      (gnus-configure-windows 'summary))
-    (and gnus-visual (run-hooks 'gnus-visual-mark-article-hook))))
+  (if (gnus-group-read-only-p)
+      (progn
+       (gnus-summary-edit-article-postpone)
+       (message "The current newsgroup does not support article editing.")
+       (ding))
+    (let ((buf (buffer-substring-no-properties (point-min) (point-max))))
+      (erase-buffer)
+      (insert buf)
+      (if (not (gnus-request-replace-article 
+               (cdr gnus-article-current) (car gnus-article-current) 
+               (current-buffer)))
+         (error "Couldn't replace article.")
+       (gnus-article-mode)
+       (use-local-map gnus-article-mode-map)
+       (setq buffer-read-only t)
+       (buffer-disable-undo (current-buffer))
+       (gnus-configure-windows 'summary))
+      (and gnus-visual (run-hooks 'gnus-visual-mark-article-hook)))))
 
 (defun gnus-summary-edit-article-postpone ()
   "Postpone changes to the current article."
@@ -13943,6 +13948,13 @@ GROUP using BNews sys file syntax."
        (goto-char (point-min))
        (while (re-search-forward "[/:]" nil t)
          (replace-match "." t t))
+       ;; Cludge to get rid of "nntp+" problems.
+       (goto-char (point-min))
+       (and (looking-at "nn[a-z]+\\+")
+            (progn
+              (search-forward "+")
+              (forward-char -1)
+              (insert "\\")))
        ;; Translate "all" to ".*".
        (while (search-forward "all" nil t)
          (replace-match ".*" t t))
index ca636e0..0980c4d 100644 (file)
@@ -90,7 +90,7 @@
          (setq file (nneething-file-name article))
 
          (if (and (file-exists-p file)
-                  (> (nth 7 (file-attributes file)) 0))
+                  (not (zerop (nth 7 (file-attributes file)))))
              (progn
                (insert (format "221 %d Article retrieved.\n" article))
                (nneething-insert-head file)
index dbf1866..6bd0f37 100644 (file)
@@ -643,8 +643,8 @@ post to this group instead.  If RESPECT-POSTER, heed the special
                      (string-equal "poster" followup-to);Poster
                      (and (eq respect-poster 'ask)
                           followup-to
-                          (y-or-n-p (concat "Followup to " 
-                                            followup-to "? "))))
+                          (not (y-or-n-p (concat "Followup to " 
+                                                 followup-to "? ")))))
                  (setq followup-to nil))
              (setq newsgroups
                    (or follow-to followup-to (mail-fetch-field "newsgroups")))