Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!motcsd!hpda!hpycla!ouicsu!creamy!etlcom!titcca!fgw!flab!umerin From: umerin@flab.flab.Fujitsu.JUNET (Masanobu UMEDA) Newsgroups: comp.emacs,fj.editor.emacs Subject: GNUS 3.12: an NNTP-based newsreader for GNU Emacs (02 of 10) Message-ID: Date: 19 Jun 89 05:28:34 GMT Sender: umerin@flab.flab.fujitsu.JUNET Followup-To: comp.emacs Organization: Fujitsu Laboratories Ltd., Kawasaki, Japan. Lines: 1259 ---- Cut Here and unpack ---- #!/bin/sh # this is part 2 of a multipart archive # do not concatenate these parts, unpack them in order with /bin/sh # file gnus.el continued # CurArch=2 if test ! -r s2_seq_.tmp then echo "Please unpack part 1 first!" exit 1; fi ( read Scheck if test "$Scheck" != $CurArch then echo "Please unpack part $Scheck next!" exit 1; else exit 0; fi ) < s2_seq_.tmp || exit 1 sed 's/^X//' << 'SHAR_EOF' >> gnus.el X;; site-init.el, default.el or your .emacs. X X(defvar gnus-your-domain nil X "*Your domain name without your host name like: \"stars.flab.Fujitsu.CO.JP\" XThe `DOMAINNAME' environment variable is used instead if defined. If Xthe function (system-name) returns the full internet name, there is no Xneed to define the name.") X X(defvar gnus-your-organization nil X "*Your organization like: \"Fujitsu Laboratories Ltd., Kawasaki, Japan.\" XThe `ORGANIZATION' environment variable is used instead if defined.") X X(defvar gnus-use-generic-from nil X "*If nil, prepend local host name to the defined domain in the From: Xfield; if stringp, use this; if non-nil, strip of the local host name.") X X(defvar gnus-use-generic-path nil X "*If nil, use the NNTP server name in the Path: field; if stringp, Xuse this; if non-nil, use no host name (user name only)") X X(defvar gnus-Info-directory Info-directory X "*A directory placing an Info file of GNUS.") X X X;; Internal variables. X X(defconst gnus-version "GNUS 3.12" X "Version numbers of this version of GNUS.") X X(defvar gnus-Info-nodes X '((gnus-Group-mode . "(gnus)Newsgroup Commands") X (gnus-Subject-mode . "(gnus)Subject Commands") X (gnus-Article-mode . "(gnus)Article Commands") X (gnus-Kill-file-mode . "(gnus)KILL File") X (gnus-Browse-killed-mode . "(gnus)Maintenance")) X "Assoc list of major modes and related Info nodes.") ;Not user variable. X X(defvar gnus-access-methods X '((nntp X (gnus-retrieve-headers . nntp-retrieve-headers) X (gnus-open-server . nntp-open-server) X (gnus-close-server . nntp-close-server) X (gnus-server-opened . nntp-server-opened) X (gnus-status-message . nntp-status-message) X (gnus-request-article . nntp-request-article) X (gnus-request-group . nntp-request-group) X (gnus-request-list . nntp-request-list) X (gnus-request-post . nntp-request-post)) X (nnspool X (gnus-retrieve-headers . nnspool-retrieve-headers) X (gnus-open-server . nnspool-open-server) X (gnus-close-server . nnspool-close-server) X (gnus-server-opened . nnspool-server-opened) X (gnus-status-message . nnspool-status-message) X (gnus-request-article . nnspool-request-article) X (gnus-request-group . nnspool-request-group) X (gnus-request-list . nnspool-request-list) X (gnus-request-post . nnspool-request-post)) X (mhspool X (gnus-retrieve-headers . mhspool-retrieve-headers) X (gnus-open-server . mhspool-open-server) X (gnus-close-server . mhspool-close-server) X (gnus-server-opened . mhspool-server-opened) X (gnus-status-message . mhspool-status-message) X (gnus-request-article . mhspool-request-article) X (gnus-request-group . mhspool-request-group) X (gnus-request-list . mhspool-request-list) X (gnus-request-post . mhspool-request-post))) X "Access method for NNTP, nnspool, and mhspool.") X X(defvar gnus-Group-buffer "*Newsgroup*") X(defvar gnus-Subject-buffer "*Subject*") X(defvar gnus-Article-buffer "*Article*") X(defvar gnus-Digest-buffer "GNUS Digest") X(defvar gnus-Digest-summary-buffer "GNUS Digest-summary") X X(defvar gnus-buffer-list X (list gnus-Group-buffer gnus-Subject-buffer gnus-Article-buffer X gnus-Digest-buffer gnus-Digest-summary-buffer) X "GNUS buffers which should be killed when exiting.") X X(defvar gnus-variable-list X '(gnus-newsrc-options X gnus-newsrc-options-n-yes gnus-newsrc-options-n-no X gnus-newsrc-assoc gnus-killed-assoc gnus-marked-assoc) X "GNUS variables saved in the quick startup file.") X X(defvar gnus-newsrc-options nil X "Options line in the .newsrc file.") X X(defvar gnus-newsrc-options-n-yes nil X "Regexp representing subscribed newsgroups.") X X(defvar gnus-newsrc-options-n-no nil X "Regexp representing unsubscribed newsgroups.") X X(defvar gnus-newsrc-assoc nil X "Assoc list of read articles.") X X(defvar gnus-killed-assoc nil X "Assoc list of newsgroups removed from gnus-newsrc-assoc.") X X(defvar gnus-marked-assoc nil X "Assoc list of articles marked as unread.") X X(defvar gnus-unread-hashtb nil X "Hashtable of unread articles.") X X(defvar gnus-active-hashtb nil X "Hashtable of active articles.") X X(defvar gnus-octive-hashtb nil X "Hashtable of OLD active articles.") X X(defvar gnus-current-startup-file nil X "Startup file for the current host.") X X(defvar gnus-last-search-regexp nil X "Default regexp for article search command.") X X(defvar gnus-last-shell-command nil X "Default shell command on article.") X X(defvar gnus-newsgroup-name nil) X(defvar gnus-newsgroup-begin nil) X(defvar gnus-newsgroup-end nil) X(defvar gnus-newsgroup-last-rmail nil) X(defvar gnus-newsgroup-last-mail nil) X(defvar gnus-newsgroup-last-folder nil) X(defvar gnus-newsgroup-last-file nil) X(defvar gnus-have-all-newsgroups nil) X X(defvar gnus-newsgroup-unreads nil X "List of unread articles in the current newsgroup.") X X(defvar gnus-newsgroup-unselected nil X "List of unselected unread articles in the current newsgroup.") X X(defvar gnus-newsgroup-marked nil X "List of marked articles in the current newsgroup (a subset of unread art).") X X(defvar gnus-newsgroup-headers nil X "List of article headers in the current newsgroup.") X X(defvar gnus-current-article nil) X(defvar gnus-current-headers nil) X(defvar gnus-current-history nil) X(defvar gnus-have-all-headers nil) X(defvar gnus-last-article nil) X(defvar gnus-current-kill-article nil) X X(defvar gnus-Group-mode-map nil) X(defvar gnus-Subject-mode-map nil) X(defvar gnus-Article-mode-map nil) X(defvar gnus-Kill-file-mode-map nil) X X(defvar rmail-last-file (expand-file-name "~/XMBOX")) X(defvar rmail-last-rmail-file (expand-file-name "~/XNEWS")) X X;; Define GNUS Subsystems. X X(autoload 'gnus-Group-kill-group "gnusmisc" X "Kill newsgroup on current line." t) X(autoload 'gnus-Group-yank-group "gnusmisc" X "Yank the last killed newsgroup on current line." t) X(autoload 'gnus-Browse-killed-groups "gnusmisc" X "Browse the killed newsgroups." t) X X(autoload 'gnus-post-news "gnuspost" "Post a new news." t) X(autoload 'gnus-news-reply "gnuspost" "Post a reply news." t) X(autoload 'gnus-cancel-news "gnuspost" "Cancel your news." t) X X(autoload 'rmail-output "rmailout" X "Append this message to Unix mail file named FILE-NAME." t) X(autoload 'news-mail-reply "rnewspost") X(autoload 'news-mail-other-window "rnewspost") X(autoload 'mail-position-on-field "sendmail") X(autoload 'mh-find-path "mh-e") X(autoload 'mh-prompt-for-folder "mh-e") X X(put 'gnus-Group-mode 'mode-class 'special) X(put 'gnus-Subject-mode 'mode-class 'special) X(put 'gnus-Article-mode 'mode-class 'special) X X X;;(put 'gnus-eval-in-buffer-window 'lisp-indent-hook 1) X X(defmacro gnus-eval-in-buffer-window (buffer &rest forms) X "Pop to BUFFER, evaluate FORMS, and then returns to original window." X (` (let ((GNUSStartBufferWindow (selected-window))) X (unwind-protect X (progn X (pop-to-buffer (, buffer)) X (,@ forms)) X (select-window GNUSStartBufferWindow))))) X X(defmacro gnus-make-hashtable () X '(make-abbrev-table)) X X(defmacro gnus-gethash (string hashtable) X "Get hash value of STRING in HASHTABLE." X ;;(` (symbol-value (abbrev-symbol (, string) (, hashtable)))) X (` (abbrev-expansion (, string) (, hashtable)))) X X(defmacro gnus-sethash (string value hashtable) X "Set hash value. Arguments are STRING, VALUE, and HASHTABLE." X ;; We cannot use define-abbrev since it only accepts string as value. X (` (set (intern (, string) (, hashtable)) (, value)))) X X;; Note: Macros defined here are also defined in nntp.el. I don't like X;; to put them here, but many users got troubled with the old X;; definitions in nntp.elc. These codes are NNTP 3.7 version. X X(defmacro nntp-header-number (header) X "Return article number in HEADER." X (` (aref (, header) 0))) X X(defmacro nntp-set-header-number (header number) X "Set article number of HEADER to NUMBER." X (` (aset (, header) 0 (, number)))) X X(defmacro nntp-header-subject (header) X "Return subject string in HEADER." X (` (aref (, header) 1))) X X(defmacro nntp-set-header-subject (header subject) X "Set article subject of HEADER to SUBJECT." X (` (aset (, header) 1 (, subject)))) X X(defmacro nntp-header-from (header) X "Return author string in HEADER." X (` (aref (, header) 2))) X X(defmacro nntp-set-header-from (header from) X "Set article author of HEADER to FROM." X (` (aset (, header) 2 (, from)))) X X(defmacro nntp-header-xref (header) X "Return xref string in HEADER." X (` (aref (, header) 3))) X X(defmacro nntp-set-header-xref (header xref) X "Set article xref of HEADER to xref." X (` (aset (, header) 3 (, xref)))) X X(defmacro nntp-header-lines (header) X "Return lines in HEADER." X (` (aref (, header) 4))) X X(defmacro nntp-set-header-lines (header lines) X "Set article lines of HEADER to LINES." X (` (aset (, header) 4 (, lines)))) X X(defmacro nntp-header-date (header) X "Return date in HEADER." X (` (aref (, header) 5))) X X(defmacro nntp-set-header-date (header date) X "Set article date of HEADER to DATE." X (` (aset (, header) 5 (, date)))) X X(defmacro nntp-header-id (header) X "Return date in HEADER." X (` (aref (, header) 6))) X X(defmacro nntp-set-header-id (header id) X "Set article ID of HEADER to ID." X (` (aset (, header) 6 (, id)))) X X X;;; X;;; GNUS Group Mode X;;; X X(if gnus-Group-mode-map X nil X (setq gnus-Group-mode-map (make-keymap)) X (suppress-keymap gnus-Group-mode-map) X (define-key gnus-Group-mode-map " " 'gnus-Group-read-group) X (define-key gnus-Group-mode-map "=" 'gnus-Group-select-group) X (define-key gnus-Group-mode-map "j" 'gnus-Group-jump-to-group) X (define-key gnus-Group-mode-map "n" 'gnus-Group-next-unread-group) X (define-key gnus-Group-mode-map "p" 'gnus-Group-prev-unread-group) X (define-key gnus-Group-mode-map "\177" 'gnus-Group-prev-unread-group) X (define-key gnus-Group-mode-map "N" 'gnus-Group-next-group) X (define-key gnus-Group-mode-map "P" 'gnus-Group-prev-group) X (define-key gnus-Group-mode-map "\C-n" 'gnus-Group-next-group) X (define-key gnus-Group-mode-map "\C-p" 'gnus-Group-prev-group) X (define-key gnus-Group-mode-map "\r" 'next-line) X (define-key gnus-Group-mode-map "/" 'isearch-forward) X (define-key gnus-Group-mode-map "<" 'beginning-of-buffer) X (define-key gnus-Group-mode-map ">" 'end-of-buffer) X (define-key gnus-Group-mode-map "u" 'gnus-Group-unsubscribe-current-group) X (define-key gnus-Group-mode-map "U" 'gnus-Group-unsubscribe-group) X (define-key gnus-Group-mode-map "c" 'gnus-Group-catch-up) X (define-key gnus-Group-mode-map "C" 'gnus-Group-catch-up-all) X (define-key gnus-Group-mode-map "l" 'gnus-Group-list-groups) X (define-key gnus-Group-mode-map "L" 'gnus-Group-list-all-groups) X (define-key gnus-Group-mode-map "g" 'gnus-Group-get-new-news) X (define-key gnus-Group-mode-map "R" 'gnus-Group-restart) X (define-key gnus-Group-mode-map "b" 'gnus-Group-check-bogus-groups) X (define-key gnus-Group-mode-map "r" 'gnus-Group-restrict-groups) X (define-key gnus-Group-mode-map "a" 'gnus-Group-post-news) X (define-key gnus-Group-mode-map "\ek" 'gnus-Group-edit-local-kill) X (define-key gnus-Group-mode-map "\eK" 'gnus-Group-edit-global-kill) X (define-key gnus-Group-mode-map "\C-k" 'gnus-Group-kill-group) X (define-key gnus-Group-mode-map "\C-y" 'gnus-Group-yank-group) X (define-key gnus-Group-mode-map "\C-c\C-y" 'gnus-Browse-killed-groups) X (define-key gnus-Group-mode-map "V" 'gnus-version) X (define-key gnus-Group-mode-map "x" 'gnus-Group-force-update) X (define-key gnus-Group-mode-map "s" 'gnus-Group-force-update) X (define-key gnus-Group-mode-map "z" 'gnus-Group-suspend) X (define-key gnus-Group-mode-map "q" 'gnus-Group-exit) X (define-key gnus-Group-mode-map "Q" 'gnus-Group-quit) X (define-key gnus-Group-mode-map "?" 'gnus-Group-describe-briefly) X (define-key gnus-Group-mode-map "\C-c\C-i" 'gnus-Info-find-node)) X X(defun gnus-Group-mode () X "Major mode for reading network news. XAll normal editing commands are turned off. XInstead, these commands are available: X XSPC Read articles in this newsgroup. X= Select this newsgroup. Xj Move to the specified newsgroup. Xn Move to the next unread newsgroup. Xp Move to the previous unread newsgroup. XC-n Move to the next newsgroup. XC-p Move to the previous newsgroup. X/ Do an incremental search forward. X< Move point to the beginning of this buffer. X> Move point to the end of this buffer. Xu Unsubscribe from (subscribe to) this newsgroup. XU Unsubscribe from (subscribe to) the specified newsgroup. Xc Mark all articles as read, preserving marked articles. XC Mark all articles in this newsgroup as read. Xl Revert this buffer. XL List all newsgroups. Xg Get new news. XR Force to read the raw .newsrc file and get new news. Xb Check bogus newsgroups. Xr Restrict visible newsgroups to the current region. Xa Post a new article. XESC k Edit a local KILL file applied to this newsgroup. XESC K Edit a global KILL file applied to all newsgroups. XC-k Kill this newsgroup. XC-y Yank killed newsgroup here. XC-c C-y Browse killed newsgroups. Xs Save .newsrc file. Xz Suspend reading news. Xq Quit reading news. XQ Quit reading news without saving .newsrc file. XV Show the version number of this GNUS. X? Describe Group Mode commands briefly. XC-h m Describe Group Mode. XC-c C-i Read Info about Group Mode. X X The name of the host running NNTP server is asked for if no default Xhost is specified. It is also possible to choose another NNTP server Xeven when the default server is defined by giving a prefix argument to Xthe command `\\[gnus]'. X X If an NNTP server is preceded by a colon such as `:Mail', the user's Xprivate directory `~/Mail' is used as a news spool. This makes it Xpossible to read mail stored in MH folders or articles saved by GNUS. XFile names of mail or articles must consist of only numeric Xcharacters. Otherwise, they are ignored. X X If there is a file named `~/.newsrc-SERVER', it is used as the Xstartup file instead of standard one when talking to SERVER. It is Xpossible to talk to many hosts by using different startup files for Xeach. X X Option `-n' of the options line in the startup file is recognized Xproperly the same as the Bnews system. For example, if the options Xline is `options -n !talk talk.rumors', newsgroups under the `talk' Xhierarchy except for `talk.rumors' are ignored while checking new Xnewsgroups. X X If there is a file named `~/.signature-DISTRIBUTION', it is used as Xsignature file instead of standard one when posting a news in XDISTRIBUTION. X X If an Info file generated from `gnus.texinfo' is installed, you can Xread an appropriate Info node of the Info file according to the Xcurrent major mode of GNUS by \\[gnus-Info-find-node]. X X The variable `gnus-version', `nntp-version', `nnspool-version', and X`mhspool-version' have the version numbers of this version of gnus.el, Xnntp.el, nnspool.el, and mhspoo.el, respectively. X XUser customizable variables: X gnus-nntp-server X Specifies the name of the host running the NNTP server. If its X value is a string such as `:DIRECTORY', the user's private X DIRECTORY is used as a news spool. The variable is initialized X from the NNTPSERVER environment variable. X X gnus-nntp-service X Specifies a NNTP service name. It is usually \"nntp\" or 119. Nil X forces GNUS to use a local news spool if the variable X `gnus-nntp-server' is set to the local host name. X X gnus-startup-file X Specifies a startup file (.newsrc). If there is a file named X `.newsrc-SERVER', it's used instead when talking to SERVER. I X recommend you to use the server specific file, if you'd like to X talk to many servers. Especially if you'd like to read your X private directory, the name of the file must be X `.newsrc-:DIRECTORY'. X X gnus-signature-file X Specifies a signature file (.signature). If there is a file named X `.signature-DISTRIBUTION', it's used instead when posting an X article in DISTRIBUTION. Set the variable to nil to prevent X appending the file automatically. If you use an NNTP inews which X comes with the NNTP package, you may have to set the variable to X nil. X X gnus-author-copy X Specifies a file name to save a copy of article you posted using X FCC: field. If the first character of the value is `|', the X contents of the article is piped out to a program specified by the X rest of the value. The variable is initialized from the X AUTHORCOPY environment variable. X X gnus-kill-file-name X Use specified file name as a KILL file (default to `KILL'). X X gnus-novice-user X Non-nil means that you are a novice to USENET. If non-nil, X verbose messages may be displayed or your confirmations may be X required. X X gnus-interactive-post X Non-nil means that newsgroup, subject and distribution are asked X for interactively when posting a new article. X X gnus-use-full-window X Non-nil means to take up the entire screen of Emacs. X X gnus-window-configuration X Specifies the configuration of Group, Subject, and Article X windows. It is a list of (ACTION (G S A)), where G, S, and A are X the relative height of Group, Subject, and Article windows, X respectively. ACTION is `SelectNewsgroup', `ExitNewsgroup', X `SelectArticle', or `ExpandSubject'. X X [gnus-subject-lines-height is obsolete. Use gnus-window-configuration.] X XVarious hooks for customization: X gnus-Group-mode-hook X Entry to this mode calls the value with no arguments, if that X value is non-nil. This hook is called before GNUS is connected to X the NNTP server. So, you can change or define the NNTP server in X this hook. X X gnus-Startup-hook X Called with no arguments after the NNTP server is selected. It is X possible to change the behavior of GNUS or initialize the X variables according to the selected NNTP server. X X gnus-Group-prepare-hook X Called with no arguments after a newsgroup list is created in the X Newsgroup buffer, if that value is non-nil. See the documentation X of this variable for more information. X X gnus-Save-newsrc-hook X Called with no arguments when saving newsrc file if that value is X non-nil. X X gnus-Inews-article-hook X Called with no arguments when posting an article if that value is X non-nil. This hook is called just before posting an article, while X news-inews-hook is called before preparing article headers. If X you'd like to convert kanji code of the article, this hook is recommended. X X gnus-Suspend-gnus-hook X Called with no arguments when suspending (not exiting) GNUS, if X that value is non-nil. X X gnus-Exit-gnus-hook X Called with no arguments when exiting (not suspending) GNUS, if X that value is non-nil." X (interactive) X (kill-all-local-variables) X ;; Gee. Why don't you upgrade? X (cond ((boundp 'mode-line-modified) X (setq mode-line-modified "--- ")) X ((listp (default-value 'mode-line-format)) X (setq mode-line-format X (cons "--- " (cdr (default-value 'mode-line-format))))) X (t X (setq mode-line-format X "--- GNUS: List of Newsgroups %[(%m)%]----%3p-%-"))) X (setq major-mode 'gnus-Group-mode) X (setq mode-name "GNUS Newsgroup") X (setq mode-line-buffer-identification "GNUS: List of Newsgroups") X (setq mode-line-process nil) X (use-local-map gnus-Group-mode-map) X (buffer-flush-undo (current-buffer)) X (setq buffer-read-only t) ;Disable modification X (run-hooks 'gnus-Group-mode-hook)) X X(defun gnus (&optional confirm) X "Read network news. XIf optional argument CONFIRM is non-nil, ask NNTP server." X (interactive "P") X (unwind-protect X (progn X (switch-to-buffer (get-buffer-create gnus-Group-buffer)) X (gnus-Group-mode) X (gnus-start-news-server confirm)) X (if (not (gnus-server-opened)) X (gnus-Group-quit) X ;; NNTP server is successfully open. X (setq mode-line-process (format " {%s}" gnus-nntp-server)) X (let ((buffer-read-only nil)) X (erase-buffer) X (gnus-Group-startup-message) X (sit-for 0)) X (run-hooks 'gnus-Startup-hook) X (gnus-setup-news-info) X (if gnus-novice-user X (gnus-Group-describe-briefly)) ;Show brief help message. X (gnus-Group-list-groups nil) X ))) X X(defun gnus-Group-startup-message () X "Insert startup message in current buffer." X ;; Insert the message. X (insert " X GNUS Version 3.12 X X NNTP-based News Reader for GNU Emacs X X XIf you have any trouble with this software, please let me Xknow. I will fix your problems in the next release. X XComments, suggestions, and bug fixes are welcome. X XMasanobu UMEDA Xumerin@flab.Fujitsu.CO.JP Xumerin%flab.Fujitsu.JUNET@uunet.UU.NET") X ;; And then hack it. X ;; 57 is the longest line. X (indent-rigidly (point-min) (point-max) (/ (max (- (window-width) 57) 0) 2)) X (goto-char (point-min)) X ;; +4 is fuzzy factor. X (insert-char ?\n (/ (max (- (window-height) 18) 0) 2))) X X(defun gnus-Group-list-groups (show-all) X "List newsgroups in the Newsgroup buffer. XIf argument SHOW-ALL is non-nil, unsubscribed groups are also listed." X (interactive "P") X (gnus-Group-prepare show-all) X (if (zerop (buffer-size)) X (message "No news is good news") X ;; Adjust cursor point. X (beginning-of-line) ;(goto-char (point-min)) X (search-forward ":" nil t) X )) X X(defun gnus-Group-prepare (&optional all) X "Prepare list of newsgroups in current buffer. XIf optional argument ALL is non-nil, unsubscribed groups are also listed." X (let ((buffer-read-only nil) X (newsrc gnus-newsrc-assoc) X (group-info nil) X (group-name nil) X (unread-count 0) X ;; This specifies the format of Group buffer. X (cntl "%s%s%5d: %s\n")) X (erase-buffer) X ;; List newsgroups. X (while newsrc X (setq group-info (car newsrc)) X (setq group-name (car group-info)) X (setq unread-count (nth 1 (gnus-gethash group-name gnus-unread-hashtb))) X (if (or all X (and (nth 1 group-info) ;Subscribed. X (> unread-count 0))) ;There are unread articles. X ;; Yes, I can use gnus-Group-prepare-line, but this is faster. X (insert X (format cntl X ;; Subscribed or not. X (if (nth 1 group-info) " " "U") X ;; Has new news? X (if (and (> unread-count 0) X (>= 0 X (- unread-count X (length X (cdr (assoc group-name X gnus-marked-assoc)))))) X "*" " ") X ;; Number of unread articles. X unread-count X ;; Newsgroup name. X group-name)) X ) X (setq newsrc (cdr newsrc)) X ) X (setq gnus-have-all-newsgroups all) X (goto-char (point-min)) X (run-hooks 'gnus-Group-prepare-hook) X )) X X(defun gnus-Group-prepare-line (info) X "Return a string for the Newsgroup buffer from INFO. XINFO is an element of gnus-newsrc-assoc or gnus-killed-assoc." X (let* ((group-name (car info)) X (unread-count X (or (nth 1 (gnus-gethash group-name gnus-unread-hashtb)) X ;; Not in hash table, so compute it now. X (gnus-number-of-articles X (gnus-difference-of-range X (nth 2 (gnus-gethash group-name gnus-active-hashtb)) X (nthcdr 2 info))))) X ;; This specifies the format of Group buffer. X (cntl "%s%s%5d: %s\n")) X (format cntl X ;; Subscribed or not. X (if (nth 1 info) " " "U") X ;; Has new news? X (if (and (> unread-count 0) X (>= 0 X (- unread-count X (length X (cdr (assoc group-name gnus-marked-assoc)))))) X "*" " ") X ;; Number of unread articles. X unread-count X ;; Newsgroup name. X group-name X ))) X X(defun gnus-Group-update-group (group &optional visible-only) X "Update newsgroup info of GROUP. XIf optional argument VISIBLE-ONLY is non-nil, non displayed group is ignored." X (let ((buffer-read-only nil) X (visible nil)) X ;; Buffer may be narrowed. X (save-restriction X (widen) X ;; Search point to modify. X (goto-char (point-min)) X (if (re-search-forward (concat "^.+: " (regexp-quote group) "$") nil t) X ;; GROUP is listed in current buffer. So, delete old line. X (progn X (setq visible t) X (beginning-of-line) X (delete-region (point) (progn (forward-line 1) (point))) X )) X (if (or visible (not visible-only)) X (progn X (insert (gnus-Group-prepare-line (assoc group gnus-newsrc-assoc))) X (forward-line -1) ;Move point on that line. X )) X ))) X X;; GNUS Group mode command X X(defun gnus-Group-group-name () X "Get newsgroup name around point." X (save-excursion X (beginning-of-line) X (if (looking-at ".[* \t]*[0-9]+:[ \t]+\\([^ \t\n]+\\)$") X (buffer-substring (match-beginning 1) (match-end 1)) X ))) X X(defun gnus-Group-read-group (all &optional no-article) X "Read news in this newsgroup. XIf argument ALL is non-nil, already read articles become readable. XIf optional argument NO-ARTICLE is non-nil, no article body is displayed." X (interactive "P") X (let ((group (gnus-Group-group-name))) ;Newsgroup name to read. X (if group X (gnus-Subject-read-group X group X (or all X ;;(not (nth 1 (assoc group gnus-newsrc-assoc))) ;Unsubscribed X (zerop X (nth 1 (gnus-gethash group gnus-unread-hashtb)))) ;No unread X no-article X )) X )) X X(defun gnus-Group-select-group (all) X "Select this newsgroup. XNo article is selected automatically. XIf argument ALL is non-nil, already read articles become readable." X (interactive "P") X (gnus-Group-read-group all t)) X X(defun gnus-Group-jump-to-group (group) X "Jump to newsgroup GROUP." X (interactive X (list (completing-read "Newsgroup: " gnus-newsrc-assoc nil 'require-match))) X (goto-char (point-min)) X (or (re-search-forward (concat "^.+: " (regexp-quote group) "$") nil t) X (if (assoc group gnus-newsrc-assoc) X ;; Add GROUP entry, then seach again. X (gnus-Group-update-group group))) X ;; Adjust cursor point. X (beginning-of-line) X (search-forward ":" nil t)) X X(defun gnus-Group-search-forward (backward any-group) X "Search for newsgroup forward. XIf 1st argument BACKWARD is non-nil, search backward instead. XIf 2nd argument ANY-GROUP is non-nil, unsubscribed or empty group Xmay be selected." X (let ((func (if backward 're-search-backward 're-search-forward)) X (regexp X (format "^%s[ \t]*\\(%s\\):" X (if any-group ".." " [ \t]") X (if any-group "[0-9]+" "[1-9][0-9]*"))) X (found nil)) X (if backward X (beginning-of-line) X (end-of-line)) X (setq found (funcall func regexp nil t)) X ;; Adjust cursor point. X (beginning-of-line) X (search-forward ":" nil t) X ;; Return T if found. X found X )) X X(defun gnus-Group-next-group (n) X "Go to next N'th newsgroup." X (interactive "p") X (while (and (> n 1) X (gnus-Group-search-forward nil t)) X (setq n (1- n))) X (or (gnus-Group-search-forward nil t) X (message "No more newsgroup"))) X X(defun gnus-Group-next-unread-group (n) X "Go to next N'th unread newsgroup." X (interactive "p") X (while (and (> n 1) X (gnus-Group-search-forward nil nil)) X (setq n (1- n))) X (or (gnus-Group-search-forward nil nil) X (message "No more unread newsgroup"))) X X(defun gnus-Group-prev-group (n) X "Go to previous N'th newsgroup." X (interactive "p") X (while (and (> n 1) X (gnus-Group-search-forward t t)) X (setq n (1- n))) X (or (gnus-Group-search-forward t t) X (message "No more newsgroup"))) X X(defun gnus-Group-prev-unread-group (n) X "Go to previous N'th unread newsgroup." X (interactive "p") X (while (and (> n 1) X (gnus-Group-search-forward t nil)) X (setq n (1- n))) X (or (gnus-Group-search-forward t nil) X (message "No more unread newsgroup"))) X X(defun gnus-Group-catch-up (all &optional quietly) X "Mark all articles not marked as unread in current newsgroup as read. XIf prefix argument ALL is non-nil, all articles are marked as read. XCross references (Xref: field) of articles are ignored." X (interactive "P") X (let* ((group (gnus-Group-group-name)) X (marked (if (not all) X (cdr (assoc group gnus-marked-assoc))))) X (and group X (or quietly X (y-or-n-p X (if all X "Do you really want to mark everything as read? " X "Delete all articles not marked as read? "))) X (progn X (message "") ;Erase "Yes or No" question. X ;; Any marked articles will be preserved. X (gnus-update-unread-articles group marked marked) X (gnus-Group-update-group group) X (gnus-Group-next-group 1))) X )) X X(defun gnus-Group-catch-up-all (&optional quietly) X "Mark all articles in current newsgroup as read. XCross references (Xref: field) of articles are ignored." X (interactive) X (gnus-Group-catch-up t quietly)) X X(defun gnus-Group-unsubscribe-current-group () X "Toggle subscribe from/to unsubscribe current group." X (interactive) X (gnus-Group-unsubscribe-group (gnus-Group-group-name)) X (gnus-Group-next-group 1)) X X(defun gnus-Group-unsubscribe-group (group) X "Toggle subscribe from/to unsubscribe GROUP. XNew newsgroup is added to .newsrc automatically." X (interactive X (list (completing-read "Newsgroup: " X gnus-active-hashtb nil 'require-match))) X (let ((newsrc (assoc group gnus-newsrc-assoc))) X (cond ((not (null newsrc)) X ;; Toggle subscription flag. X (setcar (nthcdr 1 newsrc) (not (nth 1 newsrc))) X (gnus-update-newsrc-buffer group) X (gnus-Group-update-group group) X ;; Adjust cursor point. X (beginning-of-line) X (search-forward ":" nil t)) X ((and (stringp group) X (gnus-gethash group gnus-active-hashtb)) X ;; Add new newsgroup. X (gnus-add-new-newsgroup group) X (gnus-Group-update-group group) X ;; Adjust cursor point. X (beginning-of-line) X (search-forward ":" nil t)) X (t (error "No such newsgroup: %s" group))) X )) X X(defun gnus-Group-list-all-groups () X "List all of newsgroups in the Newsgroup buffer." X (interactive) X (gnus-Group-list-groups t)) X X(defun gnus-Group-get-new-news () X "Get newly arrived articles. In fact, read the active file again." X (interactive) X (gnus-setup-news-info) X (gnus-Group-list-groups gnus-have-all-newsgroups)) X X(defun gnus-Group-restart () X "Force GNUS to read the raw startup file." X (interactive) X (gnus-save-newsrc-file) X (gnus-setup-news-info t) ;Force to read the raw startup file. X (gnus-Group-list-groups gnus-have-all-newsgroups)) X X(defun gnus-Group-check-bogus-groups () X "Check bogus newsgroups." X (interactive) X (gnus-check-bogus-newsgroups t) ;Require confirmation. X (gnus-Group-list-groups gnus-have-all-newsgroups)) X X(defun gnus-Group-restrict-groups (start end) X "Restrict visible newsgroups to the current region (START and END). XType \\[widen] to remove restriction." X (interactive "r") X (save-excursion X (narrow-to-region (progn X (goto-char start) X (beginning-of-line) X (point)) X (progn X (goto-char end) X (forward-line 1) X (point)))) X (message (substitute-command-keys "Type \\[widen] to remove restriction"))) X X(defun gnus-Group-post-news () X "Post an article." X (interactive) X (if (get-buffer gnus-Subject-buffer) X (bury-buffer gnus-Subject-buffer)) X (if (get-buffer gnus-Article-buffer) X (bury-buffer gnus-Article-buffer)) X (gnus-post-news)) X X(defun gnus-Group-edit-global-kill () X "Edit a global KILL file." X (interactive) X (setq gnus-current-kill-article nil) ;No articles selected. X (gnus-Kill-file-edit-file nil) ;Nil stands for global KILL file. X (message X (substitute-command-keys X "Editing a global KILL file (Type \\[gnus-Kill-file-exit] to exit)"))) X X(defun gnus-Group-edit-local-kill () X "Edit a local KILL file." X (interactive) X (setq gnus-current-kill-article nil) ;No articles selected. X (gnus-Kill-file-edit-file (gnus-Group-group-name)) X (message X (substitute-command-keys X "Editing a local KILL file (Type \\[gnus-Kill-file-exit] to exit)"))) X X(defun gnus-Group-force-update () X "Update .newsrc file." X (interactive) X (gnus-save-newsrc-file)) X X(defun gnus-Group-suspend () X "Suspend the current GNUS session. XIn fact, cleanup buffers except for Group Mode buffer. XThe hook gnus-Suspend-gnus-hook is called before actually suspending." X (interactive) X (run-hooks 'gnus-Suspend-gnus-hook) X ;; Kill GNUS buffers except for Group Mode buffer. X (let ((buffers gnus-buffer-list)) X (while buffers X (and (not (eq (car buffers) gnus-Group-buffer)) X (get-buffer (car buffers)) X (kill-buffer (car buffers))) X (setq buffers (cdr buffers)) X )) X (bury-buffer)) X X(defun gnus-Group-exit () X "Quit reading news after updating .newsrc. XThe hook gnus-Exit-gnus-hook is called before actually quitting." X (interactive) X (if (or (zerop (buffer-size)) X (not (gnus-server-opened)) X (y-or-n-p "Are you sure you want to quit reading news? ")) X (progn X (message "") ;Erase "Yes or No" question. X (run-hooks 'gnus-Exit-gnus-hook) X (gnus-save-newsrc-file) X (gnus-clear-system) X (gnus-close-server)) X )) X X(defun gnus-Group-quit () X "Quit reading news without updating .newsrc. XThe hook gnus-Exit-gnus-hook is called before actually quitting." X (interactive) X (if (or (zerop (buffer-size)) X (not (gnus-server-opened)) X (yes-or-no-p X (format "Quit reading news without saving %s? " X (file-name-nondirectory gnus-current-startup-file)))) X (progn X (message "") ;Erase "Yes or No" question. X (run-hooks 'gnus-Exit-gnus-hook) X (gnus-clear-system) X (gnus-close-server)) X )) X X(defun gnus-Group-describe-briefly () X "Describe Group mode commands briefly." X (interactive) X (message X (concat X (substitute-command-keys "\\[gnus-Group-read-group]:Select ") X (substitute-command-keys "\\[gnus-Group-next-unread-group]:Forward ") X (substitute-command-keys "\\[gnus-Group-prev-unread-group]:Backward ") X (substitute-command-keys "\\[gnus-Group-exit]:Exit ") X (substitute-command-keys "\\[gnus-Info-find-node]:Run Info ") X (substitute-command-keys "\\[gnus-Group-describe-briefly]:This help") X ))) X X X;;; X;;; GNUS Subject Mode X;;; X X(if gnus-Subject-mode-map X nil X (setq gnus-Subject-mode-map (make-keymap)) X (suppress-keymap gnus-Subject-mode-map) X (define-key gnus-Subject-mode-map " " 'gnus-Subject-next-page) X (define-key gnus-Subject-mode-map "\177" 'gnus-Subject-prev-page) X (define-key gnus-Subject-mode-map "\r" 'gnus-Subject-scroll-up) X (define-key gnus-Subject-mode-map "n" 'gnus-Subject-next-unread-article) X (define-key gnus-Subject-mode-map "p" 'gnus-Subject-prev-unread-article) X (define-key gnus-Subject-mode-map "N" 'gnus-Subject-next-article) X (define-key gnus-Subject-mode-map "P" 'gnus-Subject-prev-article) X (define-key gnus-Subject-mode-map "\e\C-n" 'gnus-Subject-next-same-subject) X (define-key gnus-Subject-mode-map "\e\C-p" 'gnus-Subject-prev-same-subject) X ;;(define-key gnus-Subject-mode-map "\e\C-n" 'gnus-Subject-next-unread-same-subject) X ;;(define-key gnus-Subject-mode-map "\e\C-p" 'gnus-Subject-prev-unread-same-subject) X (define-key gnus-Subject-mode-map "\C-c\C-n" 'gnus-Subject-next-digest) X (define-key gnus-Subject-mode-map "\C-c\C-p" 'gnus-Subject-prev-digest) X (define-key gnus-Subject-mode-map "\C-n" 'gnus-Subject-next-subject) X (define-key gnus-Subject-mode-map "\C-p" 'gnus-Subject-prev-subject) X (define-key gnus-Subject-mode-map "\en" 'gnus-Subject-next-unread-subject) X (define-key gnus-Subject-mode-map "\ep" 'gnus-Subject-prev-unread-subject) X ;;(define-key gnus-Subject-mode-map "\C-cn" 'gnus-Subject-next-group) X ;;(define-key gnus-Subject-mode-map "\C-cp" 'gnus-Subject-prev-group) X (define-key gnus-Subject-mode-map "." 'gnus-Subject-first-unread-article) X (define-key gnus-Subject-mode-map "/" 'isearch-forward) X (define-key gnus-Subject-mode-map "s" 'gnus-Subject-isearch-article) X (define-key gnus-Subject-mode-map "\es" 'gnus-Subject-search-article-forward) X (define-key gnus-Subject-mode-map "\eS" 'gnus-Subject-search-article-backward) X (define-key gnus-Subject-mode-map "<" 'gnus-Subject-beginning-of-article) X (define-key gnus-Subject-mode-map ">" 'gnus-Subject-end-of-article) X (define-key gnus-Subject-mode-map "j" 'gnus-Subject-goto-subject) X (define-key gnus-Subject-mode-map "J" 'gnus-Subject-goto-article) X (define-key gnus-Subject-mode-map "l" 'gnus-Subject-goto-last-article) X (define-key gnus-Subject-mode-map "^" 'gnus-Subject-refer-parent-article) X (define-key gnus-Subject-mode-map "\er" 'gnus-Subject-refer-article) X (define-key gnus-Subject-mode-map "u" 'gnus-Subject-mark-as-unread-forward) X (define-key gnus-Subject-mode-map "U" 'gnus-Subject-mark-as-unread-backward) X (define-key gnus-Subject-mode-map "d" 'gnus-Subject-mark-as-read-forward) X (define-key gnus-Subject-mode-map "D" 'gnus-Subject-mark-as-read-backward) X (define-key gnus-Subject-mode-map "\eu" 'gnus-Subject-clear-mark-forward) X (define-key gnus-Subject-mode-map "\eU" 'gnus-Subject-clear-mark-backward) X (define-key gnus-Subject-mode-map "k" 'gnus-Subject-kill-same-subject-and-select) X (define-key gnus-Subject-mode-map "\C-k" 'gnus-Subject-kill-same-subject) X (define-key gnus-Subject-mode-map "&" 'gnus-Subject-execute-command) X ;;(define-key gnus-Subject-mode-map "c" 'gnus-Subject-catch-up) X ;;(define-key gnus-Subject-mode-map "c" 'gnus-Subject-catch-up-all) X (define-key gnus-Subject-mode-map "c" 'gnus-Subject-catch-up-and-exit) X ;;(define-key gnus-Subject-mode-map "c" 'gnus-Subject-catch-up-all-and-exit) X (define-key gnus-Subject-mode-map "\C-t" 'gnus-Subject-toggle-truncation) X (define-key gnus-Subject-mode-map "x" 'gnus-Subject-delete-marked-as-read) X (define-key gnus-Subject-mode-map "X" 'gnus-Subject-delete-marked-with) X (define-key gnus-Subject-mode-map "\C-c\C-sn" 'gnus-Subject-sort-by-number) X (define-key gnus-Subject-mode-map "\C-c\C-sa" 'gnus-Subject-sort-by-author) X (define-key gnus-Subject-mode-map "\C-c\C-ss" 'gnus-Subject-sort-by-subject) X (define-key gnus-Subject-mode-map "\C-c\C-sd" 'gnus-Subject-sort-by-date) X (define-key gnus-Subject-mode-map "\C-c\C-s\C-n" 'gnus-Subject-sort-by-number) X (define-key gnus-Subject-mode-map "\C-c\C-s\C-a" 'gnus-Subject-sort-by-author) X (define-key gnus-Subject-mode-map "\C-c\C-s\C-s" 'gnus-Subject-sort-by-subject) X (define-key gnus-Subject-mode-map "\C-c\C-s\C-d" 'gnus-Subject-sort-by-date) X (define-key gnus-Subject-mode-map "=" 'gnus-Subject-expand-window) X (define-key gnus-Subject-mode-map "G" 'gnus-Subject-reselect-current-group) X (define-key gnus-Subject-mode-map "w" 'gnus-Subject-stop-page-breaking) X (define-key gnus-Subject-mode-map "\C-c\C-r" 'gnus-Subject-caesar-message) X (define-key gnus-Subject-mode-map "g" 'gnus-Subject-show-article) X (define-key gnus-Subject-mode-map "t" 'gnus-Subject-toggle-header) X (define-key gnus-Subject-mode-map "v" 'gnus-Subject-show-all-headers) X (define-key gnus-Subject-mode-map "\C-d" 'gnus-Subject-rmail-digest) X (define-key gnus-Subject-mode-map "a" 'gnus-Subject-post-news) X (define-key gnus-Subject-mode-map "f" 'gnus-Subject-post-reply) X (define-key gnus-Subject-mode-map "F" 'gnus-Subject-post-reply-with-original) X (define-key gnus-Subject-mode-map "C" 'gnus-Subject-cancel-article) X (define-key gnus-Subject-mode-map "r" 'gnus-Subject-mail-reply) X (define-key gnus-Subject-mode-map "R" 'gnus-Subject-mail-reply-with-original) X (define-key gnus-Subject-mode-map "m" 'gnus-Subject-mail-other-window) X (define-key gnus-Subject-mode-map "o" 'gnus-Subject-save-article) X (define-key gnus-Subject-mode-map "\C-o" 'gnus-Subject-save-in-mail) X (define-key gnus-Subject-mode-map "|" 'gnus-Subject-pipe-output) X (define-key gnus-Subject-mode-map "\ek" 'gnus-Subject-edit-local-kill) X (define-key gnus-Subject-mode-map "\eK" 'gnus-Subject-edit-global-kill) X (define-key gnus-Subject-mode-map "V" 'gnus-version) X (define-key gnus-Subject-mode-map "q" 'gnus-Subject-exit) X (define-key gnus-Subject-mode-map "Q" 'gnus-Subject-quit) X (define-key gnus-Subject-mode-map "?" 'gnus-Subject-describe-briefly) X (define-key gnus-Subject-mode-map "\C-c\C-i" 'gnus-Info-find-node)) X X(defun gnus-Subject-mode () X "Major mode for reading articles in this newsgroup. XAll normal editing commands are turned off. XInstead, these commands are available: X XSPC Scroll to the next page of the current article. The next unread X article is selected automatically at the end of the message. XDEL Scroll to the previous page of the current article. XRET Scroll up (or down) one line the current article. Xn Move to the next unread article. Xp Move to the previous unread article. XN Move to the next article. XP Move to the previous article. XESC C-n Move to the next article which has the same subject as the X current article. XESC C-p Move to the previous article which has the same subject as the X current article. X\\[gnus-Subject-next-unread-same-subject] X Move to the next unread article which has the same subject as the X current article. X\\[gnus-Subject-prev-unread-same-subject] X Move to the previous unread article which has the same subject as X the current article. XC-c C-n Scroll to the next digested message of the current article. XC-c C-p Scroll to the previous digested message of the current article. XC-n Move to the next subject. XC-p Move to the previous subject. XESC n Move to the next unread subject. XESC p Move to the previous unread subject. X\\[gnus-Subject-next-group] X Exit the current newsgroup and select the next unread newsgroup. X\\[gnus-Subject-prev-group] X Exit the current newsgroup and select the previous unread newsgroup. X. Jump to the first unread article in the current newsgroup. X/ Do an incremental search forward on subjects. Xs Do an incremental search forward on the current article. XESC s Search for an article containing a regexp forward. XESC S Search for an article containing a regexp backward. X< Move point to the beginning of the current article. X> Move point to the end of the current article. Xj Jump to the article specified by the numeric article ID. XJ Jump to the article specified by the numeric article ID, then read it. Xl Jump to the article you read last. X^ Refer to parent of the current article. XESC r Refer to the article specified by the Message-ID. Xu Mark the current article as unread, and go forward. XU Mark the current article as unread, and go backward. Xd Mark the current article as read, and go forward. XD Mark the current article as read, and go backward. XESC u Clear the current article's mark, and go forward. XESC U Clear the current article's mark, and go backward. Xk Mark articles which has the same subject as the current article as X read, and then select the next unread article. XC-k Mark articles which has the same subject as the current article as X read. XESC k Edit a local KILL file applied to the current newsgroup. XESC K Edit a global KILL file applied to all newsgroups. X& Execute a command for each article conditionally. X\\[gnus-Subject-catch-up] X Mark all articles as read in the current newsgroup, preserving X articles marked as unread. X\\[gnus-Subject-catch-up-all] X Mark all articles as read in the current newsgroup. X\\[gnus-Subject-catch-up-and-exit] X Catch up all articles not marked as unread, and then exit the X current newsgroup. X\\[gnus-Subject-catch-up-all-and-exit] X Catch up all articles, and then exit the current newsgroup. XC-t Toggle truncations of subject lines. Xx Delete subject lines marked as read. XX Delete subject lines with the specific marks. XC-c C-s C-n Sort subjects by article number. XC-c C-s C-a Sort subjects by article author. XC-c C-s C-s Sort subjects alphabetically. XC-c C-s C-d Sort subjects by date. X= Expand Subject window to show headers full window. XG Reselect the current newsgroup. Prefix argument means to select all. Xw Stop page breaking by linefeed. XC-c C-r Caesar rotates letters by 13/47 places. Xg Force to show the current article. Xt Show original article header if pruned header currently shown, or X vice versa. Xv Show original article header. XC-d Run RMAIL on the current digest article. Xa Post a new article. Xf Post a reply article. XF Post a reply article with original article. XC Cancel the current article. Xr Mail a message to the author. XR Mail a message to the author with original author. Xm Mail a message in other window. Xo Save the current article in your favorite format. XC-o Append the current article to a file in Unix mail format. X| Pipe the contents of the current article to a subprocess. Xq Quit reading news in the current newsgroup. XQ Quit reading news without recording unread articles information. XV Show the version number of this GNUS. X? Describe Subject Mode commands briefly. XC-h m Describe Subject Mode. XC-c C-i Read Info about Subject Mode. X XUser customizable variables: X gnus-large-newsgroup X The number of articles which indicates a large newsgroup. If the X number of articles in a newsgroup is greater than the value, the X number of articles to be selected is asked for. If the given value X N is positive, the last N articles is selected. If N is negative, X the first N articles are selected. An empty string means to select X all articles. X X gnus-use-long-file-name X Non-nil means that a newsgroup name is used as a default file name X to save articles to. If it's nil, the directory form of a X newsgroup is used instead. X X gnus-default-article-saver X Specifies your favorite article saver which is interactively X funcallable. Following functions are available: X X gnus-Subject-save-in-rmail (in Rmail format) X gnus-Subject-save-in-mail (in Unix mail format) X gnus-Subject-save-in-folder (in MH folder) X gnus-Subject-save-in-file (in article format). X X gnus-rmail-save-name X gnus-mail-save-name X gnus-folder-save-name X gnus-file-save-name X Specifies a function generating a file name to save articles in X specified format. The function is called with NEWSGROUP, HEADERS, X and optional LAST-FILE. Access macros to the headers are defined X as nntp-header-FIELD, and functions are defined as X gnus-header-FIELD. X X gnus-article-save-directory X Specifies a directory name to save articles to using the commands X gnus-Subject-save-in-rmail, gnus-Subject-save-in-mail and X gnus-Subject-save-in-file. The variable is initialized from the X SAVEDIR environment variable. X X gnus-show-all-headers X Non-nil means that all headers of an article are shown. X X gnus-save-all-headers X Non-nil means that all headers of an article are saved in a file. X X gnus-optional-headers X Specifies a function which generates an optional string displayed X in the Subject buffer. The function is called with an article X HEADERS. The result must be a string excluding `[' and `]'. The X default function returns a string like NNN:AUTHOR, where NNN is X the number of lines in an article and AUTHOR is the name of the X author. X X gnus-auto-select-first X Non-nil means the first unread article is selected automagically X when a newsgroup is selected normally (by gnus-Group-read-group). X If you'd like to prevent automatic selection of the first unread X article in some newsgroups, set the variable to nil in X gnus-Select-group-hook or gnus-Apply-kill-hook. X X gnus-auto-select-next X Non-nil means the next newsgroup is selected automagically at the X end of the newsgroup. If the value is t and the next newsgroup is X empty (no unread articles), GNUS will exit Subject mode and go X back to Group mode. If the value is neither nil nor t, GNUS won't X exit Subject mode but select the following unread newsgroup. X Especially, if the value is the symbol `quietly', the next unread X newsgroup will be selected without any confirmations. X X gnus-auto-select-same X Non-nil means an article with the same subject as the current X article is selected automagically like `rn -S'. X X gnus-auto-center-subject X Non-nil means the point of Subject Mode window is always kept X centered. X X gnus-break-pages X Non-nil means an article is broken into pages at page delimiters. X This may not work with some versions of GNU Emacs earlier than X version 18.50. X X gnus-page-delimiter X Specifies a regexp describing line-beginnings that separate pages X of news article. X X gnus-more-message X Specifies a message shown at the end of pages in page break mode. X The length of the message string must be shorter than or equal to X that of the page delimiter if GNU Emacs is earlier than version SHAR_EOF echo "End of part 2, continue with part 3" echo "3" > s2_seq_.tmp exit 0