Xref: utzoo gnu.emacs.gnus:256 comp.emacs:6344 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!bob From: bob@tut.cis.ohio-state.edu (Bob Sutterfield) Newsgroups: gnu.emacs.gnus,comp.emacs Subject: GNUS 3.12 (01 of 10) Message-ID: Date: 26 Jun 89 13:13:25 GMT Sender: bob@tut.cis.ohio-state.edu Reply-To: Bob Sutterfield Followup-To: gnu.emacs.gnus Organization: The Ohio State University Dept of Computer & Information Science Lines: 1296 #!/bin/sh # shar: Shell Archiver (v1.22) # # This is part 1 of a multipart archive # do not concatenate these parts, unpack them in order with /bin/sh # # Run the following text with /bin/sh to create: # Makefile # INSTALL.GNUS # Changes.GNUS # gnus-user-sxa.el # gnus-user-tale.el # gnus.el # gnusmisc.el # gnuspost.el # mhspool.el # nnspool.el # nntp.el # tcp.el # tcp.c # gnus.texinfo # if test -r s2_seq_.tmp then echo "Must unpack archives in sequence!" next=`cat s2_seq_.tmp`; echo "Please unpack part $next next" exit 1; fi sed 's/^X//' << 'SHAR_EOF' > Makefile && X# Makefile for GNUS newsreader X# Written by Masanobu UMEDA for version 3.12 X XELISP= gnus.elc gnuspost.elc gnusmisc.elc nntp.elc nnspool.elc mhspool.elc tcp.elc X XTCP= tcp X X# Specify the byte-compiler XELC= emacs -batch -f batch-byte-compile X X# Specify the byte-compiler for SX/A Emacs (or Version 17.64). X#ELC= emacs -batch -l gnus-user-sxa.el -f batch-byte-compile X XCFLAGS = -O X X.SUFFIXES: .elc .el X X.el.elc: X $(ELC) $< X Xall: $(ELISP) X Xgnus.elc: nntp.elc Xgnuspost.elc: nntp.elc Xgnusmisc.elc: nntp.elc X X# Make the tcp module by yourself according to the operating system X# and machine. If your emacs has the function open-network-stream, it X# is unnecessary. X X# For BSD system (do you really need it?) Xbsdtcp: X $(CC) -o $(TCP) $(CFLAGS) tcp.c X X# For USG system Xusgtcp: X $(CC) -o $(TCP) $(CFLAGS) tcp.c -DUSG X X# For Fujitsu UTS system Xutstcp: X $(CC) -o $(TCP) $(CFLAGS) tcp.c -DFUJITSU_UTS -lu -lsocket SHAR_EOF chmod 0644 Makefile || echo "restore of Makefile fails" set `wc -c Makefile`;Sum=$1 if test "$Sum" != "901" then echo original size 901, current size $Sum;fi sed 's/^X//' << 'SHAR_EOF' > INSTALL.GNUS && XThis is a copy of one chapter from the Info file gnus-1. For full Xinformation on installing GNUS, refer to the GNUS manual. X X XInstalling GNUS X*************** X X Installation of GNUS and some initialization of your computing Xenvironment are described in this chapter. Please read the following Xsections carefully before getting started with GNUS. X X* Menu: X X* Files of GNUS:: How many files of GNUS are there? X* Compilation:: How to byte-compile lisp sources. X* Autoloading:: How to define autoload entries. X* Environment:: How to define your environment. X* Texinfo Manual:: How to install an Info file and print the manual. X X XFiles of GNUS X============= X X Unpacking the shar files will produce the following files. They are Xthe Emacs lisp sources, a C source, a Texinfo manual of GNUS, and a XMakefile. X X`gnus.el' X Main part of GNUS newsreader. X X`gnuspost.el' X Post news commands. X X`gnusmisc.el' X Miscellaneous commands. X X`nntp.el' X NNTP package. X X`nnspool.el' X A package accessing local news spool like NNTP. X X`mhspool.el' X A package accessing private directory like NNTP. X X`tcp.el' X Patches to some versions of GNU Emacs which do not have the X function `open-network-stream'. X X`tcp.c' X C program for external TCP/IP implementation. This is used with X `tcp.el'. X X`gnus.texinfo' X Texinfo manual of GNUS. X X`Makefile' X Makefile to byte-compile the lisp files using the `make' command. X X XByte-Compilation X================ X X Move the lisp files, the C file, and `Makefile' to the appropriate Xdirectory in the search path defined by the variable `load-path'. XBefore actually byte-compiling the lisp files, make sure there are no Xbyte-compiled files of older versions of GNUS in that directory. Remove Xor rename such files as the byte-compiler may be confused by old macro Xdefinitions. If you can use the `make' command, you don't have to take Xcare of the dependencies. X X The C file `tcp.c' should be compiled with a C compiler and installed Xin a directory in the search path defined by the variable `exec-path', Xif this is required. X X If you can use the `make' command, just type `make' in a Unix shell. XAll the lisp files will be byte-compiled. Otherwise, byte-compile lisp Xfiles in the following order according to your computing environment by Xyourself: X X 1. Byte-compile `nntp.el', `gnus.el', `gnuspost.el', and `gnusmisc.el' X in this order. X X 2. Byte-compile `nnspool.el' if you want to use the local news spool X of your machine instead of NNTP (*Note Local News Spool::). X X 3. Byte-compile `mhspool.el' if you want to read articles or mail in X your private directory using GNUS (*Note Private Directory::). X X 4. Compile and install `tcp.el' and `tcp.c' if TCP/IP is not supported X by Emacs but is supported by your operating system. X X `tcp.el' defines the function `open-network-stream', and `tcp.c' is an Xemulation program for the stream used by the function. If you modified X`tcp.c' for your system, please send the author the diffs. Some of them Xwill be included in the future releases of GNUS. X X XAutoloading X=========== X X It is useful to define autoload entries in `.emacs', `site-init.el' or X`default.el' as follows: X X (autoload 'gnus "gnus" "Read network news." t) X (autoload 'gnus-post-news "gnuspost" "Post a new news." t) X X XEnvironment X=========== X X The NNTP server and its service name, your domain and organization, Xand other important definitions of your computing environment are Xdescribed in this section. Since these definitions depend heavily on Xyour environment, you'd better be familiar with the operating system you Xare using. Knowledge of the USENET software is also important. X X* Menu: X X* Server: NNTP Server. How to define NNTP server. X* Service: NNTP Service. How to define NNTP service. X* Domain:: How to define your domain and organization. X* GENERICFROM:: How to use GENERICFROM feature. X* GENERICPATH:: How to use GENERICPATH feature. X* Startup File:: About the startup files of GNUS. X X XNNTP Server X----------- X X The variable `gnus-nntp-server' specifies the default NNTP server. To Xdefine the server `flab', put the following code in `.emacs', X`site-init.el' or `default.el': X X (setq gnus-nntp-server "flab") X X The variable `gnus-nntp-server' is initialized from the `NNTPSERVER' Xenvironment variable. To define the server using the `NNTPSERVER' Xenvironment variable, put the following code in `.login': X X setenv NNTPSERVER "flab" 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. X*Note Private Directory::, for more information. X X GNUS will ask you for the NNTP server at start up time unless it is Xdefined. Even if the default server is defined, it is possible to Xchoose another server by invoking GNUS with a prefix argument like `C-u XM-x gnus' (*Note Getting Started::). X X XNNTP Service X------------ X X The default service name of NNTP is `"nntp"'. You may, however, have Xto define the service name as the number `119' as follows: X X (setq gnus-nntp-service 119) X X If you'd like to use a local news spool of your machine directly Xinstead of NNTP, set the variable to `nil' as follows: X X (setq gnus-nntp-service nil) X XIn this case, the NNTP server must be a local host name returned by the Xfunction `system-name' (*Note Local News Spool::). X X XDomain and Organization X----------------------- X X "Domain" and "organization" must be defined before you post your first Xarticle, because they are included in all articles you post and will be Xused for identifying who you are. X X "Domain" is the domain part of your mail address excluding the local Xhost name. For example, if your mail address is X`umerin@photon.stars.flab.Fujitsu.CO.JP' and the local host name is X`photon', your domain is `stars.flab.Fujitsu.CO.JP'. If the function X`system-name' of your Emacs returns the full Internet name, you do not Xhave to define the domain. X X "Organization" is the organization you belong to. It must be defined Xunless it is defined in the file `/usr/lib/news/organization'. X X To define the domain `stars.flab.Fujitsu.CO.JP' and the organization X`Fujitsu Laboratories Ltd., Kawasaki, Japan.' using lisp variables, put Xthe following code in `.emacs', `site-init.el' or `default.el'. If you Xare a system administrator and are installing GNUS for other users, X`site-init.el' is the best place to define this because the domain and Xorganization are common to all users of the system. X X (setq gnus-your-domain "stars.flab.Fujitsu.CO.JP") X (setq gnus-your-organization X "Fujitsu Laboratories Ltd., Kawasaki, Japan.") X X The `DOMAINNAME' and `ORGANIZATION' environment variables are used Xinstead, if defined. To define these variables, put the following code Xin `.login'. X X setenv DOMAINNAME "stars.flab.Fujitsu.CO.JP" X setenv ORGANIZATION "Fujitsu Laboratories Ltd., Kawasaki, Japan." X X If the value of the `ORGANIZATION' environment variable or the Xvariable `gnus-your-organization' begins with a slash, it is taken as Xthe name of a file whose contents are read for the value. If neither of Xthese is defined, and a file `~/.organization-DISTRIBUTION' or X`~/.organization' exists, the contents of that file are used. If Xneither of them does not exist, and the file X`/usr/lib/news/organization' exists, its contents are used. X X XGENERICFROM X----------- X X If the variable `gnus-use-generic-from' is non-`nil', the local host Xname of your machine will not appear in the `From:' field of article Xheaders you post. This is called the "GENERICFROM" feature in the Bnews Xsystem. This may be useful if there are many workstations connected to Xeach other in a local area network, and aliases service or automatic Xforwarding of mail is supported between the workstations. X X To use the GENERICFROM, put the following code in `.emacs', X`site-init.el' or `default.el'. If you are a system administrator and Xare installing GNUS for other users, `site-init.el' is the best place to Xdefine it because the definition is common to all users of the system Xhaving the same domain and organization (*Note Domain and Organization: XDomain.). X X (setq gnus-use-generic-from t) X X As a special case of the GENERICFROM feature, if the variable X`gnus-use-generic-from' is a string, it is used as your domain instead Xof the definition of the environment variable `DOMAINNAME' or the Xvariable `gnus-your-domain' (*Note Domain and Organization: Domain.). X X XGENERICPATH X----------- X X If the variable `gnus-use-generic-path' is `nil', the NNTP server name Xfollowed by the user login name is used in the `Path:' field of article Xheaders you post. If it is a string, the string followed by the user Xlogin name is used instead. Otherwise, if it is non-`nil', only the Xuser login name is used. This is called the "GENERICPATH" feature in Xthe Bnews system. X X For example, to define the generic path `flab', put the following Xcodes in `.emacs', `site-init.el' or `default.el'. If you are a system Xadministrator and are installing GNUS for other users, `site-init.el' is Xthe best place to define it because the definition is common to all Xusers of the system having the same domain and organization (*Note XDomain and Organization: Domain.). X X (setq gnus-use-generic-path "flab") X XIn this case, the `Path:' field will be generated as `Path: flab!USER'. X X XStartup File X------------ X X "Startup file" is a file recording information on articles you have Xalready read. GNUS uses `.newsrc' for the startup file as in the Bnews Xsystem. If you think you will talk to exactly one NNTP server, you can Xuse it without any problems. Otherwise, if you want to talk to several XNNTP servers, you'd better use server specific startup files since Xstartup files are not portable between servers. The server specific Xstartup file for an NNTP server on a machine SERVER is a file named X`.newsrc-SERVER'. For example, `.newsrc-photon' is for an NNTP server Xon a machine named `photon'. The primary name of the startup file, X`.newsrc', is specified by the variable `gnus-startup-file' (*Note XVariables::). X X GNUS automatically adds newly created newsgroups to a startup file Xwhen getting started. To prevent adding the newsgroups under some Xnewsgroup hierarchies, you can use the options line in the startup file. XOption `-n' of the options line in the startup file is recognized Xproperly the same as for 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. These ignored newsgroups can be added manually using the Xcommand `U' (`gnus-Group-unsubscribe-group') in the Newsgroup buffer. XUse the command `C-k' (`gnus-Group-kill-group') to kill newsgroups from Xthe startup file per a newsgroup basis. *Note Maintenance::, for more Xinformation. X X Once a startup file is updated by GNUS, the "quick startup file" of Xwhich the file name is generated by appending `.el' to that of the raw Xstartup file is also created. The quick startup file can be read by XEmacs faster than the raw startup file since all information in the file Xis in lisp form. If there is a quick startup file and it is newer than Xthe raw startup file, the quick startup file is loaded instead of the Xraw startup file. If the raw startup file is newer, it is normally read Xafter loading the quick startup file. You should not remove the quick Xstartup file because it contains additional information. Instead, make Xthe raw startup file newer than that by touching it or force GNUS to Xread it by using the command `R' (`gnus-Group-restart') in the Newsgroup Xbuffer if you want to reflect the changes of the raw startup file to XGNUS. X X XTexinfo Manual X============== X X `gnus.texinfo' is a manual of GNUS written in Texinfo format. This Xfile can be printed using TeX, and also can be read using Info Mode of XEmacs. X X *Note Creating an Info File: (texinfo)Creating an Info File, to create Xan on-line Info file from the Texinfo manual. If you are not allowed to Xcreate the Info file in the standard Info directory specified by the Xvariable `Info-directory', create it in your private directory and set Xthe variable `gnus-Info-directory' to the directory. X X If this Info file is installed, you can read the documentation of GNUS Xaccording to the current major mode of GNUS. The command X`gnus-Info-find-node' for reading appropriate Info nodes of the Info Xfile is assigned to `C-c C-i' in all major modes of GNUS. X X *Note Printing Hardcopy: (texinfo)Printing Hardcopy, to print a Xhardcopy of the manual. SHAR_EOF chmod 0444 INSTALL.GNUS || echo "restore of INSTALL.GNUS fails" set `wc -c INSTALL.GNUS`;Sum=$1 if test "$Sum" != "12819" then echo original size 12819, current size $Sum;fi sed 's/^X//' << 'SHAR_EOF' > Changes.GNUS && X Changes from GNUS Version 3.11 X X Masanobu UMEDA X umerin@flab.Fujitsu.JUNET X Mon Jun 19 13:19:46 JST 1989 X X* GNUS windows are configurable. X XIn addition to conventional two window mode, yet another two window Xmode and three window mode are available by customizing the variable Xgnus-window-configuration. X X* gnus.el is split into three files: gnus.el, gnuspost.el, and gnusmisc.el X XSince gnus.el is smaller, startup will be faster. In addition, it may Xbecome easier to understand GNUS software. X X* kill/yank commands for newsgroups are available in Group Mode. X XIt is possible to kill newsgroups from both Newsgroup buffer and X.newsrc, and they can be yanked back afterwards. These commands can Xbe used for reordering newsgroups in Group Mode. X X* mhspool.el can co-exist with nntp.el/nnspool.el X XYou don't have to load nntp.el or nnspool.el after using mhspoo.el. X X* FCC: field can be used to save author copies. X XIf gnus-author-copy (was gnus-author-copy-file) is non-nil, its value Xis inserted in FCC: field, and it is processed when posting news. XTherefore, you can change the name of the file or disable copying when Xcomposing news. X X* New followup command (F) and reply command (R) are added in Subject Mode. X XThey insert original message automatically just like `F' and `R' Xcommands of rn. X X* New catch up commands which preserve marks are added. X X* The function gnus-kill skips any marked articles by default. X XThe function gnus-expunge is also introduced (which is , in fact, the Xfunction gnus-Subject-delete-marked-with). X X* Article save name generator can be specified for each saver. X XThe variable gnus-rmail-save-name, gnus-mail-save-name, Xgnus-folder-save-name, and gnus-file-save-name are for specifying Xdefault save name generator for each saver function. The variable Xgnus-article-save-name is obsoleted. X X* Non-full window mode is available. X XIf gnus-use-full-window is nil, GNUS will not take up the entire Xscreen of Emacs. X X* User level extension and customization become easier. X XFor example, you can define a new variable which can be saved in X.newsrc.el. X X* Some user variables and functions are renamed or deleted. X** Variables X Xgnus-author-copy-file -> gnus-author-copy Xgnus-keep-subject-centered -> gnus-auto-center-subject Xgnus-article-default-saver -> gnus-default-article-saver Xgnus-article-save-name -> gnus-rmail-save-name X gnus-mail-save-name X gnus-folder-save-name X gnus-file-save-name Xgnus-article-mh-folder -> (obsolete) Xgnus-subject-lines-height -> (obsolete) X X** Functions X Xgnus-Kill-file-apply -> gnus-apply-kill-file Xgnus-Kill-file-name -> gnus-newsgroup-kill-file Xgnus-article-save-name -> gnus-numeric-save-name X gnus-Numeric-save-name X gnus-plain-save-name X gnus-Plain-save-name X gnus-folder-save-name X gnus-Folder-save-name X X* Internal variables and functions are renamed or deleted. X XIf you customize GNUS using these, you may have to modify your Xprogram. X X* All compatibility variables and functions are removed. SHAR_EOF chmod 0644 Changes.GNUS || echo "restore of Changes.GNUS fails" set `wc -c Changes.GNUS`;Sum=$1 if test "$Sum" != "3022" then echo original size 3022, current size $Sum;fi sed 's/^X//' << 'SHAR_EOF' > gnus-user-sxa.el && X;;; User Contributed Software for GNUS newsreader X;; Copyright (C) 1989 Masanobu UMEDA X X;; This file is part of GNU Emacs. X X;; GNU Emacs is distributed in the hope that it will be useful, X;; but WITHOUT ANY WARRANTY. No author or distributor X;; accepts responsibility to anyone for the consequences of using it X;; or for whether it serves any particular purpose or works at all, X;; unless he says so in writing. Refer to the GNU Emacs General Public X;; License for full details. X X;; Everyone is granted permission to copy, modify and redistribute X;; GNU Emacs, but only under the conditions described in the X;; GNU Emacs General Public License. A copy of this license is X;; supposed to have been given to you along with GNU Emacs so you X;; can know your rights and responsibilities. It should be in a X;; file named COPYING. Among other things, the copyright notice X;; and this notice must be preserved on all copies. X X;; The program in this file is contributed by Sakaeda X;; , and is not part of the X;; standard distribution of GNUS. This may be included in the future X;; releases of GNUS. Please do not send me any flame on it. X X;;Return-Path: X;;To: umerin@photon.stars.flab.fujitsu.junet (Masanobu UMEDA) X;;Subject: Re: GNUS 3.11 on SX/A EMACS. X;;In-Reply-To: Your message of Mon, 03 Apr 89 12:43:11 +0900. X;; <8904030343.AA00729@photon.stars.flab.fujitsu.junet> X;;Date: Thu, 06 Apr 89 11:32:41 JST X;;From: Sakaeda X X;; This file contains patches for very old version of GNU Emacs such X;; as SX/A Emacs (17.64!). X X(provide 'gnus-user-sxa) X X;; To load SX/A specific patches, use the following hooks: X;;(setq gnus-Group-mode-hook X;; '(lambda () X;; (require 'gnus-user-sxa))) X;; X;; To show NNTP server name in mode line, use the following hook: X;;(setq gnus-Startup-hook X;; '(lambda () X;; (gnus-user-sxa-show-server-name))) X X(defun gnus-user-sxa-show-server-name () X "Show NNTP server name in mode line." X (setq mode-name (concat mode-name mode-line-process))) X X(defun gnus-Subject-set-mode-line () X "Set Subject mode line string." X ;; For ooold GNU Emacs such as SX/A Emacs. by Yas.Itoh at PFU '88.11.24 X (setq mode-line-format X (format "--- GNUS: %17s %%[(%%m)%%]----%%3p-%%-" X (if gnus-current-headers X (nntp-header-subject gnus-current-headers) X gnus-newsgroup-name))) X (set-buffer-modified-p t)) X X(defun gnus-Article-set-mode-line () X "Set Article mode line string." X (let ((unmarked X (- (length gnus-newsgroup-unreads) (length gnus-newsgroup-marked)))) X (setq mode-line-format X (concat "--- GNUS:" X (format "%17s" X (format " %s{%d} %s" X gnus-newsgroup-name X gnus-current-article X ;; This is proposed by tale@pawl.rpi.edu. X (if (zerop unmarked) X " " X (format "%d more" unmarked)) X )) X " %[(%m)%]----%3p-%-"))) X (set-buffer-modified-p t)) X X X;; The following definitions are only for compatibility with *OOOOOLD* X;; Emacs, especially SX/A Emacs (a variant of GNU Emacs). X;; By Yasunari,Itoh and Sakaeda at PFU limited. X X(defvar news-inews-program "inews" X "Function to post news.") X(defvar news-path "/usr/spool/news/" X "The root directory below which all news files are stored.") X X(fset 'load-library (symbol-function 'load)) X(fset 'process-send-string (symbol-function 'send-string)) X(fset 'process-send-region (symbol-function 'send-region)) X X;; Save original funcitons. X(or (fboundp 'load-org) X (fset 'load-org (symbol-function 'load))) X(or (fboundp 'bury-buffer-org) X (fset 'bury-buffer-org (symbol-function 'bury-buffer))) X(or (fboundp 'apply-org) X (fset 'apply-org (symbol-function 'apply))) X X(load "backquote") X X(defun one-window-p (&optional win) X (if (or (not win)(eq win t)) (setq win (selected-window))) X (eq (selected-window)(next-window win))) X X(defun bury-buffer (&optional buffer) X (let ((buf (or buffer (current-buffer)))) X (bury-buffer-org buf) X ;; By Sakaeda and Itoh at PFU '89.02.28 X (or buffer (switch-to-buffer (other-buffer))) X nil X )) X X(defun apply (func &rest args) X (let* ((last (car (reverse args))) X (before (reverse (cdr (reverse args)))) X (org-arg (append before last))) X (apply-org func org-arg))) X X(defun file-name-as-directory (filename &optional expand-filename) X (let* ((expanded X (if expand-filename (expand-file-name filename) X filename)) X (tail-ix (1- (length expanded)))) X (if (and (> tail-ix 0) X (= (aref expanded tail-ix) ?/)) expanded X (concat expanded "/")))) X X(defun load (file &optional missing-ok nomessage dum) X "Load FILE." X (interactive "sLoad file: ") X (load-org file missing-ok nomessage)) X X(defun insert-char (chr count) X "Insert COUNT (second arg) copies of CHAR (first arg). XBoth arguments are required." X (while (> count 0) X (insert chr) X (setq count (1- count)))) SHAR_EOF chmod 0644 gnus-user-sxa.el || echo "restore of gnus-user-sxa.el fails" set `wc -c gnus-user-sxa.el`;Sum=$1 if test "$Sum" != "4917" then echo original size 4917, current size $Sum;fi sed 's/^X//' << 'SHAR_EOF' > gnus-user-tale.el && X;;; User Contributed Software for GNUS newsreader X;; Copyright (C) 1989 Masanobu UMEDA X X;; This file is part of GNU Emacs. X X;; GNU Emacs is distributed in the hope that it will be useful, X;; but WITHOUT ANY WARRANTY. No author or distributor X;; accepts responsibility to anyone for the consequences of using it X;; or for whether it serves any particular purpose or works at all, X;; unless he says so in writing. Refer to the GNU Emacs General Public X;; License for full details. X X;; Everyone is granted permission to copy, modify and redistribute X;; GNU Emacs, but only under the conditions described in the X;; GNU Emacs General Public License. A copy of this license is X;; supposed to have been given to you along with GNU Emacs so you X;; can know your rights and responsibilities. It should be in a X;; file named COPYING. Among other things, the copyright notice X;; and this notice must be preserved on all copies. X X;; The program in this file is contributed by tale@pawl.rpi.edu (David X;; C Lawrence), and is not part of the standard distribution of GNUS. X;; This may be included in the future releases of GNUS. Please do not X;; send me any flame on it. X X;;Date: 28 Feb 89 02:41:31 GMT X;;From: tale@pawl.rpi.edu (David C Lawrence) X;;Organization: The Octagon Room X;;Subject: A different article mode-line X;;To: info-gnus-english@cis.ohio-state.edu X;; X;;Well, I've seen at least three other people ask for something like X;;this and I've also wanted it, so I went in and made some changes. X;;Basically, this is what the following code does: X;; X;; o One new function is added; others merely have their current X;;definitions modified to accept the new function. X;; X;; o The exception to the first point is gnus-Article-set-mode-line. X;;The way I have defined it is to show a modeline similar to this: X;; X;;--- GNUS: comp.theory.cell-automata 2 more 5:32pm 2.27[0] (GNUS Article)--46% X;; X;;Note that comp.theory.cell-automata is one of the longest group names X;;and everything fits into the modeline happily; only one or two group X;;would break that. X;; X;; o The display-time-string is there so because I like it for both X;;telling time and getting my mail notification. X;; X;; o The percentage displayed on the mode line is how many lines of the X;;total buffer size are not beyond the bottom of the window, like more(1). X;; X;; o The "2 more" refers to how many unmarked articles remain in the X;;group. Spaces are printed if there are no more unmarked articles. X;; X;;I did the "2 more" thing rather than paging because knowing that the X;;range is {1191-2010} and that I am at 2009 is mostly useless to me; X;;since I follow subjects, which particular article I am on in the group X;;is meaningless as far as helping me predict when I'll be on my way to X;;the next group. X;; X;;This was only given non-rigourous, but seemingly adequate, testing. X;;If you find a problem with it, please let me know so I can improve it. X;; X;;Dave X X(provide 'gnus-user-tale) X X(setq gnus-Article-mode-hook X '(lambda () X (make-local-variable 'gnus-Article-head-to-window-bottom) X (kill-local-variable 'global-mode-string) X (setq mode-line-format X (list (purecopy "") X 'mode-line-modified 'mode-line-buffer-identification X (purecopy " ") X 'global-mode-string X (purecopy " %[(") X 'mode-name 'minor-mode-alist "%n" X (purecopy ")%]--") X 'gnus-Article-head-to-window-bottom X (purecopy "-%-"))))) X X(defun gnus-Article-set-percent (&optional new-article) X "Set gnus-Article-head-to-window-bottom as a string which represents the Xpercentage of total Article lines that are before the bottom of the window. XAlso forces mode-line update. Optional NEW-ARTICLE is necessary when a new Xarticle is selected." X (save-excursion X (save-restriction X (setq gnus-Article-head-to-window-bottom X (if new-article X (progn X;; (vertical-motion (- (screen-height) X;; gnus-subject-lines-height 3)) X (vertical-motion (- (screen-height) X (save-excursion X (set-buffer gnus-Subject-buffer) X (window-height)) X 3)) X ;; The next bit is in case the last real line is X ;; (will be) visible on the screen. X (move-to-column (- (screen-width) 3)) X (if (not (eobp)) (forward-char 1)) X ;; Might only be at end-of-page X (widen) X (if (eobp) "All" X (concat (/ (* 100 (count-lines (point-min) (point))) X (count-lines (point-min) (point-max))) "%"))) X (move-to-window-line (- (window-height) 2)) X ;; Same deal as above X (move-to-column (- (window-width) 3)) X (if (not (eobp)) (forward-char 1)) X ;; Might only be at end-of-page X (widen) X (if (eobp) "Bot" X (concat (/ (* 100 (count-lines (point-min) (point))) X (count-lines (point-min) (point-max))) "%")))))) X (set-buffer-modified-p t)) X X(defun gnus-Article-set-mode-line () X "Set Article mode line string." X (setq mode-line-buffer-identification X (list 17 X (format "GNUS: %s %s" X gnus-newsgroup-name X (let ((unmarked (length (gnus-set-difference X gnus-newsgroup-unreads X gnus-newsgroup-marked)))) X (if (= 0 unmarked) " " X (concat unmarked " more")))))) X ;; Even if we did this when narrowing to page, do it again as a X ;; new article. X (gnus-Article-set-percent 1) X (set-buffer-modified-p t)) X X(defun gnus-Article-next-page (lines) X "Show next page of current article. XIf end of article, return non-nil. Otherwise return nil. XArgument LINES specifies lines to be scrolled up." X (interactive "P") X (move-to-window-line -1) X (if (eobp) X (if (or (not gnus-break-pages) X (string-match "All\\|Bot" gnus-Article-head-to-window-bottom) X (save-restriction (widen) (eobp))) ;Real end-of-buffer? X t X (gnus-narrow-to-page 1) ;Go to next page. X nil X ) X (scroll-up lines) X (gnus-Article-set-percent) X nil X )) X X(defun gnus-Article-prev-page (lines) X "Show previous page of current article. XArgument LINES specifies lines to be scrolled down." X (interactive "P") X (move-to-window-line 0) X (if (and gnus-break-pages X (bobp) X (not (save-restriction (widen) (bobp)))) ;Real beginning-of-buffer? X (progn X (gnus-narrow-to-page -1) ;Go to previous page. X (goto-char (point-max)) X (recenter -1)) X (scroll-down lines) X (gnus-Article-set-percent))) X X;; I don't want to copy the whole function to my gnus-etc.el, so just X;; rebind it here. The only change the original function needs, X;; however is to include (gnus-Article-set-percent) as the last X;; function called by gnus-narrow-to-page. X(or (fboundp 'original-gnus-narrow-to-page) X (fset 'original-gnus-narrow-to-page X (symbol-function 'gnus-narrow-to-page))) X X(defun gnus-narrow-to-page (&optional arg) X "Make text outside current page invisible except for page delimiter. XA numeric arg specifies to move forward or backward by that many pages, Xthus showing a page other than the one point was originally in. XNOTE: This function has been modified to also update the Article buffer Xmode-line after narrowing." X (interactive "P") X (setq arg (if arg (prefix-numeric-value arg) 0)) X (original-gnus-narrow-to-page arg) X (gnus-Article-set-percent)) SHAR_EOF chmod 0644 gnus-user-tale.el || echo "restore of gnus-user-tale.el fails" set `wc -c gnus-user-tale.el`;Sum=$1 if test "$Sum" != "7771" then echo original size 7771, current size $Sum;fi sed 's/^X//' << 'SHAR_EOF' > gnus.el && X;;; GNUS: an NNTP-based News Reader for GNU Emacs X;; Copyright (C) 1987, 1988, 1989 Fujitsu Laboratories LTD. X;; Copyright (C) 1987, 1988, 1989 Masanobu UMEDA X;; $Header: gnus.el,v 3.12 89/06/19 13:36:31 umerin Exp $ X X;; This file is part of GNU Emacs. X X;; GNU Emacs is distributed in the hope that it will be useful, X;; but WITHOUT ANY WARRANTY. No author or distributor X;; accepts responsibility to anyone for the consequences of using it X;; or for whether it serves any particular purpose or works at all, X;; unless he says so in writing. Refer to the GNU Emacs General Public X;; License for full details. X X;; Everyone is granted permission to copy, modify and redistribute X;; GNU Emacs, but only under the conditions described in the X;; GNU Emacs General Public License. A copy of this license is X;; supposed to have been given to you along with GNU Emacs so you X;; can know your rights and responsibilities. It should be in a X;; file named COPYING. Among other things, the copyright notice X;; and this notice must be preserved on all copies. X X;; How to Install GNUS: X;; (0) First of all, remove GNUS related OLD *.elc files (at least nntp.elc). X;; (1) Unshar gnus.el, gnuspost.el, gnusmisc.el, and nntp.el. X;; (2) byte-compile-file nntp.el, gnus.el, gnuspost.el, and gnusmisc.el. X;; If you have a local news spool, byte-compile-file nnspool.el, too. X;; (3) Define three environment variables in .login file as follows: X;; X;; setenv NNTPSERVER flab X;; setenv DOMAINNAME "stars.flab.Fujitsu.CO.JP" X;; setenv ORGANIZATION "Fujitsu Laboratories Ltd., Kawasaki, Japan." X;; X;; Or instead, define lisp variables in your .emacs, site-init.el, X;; or default.el as follows: X;; X;; (setq gnus-nntp-server "flab") X;; (setq gnus-your-domain "stars.flab.Fujitsu.CO.JP") X;; (setq gnus-your-organization "Fujitsu Laboratories Ltd., ...") X;; X;; If the function (system-name) returns the full internet name, X;; you don't have to define the domain. X;; X;; (4) You may have to define NNTP service name as number 119. X;; X;; (setq gnus-nntp-service 119) X;; X;; Or, if you'd like to use a local news spool directly in stead X;; of NNTP, install nnspool.el and set the variable to nil as X;; follows: X;; X;; (setq gnus-nntp-service nil) X;; X;; (5) If you'd like to use the GENERICFROM feature like the Bnews, X;; define the variable as follows: X;; X;; (setq gnus-use-generic-from t) X;; X;; (6) Define autoload entries in .emacs file as follows: X;; X;; (autoload 'gnus "gnus" "Read network news." t) X;; (autoload 'gnus-post-news "gnuspost" "Post a news." t) X;; X;; (7) Read nntp.el if you have problems with NNTP or kanji handling. X;; X;; (8) Install mhspool.el, tcp.el, and tcp.c if it is necessary. X;; X;; mhspool.el is a package for reading articles or mail in your X;; private directory using GNUS. X;; X;; tcp.el and tcp.c are necessary if and only if your Emacs does X;; not have the function `open-network-stream' which is used for X;; communicating with NNTP server inside Emacs. X;; X;; (9) Install an Info file generated from the texinfo manual gnus.texinfo. X;; X;; If you are not allowed to create the Info file to the standard X;; Info-directory, create it in your private directory and set the X;; variable gnus-Info-directory to that directory. X X;; GNUS Mailing List: X;; There are two mailing lists for GNUS lovers in the world: X;; X;; info-gnus@flab.fujitsu.co.jp, and X;; info-gnus-english@tut.cis.ohio-state.edu. X;; X;; They are intended to exchange useful information about GNUS, such X;; as bug fixes, useful hooks, and extensions. The major difference X;; between the lists is what the official language is. Both Japanese X;; and English are available in info-gnus, while English is only X;; available in info-gnus-english. There is no need to subscribe to X;; info-gnus if you cannot read Japanese messages, because most of the X;; discussion and important announcements will be sent to X;; info-gnus-english. Moreover, if you can read gnu.emacs.gnus X;; newsgroup of USENET, you need not, either. info-gnus-english and X;; gnu.emacs.gnus are linked each other. X;; X;; Please send subscription request to: X;; X;; info-gnus-request@flab.fujitsu.co.jp, or X;; info-gnus-english-request@cis.ohio-state.edu X X;; TO DO: X;; (1) Incremental update of active info. X;; (2) GNUS own poster and programmable interface to various mailers. X;; (3) Multi-GNUS (Talking to many hosts same time). X;; (4) Asynchronous transmission of large messages. X X(provide 'gnus) X(require 'nntp) X(require 'mail-utils) X X(defvar gnus-nntp-server (getenv "NNTPSERVER") X "*The name of the host running NNTP server. XIf it is a string such as `:DIRECTORY', the user's private DIRECTORY Xis used as a news spool. XInitialized from the NNTPSERVER environment variable.") X X(defvar gnus-nntp-service "nntp" X "*NNTP service name (\"nntp\" or 119). XGo to a local news spool if its value is nil.") X X(defvar gnus-startup-file "~/.newsrc" X "*Your .newsrc file. Use `.newsrc-SERVER' instead if exists.") X X(defvar gnus-signature-file "~/.signature" X "*Your .signature file. Use `.signature-DISTRIBUTION' instead if exists.") X X(defvar gnus-large-newsgroup 50 X "*The number of articles which indicates a large newsgroup. XIf the number of articles in a newsgroup is greater than the value, Xconfirmation is required for selecting the newsgroup.") X X(defvar gnus-author-copy (getenv "AUTHORCOPY") X "*File name saving a copy of an article posted using FCC: field. XInitialized from the AUTHORCOPY environment variable. X XArticles are saved in Unix mail format if the value is a file name. XInstead, if the first character of the name is `|', the contents of Xthe article is piped out to the named program. It is possible to save Xan article in an MH folder as follows: X X(setq gnus-author-copy \"|/usr/local/lib/mh/rcvstore +Article\")") X X(defvar gnus-use-long-file-name t X "*Non-nil means that a newsgroup name is used as a default file name Xto save articles to. If it's nil, the directory form of a newsgroup is Xused instead.") X X(defvar gnus-default-article-saver (function gnus-Subject-save-in-rmail) X "*A function to save articles in your favorite format. XThe function must be interactively callable (in other words, it must Xbe an Emacs command). X XGNUS provides the following functions: 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 an MH folder) X gnus-Subject-save-in-file (in article format).") X X(defvar gnus-rmail-save-name (function gnus-plain-save-name) X "*A function generating a file name to save articles in Rmail format. XThe function is called with NEWSGROUP, HEADERS, and optional LAST-FILE.") X X(defvar gnus-mail-save-name (function gnus-plain-save-name) X "*A function generating a file name to save articles in Unix mail format. XThe function is called with NEWSGROUP, HEADERS, and optional LAST-FILE.") X X(defvar gnus-folder-save-name (function gnus-folder-save-name) X "*A function generating a file name to save articles in MH folder. XThe function is called with NEWSGROUP, HEADERS, and optional LAST-FOLDER.") X X(defvar gnus-file-save-name (function gnus-numeric-save-name) X "*A function generating a file name to save articles in article format. XThe function is called with NEWSGROUP, HEADERS, and optional LAST-FILE.") X X(defvar gnus-article-save-directory (getenv "SAVEDIR") X "*A directory name to save articles to (default to ~/News). XInitialized from the SAVEDIR environment variable.") X X(defvar gnus-kill-file-name "KILL" X "*File name of a KILL file.") X X(defvar gnus-default-distribution "local" X "*Use this value as distribution if no distribution is specified.") X X(defvar gnus-novice-user t X "*Non-nil means that you are a novice to USENET. If non-nil, Xverbose messages may be displayed or your confirmations may be required.") X X(defvar gnus-interactive-post t X "*Newsgroup, subject, and distribution will be asked for if non-nil.") X X(defvar gnus-user-login-name nil X "*The login name of the user. XGot from the USER and LOGNAME environment variable if undefined.") X X(defvar gnus-user-full-name nil X "*The full name of the user. XGot from the NAME environment variable if undefined.") X X(defvar gnus-ignored-headers X "^Path:\\|^Posting-Version:\\|^Article-I.D.:\\|^Expires:\\|^Date-Received:\\|^References:\\|^Control:\\|^Xref:\\|^Lines:\\|^Posted:\\|^Relay-Version:\\|^Message-ID:\\|^Nf-ID:\\|^Nf-From:\\|^Approved:\\|^Sender:" X "*All random fields within the header of a message.") X X(defvar gnus-show-all-headers nil X "*Show all headers of an article if non-nil.") X X(defvar gnus-save-all-headers nil X "*Save all headers of an article if non-nil.") X X(defvar gnus-optional-headers (function gnus-optional-lines-and-from) X "*A function generating a optional string displayed in GNUS Subject Xmode buffer. The function is called with an article HEADER. The Xresult must be a string excluding `[' and `]'.") X X(defvar gnus-auto-select-first t X "*Select the first unread article automagically if non-nil. XIf you want to prevent automatic selection of the first unread article Xin some newsgroups, set the variable to nil in gnus-Select-group-hook Xor gnus-Apply-kill-hook.") X X(defvar gnus-auto-select-next t X "*Select the next newsgroup automagically if non-nil. XIf the value is t and the next newsgroup is empty, GNUS will exit XSubject mode and go back to Group mode. If the value is neither nil Xnor t, GNUS will select the following unread newsgroup. Especially, if Xthe value is the symbol `quietly', the next unread newsgroup will be Xselected without any confirmations.") X X(defvar gnus-auto-select-same nil X "*Select the next article with the same subject automagically if non-nil.") X X(defvar gnus-auto-center-subject t X "*Always center the current subject in GNUS Subject mode window if non-nil.") X X(defvar gnus-break-pages t X "*Break an article into pages if non-nil. XPage delimiter is specified by the variable `gnus-page-delimiter'. A Xmessage shown at the end of pages is specified by the variable X`gnus-more-message'.") X X(defvar gnus-page-delimiter "^\^L" X "*Regexp describing line-beginnings that separate pages of news article.") X X(defvar gnus-more-message "*** More ***" X "*The message shown at the end of pages in page break mode.") X X(defvar gnus-digest-show-summary t X "*Show a summary of undigestified messages if non-nil.") X X(defvar gnus-digest-separator "^Subject:[ \t]" X "*Regexp that separates messages in a digest article.") X X(defvar gnus-use-full-window t X "*Non-nil means to take up the entire screen of Emacs.") X X(defvar gnus-window-configuration X '((SelectNewsgroup (0 1 0)) X (ExitNewsgroup (1 0 0)) X (SelectArticle (0 3 10)) X (ExpandSubject (0 1 0))) X "*Specify window configurations for each action. XThe format of the variable is a list of (ACTION (G S A)), where XG, S, and A are the relative height of Group, Subject, and Article Xwindows, respectively. ACTION is `SelectNewsgroup', `ExitNewsgroup', X`SelectArticle', or `ExpandSubject'.") X X(defvar gnus-Group-mode-hook nil X "*A hook for GNUS Group Mode.") X X(defvar gnus-Subject-mode-hook nil X "*A hook for GNUS Subject Mode.") X X(defvar gnus-Article-mode-hook nil X "*A hook for GNUS Article Mode.") X X(defvar gnus-Kill-file-mode-hook nil X "*A hook for GNUS KILL File Mode.") X X(defvar gnus-Startup-hook nil X "*A hook called at start up time. XThis hook is called after GNUS is connected to the NNTP server. So, it Xis possible to change the behavior of GNUS according to the selected XNNTP server.") X X(defvar gnus-Group-prepare-hook X (function X (lambda () X ;; Search for the first unread newsgroup. X (goto-char (point-min)) X (re-search-forward "^[ \t]+[1-9][0-9]*:" nil t))) X "*A hook called after newsgroup list is created in the Newsgroup buffer. XThis hook is used for moving the point to the first unread newsgroup Xby default. If you want to modify the Newsgroup buffer, you can use Xthis hook.") X X(defvar gnus-Subject-prepare-hook nil X "*A hook called after subject list is created in the Subject buffer. XIf you want to modify the Subject buffer, you can use this hook.") X X(defvar gnus-Article-prepare-hook nil X "*A hook called after an article is prepared in the Article buffer. XIf you want to run a special decoding program like nkf, use this hook.") X X(defvar gnus-Select-group-hook nil X "*A hook called when a newsgroup is selected. XIf you want to sort Subject buffer by date and then by subject, you Xcan use the following hook: X X(setq gnus-Select-group-hook X '(lambda () X ;; First of all, sort by date. X (gnus-sort-headers X '(lambda (a b) X (gnus-date-lessp (gnus-header-date a) X (gnus-header-date b)))) X ;; Then sort by subject string ignoring `Re:'. X ;; If case-fold-search is non-nil, case of letters is ignored. X (gnus-sort-headers X '(lambda (a b) X (gnus-string-lessp X (gnus-simplify-subject (gnus-header-subject a) 're) X (gnus-simplify-subject (gnus-header-subject b) 're) X ))))) X XIf you'd like to simplify subjects like the X`gnus-Subject-next-same-subject' command does, you can use the Xfollowing hook: X X(setq gnus-Select-group-hook X '(lambda () X (mapcar (function X (lambda (header) X (nntp-set-header-subject X header X (gnus-simplify-subject X (gnus-header-subject header) 're-only)))) X gnus-newsgroup-headers))) X XIn some newsgroups author name is meaningless. It is possible to Xprevent listing author names in GNUS Subject buffer as follows: X X(setq gnus-Select-group-hook X '(lambda () X (cond ((string-equal \"comp.sources.unix\" gnus-newsgroup-name) X (setq gnus-optional-headers X (function gnus-optional-lines))) X (t X (setq gnus-optional-headers X (function gnus-optional-lines-and-from))))))") X X(defvar gnus-Select-article-hook nil X "*A hook called when an article is selected. XIf you'd like to run RMAIL on a digest article automagically, you can Xuse the following hook: X X(setq gnus-Select-article-hook X '(lambda () X (cond ((string-equal \"comp.sys.sun\" gnus-newsgroup-name) X (gnus-Subject-rmail-digest)) X ((and (string-equal \"comp.text\" gnus-newsgroup-name) X (string-match \"^TeXhax Digest\" X (gnus-header-subject gnus-current-headers))) X (gnus-Subject-rmail-digest) X ))))") X X(defvar gnus-Select-digest-hook X (function X (lambda () X ;; Reply-To: is required by `undigestify-rmail-message'. X (or (mail-position-on-field "Reply-to" t) X (progn X (mail-position-on-field "Reply-to") X (insert (gnus-fetch-field "From")))))) X "*A hook called when reading digest messages using Rmail. XThis hook can be used to modify incomplete digest articles as follows X(this is the default): X X(setq gnus-Select-digest-hook X '(lambda () X ;; Reply-To: is required by `undigestify-rmail-message'. X (or (mail-position-on-field \"Reply-to\" t) X (progn X (mail-position-on-field \"Reply-to\") X (insert (gnus-fetch-field \"From\"))))))") X X(defvar gnus-Rmail-digest-hook nil X "*A hook called when reading digest messages using Rmail. XThis hook is intended to customize Rmail mode for reading digest articles.") X X(defvar gnus-Apply-kill-hook (function gnus-apply-kill-file) X "*A hook called when a newsgroup is selected and subject list is prepared. XThis hook is intended to apply a KILL file to the selected newsgroup. XThe function `gnus-apply-kill-file' is called defaultly. X XSince a general KILL file is too heavy to use only for a few Xnewsgroups, I recommend you to use a lighter hook function. For Xexample, if you'd like to apply a KILL file to articles which contains Xa string `rmgroup' in subject in newsgroup `control', you can use the Xfollowing hook: X X(setq gnus-Apply-kill-hook X '(lambda () X (cond ((string-match \"control\" gnus-newsgroup-name) X (gnus-kill \"Subject\" \"rmgroup\") X (gnus-expunge \"X\")))))") X X(defvar gnus-Mark-article-hook X (function X (lambda () X (or (memq gnus-current-article gnus-newsgroup-marked) X (gnus-Subject-mark-as-read gnus-current-article)) X (gnus-Subject-set-current-mark "+"))) X "*A hook called when an article is selected at the first time. XThe hook is intended to mark an article as read (or unread) Xautomatically when it is selected. X XIf you'd like to mark as unread (-) instead, use the following hook: X X(setq gnus-Mark-article-hook X '(lambda () X (gnus-Subject-mark-as-unread gnus-current-article) X (gnus-Subject-set-current-mark \"+\")))") X X(defvar gnus-Inews-article-hook nil X "*A hook called before posting an article. XIf you'd like to run a special encoding program, use this hook.") X X(defvar gnus-Exit-group-hook nil X "*A hook called when exiting (not quitting) Subject mode. XIf your machine is so slow that exiting from Subject mode takes very Xlong time, set the variable gnus-newsgroup-headers to nil. This Xinhibits marking articles as read using cross-reference information.") X X(defvar gnus-Suspend-gnus-hook nil X "*A hook called when suspending (not exiting) GNUS.") X X(defvar gnus-Exit-gnus-hook nil X "*A hook called when exiting (not suspending) GNUS.") X X(defvar gnus-Save-newsrc-hook nil X "*A hook called when saving the newsrc file. XThis hook is called before saving .newsrc file.") X X;; Site dependent variables. You have to define these variables in SHAR_EOF echo "End of part 1, continue with part 2" echo "2" > s2_seq_.tmp exit 0