article mode line.
*** gnus.el has been split into many smaller files.
+
+*** Suppression of duplicate articles based on Message-ID.
+
+(setq gnus-suppress-duplicates t)
+
+*** New variables for specifying what score and adapt files
+are to be considered home score and adapt files. See
+`gnus-home-score-file' and `gnus-home-adapt-files'.
+
+*** Groups can inherit group parameters from parent topics.
+
+*** Article editing has been revamped and is now usable.
+
+*** Signatures can be recognized in more intelligent fashions.
+See `gnus-signature-separator' and `gnus-signature-limit'.
+
+*** Summary pick mode has been made to look more nn-like.
+Line numbers are displayed and the `.' command can be
+used to pick articles.
+
+*** Commands for moving the .newsrc.eld from one server to
+another have been added.
+Sun Aug 4 00:17:51 1996 Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
+
+ * nntp.el (nntp-wait-for): Goto point-max before inserting.
+ (nntp-retrieve-headers): Didn't inhibit Erasure.
+
+ * gnus-eform.el (gnus-edit-form-mode-map): Buggy.
+
+ * nntp.el (nntp-send-command-nodelete): New function.
+
+Sat Aug 3 22:21:24 1996 Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
+
+ * article.el (article-date-ut): Wouldn't do anything much.
+
+ * nntp.el (nntp-wait-for): Wouldn't allow posting.
+
+ * nnmail.el (nnmail-delete-incoming): Set to nil.
+
+Sat Aug 3 01:31:24 1996 Lars Magne Ingebrigtsen <lars@eyesore.no>
+
+ * gnus-score.el (gnus-home-score-file): New variable.
+ (gnus-home-score-file): New function.
+ (gnus-hierarchial-home-score-file): New function.
+ (gnus-possibly-score-headers): Use `adapt-file' param.
+ (gnus-home-adapt-file): New variable.
+ (gnus-hierarchial-home-adapt-file): New function.
+
+ * gnus-load.el (gnus-original-article-buffer): Moved here.
+
+ * gnus-sum.el (gnus-article-mark): New macro.
+ (gnus-summary-prepare-unthreaded): Use it.
+ (gnus-summary-prepare-threads): Ditto.
+
+ * gnus-win.el (gnus-buffer-configuration): New `edit-article'
+ setting.
+
+ * gnus-sum.el (gnus-summary-edit-article): Don't move point in the
+ article buffer.
+ (gnus-summary-edit-article-done): Don't move point after editing.
+ (gnus-summary-edit-article-postpone): Removed.
+ (gnus-summary-update-article-line): New function.
+
+ * gnus-art.el (gnus-article-edit-mode-map): Buggy map.
+
+Fri Aug 2 22:36:40 1996 Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
+
+ * gnus.el: Red Gnus v0.4 is released.
+
Wed Jul 31 15:23:54 1996 Ken Olstad <ken@mn.cheyenne.com>
* gnus-xmas.el (gnus-xmas-redefine): Disbale XFace when running
how much time has lapsed since DATE."
(interactive (list 'ut t))
(let* ((header (or header (message-fetch-field "date") ""))
- (date (and (vectorp header) (mail-header-date header)))
+ (date (if (vectorp header) (mail-header-date header)
+ header))
(date-regexp "^Date: \\|^X-Sent: ")
(now (current-time))
(inhibit-point-motion-hooks t)
(defvar gnus-article-edit-mode-hook nil
"*Hook run in article edit mode buffers.")
+(defvar gnus-article-edit-done-function nil)
+
(defvar gnus-article-edit-mode-map nil)
(unless gnus-article-edit-mode-map
(setq gnus-article-edit-mode-map (copy-keymap text-mode-map))
(gnus-define-keys gnus-article-edit-mode-map
- "\C-c\C-c" 'gnus-summary-edit-article-done)
+ "\C-c\C-c" gnus-article-edit-done
+ "\C-c\C-k" gnus-article-edit-exit)
(gnus-define-keys (gnus-article-edit-wash-map
"\C-c\C-w" gnus-article-edit-mode-map)
(kill-all-local-variables)
(setq major-mode 'gnus-article-edit-mode)
(setq mode-name "Article Edit")
- (make-local-variable 'minor-mode-alist)
(use-local-map gnus-article-edit-mode-map)
+ (make-local-variable 'gnus-article-edit-done-function)
+ (make-local-variable 'gnus-prev-winconf)
+ (setq buffer-read-only nil)
+ (buffer-enable-undo)
+ (widen)
(run-hooks 'text-mode 'gnus-article-edit-mode-hook))
+(defun gnus-article-edit-article (exit-func)
+ "Start editing the contents of the current article buffer."
+ (let ((winconf (current-window-configuration)))
+ (set-buffer gnus-article-buffer)
+ (gnus-article-edit-mode)
+ (gnus-configure-windows 'edit-article)
+ (setq gnus-article-edit-done-function exit-func)
+ (setq gnus-prev-winconf winconf)
+ (gnus-message 6 "C-c C-c to end edits")))
+
+(defun gnus-article-edit-done ()
+ "Update the article edits and exit."
+ (interactive)
+ (let ((func gnus-article-edit-done-function)
+ (buf (current-buffer)))
+ (gnus-article-edit-exit)
+ (save-excursion
+ (set-buffer buf)
+ (let ((buffer-read-only nil))
+ (funcall func)))))
+
+(defun gnus-article-edit-exit ()
+ "Exit the article editing without updating."
+ (interactive)
+ ;; We remove all text props from the article buffer.
+ (let ((buf (format "%s" (buffer-string)))
+ (p (point))
+ (window-start (window-start)))
+ (erase-buffer)
+ (insert buf)
+ (goto-char p)
+ (set-window-start (selected-window) window-start))
+ (let ((winconf gnus-prev-winconf))
+ (gnus-article-mode)
+ ;; The cache and backlog have to be flushed somewhat.
+ (when gnus-use-cache
+ (gnus-cache-update-article
+ (car gnus-article-current) (cdr gnus-article-current)))
+ (when gnus-keep-backlog
+ (gnus-backlog-remove-article
+ (car gnus-article-current) (cdr gnus-article-current)))
+ ;; Flush original article as well.
+ (save-excursion
+ (when (get-buffer gnus-original-article-buffer)
+ (set-buffer gnus-original-article-buffer)
+ (setq gnus-original-article nil)))
+ (set-window-configuration winconf)))
+
(defun gnus-article-edit-full-stops ()
"Interactively repair spacing at end of sentences."
(interactive)
;;; Internal variables
(defvar gnus-edit-form-done-function nil)
-(defvar gnus-edit-form-buffer "*Gnus edit form*")
+(defvar gnus-edit-form-buffer "*Gnus edit form*")
(defvar gnus-edit-form-mode-map nil)
(unless gnus-edit-form-mode-map
- (set gnus-edit-form-mode-map (copy-keymap emacs-lisp-mode-map))
+ (setq gnus-edit-form-mode-map (copy-keymap emacs-lisp-mode-map))
(gnus-define-keys gnus-edit-form-mode-map
"\C-c\C-c" gnus-edit-form-done
"\C-c\C-k" gnus-edit-form-exit))
%i Number of ticked and dormant (integer)
%T Number of ticked articles (integer)
%R Number of read articles (integer)
-%t Total number of articles (integer)
+%t Estimated total number of articles (integer)
%y Number of unread, unticked articles (integer)
%G Group name (string)
%g Qualified group name (string)
"Function to override finding the next group after listing groups.")
(defvar gnus-group-edit-buffer nil)
-(defvar gnus-edit-form-buffer nil)
(defvar gnus-group-line-format-alist
`((?M gnus-tmp-marked-mark ?c)
\f
;;; Internal variables
+(defvar gnus-original-article-buffer " *Original Article*")
(defvar gnus-newsgroup-name nil)
(defvar gnus-current-select-method nil
(defvar gnus-orphan-score nil
"*All orphans get this score added. Set in the score file.")
+(defvar gnus-home-score-file nil
+ "Variable to control where interative score entries are to go.
+It can be:
+
+ * A string
+ This file file will be used as the home score file.
+
+ * A function
+ The result of this function will be used as the home score file.
+
+ * A list
+ The elements in this list can be:
+
+ * `(regexp . file-name)'
+ If the `regexp' matches the group name, the `file-name' will
+ will be used as the home score file.
+
+ * A function.
+ If the function returns non-nil, the result will be used
+ as the home score file.
+
+ * A string.
+ Use the string as the home score file.
+
+ The list will be traversed from the beginning towards the end looking
+ for matches.")
+
+(defvar gnus-home-adapt-file nil
+ "Variable to control where new adaptive score entries are to go.
+This variable allows the same syntax as `gnus-home-score-file'.")
+
(defvar gnus-default-adaptive-score-alist
'((gnus-kill-file-mark)
(gnus-unread-mark)
(defun gnus-possibly-score-headers (&optional trace)
(let ((funcs gnus-score-find-score-files-function)
+ (group gnus-newsgroup-name)
score-files)
;; Make sure funcs is a list.
(and funcs
(setq funcs (list funcs)))
;; Get the initial score files for this group.
(when funcs
- (setq score-files (gnus-score-find-alist gnus-newsgroup-name)))
+ (setq score-files (gnus-score-find-alist group)))
+ ;; Add any home adapt files.
+ (let ((home (gnus-home-score-file group t)))
+ (when home
+ (push home score-files)
+ (setq gnus-newsgroup-adaptive-score-file home)))
+ ;; Check whether there is a `adapt-file' group parameter.
+ (let ((param-file (gnus-group-get-parameter group 'adapt-file)))
+ (when param-file
+ (push param-file score-files)
+ (setq gnus-newsgroup-adaptive-score-file param-file)))
;; Go through all the functions for finding score files (or actual
;; scores) and add them to a list.
(while funcs
(when (gnus-functionp (car funcs))
(setq score-files
- (nconc score-files (funcall (car funcs) gnus-newsgroup-name))))
+ (nconc score-files (funcall (car funcs) group))))
(setq funcs (cdr funcs)))
+ ;; Add any home score files.
+ (let ((home (gnus-home-score-file group)))
+ (when home
+ (setq score-files (nconc score-files (list home)))))
;; Check whether there is a `score-file' group parameter.
- (let ((param-file (gnus-group-get-parameter
- gnus-newsgroup-name 'score-file)))
+ (let ((param-file (gnus-group-get-parameter group 'score-file)))
(when param-file
- (push param-file score-files)))
+ (setq score-files (nconc score-files (list param-file)))))
;; Do the scoring if there are any score files for this group.
(when score-files
(gnus-score-headers score-files trace))))
(gnus-message 1 "New score file entries will be case insensitive.")
(gnus-message 1 "New score file entries will be case sensitive.")))
+;;; Home score file.
+
+(defun gnus-home-score-file (group &optional adapt)
+ "Return the home score file for GROUP.
+If ADAPT, return the home adaptive file instead."
+ (let ((list (if adapt gnus-home-adapt-file gnus-home-score-file))
+ elem found)
+ ;; Make sure we have a list.
+ (unless (listp list)
+ (setq list (list list)))
+ ;; Go through the list and look for matches.
+ (while (and (not found)
+ (setq elem (pop list)))
+ (setq found
+ (cond
+ ;; Simple string.
+ ((stringp elem)
+ elem)
+ ;; Function.
+ ((gnus-functionp elem)
+ (funcall elem group))
+ ;; Regexp-file cons
+ ((consp elem)
+ (when (string-match (car elem) group)
+ (cdr elem))))))
+ (when found
+ (nnheader-concat gnus-kill-files-directory found))))
+
+(defun gnus-hierarchial-home-score-file (group)
+ "Return the score file of the top-level hierarchy of GROUP."
+ (if (string-match "^[^.]+\\." group)
+ (concat (match-string 0 group) "all." gnus-score-file-suffix)
+ ;; Group name without any dots.
+ (concat group ".all." gnus-score-file-suffix)))
+
+(defun gnus-hierarchial-home-adapt-file (group)
+ "Return the adapt file of the top-level hierarchy of GROUP."
+ (if (string-match "^[^.]+\\." group)
+ (concat (match-string 0 group) "all." gnus-adaptive-file-suffix)
+ ;; Group name without any dots.
+ (concat group ".all." gnus-adaptive-file-suffix)))
+
(provide 'gnus-score)
;;; gnus-score.el ends here
;;; Internal variables
-(defvar gnus-original-article-buffer " *Original Article*")
(defvar gnus-original-article nil)
(defvar gnus-article-internal-prepare-hook nil)
(= mark gnus-dormant-mark)
(= mark gnus-expirable-mark))))
+(defmacro gnus-article-mark (number)
+ `(cond
+ ((memq ,number gnus-newsgroup-unreads) gnus-unread-mark)
+ ((memq ,number gnus-newsgroup-marked) gnus-ticked-mark)
+ ((memq ,number gnus-newsgroup-dormant) gnus-dormant-mark)
+ ((memq ,number gnus-newsgroup-expirable) gnus-expirable-mark)
+ (t (or (cdr (assq ,number gnus-newsgroup-reads))
+ gnus-ancient-mark))))
+
;; Saving hidden threads.
(put 'gnus-save-hidden-threads 'lisp-indent-function 0)
(delq number gnus-newsgroup-unselected)))
(push number gnus-newsgroup-ancient)))))))
+(defun gnus-summary-update-article-line (article header)
+ "Update the line for ARTICLE using HEADERS."
+ (let* ((id (mail-header-id header))
+ (thread (gnus-id-to-thread id)))
+ (unless thread
+ (error "Article in no thread"))
+ ;; Update the thread.
+ (setcar thread header)
+ (gnus-summary-goto-subject article)
+ (let* ((datal (gnus-data-find-list article))
+ (data (car datal))
+ (length (when (cdr datal)
+ (- (gnus-data-pos data)
+ (gnus-data-pos (cadr datal)))))
+ (buffer-read-only nil)
+ (level (gnus-summary-thread-level)))
+ (gnus-delete-line)
+ (gnus-summary-insert-line
+ header level nil (gnus-article-mark article)
+ (memq article gnus-newsgroup-replied)
+ (memq article gnus-newsgroup-expirable)
+ (mail-header-subject header)
+ nil (cdr (assq article gnus-newsgroup-scored))
+ (memq article gnus-newsgroup-processable))
+ (when length
+ (gnus-data-update-list
+ (cdr datal) (- length (- (gnus-data-pos data) (point))))))))
+
(defun gnus-summary-update-article (article &optional iheader)
"Update ARTICLE in the summary buffer."
(set-buffer gnus-summary-buffer)
(setq gnus-tmp-dummy-line nil))
;; Compute the mark.
- (setq
- gnus-tmp-unread
- (cond
- ((memq number gnus-newsgroup-unreads) gnus-unread-mark)
- ((memq number gnus-newsgroup-marked) gnus-ticked-mark)
- ((memq number gnus-newsgroup-dormant) gnus-dormant-mark)
- ((memq number gnus-newsgroup-expirable) gnus-expirable-mark)
- (t (or (cdr (assq number gnus-newsgroup-reads))
- gnus-ancient-mark))))
+ (setq gnus-tmp-unread (gnus-article-mark number))
(push (gnus-data-make number gnus-tmp-unread (1+ (point))
gnus-tmp-header gnus-tmp-level)
(push (cons number gnus-low-score-mark)
gnus-newsgroup-reads)))
- (setq mark
- (cond
- ((memq number gnus-newsgroup-marked) gnus-ticked-mark)
- ((memq number gnus-newsgroup-dormant) gnus-dormant-mark)
- ((memq number gnus-newsgroup-unreads) gnus-unread-mark)
- ((memq number gnus-newsgroup-expirable) gnus-expirable-mark)
- (t (or (cdr (assq number gnus-newsgroup-reads))
- gnus-ancient-mark))))
+ (setq mark (gnus-article-mark number))
(setq gnus-newsgroup-data
(cons (gnus-data-make number mark (1+ (point)) header 0)
gnus-newsgroup-data))
(when (and (not force)
(gnus-group-read-only-p))
(error "The current newsgroup does not support article editing."))
- (gnus-summary-select-article t nil t)
- (gnus-configure-windows 'article)
- (select-window (get-buffer-window gnus-article-buffer))
- (gnus-message 6 "C-c C-c to end edits")
- (setq buffer-read-only nil)
- (gnus-article-edit-mode)
- (buffer-enable-undo)
- (widen)
- (goto-char (point-min))
- (search-forward "\n\n" nil t)))
-
-(defun gnus-summary-edit-article-done ()
+ ;; Select article if needed.
+ (unless (eq (gnus-summary-article-number)
+ gnus-current-article)
+ (gnus-summary-select-article t))
+ (gnus-article-edit-article
+ `(lambda ()
+ (gnus-summary-edit-article-done
+ ,(mail-header-references gnus-current-headers)
+ ,(gnus-group-read-only-p) ,gnus-summary-buffer)))))
+
+(defun gnus-summary-edit-article-done (references read-only buffer)
"Make edits to the current article permanent."
(interactive)
- (if (gnus-group-read-only-p)
- (progn
- (let ((beep (not (eq major-mode 'text-mode))))
- (gnus-summary-edit-article-postpone)
- (when beep
- (gnus-error
- 3 "The current newsgroup does not support article editing."))))
- (let ((buf (format "%s" (buffer-string))))
- (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)
- (gnus-summary-update-article (cdr gnus-article-current))
- (when gnus-use-cache
- (gnus-cache-update-article
- (car gnus-article-current) (cdr gnus-article-current)))
- (when gnus-keep-backlog
- (gnus-backlog-remove-article
- (car gnus-article-current) (cdr gnus-article-current))))
- (save-excursion
- (when (get-buffer gnus-original-article-buffer)
- (set-buffer gnus-original-article-buffer)
- (setq gnus-original-article nil)))
- (setq gnus-article-current nil
- gnus-current-article nil)
- (run-hooks 'gnus-article-display-hook)
- (and (gnus-visual-p 'summary-highlight 'highlight)
- (run-hooks 'gnus-visual-mark-article-hook)))))
-
-(defun gnus-summary-edit-article-postpone ()
- "Postpone changes to the current article."
- (interactive)
- (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-p 'summary-highlight 'highlight)
- (run-hooks 'gnus-visual-mark-article-hook)))
+ ;; Replace the article.
+ (if (and (not read-only)
+ (not (gnus-request-replace-article
+ (cdr gnus-article-current) (car gnus-article-current)
+ (current-buffer))))
+ (error "Couldn't replace article.")
+ ;; Update the summary buffer.
+ (if (equal (message-tokenize-header references " ")
+ (message-tokenize-header
+ (message-fetch-field "references") " "))
+ ;; We only have to update this line.
+ (save-restriction
+ (message-narrow-to-head)
+ (let ((header (nnheader-parse-head t)))
+ (set-buffer buffer)
+ (mail-header-set-number header (cdr gnus-article-current))
+ (gnus-summary-update-article-line
+ (cdr gnus-article-current) header)))
+ ;; Update threads.
+ (set-buffer buffer)
+ (gnus-summary-update-article (cdr gnus-article-current)))
+ ;; Prettify the article buffer again.
+ (save-excursion
+ (set-buffer gnus-article-buffer)
+ (run-hooks 'gnus-article-display-hook))
+ ;; Prettify the summary buffer line.
+ (when (gnus-visual-p 'summary-highlight 'highlight)
+ (run-hooks 'gnus-visual-mark-article-hook))))
(defun gnus-summary-edit-wash (key)
"Perform editing command in the article buffer."
(message "")
(gnus-summary-edit-article)
(execute-kbd-macro (concat (this-command-keys) key))
- (gnus-summary-edit-article-done))
+ (gnus-article-edit-done))
;;; Respooling
(vertical 1.0
(summary 0.25)
(faq 1.0 point)))
+ (edit-article
+ (vertical 1.0
+ (article 1.0 point)))
(edit-form
(vertical 1.0
(group 0.5)
(server . gnus-server-buffer)
(browse . "*Gnus Browse Server*")
(edit-group . gnus-group-edit-buffer)
- (edit-group . gnus-edit-form-buffer)
+ (edit-form . gnus-edit-form-buffer)
(edit-server . gnus-server-edit-buffer)
(group-carpal . gnus-carpal-group-buffer)
(summary-carpal . gnus-carpal-summary-buffer)
(eval '(run-hooks 'gnus-load-hook))
-(defconst gnus-version-number "0.4"
+(defconst gnus-version-number "0.5"
"Version number for this version of Gnus.")
(defconst gnus-version (format "Red Gnus v%s" gnus-version-number)
"Version string for this version of Gnus.")
-;;; Splash screen.
+(defvar gnus-inhibit-startup-message nil
+ "*If non-nil, the startup message will not be displayed.")
+
+;;; Internal variables
(defvar gnus-group-buffer "*Group*")
-(defvar gnus-inhibit-startup-message nil
- "*If non-nil, the startup message will not be displayed.")
+;;; Splash screen.
(defun gnus-splash ()
(save-excursion
(mail . "mailer-daemon\\|postmaster"))
"*Alist of abbreviations allowed in `nnmail-split-fancy'.")
-(defvar nnmail-delete-incoming t
+(defvar nnmail-delete-incoming nil
"*If non-nil, the mail backends will delete incoming files after splitting.")
(defvar nnmail-message-id-cache-length 1000
-;;; nntp.el --- nntp access for Gnus
;; Copyright (C) 1987,88,89,90,92,93,94,95,96 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
(let ((number (length articles))
(count 0)
(received 0)
- (last-point (point-min)))
+ (last-point (point-min))
+ (nntp-inhibit-erase t))
;; Send HEAD command.
(while articles
(nntp-send-command
nntp-address nntp-port-number nntp-server-buffer
wait-for nnheader-callback-function))
+(defun nntp-send-command-nodelete (wait-for &rest strings)
+ "Send STRINGS to server and wait until WAIT-FOR returns."
+ (nntp-retrieve-data
+ (mapconcat 'identity strings " ")
+ nntp-address nntp-port-number nntp-server-buffer
+ wait-for nnheader-callback-function))
+
(defun nntp-send-command-and-decode (wait-for &rest strings)
"Send STRINGS to server and wait until WAIT-FOR returns."
(unless nnheader-callback-function
"Send the current buffer to server and wait until WAIT-FOR returns."
(unless nnheader-callback-function
(save-excursion
- (set-buffer nntp-server-buffer)
+ (set-buffer (nntp-find-connection-buffer nntp-server-buffer))
(erase-buffer)))
(nntp-encode-text)
(process-send-region (nntp-find-connection nntp-server-buffer)
"Return the entry for the connection to BUFFER."
(assq (nntp-find-connection buffer) nntp-connection-alist))
+(defun nntp-find-connection-buffer (buffer)
+ "Return the process connection buffer tied to BUFFER."
+ (let ((process (nntp-find-connection buffer)))
+ (when process
+ (process-buffer process))))
+
(defun nntp-open-connection (buffer)
"Open a connection to PORT on ADDRESS delivering output to BUFFER."
(run-hooks 'nntp-prepare-server-hook)
(nntp-accept-process-output process)
(goto-char (point-min)))
(prog1
- (if (looking-at "[345]")
+ (if (looking-at "[45]")
(progn
(nntp-snarf-error-message)
nil)
(nntp-decode-text (not decode))
(save-excursion
(set-buffer buffer)
+ (goto-char (point-max))
(insert-buffer-substring (process-buffer process))
t))
(erase-buffer))))
(defun nntp-accept-process-output (process)
"Wait for output from PROCESS and message some dots."
(save-excursion
- (set-buffer nntp-server-buffer)
- (message "nntp reading%s" (make-string (/ (point-max) 100) ?.))
+ (set-buffer (or (nntp-find-connection-buffer nntp-server-buffer)
+ nntp-server-buffer))
+ (message "nntp reading%s" (make-string (/ (point-max) 1000) ?.))
(accept-process-output process 1)))
(defun nntp-accept-response ()
(insert "." nntp-end-of-line)))
(defun nntp-retrieve-headers-with-xover (articles &optional fetch-old)
+ (set-buffer nntp-server-buffer)
(erase-buffer)
(cond
;; If `nntp-server-xover' is a string, then we just send this
;; command.
(if wait-for-reply
- (nntp-send-command "\r\n\\.\r\n" nntp-server-xover range)
+ (nntp-send-command-nodelete "\r\n\\.\r\n" nntp-server-xover range)
;; We do not wait for the reply.
- (nntp-send-command "\r\n\\.\r\n" nntp-server-xover range))
+ (nntp-send-command-nodelete "\r\n\\.\r\n" nntp-server-xover range))
(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\n\\.\r\n" (car commands) range)
+ (nntp-send-command-nodelete "\r\n\\.\r\n" (car commands) range)
(save-excursion
(set-buffer nntp-server-buffer)
(goto-char (point-min))
nntp-rlogin-parameters " ")))))
proc))
-(defun nntp-find-connection-buffer (buffer)
- "Return the process connection buffer tied to BUFFER."
- (let ((process (nntp-find-connection buffer)))
- (when process
- (process-buffer process))))
-
(provide 'nntp)
;;; nntp.el ends here
+Sat Aug 3 17:35:36 1996 Lars Magne Ingebrigtsen <lars@eyesore.no>
+
+ * gnus.texi (Group Parameters): Addition.
+ (Home Score File): New.
+ (Topic Parameters): New.
+
Wed Jul 31 15:34:12 1996 Lars Magne Ingebrigtsen <lars@eyesore.no>
* gnus.texi (are): Fix.
Number of read articles.
@item t
-Total number of articles.
+Estimated total number of articles. (This is really @var{max-number}
+minus @var{min-number} plus 1.)
@item y
Number of unread, unticked, non-dormant articles.
the symbols @code{never} or @code{immediate}.
@item score-file
+@cindex score file group parameter
Elements that look like @code{(score-file . "file")} will make
-@samp{file} into the current score file for the group in question. This
+@file{file} into the current score file for the group in question. This
means that all score commands you issue will end up in that file.
+@item adapt-file
+@cindex adapt file group parameter
+Elements that look like @code{(adapt-file . "file")} will make
+@file{file} into the current adaptive file for the group in question.
+All adaptive score entries will be put into this file.
+
@item admin-address
When unsubscribing to a mailing list you should never send the
unsubscription notice to the mailing list itself. Instead, you'd send
@end table
-If you want to change the group info you can use the @kbd{G E} command
-to enter a buffer where you can edit it.
+Use the @kbd{G p} command to edit group parameters of a group.
-You usually don't want to edit the entire group info, so you'd be better
-off using the @kbd{G p} command to just edit the group parameters.
+Also @xref{Topic Parameters}.
@node Listing Groups
* Topic Variables:: How to customize the topics the Lisp Way.
* Topic Commands:: Interactive E-Z commands.
* Topic Topology:: A map of the world.
+* Topic Parameters:: Parameters that apply to all groups in a topic.
@end menu
@cindex group parameters
@cindex topic parameters
@cindex parameters
-Edit the topic parameters (@code{gnus-topic-edit-parameters}). All
-groups in the topic will inherit group parameters from the parent (and
-ancestor) topic parameters. Group parameters (of course) override topic
-parameters, and topic parameters in sub-topics override topic parameters
-in super-topics. You know. Normal inheretance rules.
+Edit the topic parameters (@code{gnus-topic-edit-parameters}).
+@xref{Topic Parameters}.
@end table
@example
Gnus
Emacs -- I wuw it!
- 3: comp.emacs
- 2: alt.religion.emacs
+ 3: comp.emacs
+ 2: alt.religion.emacs
Naughty Emacs
452: alt.sex.emacs
0: comp.talk.emacs.recovery
Misc
- 8: comp.binaries.fractals
- 13: comp.sources.unix
+ 8: comp.binaries.fractals
+ 13: comp.sources.unix
@end example
So, here we have one top-level topic, two topics under that, and one
allowed---@code{visible} and @code{invisible}.
+@node Topic Parameters
+@subsection Topic Parameters
+
+All groups in a topic will inherit group parameters from the parent (and
+ancestor) topic parameters. All legal group parameters are legal topic
+parameters (@pxref{Group Parameters}).
+
+Group parameters (of course) override topic parameters, and topic
+parameters in sub-topics override topic parameters in super-topics. You
+know. Normal inheretance rules. (@dfn{Rules} is here a noun, not a
+verb, although you may feel free to disagree with me here.)
+
+@example
+Gnus
+ Emacs
+ 3: comp.emacs
+ 2: alt.religion.emacs
+ 452: alt.sex.emacs
+ Relief
+ 452: alt.sex.emacs
+ 0: comp.talk.emacs.recovery
+ Misc
+ 8: comp.binaries.fractals
+ 13: comp.sources.unix
+ 452: alt.sex.emacs
+@end example
+
+Now, the @samp{Emacs} topic has the topic parameter
+@code{(score-file . "emacs.SCORE")}; the @samp{Relief} topic has the topic
+parameter @code{(score-file . "relief.SCORE")}; and the @samp{Misc}
+topic has the topic parameter @code{(score-file . "emacs.SCORE")}. In
+addition, @samp{alt.religion.emacs} has the group parameter
+@code{(score-file . "religion.SCORE")}.
+
+Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
+will get the @file{relief.SCORE} home score file. If you enter the same
+group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
+score file. If you enter @samp{alt.religion.emacs}, you'll get the
+@file{religion.SCORE} home score file.
+
+This seems rather simple and self-evident, doesn't it? Well, yes. But
+there are some problems, especially with the @code{total-expiry}
+parameter. Say you have a mail group in two topics; one with
+@code{total-expiry} and one without. What happens when you do @kbd{M-x
+gnus-expire-all-expirable-groups}? Gnus has no way of telling which one
+of these topics you mean to expire articles from, so anything may
+happen. In fact, I hereby declare that it is @dfn{undefined} what
+happens. You just have to be careful if you do stuff like that.
+
+
@node Misc Group Stuff
@section Misc Group Stuff
* Score File Format:: What a score file may contain.
* Score File Editing:: You can edit score files by hand as well.
* Adaptive Scoring:: Big Sister Gnus @emph{knows} what you read.
+* Home Score File:: How to say where new score entries are to go.
* Followups To Yourself:: Having Gnus notice when people answer you.
* Scoring Tips:: How to score effectively.
* Reverse Scoring:: That problem child of old is not problem.
this problem.
+@node Home Score File
+@section Home Score File
+
+The score file where new score file entries will go is calle the
+@dfn{home score file}. This is normally (and by default) the score file
+for the group itself. For instance, the home score file for
+@samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
+
+However, this may not be what you want. It is often convenient to share
+a common home score file among many groups---all @samp{emacs} groups
+could perhaps use the same home score file.
+
+@vindex gnus-home-score-file
+The variable that controls this is @code{gnus-home-score-file}. It can
+be:
+
+@enumerate
+@item
+A string. Then this file will be used as the home score file for all
+groups.
+
+@item
+A function. The result of this function will be used as the home score
+file. The function will be called with the name of the group as the
+parameter.
+
+@item
+A list. The elements in this list can be:
+
+@enumerate
+@item
+@var{(regexp . file-name)}. If the @var{regexp} matches the group name,
+the @var{file-name} will will be used as the home score file.
+
+@item
+A function. If the function returns non-nil, the result will be used as
+the home score file.
+
+@item
+A string. Use the string as the home score file.
+@end enumerate
+
+The list will be traversed from the beginning towards the end looking
+for matches.
+
+@end enumerate
+
+So, if you want to use just a single score file, you could say:
+
+@lisp
+(setq gnus-home-score-file
+ "my-total-score-file.SCORE")
+@end lisp
+
+If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
+@file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
+
+@lisp
+(setq gnus-home-score-file
+ 'gnus-hierarchial-home-score-file)
+@end lisp
+
+This is a ready-made function provided for your convenience.
+
+If you want to have one score file for the @samp{emacs} groups and
+another for the @samp{comp} groups, while letting all other groups use
+their own home score files:
+
+@lisp
+(setq gnus-home-score-file
+ ;; All groups that match the regexp "\\.emacs"
+ '("\\.emacs" . "emacs.SCORE")
+ ;; All the comp groups in one score file
+ ("^comp" . "comp.SCORE"))
+@end lisp
+
+@vindex gnus-home-adapt-file
+@code{gnus-home-adapt-file} works exactly the same way as
+@code{gnus-home-score-file}, but says what the home adaptive score file
+is instead. All new adaptive file entries will go into the file
+specified by this variable, and the same syntax is allowed.
+
+In addition to using @code{gnus-home-score-file} and
+@code{gnus-home-adapt-file}, you can also use group parameters
+(@pxref{Group Parameters}) and topic parameters (@pxref{Topic
+Parameters}) to achieve much the same. Group and topic parameters take
+presedence over this variable.
+
+
@node Followups To Yourself
@section Followups To Yourself