1 ;;; gnus.el --- a newsreader for GNU Emacs
3 ;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996, 1997,
4 ;; 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
6 ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
7 ;; Lars Magne Ingebrigtsen <larsi@gnus.org>
8 ;; Keywords: news, mail
10 ;; This file is part of GNU Emacs.
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 2, or (at your option)
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 ;; Boston, MA 02111-1307, USA.
31 (eval '(run-hooks 'gnus-load-hook))
33 (eval-when-compile (require 'cl))
38 ;; Make sure it was the right mm-util.
39 (unless (fboundp 'mm-guess-mime-charset)
40 (error "Wrong `mm-util' found in `load-path'. Make sure the Gnus one is found first."))
43 "The coffee-brewing, all singing, all dancing, kitchen sink newsreader."
47 (defgroup gnus-format nil
48 "Dealing with formatting issues."
52 (defgroup gnus-charset nil
53 "Group character set issues."
54 :link '(custom-manual "(gnus)Charsets")
58 (defgroup gnus-cache nil
62 (defgroup gnus-start nil
63 "Starting your favorite newsreader."
66 (defgroup gnus-start-server nil
67 "Server options at startup."
70 ;; These belong to gnus-group.el.
71 (defgroup gnus-group nil
73 :link '(custom-manual "(gnus)The Group Buffer")
76 (defgroup gnus-group-foreign nil
78 :link '(custom-manual "(gnus)Foreign Groups")
81 (defgroup gnus-group-new nil
82 "Automatic subscription of new groups."
85 (defgroup gnus-group-levels nil
87 :link '(custom-manual "(gnus)Group Levels")
90 (defgroup gnus-group-select nil
92 :link '(custom-manual "(gnus)Selecting a Group")
95 (defgroup gnus-group-listing nil
96 "Showing slices of the group list."
97 :link '(custom-manual "(gnus)Listing Groups")
100 (defgroup gnus-group-visual nil
101 "Sorting the group buffer."
102 :link '(custom-manual "(gnus)Group Buffer Format")
106 (defgroup gnus-group-various nil
107 "Various group options."
108 :link '(custom-manual "(gnus)Scanning New Messages")
111 ;; These belong to gnus-sum.el.
112 (defgroup gnus-summary nil
114 :link '(custom-manual "(gnus)The Summary Buffer")
117 (defgroup gnus-summary-exit nil
118 "Leaving summary buffers."
119 :link '(custom-manual "(gnus)Exiting the Summary Buffer")
120 :group 'gnus-summary)
122 (defgroup gnus-summary-marks nil
123 "Marks used in summary buffers."
124 :link '(custom-manual "(gnus)Marking Articles")
125 :group 'gnus-summary)
127 (defgroup gnus-thread nil
128 "Ordering articles according to replies."
129 :link '(custom-manual "(gnus)Threading")
130 :group 'gnus-summary)
132 (defgroup gnus-summary-format nil
133 "Formatting of the summary buffer."
134 :link '(custom-manual "(gnus)Summary Buffer Format")
135 :group 'gnus-summary)
137 (defgroup gnus-summary-choose nil
139 :link '(custom-manual "(gnus)Choosing Articles")
140 :group 'gnus-summary)
142 (defgroup gnus-summary-maneuvering nil
143 "Summary movement commands."
144 :link '(custom-manual "(gnus)Summary Maneuvering")
145 :group 'gnus-summary)
147 (defgroup gnus-picon nil
148 "Show pictures of people, domains, and newsgroups."
151 (defgroup gnus-summary-mail nil
152 "Mail group commands."
153 :link '(custom-manual "(gnus)Mail Group Commands")
154 :group 'gnus-summary)
156 (defgroup gnus-summary-sort nil
157 "Sorting the summary buffer."
158 :link '(custom-manual "(gnus)Sorting")
159 :group 'gnus-summary)
161 (defgroup gnus-summary-visual nil
162 "Highlighting and menus in the summary buffer."
163 :link '(custom-manual "(gnus)Summary Highlighting")
165 :group 'gnus-summary)
167 (defgroup gnus-summary-various nil
168 "Various summary buffer options."
169 :link '(custom-manual "(gnus)Various Summary Stuff")
170 :group 'gnus-summary)
172 (defgroup gnus-summary-pick nil
173 "Pick mode in the summary buffer."
174 :link '(custom-manual "(gnus)Pick and Read")
176 :group 'gnus-summary)
178 (defgroup gnus-summary-tree nil
179 "Tree display of threads in the summary buffer."
180 :link '(custom-manual "(gnus)Tree Display")
182 :group 'gnus-summary)
184 ;; Belongs to gnus-uu.el
185 (defgroup gnus-extract-view nil
186 "Viewing extracted files."
187 :link '(custom-manual "(gnus)Viewing Files")
188 :group 'gnus-extract)
190 ;; Belongs to gnus-score.el
191 (defgroup gnus-score nil
192 "Score and kill file handling."
195 (defgroup gnus-score-kill nil
199 (defgroup gnus-score-adapt nil
200 "Adaptive score files."
203 (defgroup gnus-score-default nil
204 "Default values for score files."
207 (defgroup gnus-score-expire nil
208 "Expiring score rules."
211 (defgroup gnus-score-decay nil
212 "Decaying score rules."
215 (defgroup gnus-score-files nil
216 "Score and kill file names."
220 (defgroup gnus-score-various nil
221 "Various scoring and killing options."
225 (defgroup gnus-visual nil
226 "Options controlling the visual fluff."
230 (defgroup gnus-agent nil
231 "Offline support for Gnus."
234 (defgroup gnus-files nil
235 "Files used by Gnus."
238 (defgroup gnus-dribble-file nil
240 :link '(custom-manual "(gnus)Auto Save")
243 (defgroup gnus-newsrc nil
244 "Storing Gnus state."
247 (defgroup gnus-server nil
248 "Options related to newsservers and other servers used by Gnus."
251 (defgroup gnus-server-visual nil
252 "Highlighting and menus in the server buffer."
256 (defgroup gnus-message '((message custom-group))
257 "Composing replies and followups in Gnus."
260 (defgroup gnus-meta nil
261 "Meta variables controlling major portions of Gnus.
262 In general, modifying these variables does not take affect until Gnus
263 is restarted, and sometimes reloaded."
266 (defgroup gnus-various nil
267 "Other Gnus options."
268 :link '(custom-manual "(gnus)Various Various")
271 (defgroup gnus-mime nil
272 "Variables for controlling the Gnus MIME interface."
275 (defgroup gnus-exit nil
277 :link '(custom-manual "(gnus)Exiting Gnus")
280 (defgroup gnus-fun nil
281 "Frivolous Gnus extensions."
282 :link '(custom-manual "(gnus)Exiting Gnus")
285 (defconst gnus-version-number "0.08"
286 "Version number for this version of Gnus.")
288 (defconst gnus-version (format "Oort Gnus v%s" gnus-version-number)
289 "Version string for this version of Gnus.")
291 (defcustom gnus-inhibit-startup-message nil
292 "If non-nil, the startup message will not be displayed.
293 This variable is used before `.gnus.el' is loaded, so it should
294 be set in `.emacs' instead."
298 (defcustom gnus-play-startup-jingle nil
299 "If non-nil, play the Gnus jingle at startup."
303 (unless (fboundp 'gnus-group-remove-excess-properties)
304 (defalias 'gnus-group-remove-excess-properties 'ignore))
306 (unless (fboundp 'gnus-set-text-properties)
307 (defalias 'gnus-set-text-properties 'set-text-properties))
309 (unless (featurep 'gnus-xmas)
310 (defalias 'gnus-make-overlay 'make-overlay)
311 (defalias 'gnus-delete-overlay 'delete-overlay)
312 (defalias 'gnus-overlay-put 'overlay-put)
313 (defalias 'gnus-move-overlay 'move-overlay)
314 (defalias 'gnus-overlay-buffer 'overlay-buffer)
315 (defalias 'gnus-overlay-start 'overlay-start)
316 (defalias 'gnus-overlay-end 'overlay-end)
317 (defalias 'gnus-extent-detached-p 'ignore)
318 (defalias 'gnus-extent-start-open 'ignore)
319 (defalias 'gnus-appt-select-lowest-window 'appt-select-lowest-window)
320 (defalias 'gnus-mail-strip-quoted-names 'mail-strip-quoted-names)
321 (defalias 'gnus-character-to-event 'identity)
322 (defalias 'gnus-add-text-properties 'add-text-properties)
323 (defalias 'gnus-put-text-property 'put-text-property)
324 (defvar gnus-mode-line-image-cache t)
325 (if (fboundp 'find-image)
326 (defun gnus-mode-line-buffer-identification (line)
327 (let ((str (car-safe line)))
328 (if (and (stringp str)
329 (string-match "^Gnus:" str))
330 (progn (add-text-properties
333 (if (eq t gnus-mode-line-image-cache)
334 (setq gnus-mode-line-image-cache
336 '((:type xpm :file "gnus-pointer.xpm"
338 (:type xbm :file "gnus-pointer.xbm"
340 gnus-mode-line-image-cache)
341 'help-echo "This is Gnus")
345 (defalias 'gnus-mode-line-buffer-identification 'identity))
346 (defalias 'gnus-characterp 'numberp)
347 (defalias 'gnus-deactivate-mark 'deactivate-mark)
348 (defalias 'gnus-window-edges 'window-edges)
349 (defalias 'gnus-key-press-event-p 'numberp)
350 ;;(defalias 'gnus-decode-rfc1522 'ignore)
353 ;; We define these group faces here to avoid the display
354 ;; update forced when creating new faces.
356 (defface gnus-group-news-1-face
359 (:foreground "PaleTurquoise" :bold t))
362 (:foreground "ForestGreen" :bold t))
365 "Level 1 newsgroup face.")
367 (defface gnus-group-news-1-empty-face
370 (:foreground "PaleTurquoise"))
373 (:foreground "ForestGreen"))
376 "Level 1 empty newsgroup face.")
378 (defface gnus-group-news-2-face
381 (:foreground "turquoise" :bold t))
384 (:foreground "CadetBlue4" :bold t))
387 "Level 2 newsgroup face.")
389 (defface gnus-group-news-2-empty-face
392 (:foreground "turquoise"))
395 (:foreground "CadetBlue4"))
398 "Level 2 empty newsgroup face.")
400 (defface gnus-group-news-3-face
409 "Level 3 newsgroup face.")
411 (defface gnus-group-news-3-empty-face
420 "Level 3 empty newsgroup face.")
422 (defface gnus-group-news-4-face
431 "Level 4 newsgroup face.")
433 (defface gnus-group-news-4-empty-face
442 "Level 4 empty newsgroup face.")
444 (defface gnus-group-news-5-face
453 "Level 5 newsgroup face.")
455 (defface gnus-group-news-5-empty-face
464 "Level 5 empty newsgroup face.")
466 (defface gnus-group-news-6-face
475 "Level 6 newsgroup face.")
477 (defface gnus-group-news-6-empty-face
486 "Level 6 empty newsgroup face.")
488 (defface gnus-group-news-low-face
491 (:foreground "DarkTurquoise" :bold t))
494 (:foreground "DarkGreen" :bold t))
497 "Low level newsgroup face.")
499 (defface gnus-group-news-low-empty-face
502 (:foreground "DarkTurquoise"))
505 (:foreground "DarkGreen"))
508 "Low level empty newsgroup face.")
510 (defface gnus-group-mail-1-face
513 (:foreground "aquamarine1" :bold t))
516 (:foreground "DeepPink3" :bold t))
519 "Level 1 mailgroup face.")
521 (defface gnus-group-mail-1-empty-face
524 (:foreground "aquamarine1"))
527 (:foreground "DeepPink3"))
529 (:italic t :bold t)))
530 "Level 1 empty mailgroup face.")
532 (defface gnus-group-mail-2-face
535 (:foreground "aquamarine2" :bold t))
538 (:foreground "HotPink3" :bold t))
541 "Level 2 mailgroup face.")
543 (defface gnus-group-mail-2-empty-face
546 (:foreground "aquamarine2"))
549 (:foreground "HotPink3"))
552 "Level 2 empty mailgroup face.")
554 (defface gnus-group-mail-3-face
557 (:foreground "aquamarine3" :bold t))
560 (:foreground "magenta4" :bold t))
563 "Level 3 mailgroup face.")
565 (defface gnus-group-mail-3-empty-face
568 (:foreground "aquamarine3"))
571 (:foreground "magenta4"))
574 "Level 3 empty mailgroup face.")
576 (defface gnus-group-mail-low-face
579 (:foreground "aquamarine4" :bold t))
582 (:foreground "DeepPink4" :bold t))
585 "Low level mailgroup face.")
587 (defface gnus-group-mail-low-empty-face
590 (:foreground "aquamarine4"))
593 (:foreground "DeepPink4"))
596 "Low level empty mailgroup face.")
598 ;; Summary mode faces.
600 (defface gnus-summary-selected-face '((t
602 "Face used for selected articles.")
604 (defface gnus-summary-cancelled-face
606 (:foreground "yellow" :background "black")))
607 "Face used for cancelled articles.")
609 (defface gnus-summary-high-ticked-face
612 (:foreground "pink" :bold t))
615 (:foreground "firebrick" :bold t))
618 "Face used for high interest ticked articles.")
620 (defface gnus-summary-low-ticked-face
623 (:foreground "pink" :italic t))
626 (:foreground "firebrick" :italic t))
629 "Face used for low interest ticked articles.")
631 (defface gnus-summary-normal-ticked-face
634 (:foreground "pink"))
637 (:foreground "firebrick"))
640 "Face used for normal interest ticked articles.")
642 (defface gnus-summary-high-ancient-face
645 (:foreground "SkyBlue" :bold t))
648 (:foreground "RoyalBlue" :bold t))
651 "Face used for high interest ancient articles.")
653 (defface gnus-summary-low-ancient-face
656 (:foreground "SkyBlue" :italic t))
659 (:foreground "RoyalBlue" :italic t))
662 "Face used for low interest ancient articles.")
664 (defface gnus-summary-normal-ancient-face
667 (:foreground "SkyBlue"))
670 (:foreground "RoyalBlue"))
673 "Face used for normal interest ancient articles.")
675 (defface gnus-summary-high-uncached-face
678 (:bold t :foreground "cyan4" :bold nil))
679 (((class color) (background dark))
680 (:bold t :foreground "LightGray" :bold nil))
681 (t (:inverse-video t :bold t)))
682 "Face used for high interest uncached articles.")
684 (defface gnus-summary-low-uncached-face
687 (:italic t :foreground "cyan4" :bold nil))
688 (((class color) (background dark))
689 (:italic t :foreground "LightGray" :bold nil))
690 (t (:inverse-video t :italic t)))
691 "Face used for low interest uncached articles.")
693 (defface gnus-summary-normal-uncached-face
696 (:foreground "cyan4" :bold nil))
697 (((class color) (background dark))
698 (:foreground "LightGray" :bold nil))
699 (t (:inverse-video t)))
700 "Face used for normal interest uncached articles.")
702 (defface gnus-summary-high-unread-face
705 "Face used for high interest unread articles.")
707 (defface gnus-summary-low-unread-face
710 "Face used for low interest unread articles.")
712 (defface gnus-summary-normal-unread-face
715 "Face used for normal interest unread articles.")
717 (defface gnus-summary-high-read-face
720 (:foreground "PaleGreen"
724 (:foreground "DarkGreen"
728 "Face used for high interest read articles.")
730 (defface gnus-summary-low-read-face
733 (:foreground "PaleGreen"
737 (:foreground "DarkGreen"
741 "Face used for low interest read articles.")
743 (defface gnus-summary-normal-read-face
746 (:foreground "PaleGreen"))
749 (:foreground "DarkGreen"))
752 "Face used for normal interest read articles.")
759 (defvar gnus-buffers nil)
761 (defun gnus-get-buffer-create (name)
762 "Do the same as `get-buffer-create', but store the created buffer."
763 (or (get-buffer name)
764 (car (push (get-buffer-create name) gnus-buffers))))
766 (defun gnus-add-buffer ()
767 "Add the current buffer to the list of Gnus buffers."
768 (push (current-buffer) gnus-buffers))
770 (defun gnus-buffers ()
771 "Return a list of live Gnus buffers."
772 (while (and gnus-buffers
773 (not (buffer-name (car gnus-buffers))))
775 (let ((buffers gnus-buffers))
777 (if (buffer-name (cadr buffers))
779 (setcdr buffers (cddr buffers)))))
784 (defvar gnus-group-buffer "*Group*")
787 (autoload 'gnus-play-jingle "gnus-audio"))
789 (defface gnus-splash-face
792 (:foreground "#888888"))
795 (:foreground "#888888"))
798 "Face for the splash screen.")
800 (defun gnus-splash ()
802 (switch-to-buffer (gnus-get-buffer-create gnus-group-buffer))
803 (let ((buffer-read-only nil))
805 (unless gnus-inhibit-startup-message
806 (gnus-group-startup-message)
808 (when gnus-play-startup-jingle
809 (gnus-play-jingle))))))
811 (defun gnus-indent-rigidly (start end arg)
812 "Indent rigidly using only spaces and no tabs."
815 (narrow-to-region start end)
817 (indent-rigidly start end arg)
818 ;; We translate tabs into spaces -- not everybody uses
819 ;; an 8-character tab.
820 (goto-char (point-min))
821 (while (search-forward "\t" nil t)
822 (replace-match " " t t))))))
824 (defvar gnus-simple-splash nil)
826 ;;(format "%02x%02x%02x" 114 66 20) "724214"
828 (defvar gnus-logo-color-alist
829 '((flame "#cc3300" "#ff2200")
830 (pine "#c0cc93" "#f8ffb8")
831 (moss "#a1cc93" "#d2ffb8")
832 (irish "#04cc90" "#05ff97")
833 (sky "#049acc" "#05deff")
834 (tin "#6886cc" "#82b6ff")
835 (velvet "#7c68cc" "#8c82ff")
836 (grape "#b264cc" "#cf7df")
837 (labia "#cc64c2" "#fd7dff")
838 (berry "#cc6485" "#ff7db5")
839 (dino "#724214" "#1e3f03")
840 (oort "#cccccc" "#888888")
841 (storm "#666699" "#99ccff")
842 (pdino "#9999cc" "#99ccff")
843 (purp "#9999cc" "#666699")
844 (neutral "#b4b4b4" "#878787")
845 (september "#bf9900" "#ffcc00"))
846 "Color alist used for the Gnus logo.")
848 (defcustom gnus-logo-color-style 'oort
849 "*Color styles used for the Gnus logo."
850 :type `(choice ,@(mapcar (lambda (elem) (list 'const (car elem)))
851 gnus-logo-color-alist))
854 (defvar gnus-logo-colors
855 (cdr (assq gnus-logo-color-style gnus-logo-color-alist))
856 "Colors used for the Gnus logo.")
858 (defun gnus-group-startup-message (&optional x y)
859 "Insert startup message in current buffer."
860 ;; Insert the message.
864 (fboundp 'find-image)
866 (let* ((data-directory (nnheader-find-etc-directory "gnus"))
868 `((:type xpm :file "gnus.xpm"
870 (("thing" . ,(car gnus-logo-colors))
871 ("shadow" . ,(cadr gnus-logo-colors))
873 ("background" . ,(face-background 'default))))
874 (:type pbm :file "gnus.pbm"
875 ;; Account for the pbm's blackground.
876 :background ,(face-foreground 'gnus-splash-face)
877 :foreground ,(face-background 'default))
878 (:type xbm :file "gnus.xbm"
879 ;; Account for the xbm's blackground.
880 :background ,(face-foreground 'gnus-splash-face)
881 :foreground ,(face-background 'default))))))
883 (let ((size (image-size image)))
884 (insert-char ?\n (max 0 (round (- (window-height)
885 (or y (cdr size)) 1) 2)))
886 (insert-char ?\ (max 0 (round (- (window-width)
887 (or x (car size))) 2)))
888 (insert-image image))
889 (setq gnus-simple-splash nil)
895 _ ___ __ ___ __ _ ___
915 (gnus-indent-rigidly (point-min) (point-max)
916 (/ (max (- (window-width) (or x 46)) 0) 2))
917 (goto-char (point-min))
919 (let* ((pheight (count-lines (point-min) (point-max)))
920 (wheight (window-height))
921 (rest (- wheight pheight)))
922 (insert (make-string (max 0 (* 2 (/ rest 3))) ?\n)))
924 (put-text-property (point-min) (point-max) 'face 'gnus-splash-face)
925 (setq gnus-simple-splash t)))
926 (goto-char (point-min))
927 (setq mode-line-buffer-identification (concat " " gnus-version))
928 (set-buffer-modified-p t))
931 (let ((command (format "%s" this-command)))
932 (if (and (string-match "gnus" command)
933 (not (string-match "gnus-other-frame" command)))
935 (gnus-get-buffer-create gnus-group-buffer))))
942 (defcustom gnus-parameters nil
943 "Alist of group parameters.
946 ((\"mail\\\\..*\" (gnus-show-threads nil)
947 (gnus-use-scoring nil)
948 (gnus-summary-line-format
949 \"%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\\n\")
952 (\"mail\\\\.me\" (gnus-use-scoring t))
953 (\"list\\\\..*\" (total-expire . t)
954 (broken-reply-to . t)))"
955 :group 'gnus-group-various
956 :type '(repeat (cons regexp
959 (defvar gnus-group-parameters-more nil)
961 (defmacro gnus-define-group-parameter (param &rest rest)
962 "Define a group parameter PARAM.
963 REST is a plist of following:
964 :type One of `bool', `list' or `nil'.
965 :function The name of the function.
966 :function-document The documentation of the function.
967 :parameter-type The type for customizing the parameter.
968 :parameter-document The documentation for the parameter.
969 :variable The name of the variable.
970 :variable-document The documentation for the variable.
971 :variable-group The group for customizing the variable.
972 :variable-type The type for customizing the variable.
973 :variable-default The default value of the variable."
974 (let* ((type (plist-get rest :type))
975 (parameter-type (plist-get rest :parameter-type))
976 (parameter-document (plist-get rest :parameter-document))
977 (function (or (plist-get rest :function)
978 (intern (format "gnus-parameter-%s" param))))
979 (function-document (or (plist-get rest :function-document) ""))
980 (variable (or (plist-get rest :variable)
981 (intern (format "gnus-parameter-%s-alist" param))))
982 (variable-document (or (plist-get rest :variable-document) ""))
983 (variable-group (plist-get rest :variable-group))
984 (variable-type (or (plist-get rest :variable-type)
986 (list (regexp :tag "Group")
987 ,(car (cdr parameter-type)))))))
988 (variable-default (plist-get rest :variable-default)))
991 `(defcustom ,variable ,variable-default
993 :group 'gnus-group-parameter
994 :group ',variable-group
995 :type ,variable-type)
996 `(setq gnus-group-parameters-more
997 (delq (assq ',param gnus-group-parameters-more)
998 gnus-group-parameters-more))
999 `(add-to-list 'gnus-group-parameters-more
1002 ,parameter-document))
1004 `(defun ,function (name)
1006 (let ((params (gnus-group-find-parameter name))
1009 ((memq ',param params)
1011 ((setq val (assq ',param params))
1013 ((stringp ,variable)
1014 (string-match ,variable name))
1016 (let ((alist ,variable)
1018 (while (setq elem (pop alist))
1020 (string-match (car elem) name))
1023 (if (consp value) (car value) value))))))
1024 `(defun ,function (name)
1027 (or (gnus-group-find-parameter name ',param ,(and type t))
1028 (let ((alist ,variable)
1030 (while (setq elem (pop alist))
1032 (string-match (car elem) name))
1037 '(if (consp value) (car value) value))))))))))
1039 (defcustom gnus-home-directory "~/"
1040 "Directory variable that specifies the \"home\" directory.
1041 All other Gnus path variables are initialized from this variable."
1045 (defcustom gnus-directory (or (getenv "SAVEDIR")
1046 (nnheader-concat gnus-home-directory "News/"))
1047 "*Directory variable from which all other Gnus file variables are derived.
1049 Note that Gnus is mostly loaded when the `.gnus.el' file is read.
1050 This means that other directory variables that are initialized from
1051 this variable won't be set properly if you set this variable in `.gnus.el'.
1052 Set this variable in `.emacs' instead."
1056 (defcustom gnus-default-directory nil
1057 "*Default directory for all Gnus buffers."
1059 :type '(choice (const :tag "current" nil)
1062 ;; Site dependent variables. These variables should be defined in
1065 (defvar gnus-default-nntp-server nil
1066 "Specify a default NNTP server.
1067 This variable should be defined in paths.el, and should never be set
1069 If you want to change servers, you should use `gnus-select-method'.
1070 See the documentation to that variable.")
1072 ;; Don't touch this variable.
1073 (defvar gnus-nntp-service "nntp"
1074 "NNTP service name (\"nntp\" or 119).
1075 This is an obsolete variable, which is scarcely used. If you use an
1076 nntp server for your newsgroup and want to change the port number
1077 used to 899, you would say something along these lines:
1079 (setq gnus-select-method '(nntp \"my.nntp.server\" (nntp-port-number 899)))")
1081 (defcustom gnus-nntpserver-file "/etc/nntpserver"
1082 "A file with only the name of the nntp server in it."
1087 ;; This function is used to check both the environment variable
1088 ;; NNTPSERVER and the /etc/nntpserver file to see whether one can find
1089 ;; an nntp server name default.
1090 (defun gnus-getenv-nntpserver ()
1091 (or (getenv "NNTPSERVER")
1092 (and (file-readable-p gnus-nntpserver-file)
1094 (set-buffer (gnus-get-buffer-create " *gnus nntp*"))
1095 (insert-file-contents gnus-nntpserver-file)
1096 (let ((name (buffer-string)))
1098 (if (string-match "\\'[ \t\n]*$" name)
1101 (kill-buffer (current-buffer))))))))
1103 (defcustom gnus-select-method
1106 (list 'nntp (or (condition-case nil
1107 (gnus-getenv-nntpserver)
1109 (when (and gnus-default-nntp-server
1110 (not (string= gnus-default-nntp-server "")))
1111 gnus-default-nntp-server)
1113 (if (or (null gnus-nntp-service)
1114 (equal gnus-nntp-service "nntp"))
1116 (list gnus-nntp-service)))
1118 "Default method for selecting a newsgroup.
1119 This variable should be a list, where the first element is how the
1120 news is to be fetched, the second is the address.
1122 For instance, if you want to get your news via \"flab.flab.edu\" using
1123 NNTP, you could say:
1125 \(setq gnus-select-method '(nntp \"flab.flab.edu\"))
1127 If you want to use your local spool, say:
1129 \(setq gnus-select-method (list 'nnspool (system-name)))
1131 If you use this variable, you must set `gnus-nntp-server' to nil.
1133 There is a lot more to know about select methods and virtual servers -
1134 see the manual for details."
1136 :type 'gnus-select-method)
1138 (defcustom gnus-message-archive-method "archive"
1139 "*Method used for archiving messages you've sent.
1140 This should be a mail method."
1142 :group 'gnus-message
1143 :type 'gnus-select-method)
1145 (defcustom gnus-message-archive-group nil
1146 "*Name of the group in which to save the messages you've written.
1147 This can either be a string; a list of strings; or an alist
1148 of regexps/functions/forms to be evaluated to return a string (or a list
1149 of strings). The functions are called with the name of the current
1150 group (or nil) as a parameter.
1152 If you want to save your mail in one group and the news articles you
1153 write in another group, you could say something like:
1155 \(setq gnus-message-archive-group
1156 '((if (message-news-p)
1160 Normally the group names returned by this variable should be
1161 unprefixed -- which implicitly means \"store on the archive server\".
1162 However, you may wish to store the message on some other server. In
1163 that case, just return a fully prefixed name of the group --
1164 \"nnml+private:mail.misc\", for instance."
1165 :group 'gnus-message
1166 :type '(choice (const :tag "none" nil)
1171 (defcustom gnus-secondary-servers nil
1172 "List of NNTP servers that the user can choose between interactively.
1173 To make Gnus query you for a server, you have to give `gnus' a
1174 non-numeric prefix - `C-u M-x gnus', in short."
1176 :type '(repeat string))
1178 (defcustom gnus-nntp-server nil
1179 "*The name of the host running the NNTP server.
1180 This variable is semi-obsolete. Use the `gnus-select-method'
1183 :type '(choice (const :tag "disable" nil)
1186 (defcustom gnus-secondary-select-methods nil
1187 "A list of secondary methods that will be used for reading news.
1188 This is a list where each element is a complete select method (see
1189 `gnus-select-method').
1191 If, for instance, you want to read your mail with the nnml back end,
1192 you could set this variable:
1194 \(setq gnus-secondary-select-methods '((nnml \"\")))"
1196 :type '(repeat gnus-select-method))
1198 (defvar gnus-backup-default-subscribed-newsgroups
1199 '("news.announce.newusers" "news.groups.questions" "gnu.emacs.gnus")
1200 "Default default new newsgroups the first time Gnus is run.
1201 Should be set in paths.el, and shouldn't be touched by the user.")
1203 (defcustom gnus-local-domain nil
1204 "Local domain name without a host name.
1205 The DOMAINNAME environment variable is used instead if it is defined.
1206 If the function `system-name' returns the full Internet name, there is
1207 no need to set this variable."
1208 :group 'gnus-message
1209 :type '(choice (const :tag "default" nil)
1212 (defvar gnus-local-organization nil
1213 "String with a description of what organization (if any) the user belongs to.
1214 Obsolete variable; use `message-user-organization' instead.")
1216 ;; Customization variables
1218 (defcustom gnus-refer-article-method nil
1219 "Preferred method for fetching an article by Message-ID.
1220 If you are reading news from the local spool (with nnspool), fetching
1221 articles by Message-ID is painfully slow. By setting this method to an
1222 nntp method, you might get acceptable results.
1224 The value of this variable must be a valid select method as discussed
1225 in the documentation of `gnus-select-method'.
1227 It can also be a list of select methods, as well as the special symbol
1228 `current', which means to use the current select method. If it is a
1229 list, Gnus will try all the methods in the list until it finds a match."
1231 :type '(choice (const :tag "default" nil)
1232 (const :tag "Google" (nnweb "refer" (nnweb-type google)))
1234 (repeat :menu-tag "Try multiple"
1236 :value (current (nnweb "refer" (nnweb-type google)))
1237 (choice :tag "Method"
1239 (const :tag "Google"
1240 (nnweb "refer" (nnweb-type google)))
1241 gnus-select-method))))
1243 (defcustom gnus-group-faq-directory
1244 '("/ftp@mirrors.aol.com:/pub/rtfm/usenet/"
1245 "/ftp@sunsite.doc.ic.ac.uk:/pub/usenet/news-faqs/"
1246 "/ftp@src.doc.ic.ac.uk:/usenet/news-FAQS/"
1247 "/ftp@ftp.seas.gwu.edu:/pub/rtfm/"
1248 "/ftp@ftp.pasteur.fr:/pub/FAQ/"
1249 "/ftp@rtfm.mit.edu:/pub/usenet/"
1250 "/ftp@ftp.uni-paderborn.de:/pub/FAQ/"
1251 "/ftp@ftp.sunet.se:/pub/usenet/"
1252 "/ftp@nctuccca.edu.tw:/USENET/FAQ/"
1253 "/ftp@hwarang.postech.ac.kr:/pub/usenet/"
1254 "/ftp@ftp.hk.super.net:/mirror/faqs/")
1255 "*Directory where the group FAQs are stored.
1256 This will most commonly be on a remote machine, and the file will be
1257 fetched by ange-ftp.
1259 This variable can also be a list of directories. In that case, the
1260 first element in the list will be used by default. The others can
1261 be used when being prompted for a site.
1263 Note that Gnus uses an aol machine as the default directory. If this
1264 feels fundamentally unclean, just think of it as a way to finally get
1265 something of value back from them.
1267 If the default site is too slow, try one of these:
1269 North America: mirrors.aol.com /pub/rtfm/usenet
1270 ftp.seas.gwu.edu /pub/rtfm
1271 rtfm.mit.edu /pub/usenet
1272 Europe: ftp.uni-paderborn.de /pub/FAQ
1273 src.doc.ic.ac.uk /usenet/news-FAQS
1274 ftp.sunet.se /pub/usenet
1275 ftp.pasteur.fr /pub/FAQ
1276 Asia: nctuccca.edu.tw /USENET/FAQ
1277 hwarang.postech.ac.kr /pub/usenet
1278 ftp.hk.super.net /mirror/faqs"
1279 :group 'gnus-group-various
1280 :type '(choice directory
1281 (repeat directory)))
1283 (defcustom gnus-group-charter-alist
1284 '(("no" . (concat "http://no.news-admin.org/charter/" name ".txt"))
1285 ("de" . (concat "http://purl.net/charta/" name ".html"))
1286 ("dk" . (concat "http://www.usenet.dk/grupper.pl?get=" name))
1287 ("england" . (concat "http://england.news-admin.org/charters/" name))
1288 ("fr" . (concat "http://www.usenet-fr.net/fur/chartes/" name ".html"))
1289 ("europa" . (concat "http://www.europa.usenet.eu.org/chartas/charta-en-"
1290 (gnus-replace-in-string name "europa\\." "") ".html"))
1291 ("nl" . (concat "http://www.xs4all.nl/~sister/usenet/charters/" name))
1292 ("aus" . (concat "http://aus.news-admin.org/groupinfo.php/" name))
1293 ("pl" . (concat "http://www.usenet.pl/opisy/" name))
1294 ("ch" . (concat "http://www.use-net.ch/Usenet/charter.html#" name))
1295 ("at" . (concat "http://www.usenet.at/chartas/" name "/charta"))
1296 ("uk" . (concat "http://www.usenet.org.uk/" name ".html"))
1297 ("wales" . (concat "http://www.wales-usenet.org/english/groups/" name ".html"))
1298 ("dfw" . (concat "http://www.cirr.com/dfw/charters/" name ".html"))
1299 ("se" . (concat "http://www.usenet-se.net/Reglementen/"
1300 (gnus-replace-in-string name "\\." "_") ".html"))
1301 ("milw" . (concat "http://usenet.mil.wi.us/"
1302 (gnus-replace-in-string name "milw\\." "") "-charter"))
1303 ("ca" . (concat "http://www.sbay.org/ca/charter-" name ".html"))
1304 ("netins" . (concat "http://www.netins.net/usenet/charter/"
1305 (gnus-replace-in-string name "\\." "-") "-charter.html")))
1306 "*An alist of (HIERARCHY . FORM) pairs used to construct the URL of a charter.
1307 When FORM is evaluated `name' is bound to the name of the group."
1308 :group 'gnus-group-various
1309 :type '(repeat (cons (string :tag "Hierarchy") (sexp :tag "Form"))))
1311 (defcustom gnus-group-fetch-control-use-browse-url nil
1312 "*Non-nil means that control messages are displayed using `browse-url'.
1313 Otherwise they are fetched with ange-ftp and displayed in an ephemeral
1315 :group 'gnus-group-various
1318 (defcustom gnus-use-cross-reference t
1319 "*Non-nil means that cross referenced articles will be marked as read.
1320 If nil, ignore cross references. If t, mark articles as read in
1321 subscribed newsgroups. If neither t nor nil, mark as read in all
1324 :type '(choice (const :tag "off" nil)
1325 (const :tag "subscribed" t)
1329 (defcustom gnus-process-mark ?#
1331 :group 'gnus-group-visual
1332 :group 'gnus-summary-marks
1335 (defcustom gnus-large-newsgroup 200
1336 "*The number of articles which indicates a large newsgroup.
1337 If the number of articles in a newsgroup is greater than this value,
1338 confirmation is required for selecting the newsgroup.
1339 If it is `nil', no confirmation is required."
1340 :group 'gnus-group-select
1341 :type '(choice (const :tag "No limit" nil)
1344 (defcustom gnus-use-long-file-name (not (memq system-type '(usg-unix-v xenix)))
1345 "*Non-nil means that the default name of a file to save articles in is the group name.
1346 If it's nil, the directory form of the group name is used instead.
1348 If this variable is a list, and the list contains the element
1349 `not-score', long file names will not be used for score files; if it
1350 contains the element `not-save', long file names will not be used for
1351 saving; and if it contains the element `not-kill', long file names
1352 will not be used for kill files.
1354 Note that the default for this variable varies according to what system
1355 type you're using. On `usg-unix-v' and `xenix' this variable defaults
1356 to nil while on all other systems it defaults to t."
1360 (defcustom gnus-kill-files-directory gnus-directory
1361 "*Name of the directory where kill files will be stored (default \"~/News\")."
1362 :group 'gnus-score-files
1363 :group 'gnus-score-kill
1366 (defcustom gnus-save-score nil
1367 "*If non-nil, save group scoring info."
1368 :group 'gnus-score-various
1372 (defcustom gnus-use-undo t
1373 "*If non-nil, allow undoing in Gnus group mode buffers."
1377 (defcustom gnus-use-adaptive-scoring nil
1378 "*If non-nil, use some adaptive scoring scheme.
1379 If a list, then the values `word' and `line' are meaningful. The
1380 former will perform adaption on individual words in the subject
1381 header while `line' will perform adaption on several headers."
1383 :group 'gnus-score-adapt
1384 :type '(set (const word) (const line)))
1386 (defcustom gnus-use-cache 'passive
1387 "*If nil, Gnus will ignore the article cache.
1388 If `passive', it will allow entering (and reading) articles
1389 explicitly entered into the cache. If anything else, use the
1390 cache to the full extent of the law."
1393 :type '(choice (const :tag "off" nil)
1394 (const :tag "passive" passive)
1395 (const :tag "active" t)))
1397 (defcustom gnus-use-trees nil
1398 "*If non-nil, display a thread tree buffer."
1402 (defcustom gnus-use-grouplens nil
1403 "*If non-nil, use GroupLens ratings."
1407 (defcustom gnus-keep-backlog 20
1408 "*If non-nil, Gnus will keep read articles for later re-retrieval.
1409 If it is a number N, then Gnus will only keep the last N articles
1410 read. If it is neither nil nor a number, Gnus will keep all read
1411 articles. This is not a good idea."
1413 :type '(choice (const :tag "off" nil)
1418 (defcustom gnus-use-nocem nil
1419 "*If non-nil, Gnus will read NoCeM cancel messages."
1423 (defcustom gnus-suppress-duplicates nil
1424 "*If non-nil, Gnus will mark duplicate copies of the same article as read."
1428 (defcustom gnus-use-scoring t
1429 "*If non-nil, enable scoring."
1433 (defcustom gnus-summary-prepare-exit-hook
1434 '(gnus-summary-expire-articles)
1435 "*A hook called when preparing to exit from the summary buffer.
1436 It calls `gnus-summary-expire-articles' by default."
1437 :group 'gnus-summary-exit
1440 (defcustom gnus-novice-user t
1441 "*Non-nil means that you are a usenet novice.
1442 If non-nil, verbose messages may be displayed and confirmations may be
1447 (defcustom gnus-expert-user nil
1448 "*Non-nil means that you will never be asked for confirmation about anything.
1449 That doesn't mean *anything* anything; particularly destructive
1450 commands will still require prompting."
1454 (defcustom gnus-interactive-catchup t
1455 "*If non-nil, require your confirmation when catching up a group."
1456 :group 'gnus-group-select
1459 (defcustom gnus-interactive-exit t
1460 "*If non-nil, require your confirmation when exiting Gnus."
1464 (defcustom gnus-extract-address-components 'gnus-extract-address-components
1465 "*Function for extracting address components from a From header.
1466 Two pre-defined function exist: `gnus-extract-address-components',
1467 which is the default, quite fast, and too simplistic solution, and
1468 `mail-extract-address-components', which works much better, but is
1470 :group 'gnus-summary-format
1471 :type '(radio (function-item gnus-extract-address-components)
1472 (function-item mail-extract-address-components)
1473 (function :tag "Other")))
1475 (defcustom gnus-carpal nil
1476 "*If non-nil, display clickable icons."
1480 (defcustom gnus-shell-command-separator ";"
1481 "String used to separate to shell commands."
1485 (defcustom gnus-valid-select-methods
1486 '(("nntp" post address prompt-address physical-address)
1487 ("nnspool" post address)
1488 ("nnvirtual" post-mail virtual prompt-address)
1489 ("nnmbox" mail respool address)
1490 ("nnml" post-mail respool address)
1491 ("nnmh" mail respool address)
1492 ("nndir" post-mail prompt-address physical-address)
1493 ("nneething" none address prompt-address physical-address)
1494 ("nndoc" none address prompt-address)
1495 ("nnbabyl" mail address respool)
1496 ("nnkiboze" post virtual)
1497 ("nnsoup" post-mail address)
1498 ("nndraft" post-mail)
1499 ("nnfolder" mail respool address)
1500 ("nngateway" post-mail address prompt-address physical-address)
1509 ("nnagent" post-mail)
1510 ("nnimap" post-mail address prompt-address physical-address)
1511 ("nnmaildir" mail respool address)
1513 "*An alist of valid select methods.
1514 The first element of each list lists should be a string with the name
1515 of the select method. The other elements may be the category of
1516 this method (i. e., `post', `mail', `none' or whatever) or other
1517 properties that this method has (like being respoolable).
1518 If you implement a new select method, all you should have to change is
1519 this variable. I think."
1521 :type '(repeat (group (string :tag "Name")
1522 (radio-button-choice (const :format "%v " post)
1523 (const :format "%v " mail)
1524 (const :format "%v " none)
1526 (checklist :inline t
1527 (const :format "%v " address)
1528 (const :format "%v " prompt-address)
1529 (const :format "%v " physical-address)
1530 (const :format "%v " virtual)
1533 (defun gnus-redefine-select-method-widget ()
1534 "Recomputes the select-method widget based on the value of
1535 `gnus-valid-select-methods'."
1536 (define-widget 'gnus-select-method 'list
1537 "Widget for entering a select method."
1539 :tag "Select Method"
1540 :args `((choice :tag "Method"
1541 ,@(mapcar (lambda (entry)
1542 (list 'const :format "%v\n"
1543 (intern (car entry))))
1544 gnus-valid-select-methods)
1545 (symbol :tag "other"))
1546 (string :tag "Address")
1547 (repeat :tag "Options"
1551 (sexp :tag "Value"))))))
1553 (gnus-redefine-select-method-widget)
1555 (defcustom gnus-updated-mode-lines '(group article summary tree)
1556 "List of buffers that should update their mode lines.
1557 The list may contain the symbols `group', `article', `tree' and
1558 `summary'. If the corresponding symbol is present, Gnus will keep
1559 that mode line updated with information that may be pertinent.
1560 If this variable is nil, screen refresh may be quicker."
1561 :group 'gnus-various
1562 :type '(set (const group)
1567 ;; Added by Keinonen Kari <kk85613@cs.tut.fi>.
1568 (defcustom gnus-mode-non-string-length nil
1569 "*Max length of mode-line non-string contents.
1570 If this is nil, Gnus will take space as is needed, leaving the rest
1571 of the modeline intact. Note that the default of nil is unlikely
1572 to be desirable; see the manual for further details."
1573 :group 'gnus-various
1574 :type '(choice (const nil)
1577 ;; There should be special validation for this.
1578 (define-widget 'gnus-email-address 'string
1581 (gnus-define-group-parameter
1584 "Return GROUP's to-address."
1586 "*Alist of group regexps and correspondent to-addresses."
1587 :parameter-type '(gnus-email-address :tag "To Address")
1588 :parameter-document "\
1589 This will be used when doing followups and posts.
1591 This is primarily useful in mail groups that represent closed
1592 mailing lists--mailing lists where it's expected that everybody that
1593 writes to the mailing list is subscribed to it. Since using this
1594 parameter ensures that the mail only goes to the mailing list itself,
1595 it means that members won't receive two copies of your followups.
1597 Using `to-address' will actually work whether the group is foreign or
1598 not. Let's say there's a group on the server that is called
1599 `fa.4ad-l'. This is a real newsgroup, but the server has gotten the
1600 articles from a mail-to-news gateway. Posting directly to this group
1601 is therefore impossible--you have to send mail to the mailing list
1604 The gnus-group-split mail splitting mechanism will behave as if this
1605 address was listed in gnus-group-split Addresses (see below).")
1607 (gnus-define-group-parameter
1610 "Return GROUP's to-list."
1612 "*Alist of group regexps and correspondent to-lists."
1613 :parameter-type '(gnus-email-address :tag "To List")
1614 :parameter-document "\
1615 This address will be used when doing a `a' in the group.
1617 It is totally ignored when doing a followup--except that if it is
1618 present in a news group, you'll get mail group semantics when doing
1621 The gnus-group-split mail splitting mechanism will behave as if this
1622 address was listed in gnus-group-split Addresses (see below).")
1624 (gnus-define-group-parameter
1628 "Return GROUP's subscription status."
1630 "*Groups which are automatically considered subscribed."
1631 :parameter-type '(const :tag "Subscribed" t)
1632 :parameter-document "\
1633 Gnus assumed that you are subscribed to the To/List address.
1635 When constructing a list of subscribed groups using
1636 `gnus-find-subscribed-addresses', Gnus includes the To address given
1637 above, or the list address (if the To address has not been set).")
1639 (gnus-define-group-parameter
1642 :function gnus-group-auto-expirable-p
1644 "Check whether GROUP is auto-expirable or not."
1645 :variable gnus-auto-expirable-newsgroups
1646 :variable-default nil
1648 "*Groups in which to automatically mark read articles as expirable.
1649 If non-nil, this should be a regexp that should match all groups in
1650 which to perform auto-expiry. This only makes sense for mail groups."
1651 :variable-group nnmail-expire
1652 :variable-type '(choice (const nil)
1654 :parameter-type '(const :tag "Automatic Expire" t)
1656 "All articles that are read will be marked as expirable.")
1658 (gnus-define-group-parameter
1661 :function gnus-group-total-expirable-p
1663 "Check whether GROUP is total-expirable or not."
1664 :variable gnus-total-expirable-newsgroups
1665 :variable-default nil
1667 "*Groups in which to perform expiry of all read articles.
1668 Use with extreme caution. All groups that match this regexp will be
1669 expiring - which means that all read articles will be deleted after
1670 \(say) one week. (This only goes for mail groups and the like, of
1672 :variable-group nnmail-expire
1673 :variable-type '(choice (const nil)
1675 :parameter-type '(const :tag "Total Expire" t)
1677 "All read articles will be put through the expiry process
1679 This happens even if they are not marked as expirable.
1682 (gnus-define-group-parameter
1685 "Return the default charset of GROUP."
1686 :variable gnus-group-charset-alist
1688 '(("\\(^\\|:\\)hk\\>\\|\\(^\\|:\\)tw\\>\\|\\<big5\\>" cn-big5)
1689 ("\\(^\\|:\\)cn\\>\\|\\<chinese\\>" cn-gb-2312)
1690 ("\\(^\\|:\\)fj\\>\\|\\(^\\|:\\)japan\\>" iso-2022-jp-2)
1691 ("\\(^\\|:\\)tnn\\>\\|\\(^\\|:\\)pin\\>\\|\\(^\\|:\\)sci.lang.japan" iso-2022-7bit)
1692 ("\\(^\\|:\\)relcom\\>" koi8-r)
1693 ("\\(^\\|:\\)fido7\\>" koi8-r)
1694 ("\\(^\\|:\\)\\(cz\\|hun\\|pl\\|sk\\|hr\\)\\>" iso-8859-2)
1695 ("\\(^\\|:\\)israel\\>" iso-8859-1)
1696 ("\\(^\\|:\\)han\\>" euc-kr)
1697 ("\\(^\\|:\\)alt.chinese.text.big5\\>" chinese-big5)
1698 ("\\(^\\|:\\)soc.culture.vietnamese\\>" vietnamese-viqr)
1699 ("\\(^\\|:\\)\\(comp\\|rec\\|alt\\|sci\\|soc\\|news\\|gnu\\|bofh\\)\\>" iso-8859-1))
1701 "Alist of regexps (to match group names) and default charsets to be used when reading."
1702 :variable-group gnus-charset
1703 :variable-type '(repeat (list (regexp :tag "Group")
1704 (symbol :tag "Charset")))
1705 :parameter-type '(symbol :tag "Charset")
1706 :parameter-document "\
1707 The default charset to use in the group.")
1709 (gnus-define-group-parameter
1713 "Return a posting method for GROUP."
1714 :variable gnus-post-method-alist
1716 "Alist of regexps (to match group names) and method to be used when
1717 posting an article."
1718 :variable-group gnus-group-foreign
1720 '(choice :tag "Posting Method"
1721 (const :tag "Use native server" native)
1722 (const :tag "Use current server" current)
1723 (list :convert-widget
1725 (list 'sexp :tag "Methods"
1726 :value gnus-select-method))))
1728 "Posting method for this group.")
1730 (gnus-define-group-parameter
1731 large-newsgroup-initial
1734 "Return GROUP's initial input of the number of articles."
1736 "*Alist of group regexps and its initial input of the number of articles."
1737 :parameter-type '(choice :tag "Initial Input for Large Newsgroup"
1738 (const :tag "All" nil)
1740 :parameter-document "\
1742 This number will be prompted as the initial value of the number of
1743 articles to list when the group is a large newsgroup (see
1744 `gnus-large-newsgroup'). If it is `nil', the default value is the
1745 total number of articles in the group.")
1747 ;; group parameters for spam processing added by Ted Zlatanov <tzz@lifelogs.com>
1748 (defvar gnus-group-spam-classification-spam t
1749 "Spam group classification (requires spam.el).
1750 This group contains spam messages. On summary entry, unread messages
1751 will be marked as spam. On summary exit, the specified spam
1752 processors will be invoked on spam-marked messages, then those
1753 messages will be expired, so the spam processor will only see a
1754 spam-marked message once.")
1756 (defvar gnus-group-spam-classification-ham 'ask
1757 "The ham value for the spam group parameter (requires spam.el).
1758 On summary exit, the specified ham processors will be invoked on
1759 ham-marked messages. Exercise caution, since the ham processor will
1760 see the same message more than once because there is no ham message
1763 (gnus-define-group-parameter
1767 "The spam type (spam, ham, or neither) of the group."
1768 :variable gnus-spam-newsgroup-contents
1769 :variable-default nil
1771 "*Groups in which to automatically mark new articles as spam on
1772 summary entry. If non-nil, this should be a list of group name
1773 regexps that should match all groups in which to do automatic spam
1774 tagging, associated with a classification (spam, ham, or neither).
1775 This only makes sense for mail groups."
1776 :variable-group spam
1777 :variable-type '(repeat
1778 (list :tag "Group contents spam/ham classification"
1779 (regexp :tag "Group")
1781 (variable-item gnus-group-spam-classification-spam)
1782 (variable-item gnus-group-spam-classification-ham)
1783 (other :tag "Unclassified" nil))))
1785 :parameter-type '(list :tag "Group contents spam/ham classification"
1786 (choice :tag "Group contents classification for spam sorting"
1787 (variable-item gnus-group-spam-classification-spam)
1788 (variable-item gnus-group-spam-classification-ham)
1789 (other :tag "Unclassified" nil)))
1791 "The spam classification (spam, ham, or neither) of this group.
1792 When a spam group is entered, all unread articles are marked as spam.")
1794 (defvar gnus-group-spam-exit-processor-ifile "ifile"
1795 "The ifile summary exit spam processor.
1796 Only applicable to spam groups.")
1798 (defvar gnus-group-spam-exit-processor-bogofilter "bogofilter"
1799 "The Bogofilter summary exit spam processor.
1800 Only applicable to spam groups.")
1802 (defvar gnus-group-spam-exit-processor-blacklist "blacklist"
1803 "The Blacklist summary exit spam processor.
1804 Only applicable to spam groups.")
1806 (defvar gnus-group-ham-exit-processor-whitelist "whitelist"
1807 "The whitelist summary exit ham processor.
1808 Only applicable to non-spam (unclassified and ham) groups.")
1810 (defvar gnus-group-ham-exit-processor-BBDB "bbdb"
1811 "The BBDB summary exit ham processor.
1812 Only applicable to non-spam (unclassified and ham) groups.")
1814 (gnus-define-group-parameter
1817 :parameter-type '(choice :tag "Spam Summary Exit Processor"
1819 (list :tag "Spam Summary Exit Processor Choices"
1821 (variable-item gnus-group-spam-exit-processor-ifile)
1822 (variable-item gnus-group-spam-exit-processor-bogofilter)
1823 (variable-item gnus-group-spam-exit-processor-blacklist)
1824 (variable-item gnus-group-ham-exit-processor-whitelist)
1825 (variable-item gnus-group-ham-exit-processor-BBDB))))
1827 "Which spam or ham processors will be applied to the GROUP articles at summary exit."
1828 :variable gnus-spam-process-newsgroups
1829 :variable-default nil
1831 "*Groups in which to automatically process spam or ham articles with
1832 a backend on summary exit. If non-nil, this should be a list of group
1833 name regexps that should match all groups in which to do automatic
1834 spam processing, associated with the appropriate processor. This only makes sense
1836 :variable-group spam
1837 :variable-type '(repeat :tag "Spam/Ham Processors"
1838 (list :tag "Spam Summary Exit Processor Choices"
1839 (regexp :tag "Group Regexp")
1840 (set :tag "Spam/Ham Summary Exit Processor"
1841 (variable-item gnus-group-spam-exit-processor-ifile)
1842 (variable-item gnus-group-spam-exit-processor-bogofilter)
1843 (variable-item gnus-group-spam-exit-processor-blacklist)
1844 (variable-item gnus-group-ham-exit-processor-whitelist)
1845 (variable-item gnus-group-ham-exit-processor-BBDB))))
1847 "Which spam processors will be applied to the spam or ham GROUP articles at summary exit.")
1849 (gnus-define-group-parameter
1850 spam-process-destination
1851 :parameter-type '(choice :tag "Destination for spam-processed articles at summary exit"
1852 (string :tag "Move to a group")
1853 (other :tag "Expire" nil))
1855 "Where spam-processed articles will go at summary exit."
1856 :variable gnus-spam-process-destinations
1857 :variable-default nil
1859 "*Groups in which to explicitly send spam-processed articles to
1860 another group, or expire them (the default). If non-nil, this should
1861 be a list of group name regexps that should match all groups in which
1862 to do spam-processed article moving, associated with the destination
1863 group or `nil' for explicit expiration. This only makes sense for
1865 :variable-group spam
1866 :variable-type '(repeat :tag "Spam-processed articles destination"
1868 (regexp :tag "Group Regexp")
1869 (choice :tag "Destination for spam-processed articles at summary exit"
1870 (string :tag "Move to a group")
1871 (other :tag "Expire" nil))))
1873 "Where spam-processed articles will go at summary exit.")
1875 (defcustom gnus-group-uncollapsed-levels 1
1876 "Number of group name elements to leave alone when making a short group name."
1877 :group 'gnus-group-visual
1880 (defcustom gnus-group-use-permanent-levels nil
1881 "*If non-nil, once you set a level, Gnus will use this level."
1882 :group 'gnus-group-levels
1887 (defcustom gnus-load-hook nil
1888 "A hook run while Gnus is loaded."
1892 (defcustom gnus-apply-kill-hook '(gnus-apply-kill-file)
1893 "A hook called to apply kill files to a group.
1894 This hook is intended to apply a kill file to the selected newsgroup.
1895 The function `gnus-apply-kill-file' is called by default.
1897 Since a general kill file is too heavy to use only for a few
1898 newsgroups, I recommend you to use a lighter hook function. For
1899 example, if you'd like to apply a kill file to articles which contains
1900 a string `rmgroup' in subject in newsgroup `control', you can use the
1903 (setq gnus-apply-kill-hook
1906 (cond ((string-match \"control\" gnus-newsgroup-name)
1907 (gnus-kill \"Subject\" \"rmgroup\")
1908 (gnus-expunge \"X\"))))))"
1909 :group 'gnus-score-kill
1910 :options '(gnus-apply-kill-file)
1913 (defcustom gnus-group-change-level-function nil
1914 "Function run when a group level is changed.
1915 It is called with three parameters -- GROUP, LEVEL and OLDLEVEL."
1916 :group 'gnus-group-levels
1921 (defcustom gnus-visual
1922 '(summary-highlight group-highlight article-highlight
1924 summary-menu group-menu article-menu
1925 tree-highlight menu highlight
1926 browse-menu server-menu
1927 page-marker tree-menu binary-menu pick-menu
1929 "*Enable visual features.
1930 If `visual' is disabled, there will be no menus and few faces. Most of
1931 the visual customization options below will be ignored. Gnus will use
1932 less space and be faster as a result.
1934 This variable can also be a list of visual elements to switch on. For
1935 instance, to switch off all visual things except menus, you can say:
1937 (setq gnus-visual '(menu))
1939 Valid elements include `summary-highlight', `group-highlight',
1940 `article-highlight', `mouse-face', `summary-menu', `group-menu',
1941 `article-menu', `tree-highlight', `menu', `highlight', `browse-menu',
1942 `server-menu', `page-marker', `tree-menu', `binary-menu', `pick-menu',
1943 and `grouplens-menu'."
1946 :type '(set (const summary-highlight)
1947 (const group-highlight)
1948 (const article-highlight)
1950 (const summary-menu)
1952 (const article-menu)
1953 (const tree-highlight)
1962 (const grouplens-menu)))
1964 ;; Byte-compiler warning.
1965 (defvar gnus-visual)
1966 ;; Find out whether the gnus-visual TYPE is wanted.
1967 (defun gnus-visual-p (&optional type class)
1968 (and gnus-visual ; Has to be non-nil, at least.
1969 (if (not type) ; We don't care about type.
1971 (if (listp gnus-visual) ; It's a list, so we check it.
1972 (or (memq type gnus-visual)
1973 (memq class gnus-visual))
1976 (defcustom gnus-mouse-face
1978 (if (gnus-visual-p 'mouse-face 'highlight)
1979 (if (boundp 'gnus-mouse-face)
1980 (or gnus-mouse-face 'highlight)
1984 "*Face used for group or summary buffer mouse highlighting.
1985 The line beneath the mouse pointer will be highlighted with this
1990 (defcustom gnus-article-save-directory gnus-directory
1991 "*Name of the directory articles will be saved in (default \"~/News\")."
1992 :group 'gnus-article-saving
1995 (defvar gnus-plugged t
1996 "Whether Gnus is plugged or not.")
1998 (defcustom gnus-agent-cache t
1999 "Whether Gnus use agent cache.
2000 You also need to enable `gnus-agent'."
2005 (defcustom gnus-default-charset (mm-guess-mime-charset)
2006 "Default charset assumed to be used when viewing non-ASCII characters.
2007 This variable is overridden on a group-to-group basis by the
2008 gnus-group-charset-alist variable and is only used on groups not
2009 covered by that variable."
2011 :group 'gnus-charset)
2013 (defcustom gnus-agent t
2014 "Whether we want to use the Gnus agent or not.
2015 Putting (gnus-agentize) in ~/.gnus is obsolete by (setq gnus-agent t)."
2020 (defcustom gnus-other-frame-function 'gnus
2021 "Function called by the command `gnus-other-frame'."
2023 :type '(choice (function-item gnus)
2024 (function-item gnus-no-server)
2025 (function-item gnus-slave)
2026 (function-item gnus-slave-no-server)))
2028 (defcustom gnus-other-frame-parameters nil
2029 "Frame parameters used by `gnus-other-frame' to create a Gnus frame.
2030 This should be an alist for FSF Emacs, or a plist for XEmacs."
2032 :type (if (featurep 'xemacs)
2033 '(repeat (list :inline t :format "%v"
2034 (symbol :tag "Property")
2035 (sexp :tag "Value")))
2036 '(repeat (cons :format "%v"
2037 (symbol :tag "Parameter")
2038 (sexp :tag "Value")))))
2041 ;;; Internal variables
2043 (defvar gnus-agent-gcc-header "X-Gnus-Agent-Gcc")
2044 (defvar gnus-agent-meta-information-header "X-Gnus-Agent-Meta-Information")
2045 (defvar gnus-draft-meta-information-header "X-Draft-From")
2046 (defvar gnus-group-get-parameter-function 'gnus-group-get-parameter)
2047 (defvar gnus-original-article-buffer " *Original Article*")
2048 (defvar gnus-newsgroup-name nil)
2049 (defvar gnus-ephemeral-servers nil)
2050 (defvar gnus-server-method-cache nil)
2052 (defvar gnus-agent-fetching nil
2053 "Whether Gnus agent is in fetching mode.")
2055 (defvar gnus-agent-covered-methods nil)
2057 (defvar gnus-command-method nil
2058 "Dynamically bound variable that says what the current back end is.")
2060 (defvar gnus-current-select-method nil
2061 "The current method for selecting a newsgroup.")
2063 (defvar gnus-tree-buffer "*Tree*"
2064 "Buffer where Gnus thread trees are displayed.")
2067 (defvar gnus-use-generic-from nil)
2069 ;; Variable holding the user answers to all method prompts.
2070 (defvar gnus-method-history nil)
2072 ;; Variable holding the user answers to all mail method prompts.
2073 (defvar gnus-mail-method-history nil)
2075 ;; Variable holding the user answers to all group prompts.
2076 (defvar gnus-group-history nil)
2078 (defvar gnus-server-alist nil
2079 "List of available servers.")
2081 (defcustom gnus-cache-directory
2082 (nnheader-concat gnus-directory "cache/")
2083 "*The directory where cached articles will be stored."
2087 (defvar gnus-predefined-server-alist
2090 (nnspool-spool-directory ,gnus-cache-directory)
2091 (nnspool-nov-directory ,gnus-cache-directory)
2092 (nnspool-active-file
2093 ,(nnheader-concat gnus-cache-directory "active"))))
2094 "List of predefined (convenience) servers.")
2096 (defvar gnus-topic-indentation "") ;; Obsolete variable.
2098 (defconst gnus-article-mark-lists
2099 '((marked . tick) (replied . reply)
2100 (expirable . expire) (killed . killed)
2101 (bookmarks . bookmark) (dormant . dormant)
2102 (scored . score) (saved . save)
2103 (cached . cache) (downloadable . download)
2104 (unsendable . unsend) (forwarded . forward)
2105 (recent . recent) (seen . seen)))
2107 (defconst gnus-article-special-mark-lists
2113 ;; Propagate flags to server, with the following exceptions:
2114 ;; `seen' is private to each gnus installation
2115 ;; `cache' is a internal gnus flag for each gnus installation
2116 ;; `download' is a agent flag private to each gnus installation
2117 ;; `unsend' are for nndraft groups only
2118 ;; `score' is not a proper mark
2119 ;; `bookmark': don't propagated it, or fix the bug in update-mark.
2120 (defconst gnus-article-unpropagated-mark-lists
2121 '(seen cache download unsend score bookmark)
2122 "Marks that shouldn't be propagated to back ends.
2123 Typical marks are those that make no sense in a standalone back end,
2124 such as a mark that says whether an article is stored in the cache
2125 \(which doesn't make sense in a standalone back end).")
2127 (defvar gnus-headers-retrieved-by nil)
2128 (defvar gnus-article-reply nil)
2129 (defvar gnus-override-method nil)
2130 (defvar gnus-article-check-size nil)
2131 (defvar gnus-opened-servers nil)
2133 (defvar gnus-current-kill-article nil)
2135 (defvar gnus-have-read-active-file nil)
2137 (defconst gnus-maintainer
2138 "bugs@gnus.org (The Gnus Bugfixing Girls + Boys)"
2139 "The mail address of the Gnus maintainers.")
2141 (defvar gnus-info-nodes
2142 '((gnus-group-mode "(gnus)Group Buffer")
2143 (gnus-summary-mode "(gnus)Summary Buffer")
2144 (gnus-article-mode "(gnus)Article Buffer")
2145 (gnus-server-mode "(gnus)Server Buffer")
2146 (gnus-browse-mode "(gnus)Browse Foreign Server")
2147 (gnus-tree-mode "(gnus)Tree Display"))
2148 "Alist of major modes and related Info nodes.")
2150 (defvar gnus-group-buffer "*Group*")
2151 (defvar gnus-summary-buffer "*Summary*")
2152 (defvar gnus-article-buffer "*Article*")
2153 (defvar gnus-server-buffer "*Server*")
2155 (defvar gnus-slave nil
2156 "Whether this Gnus is a slave or not.")
2158 (defvar gnus-batch-mode nil
2159 "Whether this Gnus is running in batch mode or not.")
2161 (defvar gnus-variable-list
2162 '(gnus-newsrc-options gnus-newsrc-options-n
2163 gnus-newsrc-last-checked-date
2164 gnus-newsrc-alist gnus-server-alist
2165 gnus-killed-list gnus-zombie-list
2166 gnus-topic-topology gnus-topic-alist
2167 gnus-format-specs gnus-agent-covered-methods)
2168 "Gnus variables saved in the quick startup file.")
2170 (defvar gnus-newsrc-alist nil
2171 "Assoc list of read articles.
2172 gnus-newsrc-hashtb should be kept so that both hold the same information.")
2174 (defvar gnus-newsrc-hashtb nil
2175 "Hashtable of gnus-newsrc-alist.")
2177 (defvar gnus-killed-list nil
2178 "List of killed newsgroups.")
2180 (defvar gnus-killed-hashtb nil
2181 "Hash table equivalent of gnus-killed-list.")
2183 (defvar gnus-zombie-list nil
2184 "List of almost dead newsgroups.")
2186 (defvar gnus-description-hashtb nil
2187 "Descriptions of newsgroups.")
2189 (defvar gnus-list-of-killed-groups nil
2190 "List of newsgroups that have recently been killed by the user.")
2192 (defvar gnus-active-hashtb nil
2193 "Hashtable of active articles.")
2195 (defvar gnus-moderated-hashtb nil
2196 "Hashtable of moderated newsgroups.")
2198 ;; Save window configuration.
2199 (defvar gnus-prev-winconf nil)
2201 (defvar gnus-reffed-article-number nil)
2203 ;;; Let the byte-compiler know that we know about this variable.
2204 (defvar rmail-default-rmail-file)
2206 (defvar gnus-dead-summary nil)
2208 (defvar gnus-invalid-group-regexp "[: `'\"/]\\|^$"
2209 "Regexp matching invalid groups.")
2211 (defvar gnus-other-frame-object nil
2212 "A frame object which will be created by `gnus-other-frame'.")