Path: utzoo!attcan!uunet!kddlab!titcca!fgw!flab!umerin From: umerin@flab.flab.fujitsu.JUNET (Masanobu UMEDA) Newsgroups: comp.emacs,fj.editor.emacs Subject: GNUS 3.11: A GNU Emacs newsreader (2 of 9) Message-ID: <4800@flab.flab.fujitsu.JUNET> Date: 23 Feb 89 07:17:17 GMT Reply-To: umerin@flab.flab.fujitsu.JUNET (Masanobu UMEDA) Followup-To: comp.emacs Organization: Fujitsu Laboratories Ltd., Kawasaki, Japan. Lines: 1278 ---- 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 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 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. 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 the NNTP server is asked for if no Xdefault host is specified. It is also possible to choose another NNTP Xserver even when the default server is defined by giving a prefix Xargument to the 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 the 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. This is the only way to keep startup files small. 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 Variable `gnus-version', `nntp-version' and `nnspool-version' have Xthe version number of this version of gnus.el, nntp.el and nnspool.el, Xrespectively. 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-server-host is obsolete. It is renamed to gnus-nntp-server.] 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-force-nntp is obsolete. Use gnus-nntp-service instead.] 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-file X Specifies a file name to save a copy of article you posted. If X the first character of the value is `|', the contents of the X article is piped out to a program specified by the rest of the X value. The variable is initialized from the AUTHORCOPY X 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 newsgroup, subject and distribution are asked X for interactively when posting a new news. It is recommended to X set the variable to non-nil, if you are a novice to USENET. 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-Exit-gnus-hook X Called with no arguments when exiting or suspending GNUS, if that X value is non-nil." X (interactive) X (kill-all-local-variables) X (if (boundp 'mode-line-modified) X (setq mode-line-modified "--- ") X (setq mode-line-format X (cons "--- " (cdr (default-value 'mode-line-format))))) 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 (nntp-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 (gnus-Group-describe-briefly) ;Show brief help message. X (gnus-Group-list-groups nil) X ))) X X(defun gnus-Group-startup-message () X (insert "\n\n\n\n X GNUS Version 3.11 X X NNTP-based News Reader for GNU Emacs X X X If you have any trouble with this software, please let me X know. I will fix your problems in the next release. X X Comments, suggestions, and bug fixes are welcome. X X Masanobu UMEDA X umerin@flab.Fujitsu.JUNET X umerin%flab.Fujitsu.JUNET@uunet.UU.NET")) 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 format of Group display 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 (insert X (format cntl X ;; Subscribed or not. X (if (nth 1 group-info) " " "U") X ;; Exists 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-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 (modified nil) X (visible nil) X (unread-count 0) X ;; This specifies format of Group display buffer. X (cntl "%s%s%5d: %s\n")) X (save-excursion X ;; Buffer may be narrowed. X (save-restriction X (widen) X (set-buffer (get-buffer gnus-Group-buffer)) 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 (setq modified (point)) X (setq unread-count X (nth 1 (gnus-gethash group gnus-unread-hashtb))) X (insert X (format cntl X ;; Subscribed or not. X (if (nth 1 (assoc group gnus-newsrc-assoc)) " " "U") X ;; Exists new news? X (if (and (> unread-count 0) X (>= 0 X (- unread-count X (length X (cdr X (assoc group gnus-marked-assoc)))))) X "*" " ") X ;; Number of unread articles. X (nth 1 (gnus-gethash group gnus-unread-hashtb)) X ;; Newsgroup name. X group)) X )) X )) X ;; Move point of group display buffer to GROUP. X (if (not visible-only) X (let ((buffer (current-buffer))) X (set-buffer (get-buffer gnus-Group-buffer)) X (goto-char modified) X (set-buffer buffer))) 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 (if (assoc group gnus-newsrc-assoc) X (progn X (goto-char (point-min)) X (or (re-search-forward (concat "^.+: " (regexp-quote group) "$") nil t) 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 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 (no-confirm) X "Mark all articles in current newsgroup as read. XIf argument NO-CONFIRM is non-nil, do without confirmations. XCross references (Xref: field) of articles are ignored." X (interactive "P") X (let ((group (gnus-Group-group-name))) X (if (and group X (or no-confirm X (y-or-n-p "Do you really want to mark everything as read? "))) X (progn X (message "") ;Erase "Yes or No" question. X (gnus-update-unread-articles group nil nil) X (gnus-Group-update-group group) X (gnus-Group-next-group 1)) X ))) 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 ((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-read-newsrc-file t) ;Read the raw startup file. X (gnus-setup-news-info) ;Get the active 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-delete-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). XYou can remove the restriction using `C-x w'." X (interactive "r") X (save-excursion X ;; Get real start point. X (goto-char start) X (beginning-of-line) X (setq start (point)) X ;; Get real end point. X (goto-char end) X (forward-line 1) X (setq end (point)) X (narrow-to-region start end) X )) 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 global KILL file." X (interactive) X (gnus-Kill-file-edit (gnus-Kill-file-name t)) X (message X (substitute-command-keys X "Editing global KILL file (Type \\[gnus-Kill-file-exit] to exit)"))) X X(defun gnus-Group-edit-local-kill () X "Edit local KILL file." X (interactive) X (let ((gnus-newsgroup-name (gnus-Group-group-name))) X (gnus-Kill-file-edit (gnus-Kill-file-name nil)) X (message X (substitute-command-keys X "Editing 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-Exit-gnus-hook is called afterwards." X (interactive) X ;; Kill buffers. X (if (get-buffer gnus-Digest-buffer) X (kill-buffer gnus-Digest-buffer)) X (if (get-buffer gnus-Digest-summary-buffer) X (kill-buffer gnus-Digest-summary-buffer)) X (if (get-buffer gnus-Article-buffer) X (kill-buffer gnus-Article-buffer)) X (if (get-buffer gnus-Subject-buffer) X (kill-buffer gnus-Subject-buffer)) X (bury-buffer) X (run-hooks 'gnus-Exit-gnus-hook)) X X(defun gnus-Group-exit () X "Quit reading news after updating .newsrc. XThe hook gnus-Exit-gnus-hook is called afterwards." X (interactive) X (if (or (zerop (buffer-size)) X (not (nntp-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 (gnus-save-newsrc-file) X (gnus-clear-system) X (nntp-close-server) X (run-hooks 'gnus-Exit-gnus-hook)) X )) X X(defun gnus-Group-quit () X "Quit reading news without updating .newsrc. XThe hook gnus-Exit-gnus-hook is called afterwards." X (interactive) X (if (or (zerop (buffer-size)) X (not (nntp-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 (gnus-clear-system) X (nntp-close-server) X (run-hooks 'gnus-Exit-gnus-hook)) 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-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 "=" 'delete-other-windows) 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 "C" 'gnus-Subject-cancel) X (define-key gnus-Subject-mode-map "r" 'gnus-Subject-mail-reply) 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 "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. X& Execute a command for each article conditionally. X\\[gnus-Subject-catch-up] X Mark all articles of the current newsgroup as read. Xc Catch up 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= Delete other window to show Subject buffer 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. XC Cancel the current article. Xr Mail a message to the 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-subject-lines-height X Height of Subject Mode window. X 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-article-save-name X Specifies a function generating a file name to save articles to. X The function is called with 2 arguments: NEWSGROUP and HEADERS. X Access macros to the headers are defined as nntp-header-FIELD, and X functions are defined as gnus-header-FIELD. X X gnus-article-default-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 plain file). 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-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-article-mh-folder X Specifies an MH folder to save articles in using the command X gnus-Subject-save-in-folder. 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-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-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 X 18.52. X X gnus-digest-show-summary X Non-nil means that a summary of digest messages is shown when X reading a digest article using `gnus-Subject-rmail-digest' X command. 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-keep-subject-centered X Non-nil means the point of Subject Mode window is always kept X centered. X XVarious hooks for customization: X gnus-Subject-mode-hook X Entry to this mode calls the value with no arguments, if that X value is non-nil. X X gnus-Select-group-hook X Called with no arguments when newsgroup is selected, if that value X is non-nil. It is possible to sort subjects in this hook. See the X documentation of this variable for more information. X X gnus-Subject-prepare-hook X Called with no arguments after a subject list is created in the X Subject buffer, if that value is non-nil. If you'd like to modify X the buffer, you can use this hook. X X gnus-Select-article-hook X Called with no arguments when an article is selected, if that X value is non-nil. See the documentation of this variable for more X information. X X gnus-Select-digest-hook X Called with no arguments when reading digest messages using Rmail, X if that value is non-nil. This hook can be used to modify an X article so that Rmail can work with it. See the documentation of X the variable for more information. X X gnus-Rmail-digest-hook X Called with no arguments when reading digest messages using Rmail, X if that value is non-nil. This hook is intended to customize Rmail X mode. X X gnus-Apply-kill-hook X Called with no arguments when a newsgroup is selected and the X Subject buffer is prepared. This hook is intended to apply a KILL X file to the selected newsgroup. The format of KILL file is X completely different from that of version 3.8. You have to rewrite X them in the new format. See the documentation of Kill file mode X for more information. X X gnus-Mark-article-hook X Called with no arguments when an article is selected at the first X time. The hook is intended to mark an article as read (or unread) X automatically when it is selected. See the documentation of the X variable for more information. X X gnus-Exit-group-hook X Called with no arguments when exiting the current newsgroup, if X that value is non-nil. If your machine is so slow that exiting X from Subject mode takes very long time, inhibit marking articles X as read using cross-references by setting the variable X gnus-newsgroup-headers to nil in this hook." X (interactive) X (kill-all-local-variables) X (if (boundp 'mode-line-modified) X (setq mode-line-modified "--- ") X (setq mode-line-format X (cons "--- " (cdr (default-value 'mode-line-format))))) X (make-local-variable 'global-mode-string) X (setq global-mode-string nil) X (setq major-mode 'gnus-Subject-mode) X (setq mode-name "GNUS Subject") X ;;(setq mode-line-process '(" " gnus-newsgroup-name)) X (gnus-Subject-set-mode-line) X (use-local-map gnus-Subject-mode-map) X (buffer-flush-undo (current-buffer)) X (setq buffer-read-only t) ;Disable modification X (setq truncate-lines t) ;Stop folding of lines. X ;;(setq case-fold-search t) X (run-hooks 'gnus-Subject-mode-hook)) X X(defun gnus-Subject-setup-buffer () X "Initialize subject display buffer." X (if (get-buffer gnus-Subject-buffer) X (set-buffer gnus-Subject-buffer) X (set-buffer (get-buffer-create gnus-Subject-buffer)) X (gnus-Subject-mode) X )) X X(defun gnus-Subject-read-group (group &optional show-all no-article) X "Start reading news in newsgroup GROUP. XIf optional 1st argument SHOW-ALL is non-nil, already read articles are Xalso listed. XIf optional 2nd argument NO-ARTICLE is non-nil, no article is selected Xinitially." X (message "Retrieving newsgroup: %s..." group) X (if (gnus-select-newsgroup group show-all) X (progn X ;; Don't switch-to-buffer to prevent displaying old contents X ;; of the buffer until new subjects list is created. X ;; Suggested by Juha Heinanen X (gnus-Subject-setup-buffer) X ;; You can change the order of subjects in this hook. X (run-hooks 'gnus-Select-group-hook) X (gnus-Subject-prepare) X ;; Function `gnus-Kill-file-apply' must be called in this hook. X (run-hooks 'gnus-Apply-kill-hook) X (if (zerop (buffer-size)) X ;; This newsgroup is empty. X (progn X (gnus-Subject-catch-up-and-exit t) ;Without confirmations. X (message "No unread news")) X ;; Show first unread article if requested. X (goto-char (point-min)) X (if (and (not no-article) X gnus-auto-select-first X (gnus-Subject-first-unread-article)) X ;; Window is configured automatically. X ;; Current buffer may be changed as a result of hook X ;; evaluation, especially by gnus-Subject-rmail-digest X ;; command, so we should not adjust cursor point here. X nil X (switch-to-buffer gnus-Subject-buffer) X (gnus-Subject-set-mode-line) X ;; Kill article display buffer because I sometime get X ;; confused by old article buffer. X (if (get-buffer gnus-Article-buffer) X (let ((artwin (get-buffer-window gnus-Article-buffer))) X (if artwin X (delete-window artwin)) X (kill-buffer gnus-Article-buffer))) X ;; Adjust cursor point. X (beginning-of-line) X (search-forward ":" nil t)) X )) X ;; Cannot select newsgroup GROUP. X (ding) (message "No such newsgroup: %s" group) X (sit-for 0) X ;; Run checking bogus newsgroups. X (gnus-delete-bogus-newsgroups t) ;Confirm X )) X X(defun gnus-Subject-prepare () X "Prepare subject list of current newsgroup in Subject mode buffer." X (let* ((buffer-read-only nil) X (number 0) X (headers gnus-newsgroup-headers) X (header nil) X ;; This defines format of Subject mode buffer. X (cntl X (format "%%s %%%dd: [%%s] %%s\n" X (length (prin1-to-string gnus-newsgroup-end))))) X ;; Note: The next codes are not actually used because the user who X ;; want it can define them in gnus-Select-group-hook. X ;; Print verbose messages if too many articles are selected. X ;; (and (numberp gnus-large-newsgroup) X ;; (> (length gnus-newsgroup-headers) gnus-large-newsgroup) X ;; (message "Preparing headers...")) X (erase-buffer) X (while headers X (setq header (car headers)) X (if (vectorp header) ;Depends on nntp.el. X (progn X (setq number (nntp-header-number header)) X (insert X (format cntl X ;; Read or not. X (cond ((memq number gnus-newsgroup-marked) "-") X ((memq number gnus-newsgroup-unreads) " ") X (t "D")) X ;; Article number. X number X ;; Optional headers. X (or (and gnus-optional-headers X (funcall gnus-optional-headers header)) "") X ;; Its subject string. X (nntp-header-subject header))) X )) X (setq headers (cdr headers)) X ) X ;; Erase header retrieval message. X (message "") X ;; Call hooks for modifying Subject mode buffer. X ;; Suggested by sven@tde.LTH.Se (Sven Mattisson). X (goto-char (point-min)) X (run-hooks 'gnus-Subject-prepare-hook) X )) X X(defun gnus-Subject-set-mode-line () X "Set Subject mode line string." X (setq mode-line-buffer-identification X (list 17 X (concat "GNUS: " X (if gnus-current-headers X (nntp-header-subject gnus-current-headers) X gnus-newsgroup-name)))) X (set-buffer-modified-p t)) X X;; GNUS Subject mode command. X X(defun gnus-Subject-search-group (&optional backward) X "Search for next unread newsgroup. XIf optional argument BACKWARD is non-nil, search backward instead." X (save-excursion X (set-buffer gnus-Group-buffer) X (save-excursion X ;; We don't want to alter current point of Group mode buffer. X (if (gnus-Group-search-forward backward nil) X (gnus-Group-group-name)) X ))) X X(defun gnus-Subject-search-subject (backward unread subject) X "Search for article forward. XIf 1st argument BACKWARD is non-nil, search backward. XIf 2nd argument UNREAD is non-nil, only unread article is selected. XIf 3rd argument SUBJECT is non-nil, the article which has Xthe same subject will be searched for." X (let ((func (if backward 're-search-backward 're-search-forward)) X (article nil) X (regexp X (format "^%s[ \t]+\\([0-9]+\\):.\\[.*\\][ \t]+%s" X ;;(if unread " " ".") X (cond ((eq unread t) " ") (unread "[ ---]") (t ".")) X (if subject X (concat "\\([Rr][Ee]:[ \t]+\\)*" X (regexp-quote (gnus-simplify-subject subject)) X ;; Ignore words in parentheses. X "\\([ \t]*(.*)\\)*[ \t]*$") X "") X ))) X (if backward X (beginning-of-line) X (end-of-line)) X (if (funcall func regexp nil t) X (setq article X (string-to-int X (buffer-substring (match-beginning 1) (match-end 1))))) X ;; Adjust cursor point. X (beginning-of-line) X (search-forward ":" nil t) X ;; This is the result. X article X )) X X(defun gnus-Subject-search-forward (&optional unread subject) X "Search for article forward. XIf 1st optional argument UNREAD is non-nil, only unread article is selected. XIf 2nd optional argument SUBJECT is non-nil, the article which has Xthe same subject will be searched for." X (gnus-Subject-search-subject nil unread subject)) X X(defun gnus-Subject-search-backward (&optional unread subject) X "Search for article backward. XIf 1st optional argument UNREAD is non-nil, only unread article is selected. XIf 2nd optional argument SUBJECT is non-nil, the article which has Xthe same subject will be searched for." X (gnus-Subject-search-subject t unread subject)) X X(defun gnus-Subject-article-number () X "Article number around point. If nothing, return current number." X (save-excursion X (beginning-of-line) X (if (looking-at ".[ \t]+\\([0-9]+\\):") X (string-to-int X (buffer-substring (match-beginning 1) (match-end 1))) X ;; If search fail, return current article number. X gnus-current-article X ))) X X(defun gnus-Subject-subject-string () X "Return current subject string or nil if nothing." X (save-excursion X ;; It is possible to implement this function using X ;; `gnus-Subject-article-number' and `gnus-newsgroup-headers'. X (beginning-of-line) X (if (looking-at ".[ \t]+[0-9]+:.\\[.*\\][ \t]+\\(.*\\)$") X (buffer-substring (match-beginning 1) (match-end 1))) X )) X X(defun gnus-Subject-goto-subject (article) X "Move point to ARTICLE's subject." X (interactive X (list X (string-to-int X (completing-read "Article number: " X (mapcar X (function X (lambda (headers) X (list X (int-to-string (nntp-header-number headers))))) X gnus-newsgroup-headers) X nil 'require-match)))) X (let ((current (point))) X (goto-char (point-min)) X (or (and article (re-search-forward (format "^.[ \t]+%d:" article) nil t)) X (progn (goto-char current) nil)) X )) X X(defun gnus-Subject-recenter () X "Center point in Subject mode window." X ;; Scroll window so as to cursor comes center of Subject mode window X ;; only when article is displayed. X ;; Suggested by earle@mahendo.JPL.NASA.GOV (Greg Earle). X ;; Recenter only when requested. X ;; Subbested by popovich@park.cs.columbia.edu X (and gnus-keep-subject-centered X (get-buffer-window gnus-Article-buffer) X (< (/ (- (window-height) 1) 2) X (count-lines (point) (point-max))) X (recenter (/ (- (window-height) 2) 2)))) X X;; Walking around Group mode buffer. X X(defun gnus-Subject-next-group (no-article) X "Exit current newsgroup and then select next unread newsgroup. XIf prefix argument NO-ARTICLE is non-nil, no article is selected initially." X (interactive "P") X (let ((group (gnus-Subject-search-group))) X (if (null group) X (progn X (message "Exiting %s..." gnus-newsgroup-name) X (gnus-Subject-exit) X (message "")) X (message "Selecting %s..." group) X (gnus-Subject-exit t) ;Exit Subject mode temporary. X ;; Now current point of Group mode buffer is pointing GROUP. X (gnus-Subject-read-group group nil no-article) X (or (eq (current-buffer) X (get-buffer gnus-Subject-buffer)) X (eq gnus-auto-select-next t) X ;; Expected newsgroup has nothing to read since the articles X ;; are marked as read by cross-referencing. So, try next X ;; newsgroup. (Make sure we are in Group mode buffer now.) X (and (eq (current-buffer) X (get-buffer gnus-Group-buffer)) X (gnus-Group-group-name) X (gnus-Subject-read-group X (gnus-Group-group-name) nil no-article)) X ) X ))) X X(defun gnus-Subject-prev-group (no-article) X "Exit current newsgroup and then select previous unread newsgroup. XIf prefix argument NO-ARTICLE is non-nil, no article is selected initially." X (interactive "P") X (let ((group (gnus-Subject-search-group t))) X (if (null group) X (progn X (message "Exiting %s..." gnus-newsgroup-name) X (gnus-Subject-exit) X (message "")) X (message "Selecting %s..." group) X (gnus-Subject-exit t) ;Exit Subject mode temporary. X ;; We have to adjust point of Group mode buffer because current X ;; point is moved to next unread newsgroup by exiting. X (gnus-Group-jump-to-group group) X (gnus-Subject-read-group group nil no-article) X (or (eq (current-buffer) X (get-buffer gnus-Subject-buffer)) X (eq gnus-auto-select-next t) X ;; Expected newsgroup has nothing to read since the articles X ;; are marked as read by cross-referencing. So, try next X ;; newsgroup. (Make sure we are in Group mode buffer now.) X (and (eq (current-buffer) X (get-buffer gnus-Group-buffer)) X (gnus-Subject-search-group t) X (gnus-Subject-read-group X (gnus-Subject-search-group t) nil no-article)) X ) X ))) X X;; Walking around subject lines. X X(defun gnus-Subject-next-subject (n &optional unread) X "Go to next N'th subject line. XIf optional argument UNREAD is non-nil, only unread article is selected." X (interactive "p") X (while (and (> n 1) X (gnus-Subject-search-forward unread)) X (setq n (1- n))) X (cond ((gnus-Subject-search-forward unread) X (gnus-Subject-recenter)) X (unread X (message "No more unread articles")) X (t X (message "No more articles")) X )) X X(defun gnus-Subject-next-unread-subject (n) X "Go to next N'th unread subject line." X (interactive "p") X (gnus-Subject-next-subject n t)) X X(defun gnus-Subject-prev-subject (n &optional unread) X "Go to previous N'th subject line. XIf optional argument UNREAD is non-nil, only unread article is selected." X (interactive "p") X (while (and (> n 1) SHAR_EOF echo "End of part 2, continue with part 3" echo "3" > s2_seq_.tmp exit 0