will not be marked.")
(defvar gnus-simplify-subject-fuzzy-regexp nil
- "*Regular expression or list of regular expressions that will be removed
-from subject strings if fuzzy subject simplification is selected.")
+ "*Strings to be removed when doing fuzzy matches.
+This can either be a egular expression or list of regular expressions
+that will be removed from subject strings if fuzzy subject
+simplification is selected.")
(defvar gnus-group-default-list-level gnus-level-subscribed
"*Default listing level.
"gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls + Boys)"
"The mail address of the Gnus maintainers.")
-(defconst gnus-version "September Gnus v0.10"
+(defconst gnus-version "September Gnus v0.11"
"Version number for this version of Gnus.")
(defvar gnus-info-nodes
(defvar gnus-newsgroup-headers nil
"List of article headers in the current newsgroup.")
+(defvar gnus-newsgroup-threads nil)
+
(defvar gnus-newsgroup-ancient nil
"List of `gnus-fetch-old-headers' articles in the current newsgroup.")
gnus-newsgroup-replied gnus-newsgroup-expirable
gnus-newsgroup-processable gnus-newsgroup-killed
gnus-newsgroup-bookmarks gnus-newsgroup-dormant
- gnus-newsgroup-headers
+ gnus-newsgroup-headers gnus-newsgroup-threads
gnus-current-article gnus-current-headers gnus-have-all-headers
gnus-last-article gnus-article-internal-prepare-hook
gnus-newsgroup-dependencies gnus-newsgroup-selected-overlay
;; gnus-mh
(autoload 'gnus-mh-mail-setup "gnus-mh")
- (autoload 'gnus-summary-save-in-folder "gnus-mh")
+ (autoload 'gnus-summary-save-in-folder "gnus-mh" nil t)
(autoload 'gnus-summary-save-article-folder "gnus-mh")
(autoload 'gnus-Folder-save-name "gnus-mh")
(autoload 'gnus-folder-save-name "gnus-mh")
;; gnus-topic
(autoload 'gnus-topic-fold "gnus-topic")
(autoload 'gnus-group-prepare-topics "gnus-topic")
+ (autoload 'gnus-group-add-to-topic "gnus-topic" nil t)
;; gnus-uu
(autoload 'gnus-uu-extract-map "gnus-uu" nil nil 'keymap)
;; gnus-vm
(autoload 'gnus-summary-save-in-vm "gnus-vm" nil t)
(autoload 'gnus-summary-save-article-vm "gnus-vm" nil t)
- (autoload 'gnus-mail-forward-using-vm "gnus-vm")
- (autoload 'gnus-mail-reply-using-vm "gnus-vm")
- (autoload 'gnus-mail-other-window-using-vm "gnus-vm" nil t)
+ (autoload 'gnus-vm-mail-setup "gnus-vm")
(autoload 'gnus-yank-article "gnus-vm" nil t)
)
(or (and (setq old-format (cdr (assq (car formats) gnus-old-specs)))
(equal old-format new-format))
(set (intern (format "gnus-%s-line-format-spec" (car formats)))
- (gnus-parse-format
- new-format
- (symbol-value
- (intern (format "gnus-%s-line-format-alist"
- (if (eq (car formats) 'article-mode)
- 'summary-mode (car formats)))))
- (not (string-match "mode$" (symbol-name (car formats)))))))
+ (if (not (stringp new-format)) new-format
+ (gnus-parse-format
+ new-format
+ (symbol-value
+ (intern (format "gnus-%s-line-format-alist"
+ (if (eq (car formats) 'article-mode)
+ 'summary-mode (car formats)))))
+ (not (string-match "mode$" (symbol-name (car formats))))))))
(setq gnus-old-specs (cons (cons (car formats) new-format)
- (delq (car formats) gnus-old-specs)))
+ (delq (assq (car formats) gnus-old-specs)
+ gnus-old-specs)))
(setq formats (cdr formats))))
(gnus-update-group-mark-positions)
perc
out)
(while (< i 3)
- (or (zerop (nth i elem))
+ (or (not (numberp (nth i elem)))
+ (zerop (nth i elem))
(progn
(setq perc (/ (* 1.0 (nth 0 elem)) total))
(setq out (cons (if (eq pbuf (nth i types))
(string-match "\\(<[^<>]+>\\) *$" references)
(substring references (match-beginning 1) (match-end 1))))
+(defun gnus-ephemeral-group-p (group)
+ "Say whether GROUP is ephemeral or not."
+ (assoc 'quit-config (gnus-find-method-for-group group)))
+
;;; List and range functions
(defun gnus-last-element (list)
(define-key gnus-group-group-map "ss" 'gnus-soup-send-replies)
(define-key gnus-group-group-map "sp" 'gnus-soup-pack-packet)
(define-key gnus-group-group-map "sr" 'nnsoup-pack-replies)
+ (define-key gnus-group-group-map "t" 'gnus-group-add-to-topic)
(define-prefix-command 'gnus-group-list-map)
(define-key gnus-group-mode-map "A" 'gnus-group-list-map)
(list (intern (substring prefix 0 (1- (length prefix)))) "")))))
(defun gnus-group-foreign-p (group)
- "Return nil if GROUP is native, non-nil if it is foreign."
- (string-match ":" group))
+ "Say whether a group is foreign or not."
+ (and (not (gnus-group-native-p group))
+ (not (gnus-group-secondary-p group))))
+
+(defun gnus-group-native-p (group)
+ "Say whether the group is native or not."
+ (not (string-match ":" group)))
+
+(defun gnus-group-secondary-p (group)
+ "Say whether the group is secondary or not."
+ (gnus-secondary-method-p (gnus-find-method-for-group group)))
(defun gnus-group-topic-p ()
"Return non-nil if the current line is a topic."
"Set the level of the next N groups to LEVEL."
(interactive
(list
- (prefix-numeric-value current-prefix-arg)
+ current-prefix-arg
(string-to-int
- (read-string (format "Level (default %s): " (gnus-group-group-level))
- (int-to-string (gnus-group-group-level))))))
+ (let ((s (read-string
+ (format "Level (default %s): " (gnus-group-group-level)))))
+ (if (string-match "^\\s-*$" s)
+ (int-to-string (gnus-group-group-level))
+ s)))))
(or (and (>= level 1) (<= level gnus-level-killed))
(error "Illegal level: %d" level))
(let ((groups (gnus-group-process-prefix n))
(interactive "P")
(gnus-group-list-groups (or arg gnus-level-unsubscribed) t))
-(defun gnus-group-list-killed ()
- "List all killed newsgroups in the group buffer."
- (interactive)
+;; Redefine this to list ALL killed groups if prefix arg used.
+;; Rewritten by engstrom@src.honeywell.com (Eric Engstrom).
+(defun gnus-group-list-killed (&optional arg)
+ "List all killed newsgroups in the group buffer.
+If ARG is non-nil, list ALL killed groups known to Gnus. This may
+entail asking the server for the groups."
+ (interactive "P")
+ ;; Find all possible killed newsgroups if arg.
+ (when arg
+ ;; First make sure active file has been read.
+ (or gnus-have-read-active-file (gnus-read-active-file))
+ (or gnus-killed-hashtb (gnus-make-hashtable-from-killed))
+ ;; Go through all newsgroups that are known to Gnus - enlarge kill list
+ (mapatoms
+ (lambda (sym)
+ (let ((groups 0)
+ (group (symbol-name sym)))
+ (if (or (null group)
+ (gnus-gethash group gnus-killed-hashtb)
+ (gnus-gethash group gnus-newsrc-hashtb))
+ ()
+ (let ((do-sub (gnus-matches-options-n group)))
+ (if (or (eq do-sub 'subscribe) (eq do-sub 'ignore))
+ ()
+ (setq groups (1+ groups))
+ (setq gnus-killed-list
+ (cons group gnus-killed-list))
+ (gnus-sethash group group gnus-killed-hashtb))))))
+ gnus-active-hashtb))
(if (not gnus-killed-list)
(gnus-message 6 "No killed groups")
(let (gnus-group-list-mode)
(defmacro gnus-data-pos (data)
(` (nth 2 (, data))))
+(defmacro gnus-data-set-pos (data pos)
+ (` (setcar (nthcdr 2 (, data)) (, pos))))
+
(defmacro gnus-data-header (data)
(` (nth 3 (, data))))
(` (= (nth 1 (, data)) gnus-unread-mark)))
(defmacro gnus-data-pseudo-p (data)
- (` (vectorp (nth 3 (, data)))))
+ (` (consp (nth 3 (, data)))))
(defmacro gnus-data-find (number)
(` (assq (, number) gnus-newsgroup-data)))
(setq gnus-newsgroup-data-reverse nil)
(gnus-data-update-list (cdr (cdr data)) offset)))
-(defun gnus-data-enter-list (after-article list offset)
+(defun gnus-data-enter-list (after-article list &optional offset)
(when list
(let ((data (and after-article (gnus-data-find-list after-article)))
(ilist list))
(progn
(setcdr list gnus-newsgroup-data)
(setq gnus-newsgroup-data ilist)
- (gnus-data-update-list (cdr list) offset))
+ (and offset (gnus-data-update-list (cdr list) offset)))
(setcdr list (cdr data))
(setcdr data ilist)
(gnus-data-update-list (cdr data) offset))
(setq gnus-newsgroup-data-reverse nil))))
-(defun gnus-data-remove (article offset)
+(defun gnus-data-remove (article &optional offset)
(let ((data gnus-newsgroup-data))
(if (= (gnus-data-number (car data)) article)
(setq gnus-newsgroup-data (cdr gnus-newsgroup-data)
(and (= (gnus-data-number (car (cdr data))) article)
(progn
(setcdr data (cdr (cdr data)))
- (gnus-data-update-list (cdr data) offset)
+ (and offset (gnus-data-update-list (cdr data) offset))
(setq data nil
gnus-newsgroup-data-reverse nil)))
(setq data (cdr data))))))
(setcar (nthcdr 2 (car data)) (+ offset (nth 2 (car data))))
(setq data (cdr data))))
+(defun gnus-data-compute-positions ()
+ "Compute all positions to all articles."
+ (let ((data gnus-newsgroup-data)
+ pos)
+ (while data
+ (and (setq pos (text-property-any
+ (point-min) (point-max)
+ 'gnus-number (gnus-data-number (car data))))
+ (gnus-data-set-pos (car data) (+ pos 3)))
+ (setq data (cdr data)))))
+
(defun gnus-summary-article-pseudo-p (article)
"Say whether this article is a pseudo article or not."
(not (vectorp (gnus-data-header (gnus-data-find article)))))
headers refs thread art data)
(if (not gnus-show-threads)
(setq thread (car (gnus-gethash (downcase id) dep)))
- ;; First go up in this thread until we find the root.
- (while (and id (setq headers
- (car (setq art (gnus-gethash (downcase id) dep)))))
- (setq thread art)
- (setq id (gnus-parent-id (mail-header-references headers))))
- ;; We now have the root, so we remove this thread from the summary
- ;; buffer.
- (gnus-remove-articles thread))
- (let ((beg (point)))
+ ;; Get the thread this article is part op.
+ (setq thread (gnus-remove-thread id)))
+ (let ((beg (point))
+ threads)
;; We then insert this thread into the summary buffer.
- (let (gnus-newsgroup-data)
+ (let (gnus-newsgroup-data gnus-newsgroup-threads)
(goto-char orig)
(gnus-summary-prepare-threads (list thread))
- (setq data (nreverse gnus-newsgroup-data)))
+ (setq data (nreverse gnus-newsgroup-data))
+ (setq threads gnus-newsgroup-threads))
;; We splice the new data into the data structure.
- (gnus-data-enter-list current data (- (point) orig))
+ (gnus-data-enter-list current data)
+ (gnus-data-compute-positions)
+ (setq gnus-newsgroup-threads (nconc threads gnus-newsgroup-threads))
;; Do highlighting and stuff.
(gnus-summary-update-lines beg (point)))))
-(defun gnus-remove-articles (thread)
- "Remove THREAD from the summary buffer.
-Returns how many articles were removed."
- (let* ((points (sort (gnus-remove-articles-1 thread) '>))
- (result (length points)))
- (while points
- (goto-char (car points))
+(defun gnus-remove-thread (id)
+ "Remove the thread that has ID in it."
+ ;; First go up in this thread until we find the root.
+ (let ((dep gnus-newsgroup-dependencies)
+ headers thread prev)
+ (while (and id (setq prev (car (gnus-gethash (downcase id) dep))))
+ (setq headers prev)
+ (setq id (gnus-parent-id (mail-header-references headers))))
+ ;; We have now found the real root of this thread. It might have
+ ;; been gathered into some loose thread, so we have to search
+ ;; through the threads to find the thread we wanted.
+ (let ((threads gnus-newsgroup-threads)
+ sub)
+ (while threads
+ (setq sub (car threads))
+ (if (stringp (car sub))
+ ;; This is a gathered threads, so we look at the roots
+ ;; below it to find whether this article in in this
+ ;; gathered root.
+ (progn
+ (setq sub (cdr sub))
+ (while sub
+ (if (equal headers (car (car sub)))
+ (setq thread (car threads)
+ threads nil
+ sub nil))
+ (setq sub (cdr sub))))
+ ;; It's an ordinary thread, so we check it.
+ (if (equal headers (car sub))
+ (setq thread sub
+ threads nil)))
+ (setq threads (cdr threads)))
+ ;; If this article is in no thread, then it's a root.
+ (if thread
+ (setq gnus-newsgroup-threads (delq thread gnus-newsgroup-threads))
+ (setq thread (cadr (gnus-gethash (downcase id) dep))))
+ (when thread
+ (prog1
+ thread ; We return this thread.
+ (if (stringp (car thread))
+ (progn
+ ;; If we use dummy roots, then we have to remove the
+ ;; dummy root as well.
+ (when (eq gnus-summary-make-false-root 'dummy)
+ ;; Uhm.
+ )
+ (setq thread (cdr thread))
+ (while thread
+ (gnus-remove-thread-1 (car thread))
+ (setq thread (cdr thread))))
+ (gnus-remove-thread-1 thread)))))))
+
+(defun gnus-remove-thread-1 (thread)
+ "Remove the thread THREAD recursively."
+ (let ((number (mail-header-number (car thread)))
+ pos)
+ (when (setq pos (text-property-any
+ (point-min) (point-max) 'gnus-number number))
+ (goto-char pos)
(gnus-delete-line)
- (setq points (cdr points)))))
-
-(defun gnus-remove-articles-1 (thread)
- (let* ((number (mail-header-number (car thread)))
- (pos (gnus-data-pos (gnus-data-find number))))
- (if pos
- (progn
- (goto-char pos)
- (gnus-data-remove number (- (progn (beginning-of-line) (point))
- (progn (forward-line 1) (point))))
- (cons pos (apply 'nconc
- (mapcar (lambda (th) (gnus-remove-articles-1 th))
- (cdr thread)))))
- (apply 'nconc (mapcar (lambda (th) (gnus-remove-articles-1 th))
- (cdr thread))))))
+ (gnus-data-remove pos))
+ (setq thread (cdr thread))
+ (while thread
+ (gnus-remove-thread-1 (car thread))
+ (setq thread (cdr thread)))))
(defun gnus-sort-threads (threads)
;; Sort threads as specified in `gnus-thread-sort-functions'.
THREADS is either a list of `(PARENT [(CHILD1 [(GRANDCHILD ...]...) ...])'
or a straight list of headers."
(message "Generating summary...")
+
+ (setq gnus-newsgroup-threads threads)
+
(let ((level 0)
thread header number subject stack state gnus-tmp-gathered mark
new-roots new-adopts thread-end)
;; article.
(when gnus-tmp-dummy-line
(gnus-summary-insert-dummy-line
- nil gnus-tmp-dummy-line header))
+ nil gnus-tmp-dummy-line (gnus-header-number header)))
;; Compute the mark.
(setq
(gnus-get-newsgroup-headers-xover articles)
(gnus-get-newsgroup-headers)))
(gnus-message 5 "Fetching headers...done")
+ ;; Set the initial limit.
+ (setq gnus-newsgroup-limit (copy-sequence articles))
;; Remove canceled articles from the list of unread articles.
(setq gnus-newsgroup-unreads
(gnus-set-sorted-intersection
gnus-newsgroup-unreads
(mapcar (lambda (headers) (mail-header-number headers))
gnus-newsgroup-headers)))
- ;; Set the initial limit.
- (setq gnus-newsgroup-limit (copy-sequence articles))
;; Adjust and set lists of article marks.
(and info
(let (marked)
(defun gnus-summary-limit-to-subject (subject)
"Limit the summary buffer to articles that have subjects that match a regexp."
(interactive "sRegexp: ")
- (if (equal "" subject)
- ()
+ (when (not (equal "" subject))
(prog1
(let ((articles (gnus-summary-find-matching "subject" subject)))
(or articles (error "Found no matches for \"%s\"" subject))
(car info) to-article
(let ((header (copy-sequence
(gnus-summary-article-header article))))
- (mail-header-set-number to-article header)
+ (mail-header-set-number header to-article)
header)
(memq article gnus-newsgroup-marked)
(memq article gnus-newsgroup-dormant)
(car info) to-article
(let ((header (copy-sequence
(gnus-summary-article-header article))))
- (mail-header-set-number to-article header)
+ (mail-header-set-number header to-article)
header)
(memq article gnus-newsgroup-marked)
(memq article gnus-newsgroup-dormant)
(gnus-set-global-variables)
(gnus-summary-catchup all quietly nil 'fast)
;; Select next newsgroup or exit.
- (if (eq gnus-auto-select-next 'quietly)
+ (if (and (eq gnus-auto-select-next 'quietly)
+ (not (gnus-ephemeral-group-p gnus-newsgroup-name)))
(gnus-summary-next-group nil)
(gnus-summary-exit)))
gnus-extract-address-components
(mail-header-from header))))
(concat (or (car extract) (cdr extract))
+ "\r" (int-to-string (mail-header-number header))
"\r" (mail-header-subject header))))
'gnus-thread-sort-by-author)
reverse))
(mail-header-from header))))
(concat
(downcase (gnus-simplify-subject (gnus-summary-article-subject) t))
+ "\r" (int-to-string (mail-header-number header))
"\r" (or (car extract) (cdr extract)))))
'gnus-thread-sort-by-subject)
reverse))
(defun gnus-summary-insert-pseudos (pslist &optional not-view)
(let ((buffer-read-only nil)
(article (gnus-summary-article-number))
- b)
+ after-article b e)
(or (gnus-summary-goto-subject article)
(error (format "No such article: %d" article)))
(gnus-summary-position-point)
(setq pslist (cdr pslist)))
(save-excursion
(while pslist
- (gnus-summary-goto-subject (or (cdr (assq 'article (car pslist)))
- (gnus-summary-article-number)))
- (beginning-of-line)
- (setq b (point))
- (put-text-property
- (point)
- (progn
- (insert " " (file-name-nondirectory
- (cdr (assq 'name (car pslist))))
- ": " (or (cdr (assq 'execute (car pslist))) "") "\n")
- (point))
- 'gnus-number gnus-reffed-article-number)
- (gnus-data-enter
- (gnus-summary-article-number)
- gnus-reffed-article-number gnus-unread-mark
- (progn (forward-line 1) (point))
- (car pslist) 0 (- (point) b))
- (forward-line -1)
+ (setq after-article (or (cdr (assq 'article (car pslist)))
+ (gnus-summary-article-number)))
+ (gnus-summary-goto-subject after-article)
+ (forward-line 1)
+ (setq b (point))
+ (insert " " (file-name-nondirectory
+ (cdr (assq 'name (car pslist))))
+ ": " (or (cdr (assq 'execute (car pslist))) "") "\n")
+ (setq e (point))
+ (forward-line -1) ; back to `b'
+ (put-text-property b e 'gnus-number gnus-reffed-article-number)
+ (gnus-data-enter after-article
+ gnus-reffed-article-number
+ gnus-unread-mark
+ b
+ (car pslist)
+ 0
+ (- e b))
(setq gnus-newsgroup-unreads
(cons gnus-reffed-article-number gnus-newsgroup-unreads))
(setq gnus-reffed-article-number (1- gnus-reffed-article-number))
(interactive)
(save-excursion
(set-buffer gnus-article-buffer)
- (let (buffer-read-only)
+ (let (buffer-read-only beg end)
+ (widen)
(goto-char (point-min))
;; Hide the "header".
(and (search-forward "\n-----BEGIN PGP SIGNED MESSAGE-----\n" nil t)
(add-text-properties (match-beginning 0) (match-end 0)
gnus-hidden-properties))
+ (setq beg (point))
;; Hide the actual signature.
(and (search-forward "\n-----BEGIN PGP SIGNATURE-----\n" nil t)
+ (setq end (match-beginning 0))
(add-text-properties
(match-beginning 0)
(if (search-forward "\n-----END PGP SIGNATURE-----\n" nil t)
;; Perhaps we shouldn't hide to the end of the buffer
;; if there is no end to the signature?
(point-max))
- gnus-hidden-properties)))))
-
+ gnus-hidden-properties))
+ (when (and beg end)
+ (narrow-to-region beg end)
+ (goto-char (point-min))
+ (while (re-search-forward "^- " nil t)
+ (replace-match "" t t))
+ (widen)))))
(defvar gnus-article-time-units
(list (cons 'year (* 365.25 24 60 60))
(beginning-of-line)
(setq b (point))
;; Insert the text.
- (eval sformat)
+ (insert (eval sformat))
(add-text-properties b (1+ b) (list 'gnus-server (intern name)))))
(defun gnus-server-setup-buffer ()
(while opened
(or (member (car (car opened)) done)
(gnus-server-insert-server-line
- nil (concat (car (car (car opened)))
- (nth 1 (car (car opened)))) (car (car opened))))
+ nil (format "%s:%s" (car (car (car opened)))
+ (nth 1 (car (car opened))))
+ (car (car opened))))
(setq opened (cdr opened))))
(goto-char (point-min))
(gnus-server-position-point))
(while (and (cdr alist)
(not (string= server (car (car (cdr alist))))))
(setq alist (cdr alist)))
- (setcdr alist (cons killed (cdr alist)))))
+ (setcdr alist (cons killed (cdr alist)))
+ (if alist
+ (setcdr alist (cons killed (cdr alist)))
+ (setq gnus-server-alist (list killed)))))
(gnus-server-update-server (car killed))
(setq gnus-server-killed-servers (cdr gnus-server-killed-servers))
(gnus-server-position-point)))
(search-forward "+")
(forward-char -1)
(insert "\\")))
+ ;; Translate ".all" to "[./].*";
+ (while (search-forward ".all" nil t)
+ (replace-match "[./].*" t t))
+ (goto-char (point-min))
;; Translate "all" to ".*".
(while (search-forward "all" nil t)
(replace-match ".*" t t))
* Customization:: Tailoring Gnus to your needs.
* Troubleshooting:: What you might try if things do not work.
* The End:: Farewell and goodbye.
-* Appendix:: Technical stuff for technical people.
+* Appendices:: Technical stuff, Emacs intro, FAQ
* Index:: Variable, function and concept index.
* Key Index:: Key Index.
@end menu
you could set @code{gnus-check-new-newsgroups} to @code{nil}. This will
also save you some time at startup. Even if this variable is
@code{nil}, you can always subscribe to the new groups just by pressing
-@kbd{U} in the group buffer (@pxref{Group Maintenance}).
+@kbd{U} in the group buffer (@pxref{Group Maintenance}). This variable
+is @code{t} by default.
Gnus normally determines whether a group is new or not by comparing the
list of groups from the active file(s) with the lists of subscribed and
@vindex gnus-use-dribble-file
If @code{gnus-use-dribble-file} is @code{nil}, Gnus won't create and
-maintain a dribble buffer.
+maintain a dribble buffer. The default is @code{t}.
@vindex gnus-dribble-directory
Gnus will put the dribble file(s) in @code{gnus-dribble-directory}. If
@vindex gnus-read-active-file
The active file can be rather Huge, so if you have a slow network, you
can set @code{gnus-read-active-file} to @code{nil} to prevent Gnus from
-reading the active file.
+reading the active file. This variable is @code{t} by default.
Gnus will try to make do by just getting information on the groups
that you actually subscribe to.
lines of a @code{format} specification, which is pretty much the same as
a @code{printf} specifications, for those of you who use (feh!) C.
+(All these format variables can also be random elisp forms. In that
+case, they will be @code{eval}ed to insert the required lines.)
+
In addition to the normal "padding" specs that @code{format} supports
(eg. @samp{%7d}), specifications like @samp{%7,12s} are allowed. A spec
of this type means that the field will be at least 7 characters long,
@vindex gnus-group-goto-unread
If @code{gnus-group-goto-unread} is @code{nil}, all the movement
commands will move to the next group, not the next unread group. Even
-the commands that say they move to the next unread group.
+the commands that say they move to the next unread group. The default
+is @code{t}.
@node Selecting a Group
@section Selecting a Group
@vindex gnus-large-newsgroup
The @code{gnus-large-newsgroup} variable says what Gnus should consider
-to be a big group. If the group has more unread articles than this,
-Gnus will query the user before entering the group. The user can then
-specify how many articles should be fetched from the server. If the
-user specifies a negative number (@samp{-n}), the @samp{n} oldest
-articles will be fetched. If it is positive, the @samp{n} articles that
-have arrived most recently will be fetched.
+to be a big group. This is 200 by default. If the group has more
+unread articles than this, Gnus will query the user before entering the
+group. The user can then specify how many articles should be fetched
+from the server. If the user specifies a negative number (@samp{-n}),
+the @samp{n} oldest articles will be fetched. If it is positive, the
+@samp{n} articles that have arrived most recently will be fetched.
@vindex gnus-select-group-hook
@vindex gnus-auto-select-first
@vindex gnus-level-unsubscribed
@vindex gnus-level-subscribed
Gnus considers groups on between levels 1 and
-@code{gnus-level-subscribed} (inclusive) to be subscribed,
+@code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
@code{gnus-level-subscribed} (exclusive) and
-@code{gnus-level-unsubscribed} (inclusive) to be unsubscribed,
-@code{gnus-level-zombie} to be zombies (walking dead) and
-@code{gnus-level-killed} to be killed, completely dead. Gnus treats
-subscribed and unsubscribed groups exactly the same, but zombie and
-killed groups have no information on what articles you have read, etc,
-stored. This distinction between dead and living groups isn't done
-because it is nice or clever, it is done purely for reasons of
-efficiency.
+@code{gnus-level-unsubscribed} (inclusive) (default 7) to be
+unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
+(default 8) and @code{gnus-level-killed} to be killed (default 9),
+completely dead. Gnus treats subscribed and unsubscribed groups exactly
+the same, but zombie and killed groups have no information on what
+articles you have read, etc, stored. This distinction between dead and
+living groups isn't done because it is nice or clever, it is done purely
+for reasons of efficiency.
It is recommended that you keep all your mail groups (if any) on quite
low levels (eg. 1 or 2).
@vindex gnus-level-default-unsubscribed
@vindex gnus-level-default-subscribed
Two closely related variables are @code{gnus-level-default-subscribed}
-and @code{gnus-level-default-unsubscribed}, which are the levels that new
-groups will be put on if they are (un)subscribed. These two variables
-should, of course, be inside the relevant legal ranges.
+(default 3) and @code{gnus-level-default-unsubscribed} (default 6),
+which are the levels that new groups will be put on if they are
+(un)subscribed. These two variables should, of course, be inside the
+relevant legal ranges.
@vindex gnus-keep-same-level
If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
If the @code{gnus-activate-foreign-newsgroups} is a positive number,
Gnus will check all foreign groups with this level or lower at startup.
This might take quite a while, especially if you subscribe to lots of
-groups from different @sc{nntp} servers. It is @code{nil} by default,
-which means that you won't be told whether there are new articles in
-these groups. How many unread articles there are will be determined
-when, or if, you decide to enter them. You can also activate any group
-with @kbd{M-g} to see how many unread articles there are.
+groups from different @sc{nntp} servers.
@node nntp
@subsection nntp
@item A k
@kindex A k (Group)
@findex gnus-group-list-killed
-List all killed groups (@code{gnus-group-list-killed}).
+List all killed groups (@code{gnus-group-list-killed}). If given a
+prefix argument, really list all groups that are available, but aren't
+currently (un)subscribed. This could entail reading the active file
+from the server.
@item A z
@kindex A z (Group)
("The Rest" "." nil))
@end lisp
+If you want to add a group to a topic, you can use the @kbd{G t}
+(@code{gnus-group-add-to-topic}) command. It understands the
+process/prefix convention (@pxref{Process/Prefix}).
+
@node Misc Group Stuff
@section Misc Group Stuff
variable as a function for getting the name and address parts of a
@code{From} header. Two pre-defined function exist:
@code{gnus-extract-address-components}, which is the default, quite
-fast, and too simplistic solution, and
+fast, and too simplistic solution; and
@code{mail-extract-address-components}, which works very nicely, but is
slower.
@vindex gnus-summary-same-subject
@code{gnus-summary-same-subject} is a string indicating that the current
article has the same subject as the previous. This string will be used
-with those specs that require it.
+with those specs that require it. The default is @samp{""}.
@node Summary Buffer Lines
@subsection Summary Buffer Lines
@item D
@code{Date}.
@item M
-@code{Message-Id}.
+@code{Message-ID}.
@item r
@code{References}.
@item t
In article <zngay8jrql@@eyesore.no> Lars Mars <lars@@eyesore.no> writes:
@end example
-Having the @code{Message-Id} in this line is probably overkill, so I
+Having the @code{Message-ID} in this line is probably overkill, so I
would suggest this hook instead:
@lisp
@code{gnus-local-domain} are @code{nil}, Gnus will use
@code{user-mail-address} as the address part of the @code{From} header.
+@item gnus-local-domain
+@vindex gnus-local-domain
+@cindex domain
+The local doman name excluding the host name. If your host is called
+@samp{"narfi.ifi.uio.no"}, then this variable should be
+@samp{"ifi.uio.no"}.
+
@item gnus-user-from-line
@vindex gnus-user-from-line
Your full, complete e-mail address with name. This variable overrides
The @code{gnus-summary-goto-unread} variable controls what action should
be taken after setting a mark. If non-@code{nil}, point will move to
the next/previous unread article. If @code{nil}, point will just move
-one line up or down.
+one line up or down. The default is @code{t}.
@node Setting Process Marks
parent will adopt all the other articles. The adopted articles will be
marked as such by pointy brackets (@samp{<>}) instead of the standard
square brackets (@samp{[]}). This is the default method.
+
@item dummy
Gnus will create a dummy summary line that will pretend to be the
parent. This dummy line does not correspond to any real article, so
selecting it will just select the first real article after the dummy
article.
+
@item empty
Gnus won't actually make any article the parent, but simply leave the
subject field of all orphans except the first empty. (Actually, it will
use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
Buffer Format}).)
+
@item none
Don't make any article parent at all. Just gather the threads and
display them after one another.
+
@item nil
Don't gather loose threads.
@end table
The data on the current group will be updated (which articles you have
read, which articles you have replied to, etc.) when you exit the
summary buffer. If the @code{gnus-use-cross-reference} variable is
-@code{t}, articles that are cross-referenced to this group and are
-marked as read, will also be marked as read in the other subscribed
-groups they were cross-posted to. If this variable is neither
-@code{nil} nor @code{t}, the article will be marked as read in both
-subscribed and unsubscribed groups.
+@code{t} (which is the default), articles that are cross-referenced to
+this group and are marked as read, will also be marked as read in the
+other subscribed groups they were cross-posted to. If this variable is
+neither @code{nil} nor @code{t}, the article will be marked as read in
+both subscribed and unsubscribed groups.
Marking cross-posted articles as read ensures that you'll never have to
read the same article more than once. Unless, of course, somebody has
All of these functions, except for the last one, will save the article
in the @code{gnus-article-save-directory}, which is initialized from the
-@samp{SAVEDIR} environment variable.
+@samp{SAVEDIR} environment variable. This is @file{~/News/} by
+default.
As you can see above, the functions use different functions to find a
suitable name of a file to save the article in. Below is a list of
Generates file names that look like @samp{~/News/alt.andrea-dworkin}.
@end table
+@vindex gnus-split-methods
+You can have Gnus suggest where to save articles by plonking regexp into
+the @code{gnus-split-methods} alist. The syntax of this variable is the
+same as @code{nnmail-split-methods}. For instance, if you would like to
+save articles related to Gnus in the file @file{gnus-stuff}, and articles
+related to VM in @code{vm-stuff}, you could set this variable to something
+like:
+
+@lisp
+(("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
+ ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff"))
+@end lisp
+
@vindex gnus-use-long-file-name
Finally, you have the @code{gnus-use-long-file-name} variable. If it is
@code{nil}, all the preceding functions will replace all periods
the functions will generate hierarchies of directories instead of having
all the files in the toplevel directory
(@samp{~/News/alt/andrea-dworkin} instead of
-@samp{~/News/alt.andrea-dworkin}.)
+@samp{~/News/alt.andrea-dworkin}.) This variable is @code{t} by default
+on most systems. However, for historical reasons, this is @code{nil} on
+Xenix and usg-unix-v machines by default.
This function also affects kill and score file names. If this variable
is a list, and the list contains the element @code{not-score}, long file
You can also ask the @sc{nntp} server for an arbitrary article, no
matter what group it belongs to. @kbd{M-^}
(@code{gnus-summary-refer-article}) will ask you for a
-@code{Message-Id}, which is one of those long thingies that look
+@code{Message-ID}, which is one of those long thingies that look
something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}. You have to get
it all exactly right. No fuzzy searches, I'm afraid.
@vindex gnus-refer-article-method
If the group you are reading is located on a backend that does not
-support fetching by @code{Message-Id} very well (like @code{nnspool}),
+support fetching by @code{Message-ID} very well (like @code{nnspool}),
you can set @code{gnus-refer-article-method} to an @sc{nntp} method. It
would, perhaps, be best if the @sc{nntp} server you consult is the same
as the one that keeps the spool you are reading from updated, but that's
who wrote the article, the date it was written and the subject of the
article. That's well and nice, but there's also lots of information
most people do not want to see---what systems the article has passed
-through before reaching you, the @code{Message-Id}, the
+through before reaching you, the @code{Message-ID}, the
@code{References}, etc. ad nauseum---and you'll probably want to get rid
of some of those lines. If you want to keep all those lines in the
article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
@item C-c ^
@kindex C-c ^ (Article)
@findex gnus-article-refer-article
-If point is in the neighborhood of a @code{Message-Id} and you press
+If point is in the neighborhood of a @code{Message-ID} and you press
@kbd{r}, Gnus will try to get that article from the server
(@code{gnus-article-refer-article}).
@item C-c C-m
@end table
-
-
-
@node Scoring
@chapter Scoring
@cindex scoring
attention!
@vindex gnus-summary-mark-below
-All articles have a default score (@code{gnus-summary-default-score}).
-This score may be raised or lowered either interactively or by score
-files. Articles that have a score lower than
+All articles have a default score (@code{gnus-summary-default-score}),
+which is 0 by default. This score may be raised or lowered either
+interactively or by score files. Articles that have a score lower than
@code{gnus-summary-mark-below} are marked as read.
Gnus will read any @dfn{score files} that apply to the current group
@item gnus-use-scoring
@vindex gnus-use-scoring
If @code{nil}, Gnus will not check for score files, and will not, in
-general, do any score-related work.
+general, do any score-related work. This is @code{t} by default.
@item gnus-kill-killed
@vindex gnus-kill-killed
may save you lots of time, it also means that if you apply a kill file
to a group, and then change the kill file and want to run it over you
group again to kill more articles, it won't work. You have to set this
-variable to @code{t} to do that.
+variable to @code{t} to do that. (It is @code{t} by default.)
@item gnus-kill-files-directory
@vindex gnus-kill-files-directory
All kill and score files will be stored in this directory, which is
initialized from the @samp{SAVEDIR} environment variable by default.
+This is @file{~/News/} by default.
@item gnus-score-file-suffix
@vindex gnus-score-file-suffix
variable is @samp{"ADAPT$"} by default, so no adaptive score files will
be cached.
+@item gnus-save-score
+@vindex gnus-save-score
+If you have really complicated score files, and do lots of batch
+scoring, then you might set this variable to @code{t}. This will make
+Gnus save the scores into the @file{.newsrc.eld} file.
+
@item gnus-score-interactive-default-score
@vindex gnus-score-interactive-default-score
Score used by all the interactive raise/lower commands to raise/lower
@item gnus-score-find-bnews
@findex gnus-score-find-bnews
-Apply all score files that match, using bnews syntax. For instance, if
-the current group is @samp{gnu.emacs.gnus}, @samp{all.emacs.all.SCORE},
-@samp{not.alt.all.SCORE} and @samp{gnu.all.SCORE} would all apply. In
-short, the instances of @samp{all} in the score file names are
-translated into @samp{.*}, and then a regexp match is done.
+Apply all score files that match, using bnews syntax. This is the
+default. For instance, if the current group is @samp{gnu.emacs.gnus},
+@samp{all.emacs.all.SCORE}, @samp{not.alt.all.SCORE} and
+@samp{gnu.all.SCORE} would all apply. In short, the instances of
+@samp{all} in the score file names are translated into @samp{.*}, and
+then a regexp match is done.
If @code{gnus-use-long-file-name} is non-@code{nil}, this won't work
very will. It will find stuff like @file{gnu/all/SCORE}, but will not
element}. This number should be an integer in the neginf to posinf
interval. This number is added to the score of the article if the match
is successful. If this element is not present, the
-@code{gnus-score-interactive-default-score} number will be used instead.
+@code{gnus-score-interactive-default-score} number will be used
+instead. This is 1000 by default.
@item
If the third element is present, it should be a number---the @dfn{date
element}. This date says when the last time this score entry matched,
@vindex gnus-adaptive-file-suffix
The adaptive score entries will be put into a file where the name is the
-group name with @code{gnus-adaptive-file-suffix} appended.
+group name with @code{gnus-adaptive-file-suffix} appended. The default
+is @samp{ADAPT}.
@vindex gnus-score-exact-adapt-limit
When doing adaptive scoring, substring or fuzzy matching would probably
@item
Articles that are heavily crossposted are probably junk.
@item
-To lower a single inappropriate article, lower by @code{Message-Id}.
+To lower a single inappropriate article, lower by @code{Message-ID}.
@item
Particularly brilliant authors can be raised on a permanent basis.
@item
If this variable is non-@code{nil}, you are either a newcomer to the
World of Usenet, or you are very cautious, which is a nice thing to be,
really. You will be given questions of the type "Are you sure you want
-to do this?" before doing anything dangerous.
+to do this?" before doing anything dangerous. This is @code{t} by
+default.
+
@item gnus-expert-user
@vindex gnus-expert-user
If this variable is non-@code{nil}, you will never ever be asked any
questions by Gnus. It will simply assume you know what your are doing,
no matter how strange.
+
@item gnus-interactive-catchup
@vindex gnus-interactive-catchup
-Require confirmation before catching up a group if non-@code{nil}.
+Require confirmation before catching up a group if non-@code{nil}. It
+is @code{t} by default.
+
@item gnus-interactive-post
@vindex gnus-interactive-post
If non-@code{nil}, the user will be prompted for a group name when
-posting an article.
+posting an article. It is @code{t} by default.
+
@item gnus-interactive-exit
@vindex gnus-interactive-exit
-Require confirmation before exiting Gnus.
+Require confirmation before exiting Gnus. This variable is @code{t} by
+default.
@end table
+
@node Windows Configuration
@section Windows Configuration
@cindex windows configuration
seconds. This is @samp{60} by default. If you change that variable,
all the timings in the handlers will be affected.)
+@vindex gnus-use-demon
+To set the whole thing in motion, though, you have to set
+@code{gnus-use-demon} to @code{t}.
+
So, if you want to add a handler, you could put something like this in
your @file{.gnus} file:
@vindex gnus-verbose
This variable is an integer between zero and ten. The higher the value,
the more messages will be displayed. If this variable is zero, Gnus
-will never flash any messages, if it is seven, most important messages
-will be shown, and if it is ten, Gnus won't ever shut up, but will flash
-so many messages it will make your head swim.
+will never flash any messages, if it is seven (which is the default),
+most important messages will be shown, and if it is ten, Gnus won't ever
+shut up, but will flash so many messages it will make your head swim.
+
@item gnus-updated-mode-lines
@vindex gnus-updated-mode-lines
This is a list of buffers that should keep their mode lines updated.
@item gnus-save-newsrc-file
If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
only save @file{.newsrc.eld}. This means that you will not be able to
-use any other newsreaders than Gnus.
+use any other newsreaders than Gnus. This variable is @code{t} by
+default.
+
@item gnus-save-killed-list
If this is @code{nil}, Gnus will not save the list of dead groups. You
should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
-variable to @code{nil}.
+variable to @code{nil}. This variable is @code{t} by default.
+
@end table
+
@node Slow Machine
@section Slow Machine
but at the common table.@*
@end quotation
-@node Appendix
-@chapter A Programmer's Guide to Gnus
+@node Appendices
+@chapter Appendices
+
+@menu
+* A Programmer's Guide to Gnus:: Rilly, rilly technical stuff.
+* Emacs for Heathens:: A short intruduction to Emacsian terms.
+* Frequently Asked Questions:: A question-and-answer session.
+@end menu
+
+
+@node A Programmer's Guide to Gnus
+@section A Programmer's Guide to Gnus
It is my hope that other people will figure out smart stuff that Gnus
can do, and that other people will write those smart things as well. To
@node Backend Interface
-@section Backend Interface
+@subsection Backend Interface
Gnus doesn't know anything about @sc{nntp}, spools, mail or virtual
groups. It only knows how to talk to @dfn{virtual servers}. A virtual
@node Required Backend Functions
-@subsection Required Backend Functions
+@subsubsection Required Backend Functions
@table @code
This might later be expanded to @code{various}, which will be a mixture
of HEADs and NOV lines, but this is currently not supported by Gnus.
-If @var{fetch-old} is non-@code{nil} it says to try to fetch "extra"
+If @var{fetch-old} is non-@code{nil} it says to try to fetch "extra
headers, in some meaning of the word. This is generally done by
fetching (at most) @var{fetch-old} extra headers less than the smallest
article number in @code{articles}, and fill in the gaps as well. The
@end table
@node Optional Backend Functions
-@subsection Optional Backend Functions
+@subsubsection Optional Backend Functions
@table @code
@node Score File Syntax
-@section Score File Syntax
+@subsection Score File Syntax
Score files are meant to be easily parsable, but yet extremely
mallable. It was decided that something that had the same read syntax
manual.
@node Headers
-@section Headers
+@subsection Headers
Gnus uses internally a format for storing article headers that
corresponds to the @sc{nov} format in a mysterious fashion. One could
be put in there.
@node Ranges
-@section Ranges
+@subsection Ranges
@sc{gnus} introduced a concept that I found so useful that I've started
using it a lot and have elaborated on it greatly.
@node Group Info
-@section Group Info
+@subsection Group Info
Gnus stores all permanent info on groups in a @dfn{group info} list.
This list is from three to six elements (or more) long and exhaustively
in pseudo-BNF.
+@node Emacs for Heathens
+@section Emacs for Heathens
+
+Believe it or not, but some people who use Gnus haven't really used
+Emacs much before they embarked on their journey on the Gnus Love Boat.
+If you are one of those unfortunates whom "@kbd{M-C-a}", "kill the
+region", and "set @code{gnus-flargblossen} to an alist where the key is
+a regexp that is used for matching on the group name" are magical
+phrases with little or no meaning, then this appendix is for you. If
+you are already familiar with Emacs, just ignore this and go fondle your
+cat instead.
+
+@menu
+* Keystrokes:: Entering text and executing commands.
+* Emacs Lisp:: The built-in Emacs programming language.
+@end menu
+
+
+@node Keystrokes
+@subsection Keystrokes
+
+@itemize @bullet
+@item
+Q: What is an experienced Emacs user?
+@item
+A: A person who wishes that the terminal had pedals.
+@end itemize
+
+Yes, when you use Emacs, you are apt to use the control key, the shift
+key and the meta key a lot. This is very annoying to some people
+(notably @code{vi}le users), and the rest of us just love the hell out
+of it. Just give up and submit. Emacs really does stand for
+"Escape-Meta-Alt-Control-Shift", and not "Editin Macros", as you may
+have heard from other disreputable sources (like the Emacs author).
+
+The shift key is normally located near your pinky fingers, and are
+normally used to get capital letters and stuff. You probably use it all
+the time. The control key is normally marked "CTRL" or something like
+that. The meta key is, funnily enough, never marked as such on any
+keyboards. The one I'm curretly at has a key that's marked "Alt", which
+is the meta key on this keyboard. It's usually located somewhere to the
+left hand side of the keyboard, usually on the bottom row.
+
+Now, us Emacs people doesn't say "press the meta-control-m key", because
+that's just too inconvenient. We say "press the @kbd{M-C-m} key".
+@kbd{M-} is the prefix that means "meta" and "C-" is the prefix that
+means "control". So "press @kbd{C-k}" means "press down the control
+key, and hold it down while you press @kbd{k}". "Press @kbd{M-C-k}"
+means "press down and hold down the meta key and the control key and
+then press @kbd{k}". Simple, ay?
+
+This is somewhat complicated by the fact that not all keyboards have a
+meta key. In that case you can use the "escape" key. Then @kbd{M-k}
+means "press escape, release escape, press @kbd{k}". That's much more
+work than if you have a meta key, so if that's the case, I respectfully
+suggest you get a real keyboard with a meta key. You can't live without
+it.
+
+
+
+@node Emacs Lisp
+@section Emacs Lisp
+
+Emacs is the King of Editors because it's really a Lisp interpreter.
+Each and every key you tap runs some Emacs Lisp code snippet, and since
+Emacs Lisp is an interpreted language, that means that you can configure
+any key to run any random code. You just, like, do it.
+
+Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
+functions. (These are byte-compiled for speed, but it's still
+interpreted.) If you decide that you don't like the way Gnus does
+certain things, it's trivial to have it do something a different way.
+(Well, at least if you know how to write Lisp code.) However, that's
+beyond the scope of this manual, so we are simply going to talk about
+some common constructs that you normally use in your @file{.emacs} file
+to customize Gnus.
+
+If you want to set the variable @code{gnus-florgbnize} to four (4), you
+write the following:
+
+@lisp
+(setq gnus-florgbnize 4)
+@end lisp
+
+This function (really "special form") @code{setq} is the one that can
+set a variable to some value. This is really all you need to know. Now
+you can go and fill your @code{.emacs} file with lots of these to change
+how Gnus works.
+
+If you have put that thing in your @code{.emacs} file, it will be read
+and @code{eval}ed (which is lispese for "run") the next time you start
+Emacs. If you want to change the variable right away, simply say
+@kbd{C-x C-e} after the closing parenthesis. That will @code{eval} the
+previous "form", which here is a simple @code{setq} statement.
+
+Go ahead---just try it, if you're located at your Emacs. After you
+@kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
+is the return value of the form you @code{eval}ed.
+
+Some pitfalls:
+
+If the manual says "set @code{gnus-read-active-file} to @code{some}",
+that means:
+
+@lisp
+(setq gnus-read-active-file 'some)
+@end lisp
+
+On the other hand, if the manual says "set @code{gnus-nntp-server} to
+@samp{"nntp.ifi.uio.no"}", that means:
+
+@lisp
+(setq gnus-nntp-server "nntp.ifi.uio.no")
+@end lisp
+
+So be careful not to mix up strings (the latter) with symbols (the
+former). The manual is unambiguous, but it can be confusing.
+
+
+
+@node Frequently Asked Questions
+@section Frequently Asked Questions
+
+
@node Index
@chapter Index
@printindex cp