Mercurial > emacs
annotate lisp/=gnus.el @ 3474:9eaa2151f7f6
(gnus-summary-isearch-article): Call isearch-forward
in ordinary fashion with no args.
(gnus-inews-article-hook, gnus-prepare-article-hook):
Initialize to a list.
(gnus-read-newsrc-file): If timestamps are equal, reload .newsrc.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 04 Jun 1993 05:33:32 +0000 |
parents | 3ab36486eede |
children | 509112098ff1 |
rev | line source |
---|---|
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1 ;;; GNUS: an NNTP-based News Reader for GNU Emacs |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2 ;; Copyright (C) 1987, 1988, 1989, 1990, 1993 Free Software Foundation, Inc. |
3474
9eaa2151f7f6
(gnus-summary-isearch-article): Call isearch-forward
Richard M. Stallman <rms@gnu.org>
parents:
3331
diff
changeset
|
3 ;; $Header: /home/fsf/rms/e19/lisp/RCS/gnus.el,v 1.16 1993/05/30 23:56:49 rms Exp rms $ |
807
4f28bd14272c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
716
diff
changeset
|
4 |
257 | 5 ;; This file is part of GNU Emacs. |
6 | |
711
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
7 ;; GNU Emacs is free software; you can redistribute it and/or modify |
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
8 ;; it under the terms of the GNU General Public License as published by |
807
4f28bd14272c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
716
diff
changeset
|
9 ;; the Free Software Foundation; either version 2, or (at your option) |
711
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
10 ;; any later version. |
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
11 |
257 | 12 ;; GNU Emacs is distributed in the hope that it will be useful, |
711
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
13 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
15 ;; GNU General Public License for more details. |
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
16 |
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
17 ;; You should have received a copy of the GNU General Public License |
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
18 ;; along with GNU Emacs; see the file COPYING. If not, write to |
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
19 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
257 | 20 |
807
4f28bd14272c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
716
diff
changeset
|
21 ;;; Commentary: |
4f28bd14272c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
716
diff
changeset
|
22 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
23 ;; How to Install GNUS: |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
24 ;; (0) First of all, remove GNUS related OLD *.elc files (at least |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
25 ;; nntp.elc). |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
26 ;; (1) Unshar gnus.el, gnuspost.el, gnusmail.el, gnusmisc.el, and |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
27 ;; nntp.el. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
28 ;; (2) byte-compile-file nntp.el, gnus.el, gnuspost.el, gnusmail.el, |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
29 ;; and gnusmisc.el. If you have a local news spool, |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
30 ;; byte-compile-file nnspool.el, too. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
31 ;; (3) Define three environment variables in .login file as follows: |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
32 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
33 ;; setenv NNTPSERVER flab |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
34 ;; setenv DOMAINNAME "stars.flab.Fujitsu.CO.JP" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
35 ;; setenv ORGANIZATION "Fujitsu Laboratories Ltd., Kawasaki, Japan." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
36 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
37 ;; Or instead, define lisp variables in your .emacs, site-init.el, |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
38 ;; or default.el as follows: |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
39 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
40 ;; (setq gnus-nntp-server "flab") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
41 ;; (setq gnus-local-domain "stars.flab.Fujitsu.CO.JP") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
42 ;; (setq gnus-local-organization "Fujitsu Laboratories Ltd., ...") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
43 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
44 ;; If the function (system-name) returns the full internet name, |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
45 ;; you don't have to define the domain. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
46 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
47 ;; (4) You may have to define NNTP service name as number 119. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
48 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
49 ;; (setq gnus-nntp-service 119) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
50 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
51 ;; Or, if you'd like to use a local news spool directly in stead |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
52 ;; of NNTP, install nnspool.el and set the variable to nil as |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
53 ;; follows: |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
54 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
55 ;; (setq gnus-nntp-service nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
56 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
57 ;; (5) If you'd like to use the GENERICFROM feature like the Bnews, |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
58 ;; define the variable as follows: |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
59 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
60 ;; (setq gnus-use-generic-from t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
61 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
62 ;; (6) Define autoload entries in .emacs file as follows: |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
63 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
64 ;; (autoload 'gnus "gnus" "Read network news." t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
65 ;; (autoload 'gnus-post-news "gnuspost" "Post a news." t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
66 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
67 ;; (7) Read nntp.el if you have problems with NNTP or kanji handling. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
68 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
69 ;; (8) Install mhspool.el, tcp.el, and tcp.c if it is necessary. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
70 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
71 ;; mhspool.el is a package for reading articles or mail in your |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
72 ;; private directory using GNUS. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
73 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
74 ;; tcp.el and tcp.c are necessary if and only if your Emacs does |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
75 ;; not have the function `open-network-stream' which is used for |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
76 ;; communicating with NNTP server inside Emacs. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
77 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
78 ;; (9) Install an Info file generated from the texinfo manual gnus.texinfo. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
79 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
80 ;; If you are not allowed to create the Info file to the standard |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
81 ;; Info-directory, create it in your private directory and set the |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
82 ;; variable gnus-info-directory to that directory. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
83 |
257 | 84 ;; GNUS Mailing List: |
85 ;; There are two mailing lists for GNUS lovers in the world: | |
86 ;; | |
87 ;; info-gnus@flab.fujitsu.co.jp, and | |
88 ;; info-gnus-english@tut.cis.ohio-state.edu. | |
89 ;; | |
90 ;; They are intended to exchange useful information about GNUS, such | |
91 ;; as bug fixes, useful hooks, and extensions. The major difference | |
92 ;; between the lists is what the official language is. Both Japanese | |
93 ;; and English are available in info-gnus, while English is only | |
94 ;; available in info-gnus-english. There is no need to subscribe to | |
95 ;; info-gnus if you cannot read Japanese messages, because most of the | |
96 ;; discussion and important announcements will be sent to | |
97 ;; info-gnus-english. Moreover, if you can read gnu.emacs.gnus | |
98 ;; newsgroup of USENET, you need not, either. info-gnus-english and | |
99 ;; gnu.emacs.gnus are linked each other. | |
100 ;; | |
101 ;; Please send subscription request to: | |
102 ;; | |
103 ;; info-gnus-request@flab.fujitsu.co.jp, or | |
104 ;; info-gnus-english-request@cis.ohio-state.edu | |
105 | |
106 ;; TO DO: | |
107 ;; (1) Incremental update of active info. | |
108 ;; (2) GNUS own poster. | |
109 ;; (3) Multi-GNUS (Talking to many hosts same time). | |
110 ;; (4) Asynchronous transmission of large messages. | |
111 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
112 (provide 'gnus) |
257 | 113 (require 'nntp) |
114 (require 'mail-utils) | |
115 | |
3331
3ab36486eede
(gnus-nntp-server): Use gnus-default-nntp-server.
Richard M. Stallman <rms@gnu.org>
parents:
2845
diff
changeset
|
116 (defvar gnus-nntp-server (or (getenv "NNTPSERVER") gnus-default-nntp-server) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
117 "*The name of the host running NNTP server. |
257 | 118 If it is a string such as `:DIRECTORY', the user's private DIRECTORY |
119 is used as a news spool. | |
120 Initialized from the NNTPSERVER environment variable.") | |
121 | |
716
f11e7af7c0d9
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
711
diff
changeset
|
122 (defvar gnus-nntp-service "nntp" |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
123 "*NNTP service name (\"nntp\" or 119). |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
124 Go to a local news spool if its value is nil.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
125 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
126 (defvar gnus-startup-file "~/.newsrc" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
127 "*Your .newsrc file. Use `.newsrc-SERVER' instead if exists.") |
716
f11e7af7c0d9
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
711
diff
changeset
|
128 |
257 | 129 (defvar gnus-signature-file "~/.signature" |
130 "*Your .signature file. Use `.signature-DISTRIBUTION' instead if exists.") | |
131 | |
132 (defvar gnus-use-cross-reference t | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
133 "*Specifies what to do with cross references (Xref: field). |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
134 If nil, ignore cross references. If t, mark articles as read in |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
135 subscribed newsgroups. Otherwise, if not nil nor t, mark articles as |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
136 read in all newsgroups.") |
257 | 137 |
138 (defvar gnus-use-followup-to t | |
139 "*Specifies what to do with Followup-To: field. | |
140 If nil, ignore followup-to: field. If t, use its value execpt for | |
141 `poster'. Otherewise, if not nil nor t, always use its value.") | |
142 | |
143 (defvar gnus-large-newsgroup 50 | |
144 "*The number of articles which indicates a large newsgroup. | |
145 If the number of articles in a newsgroup is greater than the value, | |
146 confirmation is required for selecting the newsgroup.") | |
147 | |
148 (defvar gnus-author-copy (getenv "AUTHORCOPY") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
149 "*File name saving a copy of an article posted using FCC: field. |
257 | 150 Initialized from the AUTHORCOPY environment variable. |
151 | |
152 Articles are saved using a function specified by the the variable | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
153 gnus-author-copy-saver (rmail-output is default) if a file name is |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
154 given. Instead, if the first character of the name is `|', the |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
155 contents of the article is piped out to the named program. It is |
257 | 156 possible to save an article in an MH folder as follows: |
157 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
158 (setq gnus-author-copy \"|/usr/local/lib/mh/rcvstore +Article\")") |
257 | 159 |
160 (defvar gnus-author-copy-saver (function rmail-output) | |
161 "*A function called with a file name to save an author copy to. | |
162 The default function is `rmail-output' which saves in Unix mailbox format.") | |
163 | |
164 (defvar gnus-use-long-file-name | |
165 (not (memq system-type '(usg-unix-v xenix))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
166 "*Non-nil means that a newsgroup name is used as a default file name |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
167 to save articles to. If it's nil, the directory form of a newsgroup is |
257 | 168 used instead.") |
169 | |
170 (defvar gnus-article-save-directory (getenv "SAVEDIR") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
171 "*A directory name to save articles to (default to ~/News). |
257 | 172 Initialized from the SAVEDIR environment variable.") |
173 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
174 (defvar gnus-default-article-saver (function gnus-summary-save-in-rmail) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
175 "*A function to save articles in your favorite format. |
257 | 176 The function must be interactively callable (in other words, it must |
177 be an Emacs command). | |
178 | |
179 GNUS provides the following functions: | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
180 gnus-summary-save-in-rmail (in Rmail format) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
181 gnus-summary-save-in-mail (in Unix mail format) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
182 gnus-summary-save-in-folder (in an MH folder) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
183 gnus-summary-save-in-file (in article format).") |
257 | 184 |
185 (defvar gnus-rmail-save-name (function gnus-plain-save-name) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
186 "*A function generating a file name to save articles in Rmail format. |
257 | 187 The function is called with NEWSGROUP, HEADERS, and optional LAST-FILE.") |
188 | |
189 (defvar gnus-mail-save-name (function gnus-plain-save-name) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
190 "*A function generating a file name to save articles in Unix mail format. |
257 | 191 The function is called with NEWSGROUP, HEADERS, and optional LAST-FILE.") |
192 | |
193 (defvar gnus-folder-save-name (function gnus-folder-save-name) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
194 "*A function generating a file name to save articles in MH folder. |
257 | 195 The function is called with NEWSGROUP, HEADERS, and optional LAST-FOLDER.") |
196 | |
197 (defvar gnus-file-save-name (function gnus-numeric-save-name) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
198 "*A function generating a file name to save articles in article format. |
257 | 199 The function is called with NEWSGROUP, HEADERS, and optional LAST-FILE.") |
200 | |
201 (defvar gnus-kill-file-name "KILL" | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
202 "*File name of a KILL file.") |
257 | 203 |
204 (defvar gnus-novice-user t | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
205 "*Non-nil means that you are a novice to USENET. If non-nil, |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
206 verbose messages may be displayed or your confirmations may be required.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
207 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
208 (defvar gnus-interactive-catchup t |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
209 "*Require your confirmation when catching up a newsgroup if non-nil.") |
257 | 210 |
211 (defvar gnus-interactive-post t | |
212 "*Newsgroup, subject, and distribution will be asked for if non-nil.") | |
213 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
214 (defvar gnus-interactive-exit t |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
215 "*Require your confirmation when exiting gnus if non-nil.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
216 |
257 | 217 (defvar gnus-user-login-name nil |
218 "*The login name of the user. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
219 Got from the USER and LOGNAME environment variable if undefined.") |
257 | 220 |
221 (defvar gnus-user-full-name nil | |
222 "*The full name of the user. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
223 Got from the NAME environment variable if undefined.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
224 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
225 (defvar gnus-show-mime nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
226 "*Show MIME message if non-nil.") |
257 | 227 |
228 (defvar gnus-show-threads t | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
229 "*Show conversation threads in Summary Mode if non-nil.") |
257 | 230 |
231 (defvar gnus-thread-hide-subject t | |
232 "*Non-nil means hide subjects for thread subtrees.") | |
233 | |
234 (defvar gnus-thread-hide-subtree nil | |
235 "*Non-nil means hide thread subtrees initially. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
236 If non-nil, you have to run the command gnus-summary-show-thread by |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
237 hand or by using gnus-select-article-hook to show hidden threads.") |
257 | 238 |
239 (defvar gnus-thread-hide-killed t | |
240 "*Non-nil means hide killed thread subtrees automatically.") | |
241 | |
242 (defvar gnus-thread-ignore-subject nil | |
243 "*Don't take care of subject differences, but only references if non-nil. | |
244 If it is non-nil, some commands work with subjects do not work properly.") | |
245 | |
246 (defvar gnus-thread-indent-level 4 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
247 "*Indentation of thread subtrees.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
248 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
249 (defvar gnus-ignored-newsgroups "^to\\..*$" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
250 "*A regular expression used to ignore uninterested newsgroups in the active file. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
251 Any lines in the active file matching this regular expression are |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
252 removed from the newsgroup list before anything else is done to it, |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
253 thus making them effectively invisible.") |
257 | 254 |
255 (defvar gnus-ignored-headers | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
256 "^Path:\\|^Posting-Version:\\|^Article-I.D.:\\|^Expires:\\|^Date-Received:\\|^References:\\|^Control:\\|^Xref:\\|^Lines:\\|^Posted:\\|^Relay-Version:\\|^Message-ID:\\|^Nf-ID:\\|^Nf-From:\\|^Approved:\\|^Sender:" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
257 "*All random fields within the header of a message.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
258 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
259 (defvar gnus-required-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
260 '(From Date Newsgroups Subject Message-ID Path Organization Distribution) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
261 "*All required fields for articles you post. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
262 RFC977 and RFC1036 require From, Date, Newsgroups, Subject, Message-ID |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
263 and Path fields. Organization, Distribution and Lines are optional. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
264 If you want GNUS not to insert some field, remove it from the |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
265 variable.") |
257 | 266 |
267 (defvar gnus-show-all-headers nil | |
268 "*Show all headers of an article if non-nil.") | |
269 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
270 (defvar gnus-save-all-headers t |
257 | 271 "*Save all headers of an article if non-nil.") |
272 | |
273 (defvar gnus-optional-headers (function gnus-optional-lines-and-from) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
274 "*A function generating a optional string displayed in GNUS Summary |
257 | 275 mode buffer. The function is called with an article HEADER. The |
276 result must be a string excluding `[' and `]'.") | |
277 | |
278 (defvar gnus-auto-extend-newsgroup t | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
279 "*Extend visible artciles to forward and backward if non-nil.") |
257 | 280 |
281 (defvar gnus-auto-select-first t | |
282 "*Select the first unread article automagically if non-nil. | |
283 If you want to prevent automatic selection of the first unread article | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
284 in some newsgroups, set the variable to nil in gnus-select-group-hook |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
285 or gnus-apply-kill-hook.") |
257 | 286 |
287 (defvar gnus-auto-select-next t | |
288 "*Select the next newsgroup automagically if non-nil. | |
289 If the value is t and the next newsgroup is empty, GNUS will exit | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
290 Summary mode and go back to Group mode. If the value is neither nil |
257 | 291 nor t, GNUS will select the following unread newsgroup. Especially, if |
292 the value is the symbol `quietly', the next unread newsgroup will be | |
293 selected without any confirmations.") | |
294 | |
295 (defvar gnus-auto-select-same nil | |
296 "*Select the next article with the same subject automagically if non-nil.") | |
297 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
298 (defvar gnus-auto-center-summary t |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
299 "*Always center the current summary in GNUS Summary window if non-nil.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
300 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
301 (defvar gnus-auto-mail-to-author nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
302 "*Insert `To: author' of the article when following up if non-nil. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
303 Mail is sent using the function specified by the variable |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
304 gnus-mail-send-method.") |
257 | 305 |
306 (defvar gnus-break-pages t | |
307 "*Break an article into pages if non-nil. | |
308 Page delimiter is specified by the variable `gnus-page-delimiter'.") | |
309 | |
310 (defvar gnus-page-delimiter "^\^L" | |
311 "*Regexp describing line-beginnings that separate pages of news article.") | |
312 | |
313 (defvar gnus-digest-show-summary t | |
314 "*Show a summary of undigestified messages if non-nil.") | |
315 | |
316 (defvar gnus-digest-separator "^Subject:[ \t]" | |
317 "*Regexp that separates messages in a digest article.") | |
318 | |
319 (defvar gnus-use-full-window t | |
320 "*Non-nil means to take up the entire screen of Emacs.") | |
321 | |
322 (defvar gnus-window-configuration | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
323 '((summary (0 1 0)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
324 (newsgroups (1 0 0)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
325 (article (0 3 10))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
326 "*Specify window configurations for each action. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
327 The format of the variable is a list of (ACTION (G S A)), where G, S, |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
328 and A are the relative height of Group, Summary, and Article windows, |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
329 respectively. ACTION is `summary', `newsgroups', or `article'.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
330 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
331 (defvar gnus-show-mime-method (function metamail-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
332 "*Function to process a MIME message. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
333 The function is expected to process current buffer as a MIME message.") |
257 | 334 |
335 (defvar gnus-mail-reply-method | |
336 (function gnus-mail-reply-using-mail) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
337 "*Function to compose reply mail. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
338 The function gnus-mail-reply-using-mail uses usual sendmail mail |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
339 program. The function gnus-mail-reply-using-mhe uses mh-e mail |
257 | 340 program. You can use yet another program by customizing this variable.") |
341 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
342 (defvar gnus-mail-forward-method |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
343 (function gnus-mail-forward-using-mail) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
344 "*Function to forward current message to another user. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
345 The function gnus-mail-reply-using-mail uses usual sendmail mail |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
346 program. You can use yet another program by customizing this variable.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
347 |
257 | 348 (defvar gnus-mail-other-window-method |
349 (function gnus-mail-other-window-using-mail) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
350 "*Function to compose mail in other window. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
351 The function gnus-mail-other-window-using-mail uses usual sendmail |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
352 mail program. The function gnus-mail-other-window-using-mhe uses mh-e |
257 | 353 mail program. You can use yet another program by customizing this variable.") |
354 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
355 (defvar gnus-mail-send-method send-mail-function |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
356 "*Function to mail a message too which is being posted as an article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
357 The message must have To: or Cc: field. The value of the variable |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
358 send-mail-function is the default function which uses sendmail mail |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
359 program.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
360 |
257 | 361 (defvar gnus-subscribe-newsgroup-method |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
362 (function gnus-subscribe-alphabetically) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
363 "*Function called with a newsgroup name when new newsgroup is found. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
364 The function gnus-subscribe-randomly inserts a new newsgroup a the |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
365 beginning of newsgroups. The function gnus-subscribe-alphabetically |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
366 inserts it in strict alphabetic order. The function |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
367 gnus-subscribe-hierarchically inserts it in hierarchical newsgroup |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
368 order. The function gnus-subscribe-interactively asks for your decision.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
369 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
370 (defvar gnus-group-mode-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
371 "*A hook for GNUS Group Mode.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
372 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
373 (defvar gnus-summary-mode-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
374 "*A hook for GNUS Summary Mode.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
375 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
376 (defvar gnus-article-mode-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
377 "*A hook for GNUS Article Mode.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
378 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
379 (defvar gnus-kill-file-mode-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
380 "*A hook for GNUS KILL File Mode.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
381 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
382 (defvar gnus-open-server-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
383 "*A hook called just before opening connection to news server.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
384 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
385 (defvar gnus-startup-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
386 "*A hook called at start up time. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
387 This hook is called after GNUS is connected to the NNTP server. So, it |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
388 is possible to change the behavior of GNUS according to the selected |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
389 NNTP server.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
390 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
391 (defvar gnus-group-prepare-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
392 "*A hook called after newsgroup list is created in the Newsgroup buffer. |
257 | 393 If you want to modify the Newsgroup buffer, you can use this hook.") |
394 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
395 (defvar gnus-summary-prepare-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
396 "*A hook called after summary list is created in the Summary buffer. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
397 If you want to modify the Summary buffer, you can use this hook.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
398 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
399 (defvar gnus-article-prepare-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
400 "*A hook called after an article is prepared in the Article buffer. |
257 | 401 If you want to run a special decoding program like nkf, use this hook.") |
402 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
403 (defvar gnus-select-group-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
404 "*A hook called when a newsgroup is selected. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
405 If you want to sort Summary buffer by date and then by subject, you |
257 | 406 can use the following hook: |
407 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
408 (setq gnus-select-group-hook |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
409 (function |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
410 (lambda () |
257 | 411 ;; First of all, sort by date. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
412 (gnus-keysort-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
413 (function string-lessp) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
414 (function |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
415 (lambda (a) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
416 (gnus-sortable-date (gnus-header-date a))))) |
257 | 417 ;; Then sort by subject string ignoring `Re:'. |
418 ;; If case-fold-search is non-nil, case of letters is ignored. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
419 (gnus-keysort-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
420 (function string-lessp) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
421 (function |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
422 (lambda (a) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
423 (if case-fold-search |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
424 (downcase (gnus-simplify-subject (gnus-header-subject a) t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
425 (gnus-simplify-subject (gnus-header-subject a) t))))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
426 ))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
427 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
428 If you'd like to simplify subjects like the |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
429 `gnus-summary-next-same-subject' command does, you can use the |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
430 following hook: |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
431 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
432 (setq gnus-select-group-hook |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
433 (function |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
434 (lambda () |
257 | 435 (mapcar (function |
436 (lambda (header) | |
437 (nntp-set-header-subject | |
438 header | |
439 (gnus-simplify-subject | |
440 (gnus-header-subject header) 're-only)))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
441 gnus-newsgroup-headers)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
442 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
443 In some newsgroups author name is meaningless. It is possible to |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
444 prevent listing author names in GNUS Summary buffer as follows: |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
445 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
446 (setq gnus-select-group-hook |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
447 (function |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
448 (lambda () |
257 | 449 (cond ((string-equal \"comp.sources.unix\" gnus-newsgroup-name) |
450 (setq gnus-optional-headers | |
451 (function gnus-optional-lines))) | |
452 (t | |
453 (setq gnus-optional-headers | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
454 (function gnus-optional-lines-and-from)))))))") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
455 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
456 (defvar gnus-select-article-hook |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
457 (function (lambda () (gnus-summary-show-thread))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
458 "*A hook called when an article is selected. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
459 The default hook shows conversation thread subtrees of the selected |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
460 article automatically as follows: |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
461 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
462 (setq gnus-select-article-hook |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
463 (function |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
464 (lambda () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
465 (gnus-summary-show-thread)))) |
257 | 466 |
467 If you'd like to run RMAIL on a digest article automagically, you can | |
468 use the following hook: | |
469 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
470 (setq gnus-select-article-hook |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
471 (function |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
472 (lambda () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
473 (gnus-summary-show-thread) |
257 | 474 (cond ((string-equal \"comp.sys.sun\" gnus-newsgroup-name) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
475 (gnus-summary-rmail-digest)) |
257 | 476 ((and (string-equal \"comp.text\" gnus-newsgroup-name) |
477 (string-match \"^TeXhax Digest\" | |
478 (gnus-header-subject gnus-current-headers))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
479 (gnus-summary-rmail-digest) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
480 )))))") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
481 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
482 (defvar gnus-select-digest-hook |
257 | 483 (function |
484 (lambda () | |
485 ;; Reply-To: is required by `undigestify-rmail-message'. | |
486 (or (mail-position-on-field "Reply-to" t) | |
487 (progn | |
488 (mail-position-on-field "Reply-to") | |
489 (insert (gnus-fetch-field "From")))))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
490 "*A hook called when reading digest messages using Rmail. |
257 | 491 This hook can be used to modify incomplete digest articles as follows |
492 (this is the default): | |
493 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
494 (setq gnus-select-digest-hook |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
495 (function |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
496 (lambda () |
257 | 497 ;; Reply-To: is required by `undigestify-rmail-message'. |
498 (or (mail-position-on-field \"Reply-to\" t) | |
499 (progn | |
500 (mail-position-on-field \"Reply-to\") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
501 (insert (gnus-fetch-field \"From\")))))))") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
502 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
503 (defvar gnus-rmail-digest-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
504 "*A hook called when reading digest messages using Rmail. |
257 | 505 This hook is intended to customize Rmail mode for reading digest articles.") |
506 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
507 (defvar gnus-apply-kill-hook (function gnus-apply-kill-file) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
508 "*A hook called when a newsgroup is selected and summary list is prepared. |
257 | 509 This hook is intended to apply a KILL file to the selected newsgroup. |
510 The function `gnus-apply-kill-file' is called defaultly. | |
511 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
512 Since a general KILL file is too heavy to use only for a few |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
513 newsgroups, I recommend you to use a lighter hook function. For |
257 | 514 example, if you'd like to apply a KILL file to articles which contains |
515 a string `rmgroup' in subject in newsgroup `control', you can use the | |
516 following hook: | |
517 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
518 (setq gnus-apply-kill-hook |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
519 (function |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
520 (lambda () |
257 | 521 (cond ((string-match \"control\" gnus-newsgroup-name) |
522 (gnus-kill \"Subject\" \"rmgroup\") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
523 (gnus-expunge \"X\"))))))") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
524 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
525 (defvar gnus-mark-article-hook |
257 | 526 (function |
527 (lambda () | |
528 (or (memq gnus-current-article gnus-newsgroup-marked) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
529 (gnus-summary-mark-as-read gnus-current-article)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
530 (gnus-summary-set-current-mark "+"))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
531 "*A hook called when an article is selected at the first time. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
532 The hook is intended to mark an article as read (or unread) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
533 automatically when it is selected. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
534 |
257 | 535 If you'd like to mark as unread (-) instead, use the following hook: |
536 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
537 (setq gnus-mark-article-hook |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
538 (function |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
539 (lambda () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
540 (gnus-summary-mark-as-unread gnus-current-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
541 (gnus-summary-set-current-mark \"+\"))))") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
542 |
3474
9eaa2151f7f6
(gnus-summary-isearch-article): Call isearch-forward
Richard M. Stallman <rms@gnu.org>
parents:
3331
diff
changeset
|
543 (defvar gnus-prepare-article-hook (list (function gnus-inews-insert-signature)) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
544 "*A hook called after preparing body, but before preparing header fields. |
3474
9eaa2151f7f6
(gnus-summary-isearch-article): Call isearch-forward
Richard M. Stallman <rms@gnu.org>
parents:
3331
diff
changeset
|
545 The default hook (`gnus-inews-insert-signature') inserts a signature |
9eaa2151f7f6
(gnus-summary-isearch-article): Call isearch-forward
Richard M. Stallman <rms@gnu.org>
parents:
3331
diff
changeset
|
546 file specified by the variable `gnus-signature-file'.") |
9eaa2151f7f6
(gnus-summary-isearch-article): Call isearch-forward
Richard M. Stallman <rms@gnu.org>
parents:
3331
diff
changeset
|
547 |
9eaa2151f7f6
(gnus-summary-isearch-article): Call isearch-forward
Richard M. Stallman <rms@gnu.org>
parents:
3331
diff
changeset
|
548 (defvar gnus-inews-article-hook (list (function gnus-inews-do-fcc)) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
549 "*A hook called before finally posting an article. |
3474
9eaa2151f7f6
(gnus-summary-isearch-article): Call isearch-forward
Richard M. Stallman <rms@gnu.org>
parents:
3331
diff
changeset
|
550 The default hook (`gnus-inews-do-fcc') does FCC processing (save article |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
551 to a file).") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
552 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
553 (defvar gnus-exit-group-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
554 "*A hook called when exiting (not quitting) Summary mode. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
555 If your machine is so slow that exiting from Summary mode takes very |
3474
9eaa2151f7f6
(gnus-summary-isearch-article): Call isearch-forward
Richard M. Stallman <rms@gnu.org>
parents:
3331
diff
changeset
|
556 long time, set the variable `gnus-use-cross-reference' to nil. This |
257 | 557 inhibits marking articles as read using cross-reference information.") |
558 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
559 (defvar gnus-suspend-gnus-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
560 "*A hook called when suspending (not exiting) GNUS.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
561 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
562 (defvar gnus-exit-gnus-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
563 "*A hook called when exiting (not suspending) GNUS.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
564 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
565 (defvar gnus-save-newsrc-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
566 "*A hook called when saving the newsrc file. |
3474
9eaa2151f7f6
(gnus-summary-isearch-article): Call isearch-forward
Richard M. Stallman <rms@gnu.org>
parents:
3331
diff
changeset
|
567 This hook is called before saving the `.newsrc' file.") |
257 | 568 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
569 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
570 ;; Site dependent variables. You have to define these variables in |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
571 ;; site-init.el, default.el or your .emacs. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
572 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
573 (defvar gnus-local-timezone nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
574 "*Local time zone. Both styles, \"JST\" and +0900 are acceptable. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
575 If its value is non-nil, valid Date: field will be generated in terms |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
576 of RFC822. In this case, timezone package must be installed.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
577 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
578 (defvar gnus-local-domain nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
579 "*Local domain name without a host name like: \"stars.flab.Fujitsu.CO.JP\" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
580 The `DOMAINNAME' environment variable is used instead if defined. If |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
581 the function (system-name) returns the full internet name, there is no |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
582 need to define the name.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
583 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
584 (defvar gnus-local-organization nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
585 "*Local organization like: \"Fujitsu Laboratories Ltd., Kawasaki, Japan.\" |
257 | 586 The `ORGANIZATION' environment variable is used instead if defined.") |
587 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
588 (defvar gnus-local-distributions '("local" "world") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
589 "*List of distributions. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
590 The first element in the list is used as default. If distributions |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
591 file is available, its content is also used.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
592 |
257 | 593 (defvar gnus-use-generic-from nil |
594 "*If nil, prepend local host name to the defined domain in the From: | |
595 field; if stringp, use this; if non-nil, strip of the local host name.") | |
596 | |
597 (defvar gnus-use-generic-path nil | |
598 "*If nil, use the NNTP server name in the Path: field; if stringp, | |
599 use this; if non-nil, use no host name (user name only)") | |
600 | |
601 ;; Internal variables. | |
602 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
603 (defconst gnus-version "GNUS 3.15" |
257 | 604 "Version numbers of this version of GNUS.") |
605 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
606 (defvar gnus-info-nodes |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
607 '((gnus-group-mode "(gnus)Newsgroup Commands") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
608 (gnus-summary-mode "(gnus)Summary Commands") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
609 (gnus-article-mode "(gnus)Article Commands") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
610 (gnus-kill-file-mode "(gnus)KILL File") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
611 (gnus-browse-killed-mode "(gnus)Maintenance")) |
257 | 612 "Assoc list of major modes and related Info nodes.") |
613 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
614 ;; Alist syntax is different from that of 3.14.3. |
257 | 615 (defvar gnus-access-methods |
616 '((nntp | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
617 (gnus-retrieve-headers nntp-retrieve-headers) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
618 (gnus-open-server nntp-open-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
619 (gnus-close-server nntp-close-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
620 (gnus-server-opened nntp-server-opened) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
621 (gnus-status-message nntp-status-message) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
622 (gnus-request-article nntp-request-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
623 (gnus-request-group nntp-request-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
624 (gnus-request-list nntp-request-list) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
625 (gnus-request-list-newsgroups nntp-request-list-newsgroups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
626 (gnus-request-list-distributions nntp-request-list-distributions) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
627 (gnus-request-post nntp-request-post)) |
257 | 628 (nnspool |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
629 (gnus-retrieve-headers nnspool-retrieve-headers) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
630 (gnus-open-server nnspool-open-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
631 (gnus-close-server nnspool-close-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
632 (gnus-server-opened nnspool-server-opened) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
633 (gnus-status-message nnspool-status-message) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
634 (gnus-request-article nnspool-request-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
635 (gnus-request-group nnspool-request-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
636 (gnus-request-list nnspool-request-list) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
637 (gnus-request-list-newsgroups nnspool-request-list-newsgroups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
638 (gnus-request-list-distributions nnspool-request-list-distributions) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
639 (gnus-request-post nnspool-request-post)) |
257 | 640 (mhspool |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
641 (gnus-retrieve-headers mhspool-retrieve-headers) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
642 (gnus-open-server mhspool-open-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
643 (gnus-close-server mhspool-close-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
644 (gnus-server-opened mhspool-server-opened) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
645 (gnus-status-message mhspool-status-message) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
646 (gnus-request-article mhspool-request-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
647 (gnus-request-group mhspool-request-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
648 (gnus-request-list mhspool-request-list) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
649 (gnus-request-list-newsgroups mhspool-request-list-newsgroups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
650 (gnus-request-list-distributions mhspool-request-list-distributions) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
651 (gnus-request-post mhspool-request-post))) |
257 | 652 "Access method for NNTP, nnspool, and mhspool.") |
653 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
654 (defvar gnus-group-buffer "*Newsgroup*") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
655 (defvar gnus-summary-buffer "*Summary*") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
656 (defvar gnus-article-buffer "*Article*") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
657 (defvar gnus-digest-buffer "GNUS Digest") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
658 (defvar gnus-digest-summary-buffer "GNUS Digest-summary") |
257 | 659 |
660 (defvar gnus-buffer-list | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
661 (list gnus-group-buffer gnus-summary-buffer gnus-article-buffer |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
662 gnus-digest-buffer gnus-digest-summary-buffer) |
257 | 663 "GNUS buffer names which should be killed when exiting.") |
664 | |
665 (defvar gnus-variable-list | |
666 '(gnus-newsrc-options | |
667 gnus-newsrc-options-n-yes gnus-newsrc-options-n-no | |
668 gnus-newsrc-assoc gnus-killed-assoc gnus-marked-assoc) | |
669 "GNUS variables saved in the quick startup file.") | |
670 | |
671 (defvar gnus-overload-functions | |
672 '((news-inews gnus-inews-news "rnewspost") | |
673 (caesar-region gnus-caesar-region "rnews")) | |
674 "Functions overloaded by gnus. | |
675 It is a list of `(original overload &optional file)'.") | |
676 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
677 (defvar gnus-distribution-list nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
678 |
257 | 679 (defvar gnus-newsrc-options nil |
680 "Options line in the .newsrc file.") | |
681 | |
682 (defvar gnus-newsrc-options-n-yes nil | |
683 "Regexp representing subscribed newsgroups.") | |
684 | |
685 (defvar gnus-newsrc-options-n-no nil | |
686 "Regexp representing unsubscribed newsgroups.") | |
687 | |
688 (defvar gnus-newsrc-assoc nil | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
689 "Assoc list of read articles. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
690 gnus-newsrc-hashtb should be kept so that both hold the same information.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
691 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
692 (defvar gnus-newsrc-hashtb nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
693 "Hashtable of gnus-newsrc-assoc.") |
257 | 694 |
695 (defvar gnus-killed-assoc nil | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
696 "Assoc list of newsgroups removed from gnus-newsrc-assoc. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
697 gnus-killed-hashtb should be kept so that both hold the same information.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
698 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
699 (defvar gnus-killed-hashtb nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
700 "Hashtable of gnus-killed-assoc.") |
257 | 701 |
702 (defvar gnus-marked-assoc nil | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
703 "Assoc list of articles marked as unread. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
704 gnus-marked-hashtb should be kept so that both hold the same information.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
705 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
706 (defvar gnus-marked-hashtb nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
707 "Hashtable of gnus-marked-assoc.") |
257 | 708 |
709 (defvar gnus-unread-hashtb nil | |
710 "Hashtable of unread articles.") | |
711 | |
712 (defvar gnus-active-hashtb nil | |
713 "Hashtable of active articles.") | |
714 | |
715 (defvar gnus-octive-hashtb nil | |
716 "Hashtable of OLD active articles.") | |
717 | |
718 (defvar gnus-current-startup-file nil | |
719 "Startup file for the current host.") | |
720 | |
721 (defvar gnus-last-search-regexp nil | |
722 "Default regexp for article search command.") | |
723 | |
724 (defvar gnus-last-shell-command nil | |
725 "Default shell command on article.") | |
726 | |
727 (defvar gnus-have-all-newsgroups nil) | |
728 | |
729 (defvar gnus-newsgroup-name nil) | |
730 (defvar gnus-newsgroup-begin nil) | |
731 (defvar gnus-newsgroup-end nil) | |
732 (defvar gnus-newsgroup-last-rmail nil) | |
733 (defvar gnus-newsgroup-last-mail nil) | |
734 (defvar gnus-newsgroup-last-folder nil) | |
735 (defvar gnus-newsgroup-last-file nil) | |
736 | |
737 (defvar gnus-newsgroup-unreads nil | |
738 "List of unread articles in the current newsgroup.") | |
739 | |
740 (defvar gnus-newsgroup-unselected nil | |
741 "List of unselected unread articles in the current newsgroup.") | |
742 | |
743 (defvar gnus-newsgroup-marked nil | |
744 "List of marked articles in the current newsgroup (a subset of unread art).") | |
745 | |
746 (defvar gnus-newsgroup-headers nil | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
747 "List of article headers in the current newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
748 If the variable is modified (added or deleted), the function |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
749 gnus-clear-hashtables-for-newsgroup-headers must be called to clear |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
750 the hash tables.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
751 (defvar gnus-newsgroup-headers-hashtb-by-id nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
752 (defvar gnus-newsgroup-headers-hashtb-by-number nil) |
257 | 753 |
754 (defvar gnus-current-article nil) | |
755 (defvar gnus-current-headers nil) | |
756 (defvar gnus-current-history nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
757 (defvar gnus-have-all-headers nil "Must be either T or NIL.") |
257 | 758 (defvar gnus-last-article nil) |
759 (defvar gnus-current-kill-article nil) | |
760 | |
761 ;; Save window configuration. | |
762 (defvar gnus-winconf-kill-file nil) | |
763 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
764 (defvar gnus-group-mode-map nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
765 (defvar gnus-summary-mode-map nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
766 (defvar gnus-article-mode-map nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
767 (defvar gnus-kill-file-mode-map nil) |
257 | 768 |
769 (defvar rmail-last-file (expand-file-name "~/XMBOX")) | |
770 (defvar rmail-last-rmail-file (expand-file-name "~/XNEWS")) | |
771 | |
772 ;; Define GNUS Subsystems. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
773 (autoload 'gnus-group-post-news "gnuspost" |
257 | 774 "Post an article." t) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
775 (autoload 'gnus-summary-post-news "gnuspost" |
257 | 776 "Post an article." t) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
777 (autoload 'gnus-summary-followup "gnuspost" |
257 | 778 "Post a reply article." t) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
779 (autoload 'gnus-summary-followup-with-original "gnuspost" |
257 | 780 "Post a reply article with original article." t) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
781 (autoload 'gnus-summary-cancel-article "gnuspost" |
257 | 782 "Cancel an article you posted." t) |
783 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
784 (autoload 'gnus-summary-reply "gnusmail" |
257 | 785 "Reply mail to news author." t) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
786 (autoload 'gnus-summary-reply-with-original "gnusmail" |
257 | 787 "Reply mail to news author with original article." t) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
788 (autoload 'gnus-summary-mail-forward "gnusmail" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
789 "Forward the current message to another user." t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
790 (autoload 'gnus-summary-mail-other-window "gnusmail" |
257 | 791 "Compose mail in other window." t) |
792 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
793 (autoload 'gnus-group-kill-group "gnusmisc" |
257 | 794 "Kill newsgroup on current line." t) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
795 (autoload 'gnus-group-yank-group "gnusmisc" |
257 | 796 "Yank the last killed newsgroup on current line." t) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
797 (autoload 'gnus-group-kill-region "gnusmisc" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
798 "Kill newsgroups in current region." t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
799 (autoload 'gnus-group-transpose-groups "gnusmisc" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
800 "Exchange current newsgroup and previous newsgroup." t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
801 (autoload 'gnus-list-killed-groups "gnusmisc" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
802 "List the killed newsgroups." t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
803 (autoload 'gnus-gmt-to-local "gnusmisc" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
804 "Rewrite Date field in GMT to local in current buffer.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
805 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
806 (autoload 'metamail-buffer "metamail" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
807 "Process current buffer through 'metamail'." t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
808 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
809 (autoload 'timezone-make-sortable-date "timezone") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
810 (autoload 'timezone-parse-date "timezone") |
257 | 811 |
812 (autoload 'rmail-output "rmailout" | |
813 "Append this message to Unix mail file named FILE-NAME." t) | |
814 (autoload 'mail-position-on-field "sendmail") | |
815 (autoload 'mh-find-path "mh-e") | |
816 (autoload 'mh-prompt-for-folder "mh-e") | |
817 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
818 (put 'gnus-group-mode 'mode-class 'special) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
819 (put 'gnus-summary-mode 'mode-class 'special) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
820 (put 'gnus-article-mode 'mode-class 'special) |
257 | 821 |
822 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
823 ;;(put 'gnus-eval-in-buffer-window 'lisp-indent-hook 1) |
257 | 824 |
825 (defmacro gnus-eval-in-buffer-window (buffer &rest forms) | |
826 "Pop to BUFFER, evaluate FORMS, and then returns to original window." | |
827 (` (let ((GNUSStartBufferWindow (selected-window))) | |
828 (unwind-protect | |
829 (progn | |
830 (pop-to-buffer (, buffer)) | |
831 (,@ forms)) | |
832 (select-window GNUSStartBufferWindow))))) | |
833 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
834 (defmacro gnus-make-hashtable (&optional hashsize) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
835 "Make a hash table (default and minimum size is 200). |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
836 Optional argument HASHSIZE specifies the table size." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
837 (` (make-vector (, (if hashsize (` (max (, hashsize) 200)) 200)) 0))) |
257 | 838 |
839 (defmacro gnus-gethash (string hashtable) | |
840 "Get hash value of STRING in HASHTABLE." | |
841 ;;(` (symbol-value (abbrev-symbol (, string) (, hashtable)))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
842 ;;(` (abbrev-expansion (, string) (, hashtable))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
843 (` (symbol-value (intern-soft (, string) (, hashtable))))) |
257 | 844 |
845 (defmacro gnus-sethash (string value hashtable) | |
846 "Set hash value. Arguments are STRING, VALUE, and HASHTABLE." | |
847 ;; We cannot use define-abbrev since it only accepts string as value. | |
848 (` (set (intern (, string) (, hashtable)) (, value)))) | |
849 | |
850 ;; Note: Macros defined here are also defined in nntp.el. I don't like | |
851 ;; to put them here, but many users got troubled with the old | |
852 ;; definitions in nntp.elc. These codes are NNTP 3.10 version. | |
853 | |
854 (defmacro nntp-header-number (header) | |
855 "Return article number in HEADER." | |
856 (` (aref (, header) 0))) | |
857 | |
858 (defmacro nntp-set-header-number (header number) | |
859 "Set article number of HEADER to NUMBER." | |
860 (` (aset (, header) 0 (, number)))) | |
861 | |
862 (defmacro nntp-header-subject (header) | |
863 "Return subject string in HEADER." | |
864 (` (aref (, header) 1))) | |
865 | |
866 (defmacro nntp-set-header-subject (header subject) | |
867 "Set article subject of HEADER to SUBJECT." | |
868 (` (aset (, header) 1 (, subject)))) | |
869 | |
870 (defmacro nntp-header-from (header) | |
871 "Return author string in HEADER." | |
872 (` (aref (, header) 2))) | |
873 | |
874 (defmacro nntp-set-header-from (header from) | |
875 "Set article author of HEADER to FROM." | |
876 (` (aset (, header) 2 (, from)))) | |
877 | |
878 (defmacro nntp-header-xref (header) | |
879 "Return xref string in HEADER." | |
880 (` (aref (, header) 3))) | |
881 | |
882 (defmacro nntp-set-header-xref (header xref) | |
883 "Set article xref of HEADER to xref." | |
884 (` (aset (, header) 3 (, xref)))) | |
885 | |
886 (defmacro nntp-header-lines (header) | |
887 "Return lines in HEADER." | |
888 (` (aref (, header) 4))) | |
889 | |
890 (defmacro nntp-set-header-lines (header lines) | |
891 "Set article lines of HEADER to LINES." | |
892 (` (aset (, header) 4 (, lines)))) | |
893 | |
894 (defmacro nntp-header-date (header) | |
895 "Return date in HEADER." | |
896 (` (aref (, header) 5))) | |
897 | |
898 (defmacro nntp-set-header-date (header date) | |
899 "Set article date of HEADER to DATE." | |
900 (` (aset (, header) 5 (, date)))) | |
901 | |
902 (defmacro nntp-header-id (header) | |
903 "Return Id in HEADER." | |
904 (` (aref (, header) 6))) | |
905 | |
906 (defmacro nntp-set-header-id (header id) | |
907 "Set article Id of HEADER to ID." | |
908 (` (aset (, header) 6 (, id)))) | |
909 | |
910 (defmacro nntp-header-references (header) | |
911 "Return references in HEADER." | |
912 (` (aref (, header) 7))) | |
913 | |
914 (defmacro nntp-set-header-references (header ref) | |
915 "Set article references of HEADER to REF." | |
916 (` (aset (, header) 7 (, ref)))) | |
917 | |
918 | |
919 ;;; | |
920 ;;; GNUS Group Mode | |
921 ;;; | |
922 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
923 (if gnus-group-mode-map |
257 | 924 nil |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
925 (setq gnus-group-mode-map (make-keymap)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
926 (suppress-keymap gnus-group-mode-map) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
927 (define-key gnus-group-mode-map " " 'gnus-group-read-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
928 (define-key gnus-group-mode-map "=" 'gnus-group-select-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
929 (define-key gnus-group-mode-map "j" 'gnus-group-jump-to-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
930 (define-key gnus-group-mode-map "n" 'gnus-group-next-unread-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
931 (define-key gnus-group-mode-map "p" 'gnus-group-prev-unread-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
932 (define-key gnus-group-mode-map "\177" 'gnus-group-prev-unread-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
933 (define-key gnus-group-mode-map "N" 'gnus-group-next-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
934 (define-key gnus-group-mode-map "P" 'gnus-group-prev-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
935 (define-key gnus-group-mode-map "\C-n" 'gnus-group-next-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
936 (define-key gnus-group-mode-map "\C-p" 'gnus-group-prev-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
937 (define-key gnus-group-mode-map "\r" 'next-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
938 ;;(define-key gnus-group-mode-map "/" 'isearch-forward) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
939 (define-key gnus-group-mode-map "<" 'beginning-of-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
940 (define-key gnus-group-mode-map ">" 'end-of-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
941 (define-key gnus-group-mode-map "u" 'gnus-group-unsubscribe-current-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
942 (define-key gnus-group-mode-map "U" 'gnus-group-unsubscribe-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
943 (define-key gnus-group-mode-map "c" 'gnus-group-catchup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
944 (define-key gnus-group-mode-map "C" 'gnus-group-catchup-all) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
945 (define-key gnus-group-mode-map "l" 'gnus-group-list-groups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
946 (define-key gnus-group-mode-map "L" 'gnus-group-list-all-groups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
947 (define-key gnus-group-mode-map "g" 'gnus-group-get-new-news) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
948 (define-key gnus-group-mode-map "R" 'gnus-group-restart) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
949 (define-key gnus-group-mode-map "b" 'gnus-group-check-bogus-groups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
950 (define-key gnus-group-mode-map "r" 'gnus-group-restrict-groups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
951 (define-key gnus-group-mode-map "a" 'gnus-group-post-news) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
952 (define-key gnus-group-mode-map "\ek" 'gnus-group-edit-local-kill) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
953 (define-key gnus-group-mode-map "\eK" 'gnus-group-edit-global-kill) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
954 (define-key gnus-group-mode-map "\C-k" 'gnus-group-kill-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
955 (define-key gnus-group-mode-map "\C-y" 'gnus-group-yank-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
956 (define-key gnus-group-mode-map "\C-w" 'gnus-group-kill-region) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
957 (define-key gnus-group-mode-map "\C-x\C-t" 'gnus-group-transpose-groups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
958 (define-key gnus-group-mode-map "\C-c\C-l" 'gnus-list-killed-groups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
959 (define-key gnus-group-mode-map "V" 'gnus-version) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
960 ;;(define-key gnus-group-mode-map "x" 'gnus-group-force-update) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
961 (define-key gnus-group-mode-map "s" 'gnus-group-force-update) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
962 (define-key gnus-group-mode-map "z" 'gnus-group-suspend) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
963 (define-key gnus-group-mode-map "q" 'gnus-group-exit) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
964 (define-key gnus-group-mode-map "Q" 'gnus-group-quit) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
965 (define-key gnus-group-mode-map "?" 'gnus-group-describe-briefly) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
966 (define-key gnus-group-mode-map "\C-c\C-i" 'gnus-info-find-node)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
967 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
968 (defun gnus-group-mode () |
257 | 969 "Major mode for reading network news. |
970 All normal editing commands are turned off. | |
971 Instead, these commands are available: | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
972 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
973 SPC Read articles in this newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
974 = Select this newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
975 j Move to the specified newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
976 n Move to the next unread newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
977 p Move to the previous unread newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
978 C-n Move to the next newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
979 C-p Move to the previous newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
980 < Move point to the beginning of this buffer. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
981 > Move point to the end of this buffer. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
982 u Unsubscribe from (subscribe to) this newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
983 U Unsubscribe from (subscribe to) the specified newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
984 c Mark all articles as read, preserving marked articles. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
985 C Mark all articles in this newsgroup as read. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
986 l Revert this buffer. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
987 L List all newsgroups. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
988 g Get new news. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
989 R Force to read the raw .newsrc file and get new news. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
990 b Check bogus newsgroups. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
991 r Restrict visible newsgroups to the current region. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
992 a Post a new article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
993 ESC k Edit a local KILL file applied to this newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
994 ESC K Edit a global KILL file applied to all newsgroups. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
995 C-k Kill this newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
996 C-y Yank killed newsgroup here. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
997 C-w Kill newsgroups in current region (excluding current point). |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
998 C-x C-t Exchange this newsgroup and previous newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
999 C-c C-l list killed newsgroups. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1000 s Save .newsrc file. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1001 z Suspend reading news. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1002 q Quit reading news. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1003 Q Quit reading news without saving .newsrc file. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1004 V Show the version number of this GNUS. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1005 ? Describe Group Mode commands briefly. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1006 C-h m Describe Group Mode. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1007 C-c C-i Read Info about Group Mode. |
257 | 1008 |
1009 The name of the host running NNTP server is asked for if no default | |
1010 host is specified. It is also possible to choose another NNTP server | |
1011 even when the default server is defined by giving a prefix argument to | |
1012 the command `\\[gnus]'. | |
1013 | |
1014 If an NNTP server is preceded by a colon such as `:Mail', the user's | |
1015 private directory `~/Mail' is used as a news spool. This makes it | |
1016 possible to read mail stored in MH folders or articles saved by GNUS. | |
1017 File names of mail or articles must consist of only numeric | |
1018 characters. Otherwise, they are ignored. | |
1019 | |
1020 If there is a file named `~/.newsrc-SERVER', it is used as the | |
1021 startup file instead of standard one when talking to SERVER. It is | |
1022 possible to talk to many hosts by using different startup files for | |
1023 each. | |
1024 | |
1025 Option `-n' of the options line in the startup file is recognized | |
1026 properly the same as the Bnews system. For example, if the options | |
1027 line is `options -n !talk talk.rumors', newsgroups under the `talk' | |
1028 hierarchy except for `talk.rumors' are ignored while checking new | |
1029 newsgroups. | |
1030 | |
1031 If there is a file named `~/.signature-DISTRIBUTION', it is used as | |
1032 signature file instead of standard one when posting a news in | |
1033 DISTRIBUTION. | |
1034 | |
1035 If an Info file generated from `gnus.texinfo' is installed, you can | |
1036 read an appropriate Info node of the Info file according to the | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1037 current major mode of GNUS by \\[gnus-info-find-node]. |
257 | 1038 |
1039 The variable `gnus-version', `nntp-version', `nnspool-version', and | |
1040 `mhspool-version' have the version numbers of this version of gnus.el, | |
1041 nntp.el, nnspool.el, and mhspoo.el, respectively. | |
1042 | |
1043 User customizable variables: | |
1044 gnus-nntp-server | |
1045 Specifies the name of the host running the NNTP server. If its | |
1046 value is a string such as `:DIRECTORY', the user's private | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1047 DIRECTORY is used as a news spool. The variable is initialized |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1048 from the NNTPSERVER environment variable. |
257 | 1049 |
1050 gnus-nntp-service | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1051 Specifies a NNTP service name. It is usually \"nntp\" or 119. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1052 Nil forces GNUS to use a local news spool if the variable |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1053 `gnus-nntp-server' is set to the local host name. |
257 | 1054 |
1055 gnus-startup-file | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1056 Specifies a startup file (.newsrc). If there is a file named |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1057 `.newsrc-SERVER', it's used instead when talking to SERVER. I |
257 | 1058 recommend you to use the server specific file, if you'd like to |
1059 talk to many servers. Especially if you'd like to read your | |
1060 private directory, the name of the file must be | |
1061 `.newsrc-:DIRECTORY'. | |
1062 | |
1063 gnus-signature-file | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1064 Specifies a signature file (.signature). If there is a file named |
257 | 1065 `.signature-DISTRIBUTION', it's used instead when posting an |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1066 article in DISTRIBUTION. Set the variable to nil to prevent |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1067 appending the file automatically. If you use an NNTP inews which |
257 | 1068 comes with the NNTP package, you may have to set the variable to |
1069 nil. | |
1070 | |
1071 gnus-use-cross-reference | |
1072 Specifies what to do with cross references (Xref: field). If it | |
1073 is nil, cross references are ignored. If it is t, articles in | |
1074 subscribed newsgroups are only marked as read. Otherwise, if it | |
1075 is not nil nor t, articles in all newsgroups are marked as read. | |
1076 | |
1077 gnus-use-followup-to | |
1078 Specifies what to do with followup-to: field. If it is nil, its | |
1079 value is ignored. If it is non-nil, its value is used as followup | |
1080 newsgroups. Especially, if it is t and field value is `poster', | |
1081 your confirmation is required. | |
1082 | |
1083 gnus-author-copy | |
1084 Specifies a file name to save a copy of article you posted using | |
1085 FCC: field. If the first character of the value is `|', the | |
1086 contents of the article is piped out to a program specified by the | |
1087 rest of the value. The variable is initialized from the | |
1088 AUTHORCOPY environment variable. | |
1089 | |
1090 gnus-author-copy-saver | |
1091 Specifies a function to save an author copy. The function is | |
1092 called with a file name. The default function `rmail-output' | |
1093 saves in Unix mail format. | |
1094 | |
1095 gnus-kill-file-name | |
1096 Use specified file name as a KILL file (default to `KILL'). | |
1097 | |
1098 gnus-novice-user | |
1099 Non-nil means that you are a novice to USENET. If non-nil, | |
1100 verbose messages may be displayed or your confirmations may be | |
1101 required. | |
1102 | |
1103 gnus-interactive-post | |
1104 Non-nil means that newsgroup, subject and distribution are asked | |
1105 for interactively when posting a new article. | |
1106 | |
1107 gnus-use-full-window | |
1108 Non-nil means to take up the entire screen of Emacs. | |
1109 | |
1110 gnus-window-configuration | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1111 Specifies the configuration of Group, Summary, and Article |
257 | 1112 windows. It is a list of (ACTION (G S A)), where G, S, and A are |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1113 the relative height of Group, Summary, and Article windows, |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1114 respectively. ACTION is `summary', `newsgroups', or `article'. |
257 | 1115 |
1116 gnus-subscribe-newsgroup-method | |
1117 Specifies a function called with a newsgroup name when new | |
1118 newsgroup is found. The default definition adds new newsgroup at | |
1119 the beginning of other newsgroups. | |
1120 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1121 And more and more. Please refer to texinfo documentation. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1122 |
257 | 1123 Various hooks for customization: |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1124 gnus-group-mode-hook |
257 | 1125 Entry to this mode calls the value with no arguments, if that |
1126 value is non-nil. This hook is called before GNUS is connected to | |
1127 the NNTP server. So, you can change or define the NNTP server in | |
1128 this hook. | |
1129 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1130 gnus-startup-hook |
257 | 1131 Called with no arguments after the NNTP server is selected. It is |
1132 possible to change the behavior of GNUS or initialize the | |
1133 variables according to the selected NNTP server. | |
1134 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1135 gnus-group-prepare-hook |
257 | 1136 Called with no arguments after a newsgroup list is created in the |
1137 Newsgroup buffer, if that value is non-nil. | |
1138 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1139 gnus-save-newsrc-hook |
257 | 1140 Called with no arguments when saving newsrc file if that value is |
1141 non-nil. | |
1142 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1143 gnus-prepare-article-hook |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1144 Called with no arguments after preparing message body, but before |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1145 preparing header fields which is automatically generated if that |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1146 value is non-nil. The default hook (gnus-inews-insert-signature) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1147 inserts a signature file. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1148 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1149 gnus-inews-article-hook |
257 | 1150 Called with no arguments when posting an article if that value is |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1151 non-nil. This hook is called just before posting an article. The |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1152 default hook does FCC (save an article to the specified file). |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1153 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1154 gnus-suspend-gnus-hook |
257 | 1155 Called with no arguments when suspending (not exiting) GNUS, if |
1156 that value is non-nil. | |
1157 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1158 gnus-exit-gnus-hook |
257 | 1159 Called with no arguments when exiting (not suspending) GNUS, if |
1160 that value is non-nil." | |
1161 (interactive) | |
1162 (kill-all-local-variables) | |
1163 ;; Gee. Why don't you upgrade? | |
1164 (cond ((boundp 'mode-line-modified) | |
1165 (setq mode-line-modified "--- ")) | |
1166 ((listp (default-value 'mode-line-format)) | |
1167 (setq mode-line-format | |
1168 (cons "--- " (cdr (default-value 'mode-line-format))))) | |
1169 (t | |
1170 (setq mode-line-format | |
1171 "--- GNUS: List of Newsgroups %[(%m)%]----%3p-%-"))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1172 (setq major-mode 'gnus-group-mode) |
257 | 1173 (setq mode-name "Newsgroup") |
1174 (setq mode-line-buffer-identification "GNUS: List of Newsgroups") | |
1175 (setq mode-line-process nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1176 (use-local-map gnus-group-mode-map) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1177 (buffer-flush-undo (current-buffer)) |
257 | 1178 (setq buffer-read-only t) ;Disable modification |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1179 (run-hooks 'gnus-group-mode-hook)) |
257 | 1180 |
1181 ;;;###autoload | |
1182 (defun gnus (&optional confirm) | |
1183 "Read network news. | |
1184 If optional argument CONFIRM is non-nil, ask NNTP server." | |
1185 (interactive "P") | |
1186 (unwind-protect | |
1187 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1188 (switch-to-buffer (get-buffer-create gnus-group-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1189 (gnus-group-mode) |
257 | 1190 (gnus-start-news-server confirm)) |
1191 (if (not (gnus-server-opened)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1192 (gnus-group-quit) |
257 | 1193 ;; NNTP server is successfully open. |
1194 (setq mode-line-process (format " {%s}" gnus-nntp-server)) | |
1195 (let ((buffer-read-only nil)) | |
1196 (erase-buffer) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1197 (gnus-group-startup-message) |
257 | 1198 (sit-for 0)) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1199 (run-hooks 'gnus-startup-hook) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1200 (gnus-setup-news) |
257 | 1201 (if gnus-novice-user |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1202 (gnus-group-describe-briefly)) ;Show brief help message. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1203 (gnus-group-list-groups nil) |
257 | 1204 ))) |
1205 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1206 (defun gnus-group-startup-message () |
257 | 1207 "Insert startup message in current buffer." |
1208 ;; Insert the message. | |
1209 (insert " | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1210 GNUS Version 3.15 |
257 | 1211 |
1212 NNTP-based News Reader for GNU Emacs | |
1213 | |
1214 | |
1215 If you have any trouble with this software, please let me | |
1216 know. I will fix your problems in the next release. | |
1217 | |
1218 Comments, suggestions, and bug fixes are welcome. | |
1219 | |
1220 Masanobu UMEDA | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1221 umerin@mse.kyutech.ac.jp") |
257 | 1222 ;; And then hack it. |
1223 ;; 57 is the longest line. | |
1224 (indent-rigidly (point-min) (point-max) (/ (max (- (window-width) 57) 0) 2)) | |
1225 (goto-char (point-min)) | |
1226 ;; +4 is fuzzy factor. | |
1227 (insert-char ?\n (/ (max (- (window-height) 18) 0) 2))) | |
1228 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1229 (defun gnus-group-list-groups (show-all) |
257 | 1230 "List newsgroups in the Newsgroup buffer. |
1231 If argument SHOW-ALL is non-nil, unsubscribed groups are also listed." | |
1232 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1233 (let ((case-fold-search nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1234 (last-group ;Current newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1235 (gnus-group-group-name)) |
257 | 1236 (next-group ;Next possible newsgroup. |
1237 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1238 (gnus-group-search-forward nil nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1239 (gnus-group-group-name))) |
257 | 1240 (prev-group ;Previous possible newsgroup. |
1241 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1242 (gnus-group-search-forward t nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1243 (gnus-group-group-name)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1244 (set-buffer gnus-group-buffer) ;May call from out of Group buffer |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1245 (gnus-group-prepare show-all) |
257 | 1246 (if (zerop (buffer-size)) |
1247 (message "No news is good news") | |
1248 ;; Go to last newsgroup if possible. If cannot, try next and | |
1249 ;; previous. If all fail, go to first unread newsgroup. | |
1250 (goto-char (point-min)) | |
1251 (or (and last-group | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1252 (re-search-forward (gnus-group-make-regexp last-group) nil t)) |
257 | 1253 (and next-group |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1254 (re-search-forward (gnus-group-make-regexp next-group) nil t)) |
257 | 1255 (and prev-group |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1256 (re-search-forward (gnus-group-make-regexp prev-group) nil t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1257 (gnus-group-search-forward nil nil t)) |
257 | 1258 ;; Adjust cursor point. |
1259 (beginning-of-line) | |
1260 (search-forward ":" nil t) | |
1261 ))) | |
1262 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1263 (defun gnus-group-prepare (&optional all) |
257 | 1264 "Prepare list of newsgroups in current buffer. |
1265 If optional argument ALL is non-nil, unsubscribed groups are also listed." | |
1266 (let ((buffer-read-only nil) | |
1267 (newsrc gnus-newsrc-assoc) | |
1268 (group-info nil) | |
1269 (group-name nil) | |
1270 (unread-count 0) | |
1271 ;; This specifies the format of Group buffer. | |
1272 (cntl "%s%s%5d: %s\n")) | |
1273 (erase-buffer) | |
1274 ;; List newsgroups. | |
1275 (while newsrc | |
1276 (setq group-info (car newsrc)) | |
1277 (setq group-name (car group-info)) | |
1278 (setq unread-count (nth 1 (gnus-gethash group-name gnus-unread-hashtb))) | |
1279 (if (or all | |
1280 (and (nth 1 group-info) ;Subscribed. | |
1281 (> unread-count 0))) ;There are unread articles. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1282 ;; Yes, I can use gnus-group-prepare-line, but this is faster. |
257 | 1283 (insert |
1284 (format cntl | |
1285 ;; Subscribed or not. | |
1286 (if (nth 1 group-info) " " "U") | |
1287 ;; Has new news? | |
1288 (if (and (> unread-count 0) | |
1289 (>= 0 | |
1290 (- unread-count | |
1291 (length | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1292 (cdr (gnus-gethash group-name |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1293 gnus-marked-hashtb)))))) |
257 | 1294 "*" " ") |
1295 ;; Number of unread articles. | |
1296 unread-count | |
1297 ;; Newsgroup name. | |
1298 group-name)) | |
1299 ) | |
1300 (setq newsrc (cdr newsrc)) | |
1301 ) | |
1302 (setq gnus-have-all-newsgroups all) | |
1303 (goto-char (point-min)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1304 (run-hooks 'gnus-group-prepare-hook) |
257 | 1305 )) |
1306 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1307 (defun gnus-group-prepare-line (info) |
257 | 1308 "Return a string for the Newsgroup buffer from INFO. |
1309 INFO is an element of gnus-newsrc-assoc or gnus-killed-assoc." | |
1310 (let* ((group-name (car info)) | |
1311 (unread-count | |
1312 (or (nth 1 (gnus-gethash group-name gnus-unread-hashtb)) | |
1313 ;; Not in hash table, so compute it now. | |
1314 (gnus-number-of-articles | |
1315 (gnus-difference-of-range | |
1316 (nth 2 (gnus-gethash group-name gnus-active-hashtb)) | |
1317 (nthcdr 2 info))))) | |
1318 ;; This specifies the format of Group buffer. | |
1319 (cntl "%s%s%5d: %s\n")) | |
1320 (format cntl | |
1321 ;; Subscribed or not. | |
1322 (if (nth 1 info) " " "U") | |
1323 ;; Has new news? | |
1324 (if (and (> unread-count 0) | |
1325 (>= 0 | |
1326 (- unread-count | |
1327 (length | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1328 (cdr (gnus-gethash group-name |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1329 gnus-marked-hashtb)))))) |
257 | 1330 "*" " ") |
1331 ;; Number of unread articles. | |
1332 unread-count | |
1333 ;; Newsgroup name. | |
1334 group-name | |
1335 ))) | |
1336 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1337 (defun gnus-group-update-group (group &optional visible-only) |
257 | 1338 "Update newsgroup info of GROUP. |
1339 If optional argument VISIBLE-ONLY is non-nil, non displayed group is ignored." | |
1340 (let ((buffer-read-only nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1341 (case-fold-search nil) ;appleIIgs vs. appleiigs |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1342 (regexp (gnus-group-make-regexp group)) |
257 | 1343 (visible nil)) |
1344 ;; Buffer may be narrowed. | |
1345 (save-restriction | |
1346 (widen) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1347 ;; Search a line to modify. If the buffer is large, the search |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1348 ;; takes long time. In most cases, current point is on the line |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1349 ;; we are looking for. So, first of all, check current line. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1350 ;; And then if current point is in the first half, search from |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1351 ;; the beginning. Otherwise, search from the end. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1352 (if (cond ((progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1353 (beginning-of-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1354 (looking-at regexp))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1355 ((and (> (/ (buffer-size) 2) (point)) ;In the first half. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1356 (progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1357 (goto-char (point-min)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1358 (re-search-forward regexp nil t)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1359 ((progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1360 (goto-char (point-max)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1361 (re-search-backward regexp nil t)))) |
257 | 1362 ;; GROUP is listed in current buffer. So, delete old line. |
1363 (progn | |
1364 (setq visible t) | |
1365 (beginning-of-line) | |
1366 (delete-region (point) (progn (forward-line 1) (point))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1367 ) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1368 ;; No such line in the buffer, so insert it at the top. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1369 (goto-char (point-min))) |
257 | 1370 (if (or visible (not visible-only)) |
1371 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1372 (insert (gnus-group-prepare-line |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1373 (gnus-gethash group gnus-newsrc-hashtb))) |
257 | 1374 (forward-line -1) ;Move point on that line. |
1375 )) | |
1376 ))) | |
1377 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1378 (defun gnus-group-group-name () |
257 | 1379 "Get newsgroup name around point." |
1380 (save-excursion | |
1381 (beginning-of-line) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1382 (if (looking-at "^.+:[ \t]+\\([^ \t\n]+\\)\\([ \t].*\\|$\\)") |
257 | 1383 (buffer-substring (match-beginning 1) (match-end 1)) |
1384 ))) | |
1385 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1386 (defun gnus-group-make-regexp (newsgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1387 "Return regexp that matches for a line of NEWSGROUP." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1388 (concat "^.+: " (regexp-quote newsgroup) "\\([ \t].*\\|$\\)")) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1389 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1390 (defun gnus-group-search-forward (backward norest &optional heretoo) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1391 "Search for the next (or previous) newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1392 If 1st argument BACKWARD is non-nil, search backward instead. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1393 If 2nd argument NOREST is non-nil, don't care about newsgroup property. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1394 If optional argument HERETOO is non-nil, current line is searched for, too." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1395 (let ((case-fold-search nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1396 (func |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1397 (if backward |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1398 (function re-search-backward) (function re-search-forward))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1399 (regexp |
257 | 1400 (format "^%s[ \t]*\\(%s\\):" |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1401 (if norest ".." " [ \t]") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1402 (if norest "[0-9]+" "[1-9][0-9]*"))) |
257 | 1403 (found nil)) |
1404 (if backward | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1405 (if heretoo |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1406 (end-of-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1407 (beginning-of-line)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1408 (if heretoo |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1409 (beginning-of-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1410 (end-of-line))) |
257 | 1411 (setq found (funcall func regexp nil t)) |
1412 ;; Adjust cursor point. | |
1413 (beginning-of-line) | |
1414 (search-forward ":" nil t) | |
1415 ;; Return T if found. | |
1416 found | |
1417 )) | |
1418 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1419 ;; GNUS Group mode command |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1420 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1421 (defun gnus-group-read-group (all &optional no-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1422 "Read news in this newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1423 If argument ALL is non-nil, already read articles become readable. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1424 If optional argument NO-ARTICLE is non-nil, no article body is displayed." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1425 (interactive "P") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1426 (let ((group (gnus-group-group-name))) ;Newsgroup name to read. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1427 (if group |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1428 (gnus-summary-read-group |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1429 group |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1430 (or all |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1431 ;;(not (nth 1 (gnus-gethash group gnus-newsrc-hashtb))) ;Unsubscribed |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1432 (zerop |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1433 (nth 1 (gnus-gethash group gnus-unread-hashtb)))) ;No unread |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1434 no-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1435 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1436 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1437 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1438 (defun gnus-group-select-group (all) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1439 "Select this newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1440 No article is selected automatically. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1441 If argument ALL is non-nil, already read articles become readable." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1442 (interactive "P") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1443 (gnus-group-read-group all t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1444 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1445 (defun gnus-group-jump-to-group (group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1446 "Jump to newsgroup GROUP." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1447 (interactive |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1448 (list (completing-read "Newsgroup: " gnus-newsrc-assoc nil 'require-match))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1449 (let ((case-fold-search nil)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1450 (goto-char (point-min)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1451 (or (re-search-forward (gnus-group-make-regexp group) nil t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1452 (if (gnus-gethash group gnus-newsrc-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1453 ;; Add GROUP entry, then seach again. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1454 (gnus-group-update-group group))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1455 ;; Adjust cursor point. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1456 (beginning-of-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1457 (search-forward ":" nil t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1458 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1459 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1460 (defun gnus-group-next-group (n) |
257 | 1461 "Go to next N'th newsgroup." |
1462 (interactive "p") | |
1463 (while (and (> n 1) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1464 (gnus-group-search-forward nil t)) |
257 | 1465 (setq n (1- n))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1466 (or (gnus-group-search-forward nil t) |
257 | 1467 (message "No more newsgroups"))) |
1468 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1469 (defun gnus-group-next-unread-group (n) |
257 | 1470 "Go to next N'th unread newsgroup." |
1471 (interactive "p") | |
1472 (while (and (> n 1) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1473 (gnus-group-search-forward nil nil)) |
257 | 1474 (setq n (1- n))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1475 (or (gnus-group-search-forward nil nil) |
257 | 1476 (message "No more unread newsgroups"))) |
1477 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1478 (defun gnus-group-prev-group (n) |
257 | 1479 "Go to previous N'th newsgroup." |
1480 (interactive "p") | |
1481 (while (and (> n 1) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1482 (gnus-group-search-forward t t)) |
257 | 1483 (setq n (1- n))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1484 (or (gnus-group-search-forward t t) |
257 | 1485 (message "No more newsgroups"))) |
1486 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1487 (defun gnus-group-prev-unread-group (n) |
257 | 1488 "Go to previous N'th unread newsgroup." |
1489 (interactive "p") | |
1490 (while (and (> n 1) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1491 (gnus-group-search-forward t nil)) |
257 | 1492 (setq n (1- n))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1493 (or (gnus-group-search-forward t nil) |
257 | 1494 (message "No more unread newsgroups"))) |
1495 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1496 (defun gnus-group-catchup (all) |
257 | 1497 "Mark all articles not marked as unread in current newsgroup as read. |
1498 If prefix argument ALL is non-nil, all articles are marked as read. | |
1499 Cross references (Xref: field) of articles are ignored." | |
1500 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1501 (let* ((group (gnus-group-group-name)) |
257 | 1502 (marked (if (not all) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1503 (cdr (gnus-gethash group gnus-marked-hashtb))))) |
257 | 1504 (and group |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1505 (or (not gnus-interactive-catchup) ;Without confirmation? |
257 | 1506 (y-or-n-p |
1507 (if all | |
1508 "Do you really want to mark everything as read? " | |
1509 "Delete all articles not marked as read? "))) | |
1510 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1511 (message "") ;Clear "Yes or No" question. |
257 | 1512 ;; Any marked articles will be preserved. |
1513 (gnus-update-unread-articles group marked marked) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1514 (gnus-group-update-group group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1515 (gnus-group-next-group 1))) |
257 | 1516 )) |
1517 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1518 (defun gnus-group-catchup-all () |
257 | 1519 "Mark all articles in current newsgroup as read. |
1520 Cross references (Xref: field) of articles are ignored." | |
1521 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1522 (gnus-group-catchup t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1523 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1524 (defun gnus-group-unsubscribe-current-group () |
257 | 1525 "Toggle subscribe from/to unsubscribe current group." |
1526 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1527 (gnus-group-unsubscribe-group (gnus-group-group-name)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1528 (gnus-group-next-group 1)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1529 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1530 (defun gnus-group-unsubscribe-group (group) |
257 | 1531 "Toggle subscribe from/to unsubscribe GROUP. |
1532 New newsgroup is added to .newsrc automatically." | |
1533 (interactive | |
1534 (list (completing-read "Newsgroup: " | |
1535 gnus-active-hashtb nil 'require-match))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1536 (let ((newsrc (gnus-gethash group gnus-newsrc-hashtb))) |
257 | 1537 (cond ((not (null newsrc)) |
1538 ;; Toggle subscription flag. | |
1539 (setcar (nthcdr 1 newsrc) (not (nth 1 newsrc))) | |
1540 (gnus-update-newsrc-buffer group) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1541 (gnus-group-update-group group) |
257 | 1542 ;; Adjust cursor point. |
1543 (beginning-of-line) | |
1544 (search-forward ":" nil t)) | |
1545 ((and (stringp group) | |
1546 (gnus-gethash group gnus-active-hashtb)) | |
1547 ;; Add new newsgroup. | |
1548 (gnus-add-newsgroup group) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1549 (gnus-group-update-group group) |
257 | 1550 ;; Adjust cursor point. |
1551 (beginning-of-line) | |
1552 (search-forward ":" nil t)) | |
1553 (t (error "No such newsgroup: %s" group))) | |
1554 )) | |
1555 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1556 (defun gnus-group-list-all-groups () |
257 | 1557 "List all of newsgroups in the Newsgroup buffer." |
1558 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1559 (gnus-group-list-groups t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1560 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1561 (defun gnus-group-get-new-news () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1562 "Get newly arrived articles. In fact, read the active file again." |
257 | 1563 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1564 (gnus-setup-news) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1565 (gnus-group-list-groups gnus-have-all-newsgroups)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1566 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1567 (defun gnus-group-restart () |
257 | 1568 "Force GNUS to read the raw startup file." |
1569 (interactive) | |
1570 (gnus-save-newsrc-file) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1571 (gnus-setup-news t) ;Force to read the raw startup file. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1572 (gnus-group-list-groups gnus-have-all-newsgroups)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1573 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1574 (defun gnus-group-check-bogus-groups () |
257 | 1575 "Check bogus newsgroups." |
1576 (interactive) | |
1577 (gnus-check-bogus-newsgroups t) ;Require confirmation. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1578 (gnus-group-list-groups gnus-have-all-newsgroups)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1579 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1580 (defun gnus-group-restrict-groups (start end) |
257 | 1581 "Restrict visible newsgroups to the current region (START and END). |
1582 Type \\[widen] to remove restriction." | |
1583 (interactive "r") | |
1584 (save-excursion | |
1585 (narrow-to-region (progn | |
1586 (goto-char start) | |
1587 (beginning-of-line) | |
1588 (point)) | |
1589 (progn | |
1590 (goto-char end) | |
1591 (forward-line 1) | |
1592 (point)))) | |
1593 (message (substitute-command-keys "Type \\[widen] to remove restriction"))) | |
1594 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1595 (defun gnus-group-edit-global-kill () |
257 | 1596 "Edit a global KILL file." |
1597 (interactive) | |
1598 (setq gnus-current-kill-article nil) ;No articles selected. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1599 (gnus-kill-file-edit-file nil) ;Nil stands for global KILL file. |
257 | 1600 (message |
1601 (substitute-command-keys | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1602 "Editing a global KILL file (Type \\[gnus-kill-file-exit] to exit)"))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1603 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1604 (defun gnus-group-edit-local-kill () |
257 | 1605 "Edit a local KILL file." |
1606 (interactive) | |
1607 (setq gnus-current-kill-article nil) ;No articles selected. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1608 (gnus-kill-file-edit-file (gnus-group-group-name)) |
257 | 1609 (message |
1610 (substitute-command-keys | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1611 "Editing a local KILL file (Type \\[gnus-kill-file-exit] to exit)"))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1612 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1613 (defun gnus-group-force-update () |
257 | 1614 "Update .newsrc file." |
1615 (interactive) | |
1616 (gnus-save-newsrc-file)) | |
1617 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1618 (defun gnus-group-suspend () |
257 | 1619 "Suspend the current GNUS session. |
1620 In fact, cleanup buffers except for Group Mode buffer. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1621 The hook gnus-suspend-gnus-hook is called before actually suspending." |
257 | 1622 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1623 (run-hooks 'gnus-suspend-gnus-hook) |
257 | 1624 ;; Kill GNUS buffers except for Group Mode buffer. |
1625 (let ((buffers gnus-buffer-list)) | |
1626 (while buffers | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1627 (and (not (eq (car buffers) gnus-group-buffer)) |
257 | 1628 (get-buffer (car buffers)) |
1629 (kill-buffer (car buffers))) | |
1630 (setq buffers (cdr buffers)) | |
1631 )) | |
1632 (bury-buffer)) | |
1633 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1634 (defun gnus-group-exit () |
257 | 1635 "Quit reading news after updating .newsrc. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1636 The hook gnus-exit-gnus-hook is called before actually quitting." |
257 | 1637 (interactive) |
1638 (if (or noninteractive ;For gnus-batch-kill | |
1639 (zerop (buffer-size)) ;No news is good news. | |
1640 (not (gnus-server-opened)) ;NNTP connection closed. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1641 (not gnus-interactive-exit) ;Without confirmation |
257 | 1642 (y-or-n-p "Are you sure you want to quit reading news? ")) |
1643 (progn | |
1644 (message "") ;Erase "Yes or No" question. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1645 (run-hooks 'gnus-exit-gnus-hook) |
257 | 1646 (gnus-save-newsrc-file) |
1647 (gnus-clear-system) | |
1648 (gnus-close-server)) | |
1649 )) | |
1650 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1651 (defun gnus-group-quit () |
257 | 1652 "Quit reading news without updating .newsrc. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1653 The hook gnus-exit-gnus-hook is called before actually quitting." |
257 | 1654 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1655 (if (or noninteractive ;For gnus-batch-kill |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1656 (zerop (buffer-size)) |
257 | 1657 (not (gnus-server-opened)) |
1658 (yes-or-no-p | |
1659 (format "Quit reading news without saving %s? " | |
1660 (file-name-nondirectory gnus-current-startup-file)))) | |
1661 (progn | |
1662 (message "") ;Erase "Yes or No" question. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1663 (run-hooks 'gnus-exit-gnus-hook) |
257 | 1664 (gnus-clear-system) |
1665 (gnus-close-server)) | |
1666 )) | |
1667 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1668 (defun gnus-group-describe-briefly () |
257 | 1669 "Describe Group mode commands briefly." |
1670 (interactive) | |
1671 (message | |
1672 (concat | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1673 (substitute-command-keys "\\[gnus-group-read-group]:Select ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1674 (substitute-command-keys "\\[gnus-group-next-unread-group]:Forward ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1675 (substitute-command-keys "\\[gnus-group-prev-unread-group]:Backward ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1676 (substitute-command-keys "\\[gnus-group-exit]:Exit ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1677 (substitute-command-keys "\\[gnus-info-find-node]:Run Info ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1678 (substitute-command-keys "\\[gnus-group-describe-briefly]:This help") |
257 | 1679 ))) |
1680 | |
1681 | |
1682 ;;; | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1683 ;;; GNUS Summary Mode |
257 | 1684 ;;; |
1685 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1686 (if gnus-summary-mode-map |
257 | 1687 nil |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1688 (setq gnus-summary-mode-map (make-keymap)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1689 (suppress-keymap gnus-summary-mode-map) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1690 (define-key gnus-summary-mode-map " " 'gnus-summary-next-page) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1691 (define-key gnus-summary-mode-map "\177" 'gnus-summary-prev-page) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1692 (define-key gnus-summary-mode-map "\r" 'gnus-summary-scroll-up) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1693 (define-key gnus-summary-mode-map "n" 'gnus-summary-next-unread-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1694 (define-key gnus-summary-mode-map "p" 'gnus-summary-prev-unread-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1695 (define-key gnus-summary-mode-map "N" 'gnus-summary-next-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1696 (define-key gnus-summary-mode-map "P" 'gnus-summary-prev-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1697 (define-key gnus-summary-mode-map "\e\C-n" 'gnus-summary-next-same-subject) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1698 (define-key gnus-summary-mode-map "\e\C-p" 'gnus-summary-prev-same-subject) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1699 ;;(define-key gnus-summary-mode-map "\e\C-n" 'gnus-summary-next-unread-same-subject) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1700 ;;(define-key gnus-summary-mode-map "\e\C-p" 'gnus-summary-prev-unread-same-subject) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1701 (define-key gnus-summary-mode-map "\C-c\C-n" 'gnus-summary-next-digest) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1702 (define-key gnus-summary-mode-map "\C-c\C-p" 'gnus-summary-prev-digest) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1703 (define-key gnus-summary-mode-map "\C-n" 'gnus-summary-next-subject) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1704 (define-key gnus-summary-mode-map "\C-p" 'gnus-summary-prev-subject) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1705 (define-key gnus-summary-mode-map "\en" 'gnus-summary-next-unread-subject) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1706 (define-key gnus-summary-mode-map "\ep" 'gnus-summary-prev-unread-subject) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1707 ;;(define-key gnus-summary-mode-map "\C-cn" 'gnus-summary-next-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1708 ;;(define-key gnus-summary-mode-map "\C-cp" 'gnus-summary-prev-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1709 (define-key gnus-summary-mode-map "." 'gnus-summary-first-unread-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1710 ;;(define-key gnus-summary-mode-map "/" 'isearch-forward) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1711 (define-key gnus-summary-mode-map "s" 'gnus-summary-isearch-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1712 (define-key gnus-summary-mode-map "\es" 'gnus-summary-search-article-forward) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1713 ;;(define-key gnus-summary-mode-map "\eS" 'gnus-summary-search-article-backward) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1714 (define-key gnus-summary-mode-map "\er" 'gnus-summary-search-article-backward) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1715 (define-key gnus-summary-mode-map "<" 'gnus-summary-beginning-of-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1716 (define-key gnus-summary-mode-map ">" 'gnus-summary-end-of-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1717 (define-key gnus-summary-mode-map "j" 'gnus-summary-goto-subject) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1718 ;;(define-key gnus-summary-mode-map "J" 'gnus-summary-goto-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1719 (define-key gnus-summary-mode-map "l" 'gnus-summary-goto-last-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1720 (define-key gnus-summary-mode-map "^" 'gnus-summary-refer-parent-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1721 ;;(define-key gnus-summary-mode-map "\er" 'gnus-summary-refer-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1722 (define-key gnus-summary-mode-map "\e^" 'gnus-summary-refer-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1723 (define-key gnus-summary-mode-map "u" 'gnus-summary-mark-as-unread-forward) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1724 (define-key gnus-summary-mode-map "U" 'gnus-summary-mark-as-unread-backward) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1725 (define-key gnus-summary-mode-map "d" 'gnus-summary-mark-as-read-forward) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1726 (define-key gnus-summary-mode-map "D" 'gnus-summary-mark-as-read-backward) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1727 (define-key gnus-summary-mode-map "\eu" 'gnus-summary-clear-mark-forward) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1728 (define-key gnus-summary-mode-map "\eU" 'gnus-summary-clear-mark-backward) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1729 (define-key gnus-summary-mode-map "k" 'gnus-summary-kill-same-subject-and-select) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1730 (define-key gnus-summary-mode-map "\C-k" 'gnus-summary-kill-same-subject) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1731 (define-key gnus-summary-mode-map "\e\C-t" 'gnus-summary-toggle-threads) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1732 (define-key gnus-summary-mode-map "\e\C-s" 'gnus-summary-show-thread) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1733 (define-key gnus-summary-mode-map "\e\C-h" 'gnus-summary-hide-thread) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1734 (define-key gnus-summary-mode-map "\e\C-f" 'gnus-summary-next-thread) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1735 (define-key gnus-summary-mode-map "\e\C-b" 'gnus-summary-prev-thread) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1736 (define-key gnus-summary-mode-map "\e\C-u" 'gnus-summary-up-thread) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1737 (define-key gnus-summary-mode-map "\e\C-d" 'gnus-summary-down-thread) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1738 (define-key gnus-summary-mode-map "\e\C-k" 'gnus-summary-kill-thread) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1739 (define-key gnus-summary-mode-map "&" 'gnus-summary-execute-command) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1740 ;;(define-key gnus-summary-mode-map "c" 'gnus-summary-catchup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1741 ;;(define-key gnus-summary-mode-map "c" 'gnus-summary-catchup-all) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1742 (define-key gnus-summary-mode-map "c" 'gnus-summary-catchup-and-exit) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1743 ;;(define-key gnus-summary-mode-map "c" 'gnus-summary-catchup-all-and-exit) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1744 (define-key gnus-summary-mode-map "\C-t" 'gnus-summary-toggle-truncation) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1745 (define-key gnus-summary-mode-map "x" 'gnus-summary-delete-marked-as-read) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1746 (define-key gnus-summary-mode-map "X" 'gnus-summary-delete-marked-with) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1747 (define-key gnus-summary-mode-map "\C-c\C-sn" 'gnus-summary-sort-by-number) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1748 (define-key gnus-summary-mode-map "\C-c\C-sa" 'gnus-summary-sort-by-author) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1749 (define-key gnus-summary-mode-map "\C-c\C-ss" 'gnus-summary-sort-by-subject) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1750 (define-key gnus-summary-mode-map "\C-c\C-sd" 'gnus-summary-sort-by-date) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1751 (define-key gnus-summary-mode-map "\C-c\C-s\C-n" 'gnus-summary-sort-by-number) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1752 (define-key gnus-summary-mode-map "\C-c\C-s\C-a" 'gnus-summary-sort-by-author) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1753 (define-key gnus-summary-mode-map "\C-c\C-s\C-s" 'gnus-summary-sort-by-subject) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1754 (define-key gnus-summary-mode-map "\C-c\C-s\C-d" 'gnus-summary-sort-by-date) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1755 (define-key gnus-summary-mode-map "=" 'gnus-summary-expand-window) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1756 ;;(define-key gnus-summary-mode-map "G" 'gnus-summary-reselect-current-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1757 (define-key gnus-summary-mode-map "\C-x\C-s" 'gnus-summary-reselect-current-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1758 (define-key gnus-summary-mode-map "w" 'gnus-summary-stop-page-breaking) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1759 (define-key gnus-summary-mode-map "\C-c\C-r" 'gnus-summary-caesar-message) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1760 (define-key gnus-summary-mode-map "g" 'gnus-summary-show-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1761 (define-key gnus-summary-mode-map "t" 'gnus-summary-toggle-header) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1762 ;;(define-key gnus-summary-mode-map "v" 'gnus-summary-show-all-headers) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1763 (define-key gnus-summary-mode-map "\et" 'gnus-summary-toggle-mime) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1764 (define-key gnus-summary-mode-map "\C-d" 'gnus-summary-rmail-digest) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1765 (define-key gnus-summary-mode-map "a" 'gnus-summary-post-news) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1766 (define-key gnus-summary-mode-map "f" 'gnus-summary-followup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1767 (define-key gnus-summary-mode-map "F" 'gnus-summary-followup-with-original) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1768 (define-key gnus-summary-mode-map "C" 'gnus-summary-cancel-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1769 (define-key gnus-summary-mode-map "r" 'gnus-summary-reply) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1770 (define-key gnus-summary-mode-map "R" 'gnus-summary-reply-with-original) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1771 (define-key gnus-summary-mode-map "\C-c\C-f" 'gnus-summary-mail-forward) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1772 (define-key gnus-summary-mode-map "m" 'gnus-summary-mail-other-window) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1773 (define-key gnus-summary-mode-map "o" 'gnus-summary-save-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1774 (define-key gnus-summary-mode-map "\C-o" 'gnus-summary-save-in-mail) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1775 (define-key gnus-summary-mode-map "|" 'gnus-summary-pipe-output) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1776 (define-key gnus-summary-mode-map "\ek" 'gnus-summary-edit-local-kill) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1777 (define-key gnus-summary-mode-map "\eK" 'gnus-summary-edit-global-kill) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1778 (define-key gnus-summary-mode-map "V" 'gnus-version) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1779 (define-key gnus-summary-mode-map "q" 'gnus-summary-exit) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1780 (define-key gnus-summary-mode-map "Q" 'gnus-summary-quit) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1781 (define-key gnus-summary-mode-map "?" 'gnus-summary-describe-briefly) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1782 (define-key gnus-summary-mode-map "\C-c\C-i" 'gnus-info-find-node)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1783 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1784 (defun gnus-summary-mode () |
257 | 1785 "Major mode for reading articles in this newsgroup. |
1786 All normal editing commands are turned off. | |
1787 Instead, these commands are available: | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1788 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1789 SPC Scroll to the next page of the current article. The next unread |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1790 article is selected automatically at the end of the message. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1791 DEL Scroll to the previous page of the current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1792 RET Scroll up (or down) one line the current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1793 n Move to the next unread article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1794 p Move to the previous unread article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1795 N Move to the next article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1796 P Move to the previous article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1797 ESC C-n Move to the next article which has the same subject as the |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1798 current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1799 ESC C-p Move to the previous article which has the same subject as the |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1800 current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1801 \\[gnus-summary-next-unread-same-subject] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1802 Move to the next unread article which has the same subject as the |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1803 current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1804 \\[gnus-summary-prev-unread-same-subject] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1805 Move to the previous unread article which has the same subject as |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1806 the current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1807 C-c C-n Scroll to the next digested message of the current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1808 C-c C-p Scroll to the previous digested message of the current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1809 C-n Move to the next subject. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1810 C-p Move to the previous subject. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1811 ESC n Move to the next unread subject. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1812 ESC p Move to the previous unread subject. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1813 \\[gnus-summary-next-group] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1814 Exit the current newsgroup and select the next unread newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1815 \\[gnus-summary-prev-group] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1816 Exit the current newsgroup and select the previous unread newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1817 . Jump to the first unread article in the current newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1818 s Do an incremental search forward on the current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1819 ESC s Search for an article containing a regexp forward. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1820 ESC r Search for an article containing a regexp backward. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1821 < Move point to the beginning of the current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1822 > Move point to the end of the current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1823 j Jump to the article specified by the numeric article ID. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1824 l Jump to the article you read last. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1825 ^ Refer to parent of the current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1826 ESC ^ Refer to the article specified by the Message-ID. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1827 u Mark the current article as unread, and go forward. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1828 U Mark the current article as unread, and go backward. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1829 d Mark the current article as read, and go forward. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1830 D Mark the current article as read, and go backward. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1831 ESC u Clear the current article's mark, and go forward. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1832 ESC U Clear the current article's mark, and go backward. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1833 k Mark articles which has the same subject as the current article as |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1834 read, and then select the next unread article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1835 C-k Mark articles which has the same subject as the current article as |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1836 read. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1837 ESC k Edit a local KILL file applied to the current newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1838 ESC K Edit a global KILL file applied to all newsgroups. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1839 ESC C-t Toggle showing conversation threads. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1840 ESC C-s Show thread subtrees. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1841 ESC C-h Hide thread subtrees. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1842 \\[gnus-summary-show-all-threads] Show all thread subtrees. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1843 \\[gnus-summary-hide-all-threads] Hide all thread subtrees. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1844 ESC C-f Go to the same level next thread. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1845 ESC C-b Go to the same level previous thread. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1846 ESC C-d Go downward current thread. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1847 ESC C-u Go upward current thread. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1848 ESC C-k Mark articles under current thread as read. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1849 & Execute a command for each article conditionally. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1850 \\[gnus-summary-catchup] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1851 Mark all articles as read in the current newsgroup, preserving |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1852 articles marked as unread. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1853 \\[gnus-summary-catchup-all] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1854 Mark all articles as read in the current newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1855 \\[gnus-summary-catchup-and-exit] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1856 Catch up all articles not marked as unread, and then exit the |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1857 current newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1858 \\[gnus-summary-catchup-all-and-exit] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1859 Catch up all articles, and then exit the current newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1860 C-t Toggle truncations of subject lines. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1861 x Delete subject lines marked as read. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1862 X Delete subject lines with the specific marks. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1863 C-c C-s C-n Sort subjects by article number. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1864 C-c C-s C-a Sort subjects by article author. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1865 C-c C-s C-s Sort subjects alphabetically. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1866 C-c C-s C-d Sort subjects by date. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1867 = Expand Summary window to show headers full window. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1868 C-x C-s Reselect the current newsgroup. Prefix argument means to select all. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1869 w Stop page breaking by linefeed. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1870 C-c C-r Caesar rotates letters by 13/47 places. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1871 g Force to show the current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1872 t Show original article header if pruned header currently shown, or |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1873 vice versa. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1874 ESC-t Toggle MIME processing. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1875 C-d Run RMAIL on the current digest article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1876 a Post a new article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1877 f Post a reply article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1878 F Post a reply article with original article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1879 C Cancel the current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1880 r Mail a message to the author. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1881 R Mail a message to the author with original author. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1882 C-c C-f Forward the current message to another user. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1883 m Mail a message in other window. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1884 o Save the current article in your favorite format. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1885 C-o Append the current article to a file in Unix mail format. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1886 | Pipe the contents of the current article to a subprocess. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1887 q Quit reading news in the current newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1888 Q Quit reading news without recording unread articles information. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1889 V Show the version number of this GNUS. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1890 ? Describe Summary mode commands briefly. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1891 C-h m Describe Summary mode. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1892 C-c C-i Read Info about Summary mode. |
257 | 1893 |
1894 User customizable variables: | |
1895 gnus-large-newsgroup | |
1896 The number of articles which indicates a large newsgroup. If the | |
1897 number of articles in a newsgroup is greater than the value, the | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1898 number of articles to be selected is asked for. If the given value |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1899 N is positive, the last N articles is selected. If N is negative, |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1900 the first N articles are selected. An empty string means to select |
257 | 1901 all articles. |
1902 | |
1903 gnus-use-long-file-name | |
1904 Non-nil means that a newsgroup name is used as a default file name | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1905 to save articles to. If it's nil, the directory form of a |
257 | 1906 newsgroup is used instead. |
1907 | |
1908 gnus-default-article-saver | |
1909 Specifies your favorite article saver which is interactively | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1910 funcallable. Following functions are available: |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1911 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1912 gnus-summary-save-in-rmail (in Rmail format) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1913 gnus-summary-save-in-mail (in Unix mail format) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1914 gnus-summary-save-in-folder (in MH folder) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1915 gnus-summary-save-in-file (in article format). |
257 | 1916 |
1917 gnus-rmail-save-name | |
1918 gnus-mail-save-name | |
1919 gnus-folder-save-name | |
1920 gnus-file-save-name | |
1921 Specifies a function generating a file name to save articles in | |
1922 specified format. The function is called with NEWSGROUP, HEADERS, | |
1923 and optional LAST-FILE. Access macros to the headers are defined | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1924 as nntp-header-FIELD, and functions are defined as |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1925 gnus-header-FIELD. |
257 | 1926 |
1927 gnus-article-save-directory | |
1928 Specifies a directory name to save articles to using the commands | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1929 gnus-summary-save-in-rmail, gnus-summary-save-in-mail and |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1930 gnus-summary-save-in-file. The variable is initialized from the |
257 | 1931 SAVEDIR environment variable. |
1932 | |
1933 gnus-show-all-headers | |
1934 Non-nil means that all headers of an article are shown. | |
1935 | |
1936 gnus-save-all-headers | |
1937 Non-nil means that all headers of an article are saved in a file. | |
1938 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1939 gnus-show-mime |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1940 Non-nil means that show a MIME message. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1941 |
257 | 1942 gnus-show-threads |
1943 Non-nil means that conversation threads are shown in tree structure. | |
1944 | |
1945 gnus-thread-hide-subject | |
1946 Non-nil means that subjects for thread subtrees are hidden. | |
1947 | |
1948 gnus-thread-hide-subtree | |
1949 Non-nil means that thread subtrees are hidden initially. | |
1950 | |
1951 gnus-thread-hide-killed | |
1952 Non-nil means that killed thread subtrees are hidden automatically. | |
1953 | |
1954 gnus-thread-ignore-subject | |
1955 Non-nil means that subject differences are ignored in constructing | |
1956 thread trees. | |
1957 | |
1958 gnus-thread-indent-level | |
1959 Indentation of thread subtrees. | |
1960 | |
1961 gnus-optional-headers | |
1962 Specifies a function which generates an optional string displayed | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1963 in the Summary buffer. The function is called with an article |
257 | 1964 HEADERS. The result must be a string excluding `[' and `]'. The |
1965 default function returns a string like NNN:AUTHOR, where NNN is | |
1966 the number of lines in an article and AUTHOR is the name of the | |
1967 author. | |
1968 | |
1969 gnus-auto-extend-newsgroup | |
1970 Non-nil means visible articles are extended to forward and | |
1971 backward automatically if possible. | |
1972 | |
1973 gnus-auto-select-first | |
1974 Non-nil means the first unread article is selected automagically | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1975 when a newsgroup is selected normally (by gnus-group-read-group). |
257 | 1976 If you'd like to prevent automatic selection of the first unread |
1977 article in some newsgroups, set the variable to nil in | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1978 gnus-select-group-hook or gnus-apply-kill-hook. |
257 | 1979 |
1980 gnus-auto-select-next | |
1981 Non-nil means the next newsgroup is selected automagically at the | |
1982 end of the newsgroup. If the value is t and the next newsgroup is | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1983 empty (no unread articles), GNUS will exit Summary mode and go |
257 | 1984 back to Group mode. If the value is neither nil nor t, GNUS won't |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1985 exit Summary mode but select the following unread newsgroup. |
257 | 1986 Especially, if the value is the symbol `quietly', the next unread |
1987 newsgroup will be selected without any confirmations. | |
1988 | |
1989 gnus-auto-select-same | |
1990 Non-nil means an article with the same subject as the current | |
1991 article is selected automagically like `rn -S'. | |
1992 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1993 gnus-auto-center-summary |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1994 Non-nil means the point of Summary Mode window is always kept |
257 | 1995 centered. |
1996 | |
1997 gnus-break-pages | |
1998 Non-nil means an article is broken into pages at page delimiters. | |
1999 This may not work with some versions of GNU Emacs earlier than | |
2000 version 18.50. | |
2001 | |
2002 gnus-page-delimiter | |
2003 Specifies a regexp describing line-beginnings that separate pages | |
2004 of news article. | |
2005 | |
2006 [gnus-more-message is obsolete. overlay-arrow-string interfares | |
2007 with other subsystems, such as dbx mode.] | |
2008 | |
2009 gnus-digest-show-summary | |
2010 Non-nil means that a summary of digest messages is shown when | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2011 reading a digest article using `gnus-summary-rmail-digest' |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2012 command. |
257 | 2013 |
2014 gnus-digest-separator | |
2015 Specifies a regexp separating messages in a digest article. | |
2016 | |
2017 gnus-mail-reply-method | |
2018 gnus-mail-other-window-method | |
2019 Specifies a function to begin composing mail message using | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2020 commands gnus-summary-reply and gnus-summary-mail-other-window. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2021 Functions gnus-mail-reply-using-mail and gnus-mail-reply-using-mhe |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2022 are available for the value of gnus-mail-reply-method. And |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2023 functions gnus-mail-other-window-using-mail and |
257 | 2024 gnus-mail-other-window-using-mhe are available for the value of |
2025 gnus-mail-other-window-method. | |
2026 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2027 gnus-mail-send-method |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2028 Specifies a function to mail a message too which is being posted |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2029 as an article. The message must have To: or Cc: field. The value |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2030 of the variable send-mail-function is the default function which |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2031 uses sendmail mail program. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2032 |
257 | 2033 Various hooks for customization: |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2034 gnus-summary-mode-hook |
257 | 2035 Entry to this mode calls the value with no arguments, if that |
2036 value is non-nil. | |
2037 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2038 gnus-select-group-hook |
257 | 2039 Called with no arguments when newsgroup is selected, if that value |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2040 is non-nil. It is possible to sort subjects in this hook. See the |
257 | 2041 documentation of this variable for more information. |
2042 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2043 gnus-summary-prepare-hook |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2044 Called with no arguments after a summary list is created in the |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2045 Summary buffer, if that value is non-nil. If you'd like to modify |
257 | 2046 the buffer, you can use this hook. |
2047 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2048 gnus-select-article-hook |
257 | 2049 Called with no arguments when an article is selected, if that |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2050 value is non-nil. See the documentation of this variable for more |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2051 information. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2052 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2053 gnus-select-digest-hook |
257 | 2054 Called with no arguments when reading digest messages using Rmail, |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2055 if that value is non-nil. This hook can be used to modify an |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2056 article so that Rmail can work with it. See the documentation of |
257 | 2057 the variable for more information. |
2058 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2059 gnus-rmail-digest-hook |
257 | 2060 Called with no arguments when reading digest messages using Rmail, |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2061 if that value is non-nil. This hook is intended to customize Rmail |
257 | 2062 mode. |
2063 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2064 gnus-apply-kill-hook |
257 | 2065 Called with no arguments when a newsgroup is selected and the |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2066 Summary buffer is prepared. This hook is intended to apply a KILL |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2067 file to the selected newsgroup. The format of KILL file is |
257 | 2068 completely different from that of version 3.8. You have to rewrite |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2069 them in the new format. See the documentation of Kill file mode |
257 | 2070 for more information. |
2071 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2072 gnus-mark-article-hook |
257 | 2073 Called with no arguments when an article is selected at the first |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2074 time. The hook is intended to mark an article as read (or unread) |
257 | 2075 automatically when it is selected. See the documentation of the |
2076 variable for more information. | |
2077 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2078 gnus-exit-group-hook |
257 | 2079 Called with no arguments when exiting the current newsgroup, if |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2080 that value is non-nil. If your machine is so slow that exiting |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2081 from Summary mode takes very long time, inhibit marking articles |
257 | 2082 as read using cross-references by setting the variable |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2083 gnus-use-cross-reference to nil in this hook." |
257 | 2084 (interactive) |
2085 (kill-all-local-variables) | |
2086 ;; Gee. Why don't you upgrade? | |
2087 (cond ((boundp 'mode-line-modified) | |
2088 (setq mode-line-modified "--- ")) | |
2089 ((listp (default-value 'mode-line-format)) | |
2090 (setq mode-line-format | |
2091 (cons "--- " (cdr (default-value 'mode-line-format)))))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2092 ;; To disable display-time facility. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2093 ;;(make-local-variable 'global-mode-string) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2094 ;;(setq global-mode-string nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2095 (setq major-mode 'gnus-summary-mode) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2096 (setq mode-name "Summary") |
257 | 2097 ;;(setq mode-line-process '(" " gnus-newsgroup-name)) |
2098 (make-local-variable 'minor-mode-alist) | |
2099 (or (assq 'gnus-show-threads minor-mode-alist) | |
2100 (setq minor-mode-alist | |
2101 (cons (list 'gnus-show-threads " Thread") minor-mode-alist))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2102 (gnus-summary-set-mode-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2103 (use-local-map gnus-summary-mode-map) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2104 (buffer-flush-undo (current-buffer)) |
257 | 2105 (setq buffer-read-only t) ;Disable modification |
2106 (setq truncate-lines t) ;Stop line folding | |
2107 (setq selective-display t) | |
2108 (setq selective-display-ellipses t) ;Display `...' | |
2109 ;;(setq case-fold-search t) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2110 (run-hooks 'gnus-summary-mode-hook)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2111 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2112 (defun gnus-summary-setup-buffer () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2113 "Initialize Summary buffer." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2114 (if (get-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2115 (set-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2116 (set-buffer (get-buffer-create gnus-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2117 (gnus-summary-mode) |
257 | 2118 )) |
2119 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2120 (defun gnus-summary-read-group (group &optional show-all no-article) |
257 | 2121 "Start reading news in newsgroup GROUP. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2122 If optional 1st argument SHOW-ALL is non-nil, already read articles are |
257 | 2123 also listed. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2124 If optional 2nd argument NO-ARTICLE is non-nil, no article is selected |
257 | 2125 initially." |
2126 (message "Retrieving newsgroup: %s..." group) | |
2127 (if (gnus-select-newsgroup group show-all) | |
2128 (progn | |
2129 ;; Don't switch-to-buffer to prevent displaying old contents | |
2130 ;; of the buffer until new subjects list is created. | |
2131 ;; Suggested by Juha Heinanen <jh@tut.fi> | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2132 (gnus-summary-setup-buffer) |
257 | 2133 ;; You can change the order of subjects in this hook. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2134 (run-hooks 'gnus-select-group-hook) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2135 (gnus-summary-prepare) |
257 | 2136 ;; Function `gnus-apply-kill-file' must be called in this hook. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2137 (run-hooks 'gnus-apply-kill-hook) |
257 | 2138 (if (zerop (buffer-size)) |
2139 ;; This newsgroup is empty. | |
2140 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2141 (gnus-summary-catchup-and-exit nil t) ;Without confirmations. |
257 | 2142 (message "No unread news")) |
2143 ;; Hide conversation thread subtrees. We cannot do this in | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2144 ;; gnus-summary-prepare-hook since kill processing may not |
257 | 2145 ;; work with hidden articles. |
2146 (and gnus-show-threads | |
2147 gnus-thread-hide-subtree | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2148 (gnus-summary-hide-all-threads)) |
257 | 2149 ;; Show first unread article if requested. |
2150 (goto-char (point-min)) | |
2151 (if (and (not no-article) | |
2152 gnus-auto-select-first | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2153 (gnus-summary-first-unread-article)) |
257 | 2154 ;; Window is configured automatically. |
2155 ;; Current buffer may be changed as a result of hook | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2156 ;; evaluation, especially by gnus-summary-rmail-digest |
257 | 2157 ;; command, so we should adjust cursor point carefully. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2158 (if (eq (current-buffer) (get-buffer gnus-summary-buffer)) |
257 | 2159 (progn |
2160 ;; Adjust cursor point. | |
2161 (beginning-of-line) | |
2162 (search-forward ":" nil t))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2163 (gnus-configure-windows 'summary) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2164 (pop-to-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2165 (gnus-summary-set-mode-line) |
257 | 2166 ;; I sometime get confused with the old Article buffer. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2167 (if (get-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2168 (if (get-buffer-window gnus-article-buffer) |
257 | 2169 (save-excursion |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2170 (set-buffer gnus-article-buffer) |
257 | 2171 (let ((buffer-read-only nil)) |
2172 (erase-buffer))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2173 (kill-buffer gnus-article-buffer))) |
257 | 2174 ;; Adjust cursor point. |
2175 (beginning-of-line) | |
2176 (search-forward ":" nil t)) | |
2177 )) | |
2178 ;; Cannot select newsgroup GROUP. | |
2179 (if (gnus-gethash group gnus-active-hashtb) | |
2180 (progn | |
2181 ;; If NNTP is used, nntp_access file may not be installed | |
2182 ;; properly. Otherwise, may be active file problem. | |
2183 (ding) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2184 (message |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2185 (gnus-nntp-message |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2186 (format "Cannot select %s. May be security or active file problem." group))) |
257 | 2187 (sit-for 0)) |
2188 ;; Check bogus newsgroups. | |
2189 ;; We must be in Group Mode buffer. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2190 (gnus-group-check-bogus-groups)) |
257 | 2191 )) |
2192 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2193 (defun gnus-summary-prepare () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2194 "Prepare summary list of current newsgroup in Summary buffer." |
257 | 2195 (let ((buffer-read-only nil)) |
2196 ;; Note: The next codes are not actually used because the user who | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2197 ;; want it can define them in gnus-select-group-hook. |
257 | 2198 ;; Print verbose messages if too many articles are selected. |
2199 ;; (and (numberp gnus-large-newsgroup) | |
2200 ;; (> (length gnus-newsgroup-headers) gnus-large-newsgroup) | |
2201 ;; (message "Preparing headers...")) | |
2202 (erase-buffer) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2203 (gnus-summary-prepare-threads |
257 | 2204 (if gnus-show-threads |
2205 (gnus-make-threads gnus-newsgroup-headers) | |
2206 gnus-newsgroup-headers) 0) | |
2207 ;; Erase header retrieval message. | |
2208 (message "") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2209 ;; Call hooks for modifying Summary buffer. |
257 | 2210 ;; Suggested by sven@tde.LTH.Se (Sven Mattisson). |
2211 (goto-char (point-min)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2212 (run-hooks 'gnus-summary-prepare-hook) |
257 | 2213 )) |
2214 | |
2215 ;; Basic ideas by Paul Dworkin <paul@media-lab.media.mit.edu> | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2216 ;; Subject bug fix by jbw@bigbird.bu.edu (Joe Wells) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2217 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2218 (defun gnus-summary-prepare-threads (threads level &optional parent-subject) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2219 "Prepare Summary buffer from THREADS and indentation LEVEL. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2220 THREADS is a list of `(PARENT [(CHILD1 [(GRANDCHILD ...]...) ...]).' |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2221 Optional PARENT-SUBJECT specifies the subject of the parent." |
257 | 2222 (let ((thread nil) |
2223 (header nil) | |
2224 (number nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2225 (subject nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2226 (child-subject nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2227 (parent-subject (or parent-subject "")) |
257 | 2228 ;; `M Indent NUM: [OPT] SUBJECT' |
2229 (cntl (format "%%s %%s%%%dd: [%%s] %%s\n" | |
2230 (length (prin1-to-string gnus-newsgroup-end))))) | |
2231 (while threads | |
2232 (setq thread (car threads)) | |
2233 (setq threads (cdr threads)) | |
2234 ;; If thread is a cons, hierarchical threads is given. | |
2235 ;; Otherwise, thread itself is header. | |
2236 (if (consp thread) | |
2237 (setq header (car thread)) | |
2238 (setq header thread)) | |
2239 ;; Print valid header only. | |
2240 (if (vectorp header) ;Depends on nntp.el. | |
2241 (progn | |
2242 (setq number (nntp-header-number header)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2243 (setq subject (nntp-header-subject header)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2244 (setq child-subject (gnus-simplify-subject subject 're-only)) |
257 | 2245 (insert |
2246 (format cntl | |
2247 ;; Read or not. | |
2248 (cond ((memq number gnus-newsgroup-marked) "-") | |
2249 ((memq number gnus-newsgroup-unreads) " ") | |
2250 (t "D")) | |
2251 ;; Thread level. | |
2252 (make-string (* level gnus-thread-indent-level) ? ) | |
2253 ;; Article number. | |
2254 number | |
2255 ;; Optional headers. | |
2256 (or (and gnus-optional-headers | |
2257 (funcall gnus-optional-headers header)) "") | |
2258 ;; Its subject string. | |
2259 (concat (if (or (zerop level) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2260 (not gnus-thread-hide-subject) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2261 ;; Subject is different from the parent. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2262 (not (string-equal |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2263 parent-subject child-subject))) |
257 | 2264 nil |
2265 (make-string (window-width) ? )) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2266 subject) |
257 | 2267 )) |
2268 )) | |
2269 ;; Print subthreads. | |
2270 (and (consp thread) | |
2271 (cdr thread) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2272 (gnus-summary-prepare-threads |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2273 (cdr thread) (1+ level) child-subject)) |
257 | 2274 ))) |
2275 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2276 ;;(defun gnus-summary-set-mode-line () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2277 ;; "Set Summary mode line string." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2278 ;; ;; The value must be a string to escape %-constructs. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2279 ;; (let ((subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2280 ;; (if gnus-current-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2281 ;; (nntp-header-subject gnus-current-headers) gnus-newsgroup-name))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2282 ;; (setq mode-line-buffer-identification |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2283 ;; (concat "GNUS: " |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2284 ;; subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2285 ;; ;; Enough spaces to pad subject to 17 positions. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2286 ;; (make-string (max 0 (- 17 (length subject))) ? )))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2287 ;; (set-buffer-modified-p t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2288 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2289 ;; New implementation in gnus 3.14.3 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2290 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2291 (defun gnus-summary-set-mode-line () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2292 "Set Summary mode line string. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2293 If you don't like it, define your own gnus-summary-set-mode-line." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2294 (let ((unmarked |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2295 (- (length gnus-newsgroup-unreads) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2296 (length (gnus-intersection |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2297 gnus-newsgroup-unreads gnus-newsgroup-marked)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2298 (unselected |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2299 (- (length gnus-newsgroup-unselected) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2300 (length (gnus-intersection |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2301 gnus-newsgroup-unselected gnus-newsgroup-marked))))) |
257 | 2302 (setq mode-line-buffer-identification |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2303 (list 17 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2304 (format "GNUS: %s%s %s" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2305 gnus-newsgroup-name |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2306 (if gnus-current-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2307 (format "/%d" gnus-current-article) "") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2308 ;; Basic ideas by tale@pawl.rpi.edu. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2309 (cond ((and (zerop unmarked) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2310 (zerop unselected)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2311 "") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2312 ((zerop unselected) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2313 (format "{%d more}" unmarked)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2314 (t |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2315 (format "{%d(+%d) more}" unmarked unselected))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2316 )))) |
257 | 2317 (set-buffer-modified-p t)) |
2318 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2319 ;; GNUS Summary mode command. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2320 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2321 (defun gnus-summary-search-group (&optional backward) |
257 | 2322 "Search for next unread newsgroup. |
2323 If optional argument BACKWARD is non-nil, search backward instead." | |
2324 (save-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2325 (set-buffer gnus-group-buffer) |
257 | 2326 (save-excursion |
2327 ;; We don't want to alter current point of Group mode buffer. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2328 (if (gnus-group-search-forward backward nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2329 (gnus-group-group-name)) |
257 | 2330 ))) |
2331 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2332 (defun gnus-summary-search-subject (backward unread subject) |
257 | 2333 "Search for article forward. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2334 If 1st argument BACKWARD is non-nil, search backward. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2335 If 2nd argument UNREAD is non-nil, only unread article is selected. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2336 If 3rd argument SUBJECT is non-nil, the article which has |
257 | 2337 the same subject will be searched for." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2338 (let ((func |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2339 (if backward |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2340 (function re-search-backward) (function re-search-forward))) |
257 | 2341 (article nil) |
2342 ;; We have to take care of hidden lines. | |
2343 (regexp | |
2344 (format "^%s[ \t]+\\([0-9]+\\):.\\[[^]\r\n]*\\][ \t]+%s" | |
2345 ;;(if unread " " ".") | |
2346 (cond ((eq unread t) " ") (unread "[ ---]") (t ".")) | |
2347 (if subject | |
2348 (concat "\\([Rr][Ee]:[ \t]+\\)*" | |
2349 (regexp-quote (gnus-simplify-subject subject)) | |
2350 ;; Ignore words in parentheses. | |
2351 "\\([ \t]*([^\r\n]*)\\)*[ \t]*\\(\r\\|$\\)") | |
2352 "") | |
2353 ))) | |
2354 (if backward | |
2355 (beginning-of-line) | |
2356 (end-of-line)) | |
2357 (if (funcall func regexp nil t) | |
2358 (setq article | |
2359 (string-to-int | |
2360 (buffer-substring (match-beginning 1) (match-end 1))))) | |
2361 ;; Adjust cursor point. | |
2362 (beginning-of-line) | |
2363 (search-forward ":" nil t) | |
2364 ;; This is the result. | |
2365 article | |
2366 )) | |
2367 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2368 (defun gnus-summary-search-forward (&optional unread subject) |
257 | 2369 "Search for article forward. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2370 If 1st optional argument UNREAD is non-nil, only unread article is selected. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2371 If 2nd optional argument SUBJECT is non-nil, the article which has |
257 | 2372 the same subject will be searched for." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2373 (gnus-summary-search-subject nil unread subject)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2374 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2375 (defun gnus-summary-search-backward (&optional unread subject) |
257 | 2376 "Search for article backward. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2377 If 1st optional argument UNREAD is non-nil, only unread article is selected. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2378 If 2nd optional argument SUBJECT is non-nil, the article which has |
257 | 2379 the same subject will be searched for." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2380 (gnus-summary-search-subject t unread subject)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2381 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2382 (defun gnus-summary-article-number () |
257 | 2383 "Article number around point. If nothing, return current number." |
2384 (save-excursion | |
2385 (beginning-of-line) | |
2386 (if (looking-at ".[ \t]+\\([0-9]+\\):") | |
2387 (string-to-int | |
2388 (buffer-substring (match-beginning 1) (match-end 1))) | |
2389 ;; If search fail, return current article number. | |
2390 gnus-current-article | |
2391 ))) | |
2392 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2393 (defun gnus-summary-subject-string () |
257 | 2394 "Return current subject string or nil if nothing." |
2395 (save-excursion | |
2396 ;; It is possible to implement this function using | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2397 ;; `gnus-summary-article-number' and `gnus-newsgroup-headers'. |
257 | 2398 (beginning-of-line) |
2399 ;; We have to take care of hidden lines. | |
2400 (if (looking-at ".[ \t]+[0-9]+:.\\[[^]\r\n]*\\][ \t]+\\([^\r\n]*\\)[\r\n]") | |
2401 (buffer-substring (match-beginning 1) (match-end 1))) | |
2402 )) | |
2403 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2404 (defun gnus-summary-goto-subject (article) |
257 | 2405 "Move point to ARTICLE's subject." |
2406 (interactive | |
2407 (list | |
2408 (string-to-int | |
2409 (completing-read "Article number: " | |
2410 (mapcar | |
2411 (function | |
2412 (lambda (headers) | |
2413 (list | |
2414 (int-to-string (nntp-header-number headers))))) | |
2415 gnus-newsgroup-headers) | |
2416 nil 'require-match)))) | |
2417 (let ((current (point))) | |
2418 (goto-char (point-min)) | |
2419 (or (and article (re-search-forward (format "^.[ \t]+%d:" article) nil t)) | |
2420 (progn (goto-char current) nil)) | |
2421 )) | |
2422 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2423 (defun gnus-summary-recenter () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2424 "Center point in Summary window." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2425 ;; Scroll window so as to cursor comes center of Summary window |
257 | 2426 ;; only when article is displayed. |
2427 ;; Suggested by earle@mahendo.JPL.NASA.GOV (Greg Earle). | |
2428 ;; Recenter only when requested. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2429 ;; Subbested by popovich@park.cs.columbia.edu |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2430 (and gnus-auto-center-summary |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2431 (get-buffer-window gnus-article-buffer) |
257 | 2432 (< (/ (- (window-height) 1) 2) |
2433 (count-lines (point) (point-max))) | |
2434 (recenter (/ (- (window-height) 2) 2)))) | |
2435 | |
2436 ;; Walking around Group mode buffer. | |
2437 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2438 (defun gnus-summary-jump-to-group (newsgroup) |
257 | 2439 "Move point to NEWSGROUP in Group mode buffer." |
2440 ;; Keep update point of Group mode buffer if visible. | |
2441 (if (eq (current-buffer) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2442 (get-buffer gnus-group-buffer)) |
257 | 2443 (save-window-excursion |
2444 ;; Take care of tree window mode. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2445 (if (get-buffer-window gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2446 (pop-to-buffer gnus-group-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2447 (gnus-group-jump-to-group newsgroup)) |
257 | 2448 (save-excursion |
2449 ;; Take care of tree window mode. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2450 (if (get-buffer-window gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2451 (pop-to-buffer gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2452 (set-buffer gnus-group-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2453 (gnus-group-jump-to-group newsgroup)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2454 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2455 (defun gnus-summary-next-group (no-article) |
257 | 2456 "Exit current newsgroup and then select next unread newsgroup. |
2457 If prefix argument NO-ARTICLE is non-nil, no article is selected initially." | |
2458 (interactive "P") | |
2459 ;; Make sure Group mode buffer point is on current newsgroup. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2460 (gnus-summary-jump-to-group gnus-newsgroup-name) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2461 (let ((group (gnus-summary-search-group))) |
257 | 2462 (if (null group) |
2463 (progn | |
2464 (message "Exiting %s..." gnus-newsgroup-name) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2465 (gnus-summary-exit) |
257 | 2466 (message "")) |
2467 (message "Selecting %s..." group) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2468 (gnus-summary-exit t) ;Exit Summary mode temporary. |
257 | 2469 ;; We are now in Group mode buffer. |
2470 ;; Make sure Group mode buffer point is on GROUP. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2471 (gnus-summary-jump-to-group group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2472 (gnus-summary-read-group group nil no-article) |
257 | 2473 (or (eq (current-buffer) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2474 (get-buffer gnus-summary-buffer)) |
257 | 2475 (eq gnus-auto-select-next t) |
2476 ;; Expected newsgroup has nothing to read since the articles | |
2477 ;; are marked as read by cross-referencing. So, try next | |
2478 ;; newsgroup. (Make sure we are in Group mode buffer now.) | |
2479 (and (eq (current-buffer) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2480 (get-buffer gnus-group-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2481 (gnus-group-group-name) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2482 (gnus-summary-read-group |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2483 (gnus-group-group-name) nil no-article)) |
257 | 2484 ) |
2485 ))) | |
2486 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2487 (defun gnus-summary-prev-group (no-article) |
257 | 2488 "Exit current newsgroup and then select previous unread newsgroup. |
2489 If prefix argument NO-ARTICLE is non-nil, no article is selected initially." | |
2490 (interactive "P") | |
2491 ;; Make sure Group mode buffer point is on current newsgroup. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2492 (gnus-summary-jump-to-group gnus-newsgroup-name) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2493 (let ((group (gnus-summary-search-group t))) |
257 | 2494 (if (null group) |
2495 (progn | |
2496 (message "Exiting %s..." gnus-newsgroup-name) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2497 (gnus-summary-exit) |
257 | 2498 (message "")) |
2499 (message "Selecting %s..." group) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2500 (gnus-summary-exit t) ;Exit Summary mode temporary. |
257 | 2501 ;; We are now in Group mode buffer. |
2502 ;; We have to adjust point of Group mode buffer because current | |
2503 ;; point is moved to next unread newsgroup by exiting. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2504 (gnus-summary-jump-to-group group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2505 (gnus-summary-read-group group nil no-article) |
257 | 2506 (or (eq (current-buffer) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2507 (get-buffer gnus-summary-buffer)) |
257 | 2508 (eq gnus-auto-select-next t) |
2509 ;; Expected newsgroup has nothing to read since the articles | |
2510 ;; are marked as read by cross-referencing. So, try next | |
2511 ;; newsgroup. (Make sure we are in Group mode buffer now.) | |
2512 (and (eq (current-buffer) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2513 (get-buffer gnus-group-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2514 (gnus-summary-search-group t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2515 (gnus-summary-read-group |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2516 (gnus-summary-search-group t) nil no-article)) |
257 | 2517 ) |
2518 ))) | |
2519 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2520 ;; Walking around summary lines. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2521 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2522 (defun gnus-summary-next-subject (n &optional unread) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2523 "Go to next N'th summary line. |
257 | 2524 If optional argument UNREAD is non-nil, only unread article is selected." |
2525 (interactive "p") | |
2526 (while (and (> n 1) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2527 (gnus-summary-search-forward unread)) |
257 | 2528 (setq n (1- n))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2529 (cond ((gnus-summary-search-forward unread) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2530 (gnus-summary-recenter)) |
257 | 2531 (unread |
2532 (message "No more unread articles")) | |
2533 (t | |
2534 (message "No more articles")) | |
2535 )) | |
2536 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2537 (defun gnus-summary-next-unread-subject (n) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2538 "Go to next N'th unread summary line." |
257 | 2539 (interactive "p") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2540 (gnus-summary-next-subject n t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2541 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2542 (defun gnus-summary-prev-subject (n &optional unread) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2543 "Go to previous N'th summary line. |
257 | 2544 If optional argument UNREAD is non-nil, only unread article is selected." |
2545 (interactive "p") | |
2546 (while (and (> n 1) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2547 (gnus-summary-search-backward unread)) |
257 | 2548 (setq n (1- n))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2549 (cond ((gnus-summary-search-backward unread) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2550 (gnus-summary-recenter)) |
257 | 2551 (unread |
2552 (message "No more unread articles")) | |
2553 (t | |
2554 (message "No more articles")) | |
2555 )) | |
2556 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2557 (defun gnus-summary-prev-unread-subject (n) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2558 "Go to previous N'th unread summary line." |
257 | 2559 (interactive "p") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2560 (gnus-summary-prev-subject n t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2561 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2562 ;; Walking around summary lines with displaying articles. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2563 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2564 (defun gnus-summary-expand-window () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2565 "Expand Summary window to show headers full window." |
257 | 2566 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2567 (gnus-configure-windows 'summary) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2568 (pop-to-buffer gnus-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2569 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2570 (defun gnus-summary-display-article (article &optional all-header) |
257 | 2571 "Display ARTICLE in Article buffer." |
2572 (if (null article) | |
2573 nil | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2574 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2575 (pop-to-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2576 (gnus-article-prepare article all-header) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2577 (gnus-summary-recenter) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2578 (gnus-summary-set-mode-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2579 (run-hooks 'gnus-select-article-hook) |
257 | 2580 ;; Successfully display article. |
2581 t | |
2582 )) | |
2583 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2584 (defun gnus-summary-select-article (&optional all-headers force) |
257 | 2585 "Select the current article. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2586 Optional first argument ALL-HEADERS is non-nil, show all header fields. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2587 Optional second argument FORCE is nil, the article is only selected |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2588 again when current header does not match with ALL-HEADERS option." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2589 (let ((article (gnus-summary-article-number)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2590 (all-headers (not (not all-headers)))) ;Must be T or NIL. |
257 | 2591 (if (or (null gnus-current-article) |
2592 (/= article gnus-current-article) | |
2593 (and force (not (eq all-headers gnus-have-all-headers)))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2594 ;; The selected one is different from that of the current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2595 (gnus-summary-display-article article all-headers) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2596 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2597 (pop-to-buffer gnus-summary-buffer)) |
257 | 2598 )) |
2599 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2600 (defun gnus-summary-set-current-mark (&optional current-mark) |
257 | 2601 "Put `+' at the current article. |
2602 Optional argument specifies CURRENT-MARK instead of `+'." | |
2603 (save-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2604 (set-buffer gnus-summary-buffer) |
257 | 2605 (let ((buffer-read-only nil)) |
2606 (goto-char (point-min)) | |
2607 ;; First of all clear mark at last article. | |
2608 (if (re-search-forward "^.[ \t]+[0-9]+:[^ \t]" nil t) | |
2609 (progn | |
2610 (delete-char -1) | |
2611 (insert " ") | |
2612 (goto-char (point-min)))) | |
2613 (if (re-search-forward (format "^.[ \t]+%d:" gnus-current-article) nil t) | |
2614 (progn | |
2615 (delete-char 1) | |
2616 (insert (or current-mark "+")))) | |
2617 ))) | |
2618 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2619 ;;(defun gnus-summary-next-article (unread &optional subject) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2620 ;; "Select article after current one. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2621 ;;If argument UNREAD is non-nil, only unread article is selected." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2622 ;; (interactive "P") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2623 ;; (cond ((gnus-summary-display-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2624 ;; (gnus-summary-search-forward unread subject))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2625 ;; (unread |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2626 ;; (message "No more unread articles")) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2627 ;; (t |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2628 ;; (message "No more articles")) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2629 ;; )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2630 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2631 (defun gnus-summary-next-article (unread &optional subject) |
257 | 2632 "Select article after current one. |
2633 If argument UNREAD is non-nil, only unread article is selected." | |
2634 (interactive "P") | |
2635 (let ((header nil)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2636 (cond ((gnus-summary-display-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2637 (gnus-summary-search-forward unread subject))) |
257 | 2638 ((and subject |
2639 gnus-auto-select-same | |
2640 (gnus-set-difference gnus-newsgroup-unreads | |
2641 gnus-newsgroup-marked) | |
2642 (memq this-command | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2643 '(gnus-summary-next-unread-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2644 gnus-summary-next-page |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2645 gnus-summary-kill-same-subject-and-select |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2646 ;;gnus-summary-next-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2647 ;;gnus-summary-next-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2648 ;;gnus-summary-next-unread-same-subject |
257 | 2649 ))) |
2650 ;; Wrap article pointer if there are unread articles. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2651 ;; Hook function, such as gnus-summary-rmail-digest, may |
257 | 2652 ;; change current buffer, so need check. |
2653 (let ((buffer (current-buffer)) | |
2654 (last-point (point))) | |
2655 ;; No more articles with same subject, so jump to the first | |
2656 ;; unread article. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2657 (gnus-summary-first-unread-article) |
257 | 2658 ;;(and (eq buffer (current-buffer)) |
2659 ;; (= (point) last-point) | |
2660 ;; ;; Ignore given SUBJECT, and try again. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2661 ;; (gnus-summary-next-article unread nil)) |
257 | 2662 (and (eq buffer (current-buffer)) |
2663 (< (point) last-point) | |
2664 (message "Wrapped")) | |
2665 )) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2666 ((and gnus-auto-extend-newsgroup |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2667 (not unread) ;Not unread only |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2668 (not subject) ;Only if subject is not specified. |
257 | 2669 (setq header (gnus-more-header-forward))) |
2670 ;; Extend to next article if possible. | |
2671 ;; Basic ideas by himacdonald@watdragon.waterloo.edu | |
2672 (gnus-extend-newsgroup header nil) | |
2673 ;; Threads feature must be turned off. | |
2674 (let ((buffer-read-only nil)) | |
2675 (goto-char (point-max)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2676 (gnus-summary-prepare-threads (list header) 0)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2677 (gnus-summary-goto-article gnus-newsgroup-end)) |
257 | 2678 (t |
2679 ;; Select next newsgroup automatically if requested. | |
2680 (let ((cmd (string-to-char (this-command-keys))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2681 (group (gnus-summary-search-group)) |
257 | 2682 (auto-select |
2683 (and gnus-auto-select-next | |
2684 ;;(null (gnus-set-difference gnus-newsgroup-unreads | |
2685 ;; gnus-newsgroup-marked)) | |
2686 (memq this-command | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2687 '(gnus-summary-next-unread-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2688 gnus-summary-next-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2689 gnus-summary-next-page |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2690 gnus-summary-next-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2691 gnus-summary-next-unread-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2692 gnus-summary-kill-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2693 gnus-summary-kill-same-subject-and-select |
257 | 2694 )) |
2695 ;; Ignore characters typed ahead. | |
2696 (not (input-pending-p)) | |
2697 ))) | |
2698 (message "No more%s articles%s" | |
2699 (if unread " unread" "") | |
2700 (if (and auto-select | |
2701 (not (eq gnus-auto-select-next 'quietly))) | |
2702 (if group | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2703 (format " (Type %s for %s [%d])" |
257 | 2704 (key-description (char-to-string cmd)) |
2705 group | |
2706 (nth 1 (gnus-gethash group | |
2707 gnus-unread-hashtb))) | |
2708 (format " (Type %s to exit %s)" | |
2709 (key-description (char-to-string cmd)) | |
2710 gnus-newsgroup-name | |
2711 )) | |
2712 "")) | |
2713 ;; Select next unread newsgroup automagically. | |
2714 (cond ((and auto-select | |
2715 (eq gnus-auto-select-next 'quietly)) | |
2716 ;; Select quietly. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2717 (gnus-summary-next-group nil)) |
257 | 2718 (auto-select |
2719 ;; Confirm auto selection. | |
2720 (let ((char (read-char))) | |
2721 (if (= char cmd) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2722 (gnus-summary-next-group nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2723 (setq unread-command-char char)))) |
257 | 2724 ) |
2725 )) | |
2726 ))) | |
2727 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2728 (defun gnus-summary-next-unread-article () |
257 | 2729 "Select unread article after current one." |
2730 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2731 (gnus-summary-next-article t (and gnus-auto-select-same |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2732 (gnus-summary-subject-string)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2733 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2734 (defun gnus-summary-prev-article (unread &optional subject) |
257 | 2735 "Select article before current one. |
2736 If argument UNREAD is non-nil, only unread article is selected." | |
2737 (interactive "P") | |
2738 (let ((header nil)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2739 (cond ((gnus-summary-display-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2740 (gnus-summary-search-backward unread subject))) |
257 | 2741 ((and subject |
2742 gnus-auto-select-same | |
2743 (gnus-set-difference gnus-newsgroup-unreads | |
2744 gnus-newsgroup-marked) | |
2745 (memq this-command | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2746 '(gnus-summary-prev-unread-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2747 ;;gnus-summary-prev-page |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2748 ;;gnus-summary-prev-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2749 ;;gnus-summary-prev-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2750 ;;gnus-summary-prev-unread-same-subject |
257 | 2751 ))) |
2752 ;; Ignore given SUBJECT, and try again. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2753 (gnus-summary-prev-article unread nil)) |
257 | 2754 (unread |
2755 (message "No more unread articles")) | |
2756 ((and gnus-auto-extend-newsgroup | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2757 (not subject) ;Only if subject is not specified. |
257 | 2758 (setq header (gnus-more-header-backward))) |
2759 ;; Extend to previous article if possible. | |
2760 ;; Basic ideas by himacdonald@watdragon.waterloo.edu | |
2761 (gnus-extend-newsgroup header t) | |
2762 (let ((buffer-read-only nil)) | |
2763 (goto-char (point-min)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2764 (gnus-summary-prepare-threads (list header) 0)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2765 (gnus-summary-goto-article gnus-newsgroup-begin)) |
257 | 2766 (t |
2767 (message "No more articles")) | |
2768 ))) | |
2769 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2770 (defun gnus-summary-prev-unread-article () |
257 | 2771 "Select unred article before current one." |
2772 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2773 (gnus-summary-prev-article t (and gnus-auto-select-same |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2774 (gnus-summary-subject-string)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2775 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2776 (defun gnus-summary-next-page (lines) |
257 | 2777 "Show next page of selected article. |
2778 If end of artile, select next article. | |
2779 Argument LINES specifies lines to be scrolled up." | |
2780 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2781 (let ((article (gnus-summary-article-number)) |
257 | 2782 (endp nil)) |
2783 (if (or (null gnus-current-article) | |
2784 (/= article gnus-current-article)) | |
2785 ;; Selected subject is different from current article's. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2786 (gnus-summary-display-article article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2787 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2788 (pop-to-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2789 (gnus-eval-in-buffer-window gnus-article-buffer |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2790 (setq endp (gnus-article-next-page lines))) |
257 | 2791 (cond ((and endp lines) |
2792 (message "End of message")) | |
2793 ((and endp (null lines)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2794 (gnus-summary-next-unread-article))) |
257 | 2795 ))) |
2796 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2797 (defun gnus-summary-prev-page (lines) |
257 | 2798 "Show previous page of selected article. |
2799 Argument LINES specifies lines to be scrolled down." | |
2800 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2801 (let ((article (gnus-summary-article-number))) |
257 | 2802 (if (or (null gnus-current-article) |
2803 (/= article gnus-current-article)) | |
2804 ;; Selected subject is different from current article's. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2805 (gnus-summary-display-article article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2806 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2807 (pop-to-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2808 (gnus-eval-in-buffer-window gnus-article-buffer |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2809 (gnus-article-prev-page lines)) |
257 | 2810 ))) |
2811 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2812 (defun gnus-summary-scroll-up (lines) |
257 | 2813 "Scroll up (or down) one line current article. |
2814 Argument LINES specifies lines to be scrolled up (or down if negative)." | |
2815 (interactive "p") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2816 (gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2817 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 2818 (cond ((> lines 0) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2819 (if (gnus-article-next-page lines) |
257 | 2820 (message "End of message"))) |
2821 ((< lines 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2822 (gnus-article-prev-page (- 0 lines)))) |
257 | 2823 )) |
2824 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2825 (defun gnus-summary-next-same-subject () |
257 | 2826 "Select next article which has the same subject as current one." |
2827 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2828 (gnus-summary-next-article nil (gnus-summary-subject-string))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2829 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2830 (defun gnus-summary-prev-same-subject () |
257 | 2831 "Select previous article which has the same subject as current one." |
2832 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2833 (gnus-summary-prev-article nil (gnus-summary-subject-string))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2834 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2835 (defun gnus-summary-next-unread-same-subject () |
257 | 2836 "Select next unread article which has the same subject as current one." |
2837 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2838 (gnus-summary-next-article t (gnus-summary-subject-string))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2839 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2840 (defun gnus-summary-prev-unread-same-subject () |
257 | 2841 "Select previous unread article which has the same subject as current one." |
2842 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2843 (gnus-summary-prev-article t (gnus-summary-subject-string))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2844 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2845 (defun gnus-summary-refer-parent-article (child) |
257 | 2846 "Refer parent article of current article. |
2847 If a prefix argument CHILD is non-nil, go back to the child article | |
2848 using internally maintained articles history. | |
2849 NOTE: This command may not work with nnspool.el." | |
2850 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2851 (gnus-summary-select-article t t) ;Request all headers. |
257 | 2852 (let ((referenced-id nil)) ;Message-id of parent or child article. |
2853 (if child | |
2854 ;; Go back to child article using history. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2855 (gnus-summary-refer-article nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2856 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 2857 ;; Look for parent Message-ID. |
2858 ;; We cannot use gnus-current-headers to get references | |
2859 ;; because we may be looking at parent or refered article. | |
2860 (let ((references (gnus-fetch-field "References"))) | |
2861 ;; Get the last message-id in the references. | |
2862 (and references | |
2863 (string-match "\\(<[^<>]+>\\)[^>]*\\'" references) | |
2864 (setq referenced-id | |
2865 (substring references | |
2866 (match-beginning 1) (match-end 1)))) | |
2867 )) | |
2868 (if (stringp referenced-id) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2869 (gnus-summary-refer-article referenced-id) |
257 | 2870 (error "No more parents")) |
2871 ))) | |
2872 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2873 (defun gnus-summary-refer-article (message-id) |
257 | 2874 "Refer article specified by MESSAGE-ID. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2875 If the MESSAGE-ID is nil or an empty string, Message-ID is poped from |
257 | 2876 internally maintained articles history. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2877 NOTE: This command may not work with nnspool.el nor mhspool.el." |
257 | 2878 (interactive "sMessage-ID: ") |
2879 ;; Make sure that this command depends on the fact that article | |
2880 ;; related information is not updated when an article is retrieved | |
2881 ;; by Message-ID. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2882 (gnus-summary-select-article t t) ;Request all headers. |
257 | 2883 (if (and (stringp message-id) |
2884 (> (length message-id) 0)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2885 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 2886 ;; Construct the correct Message-ID if necessary. |
2887 ;; Suggested by tale@pawl.rpi.edu. | |
2888 (or (string-match "^<" message-id) | |
2889 (setq message-id (concat "<" message-id))) | |
2890 (or (string-match ">$" message-id) | |
2891 (setq message-id (concat message-id ">"))) | |
2892 ;; Push current message-id on history. | |
2893 ;; We cannot use gnus-current-headers to get current | |
2894 ;; message-id because we may be looking at parent or refered | |
2895 ;; article. | |
2896 (let ((current (gnus-fetch-field "Message-ID"))) | |
2897 (or (equal current message-id) ;Nothing to do. | |
2898 (equal current (car gnus-current-history)) | |
2899 (setq gnus-current-history | |
2900 (cons current gnus-current-history))) | |
2901 )) | |
2902 ;; Pop message-id from history. | |
2903 (setq message-id (car gnus-current-history)) | |
2904 (setq gnus-current-history (cdr gnus-current-history))) | |
2905 (if (stringp message-id) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2906 ;; Retrieve article by message-id. This may not work with |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2907 ;; nnspool nor mhspool. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2908 (gnus-article-prepare message-id t) |
257 | 2909 (error "No such references")) |
2910 ) | |
2911 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2912 (defun gnus-summary-next-digest (nth) |
257 | 2913 "Move to head of NTH next digested message." |
2914 (interactive "p") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2915 (gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2916 (gnus-eval-in-buffer-window gnus-article-buffer |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2917 (gnus-article-next-digest (or nth 1)) |
257 | 2918 )) |
2919 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2920 (defun gnus-summary-prev-digest (nth) |
257 | 2921 "Move to head of NTH previous digested message." |
2922 (interactive "p") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2923 (gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2924 (gnus-eval-in-buffer-window gnus-article-buffer |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2925 (gnus-article-prev-digest (or nth 1)) |
257 | 2926 )) |
2927 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2928 (defun gnus-summary-first-unread-article () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2929 "Select first unread article. Return non-nil if successfully selected." |
257 | 2930 (interactive) |
2931 (let ((begin (point))) | |
2932 (goto-char (point-min)) | |
2933 (if (re-search-forward "^ [ \t]+[0-9]+:" nil t) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2934 (gnus-summary-display-article (gnus-summary-article-number)) |
257 | 2935 ;; If there is no unread articles, stay there. |
2936 (goto-char begin) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2937 ;;(gnus-summary-display-article (gnus-summary-article-number)) |
257 | 2938 (message "No more unread articles") |
2939 nil | |
2940 ) | |
2941 )) | |
2942 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2943 (defun gnus-summary-isearch-article () |
257 | 2944 "Do incremental search forward on current article." |
2945 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2946 (gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2947 (gnus-eval-in-buffer-window gnus-article-buffer |
3474
9eaa2151f7f6
(gnus-summary-isearch-article): Call isearch-forward
Richard M. Stallman <rms@gnu.org>
parents:
3331
diff
changeset
|
2948 (isearch-forward))) |
257 | 2949 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2950 (defun gnus-summary-search-article-forward (regexp) |
257 | 2951 "Search for an article containing REGEXP forward. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2952 gnus-select-article-hook is not called during the search." |
257 | 2953 (interactive |
2954 (list (read-string | |
2955 (concat "Search forward (regexp): " | |
2956 (if gnus-last-search-regexp | |
2957 (concat "(default " gnus-last-search-regexp ") ")))))) | |
2958 (if (string-equal regexp "") | |
2959 (setq regexp (or gnus-last-search-regexp "")) | |
2960 (setq gnus-last-search-regexp regexp)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2961 (if (gnus-summary-search-article regexp nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2962 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 2963 (recenter 0) |
2964 ;;(sit-for 1) | |
2965 ) | |
2966 (error "Search failed: \"%s\"" regexp) | |
2967 )) | |
2968 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2969 (defun gnus-summary-search-article-backward (regexp) |
257 | 2970 "Search for an article containing REGEXP backward. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2971 gnus-select-article-hook is not called during the search." |
257 | 2972 (interactive |
2973 (list (read-string | |
2974 (concat "Search backward (regexp): " | |
2975 (if gnus-last-search-regexp | |
2976 (concat "(default " gnus-last-search-regexp ") ")))))) | |
2977 (if (string-equal regexp "") | |
2978 (setq regexp (or gnus-last-search-regexp "")) | |
2979 (setq gnus-last-search-regexp regexp)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2980 (if (gnus-summary-search-article regexp t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2981 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 2982 (recenter 0) |
2983 ;;(sit-for 1) | |
2984 ) | |
2985 (error "Search failed: \"%s\"" regexp) | |
2986 )) | |
2987 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2988 (defun gnus-summary-search-article (regexp &optional backward) |
257 | 2989 "Search for an article containing REGEXP. |
2990 Optional argument BACKWARD means do search for backward. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2991 gnus-select-article-hook is not called during the search." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2992 (let ((gnus-select-article-hook nil) ;Disable hook. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2993 (gnus-mark-article-hook nil) ;Inhibit marking as read. |
257 | 2994 (re-search |
2995 (if backward | |
2996 (function re-search-backward) (function re-search-forward))) | |
2997 (found nil) | |
2998 (last nil)) | |
2999 ;; Hidden thread subtrees must be searched for ,too. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3000 (gnus-summary-show-all-threads) |
257 | 3001 ;; First of all, search current article. |
3002 ;; We don't want to read article again from NNTP server nor reset | |
3003 ;; current point. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3004 (gnus-summary-select-article) |
257 | 3005 (message "Searching article: %d..." gnus-current-article) |
3006 (setq last gnus-current-article) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3007 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3008 (save-restriction |
3009 (widen) | |
3010 ;; Begin search from current point. | |
3011 (setq found (funcall re-search regexp nil t)))) | |
3012 ;; Then search next articles. | |
3013 (while (and (not found) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3014 (gnus-summary-display-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3015 (gnus-summary-search-subject backward nil nil))) |
257 | 3016 (message "Searching article: %d..." gnus-current-article) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3017 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3018 (save-restriction |
3019 (widen) | |
3020 (goto-char (if backward (point-max) (point-min))) | |
3021 (setq found (funcall re-search regexp nil t))) | |
3022 )) | |
3023 (message "") | |
3024 ;; Adjust article pointer. | |
3025 (or (eq last gnus-current-article) | |
3026 (setq gnus-last-article last)) | |
3027 ;; Return T if found such article. | |
3028 found | |
3029 )) | |
3030 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3031 (defun gnus-summary-execute-command (field regexp command &optional backward) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3032 "If FIELD of article header matches REGEXP, execute a COMMAND string. |
257 | 3033 If FIELD is an empty string (or nil), entire article body is searched for. |
3034 If optional (prefix) argument BACKWARD is non-nil, do backward instead." | |
3035 (interactive | |
3036 (list (let ((completion-ignore-case t)) | |
3037 (completing-read "Field name: " | |
3038 '(("Number")("Subject")("From") | |
3039 ("Lines")("Date")("Id") | |
3040 ("Xref")("References")) | |
3041 nil 'require-match)) | |
3042 (read-string "Regexp: ") | |
3043 (read-key-sequence "Command: ") | |
3044 current-prefix-arg)) | |
3045 ;; Hidden thread subtrees must be searched for ,too. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3046 (gnus-summary-show-all-threads) |
257 | 3047 ;; We don't want to change current point nor window configuration. |
3048 (save-excursion | |
3049 (save-window-excursion | |
3050 (message "Executing %s..." (key-description command)) | |
3051 ;; We'd like to execute COMMAND interactively so as to give arguments. | |
3052 (gnus-execute field regexp | |
3053 (` (lambda () | |
3054 (call-interactively '(, (key-binding command))))) | |
3055 backward) | |
3056 (message "Executing %s... done" (key-description command))))) | |
3057 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3058 (defun gnus-summary-beginning-of-article () |
257 | 3059 "Go to beginning of article body" |
3060 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3061 (gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3062 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3063 (widen) |
3064 (beginning-of-buffer) | |
3065 (if gnus-break-pages | |
3066 (gnus-narrow-to-page)) | |
3067 )) | |
3068 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3069 (defun gnus-summary-end-of-article () |
257 | 3070 "Go to end of article body" |
3071 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3072 (gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3073 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3074 (widen) |
3075 (end-of-buffer) | |
3076 (if gnus-break-pages | |
3077 (gnus-narrow-to-page)) | |
3078 )) | |
3079 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3080 (defun gnus-summary-goto-article (article &optional all-headers) |
257 | 3081 "Read ARTICLE if exists. |
3082 Optional argument ALL-HEADERS means all headers are shown." | |
3083 (interactive | |
3084 (list | |
3085 (string-to-int | |
3086 (completing-read "Article number: " | |
3087 (mapcar | |
3088 (function | |
3089 (lambda (headers) | |
3090 (list | |
3091 (int-to-string (nntp-header-number headers))))) | |
3092 gnus-newsgroup-headers) | |
3093 nil 'require-match)))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3094 (if (gnus-summary-goto-subject article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3095 (gnus-summary-display-article article all-headers))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3096 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3097 (defun gnus-summary-goto-last-article () |
257 | 3098 "Go to last subject line." |
3099 (interactive) | |
3100 (if gnus-last-article | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3101 (gnus-summary-goto-article gnus-last-article))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3102 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3103 (defun gnus-summary-show-article () |
257 | 3104 "Force to show current article." |
3105 (interactive) | |
3106 ;; The following is a trick to force to read the current article again. | |
3107 (setq gnus-have-all-headers (not gnus-have-all-headers)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3108 (gnus-summary-select-article (not gnus-have-all-headers) t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3109 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3110 (defun gnus-summary-toggle-header (arg) |
257 | 3111 "Show original header if pruned header currently shown, or vice versa. |
3112 With arg, show original header iff arg is positive." | |
3113 (interactive "P") | |
3114 ;; Variable gnus-show-all-headers must be NIL to toggle really. | |
3115 (let ((gnus-show-all-headers nil) | |
3116 (all-headers | |
3117 (if (null arg) (not gnus-have-all-headers) | |
3118 (> (prefix-numeric-value arg) 0)))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3119 (gnus-summary-select-article all-headers t))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3120 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3121 (defun gnus-summary-show-all-headers () |
257 | 3122 "Show original article header." |
3123 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3124 (gnus-summary-select-article t t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3125 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3126 (defun gnus-summary-toggle-mime (arg) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3127 "Toggle MIME processing. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3128 With arg, turn MIME processing on iff arg is positive." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3129 (interactive "P") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3130 (setq gnus-show-mime |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3131 (if (null arg) (not gnus-show-mime) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3132 (> (prefix-numeric-value arg) 0))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3133 ;; The following is a trick to force to read the current article again. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3134 (setq gnus-have-all-headers (not gnus-have-all-headers)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3135 (gnus-summary-select-article (not gnus-have-all-headers) t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3136 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3137 (defun gnus-summary-stop-page-breaking () |
257 | 3138 "Stop page breaking by linefeed temporary (Widen article buffer)." |
3139 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3140 (gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3141 (gnus-eval-in-buffer-window gnus-article-buffer |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3142 (widen) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3143 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3144 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3145 (defun gnus-summary-kill-same-subject-and-select (unmark) |
257 | 3146 "Mark articles which has the same subject as read, and then select next. |
3147 If argument UNMARK is positive, remove any kinds of marks. | |
3148 If argument UNMARK is negative, mark articles as unread instead." | |
3149 (interactive "P") | |
3150 (if unmark | |
3151 (setq unmark (prefix-numeric-value unmark))) | |
3152 (let ((count | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3153 (gnus-summary-mark-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3154 (gnus-summary-subject-string) unmark))) |
257 | 3155 ;; Select next unread article. If auto-select-same mode, should |
3156 ;; select the first unread article. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3157 (gnus-summary-next-article t (and gnus-auto-select-same |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3158 (gnus-summary-subject-string))) |
257 | 3159 (message "%d articles are marked as %s" |
3160 count (if unmark "unread" "read")) | |
3161 )) | |
3162 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3163 (defun gnus-summary-kill-same-subject (unmark) |
257 | 3164 "Mark articles which has the same subject as read. |
3165 If argument UNMARK is positive, remove any kinds of marks. | |
3166 If argument UNMARK is negative, mark articles as unread instead." | |
3167 (interactive "P") | |
3168 (if unmark | |
3169 (setq unmark (prefix-numeric-value unmark))) | |
3170 (let ((count | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3171 (gnus-summary-mark-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3172 (gnus-summary-subject-string) unmark))) |
257 | 3173 ;; If marked as read, go to next unread subject. |
3174 (if (null unmark) | |
3175 ;; Go to next unread subject. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3176 (gnus-summary-next-subject 1 t)) |
257 | 3177 (message "%d articles are marked as %s" |
3178 count (if unmark "unread" "read")) | |
3179 )) | |
3180 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3181 (defun gnus-summary-mark-same-subject (subject &optional unmark) |
257 | 3182 "Mark articles with same SUBJECT as read, and return marked number. |
3183 If optional argument UNMARK is positive, remove any kinds of marks. | |
3184 If optional argument UNMARK is negative, mark articles as unread instead." | |
3185 (let ((count 1)) | |
3186 (save-excursion | |
3187 (cond ((null unmark) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3188 (gnus-summary-mark-as-read nil "K")) |
257 | 3189 ((> unmark 0) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3190 (gnus-summary-mark-as-unread nil t)) |
257 | 3191 (t |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3192 (gnus-summary-mark-as-unread))) |
257 | 3193 (while (and subject |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3194 (gnus-summary-search-forward nil subject)) |
257 | 3195 (cond ((null unmark) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3196 (gnus-summary-mark-as-read nil "K")) |
257 | 3197 ((> unmark 0) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3198 (gnus-summary-mark-as-unread nil t)) |
257 | 3199 (t |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3200 (gnus-summary-mark-as-unread))) |
257 | 3201 (setq count (1+ count)) |
3202 )) | |
3203 ;; Hide killed thread subtrees. Does not work properly always. | |
3204 ;;(and (null unmark) | |
3205 ;; gnus-thread-hide-killed | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3206 ;; (gnus-summary-hide-thread)) |
257 | 3207 ;; Return number of articles marked as read. |
3208 count | |
3209 )) | |
3210 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3211 (defun gnus-summary-mark-as-unread-forward (count) |
257 | 3212 "Mark current article as unread, and then go forward. |
3213 Argument COUNT specifies number of articles marked as unread." | |
3214 (interactive "p") | |
3215 (while (> count 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3216 (gnus-summary-mark-as-unread nil nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3217 (gnus-summary-next-subject 1 nil) |
257 | 3218 (setq count (1- count)))) |
3219 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3220 (defun gnus-summary-mark-as-unread-backward (count) |
257 | 3221 "Mark current article as unread, and then go backward. |
3222 Argument COUNT specifies number of articles marked as unread." | |
3223 (interactive "p") | |
3224 (while (> count 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3225 (gnus-summary-mark-as-unread nil nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3226 (gnus-summary-prev-subject 1 nil) |
257 | 3227 (setq count (1- count)))) |
3228 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3229 (defun gnus-summary-mark-as-unread (&optional article clear-mark) |
257 | 3230 "Mark current article as unread. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3231 Optional 1st argument ARTICLE specifies article number to be marked as unread. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3232 Optional 2nd argument CLEAR-MARK remove any kinds of mark." |
257 | 3233 (save-excursion |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3234 (set-buffer gnus-summary-buffer) |
257 | 3235 ;; First of all, show hidden thread subtrees. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3236 (gnus-summary-show-thread) |
257 | 3237 (let* ((buffer-read-only nil) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3238 (current (gnus-summary-article-number)) |
257 | 3239 (article (or article current))) |
3240 (gnus-mark-article-as-unread article clear-mark) | |
3241 (if (or (eq article current) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3242 (gnus-summary-goto-subject article)) |
257 | 3243 (progn |
3244 (beginning-of-line) | |
3245 (delete-char 1) | |
3246 (insert (if clear-mark " " "-")))) | |
3247 ))) | |
3248 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3249 (defun gnus-summary-mark-as-read-forward (count) |
257 | 3250 "Mark current article as read, and then go forward. |
3251 Argument COUNT specifies number of articles marked as read" | |
3252 (interactive "p") | |
3253 (while (> count 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3254 (gnus-summary-mark-as-read) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3255 (gnus-summary-next-subject 1 'unread-only) |
257 | 3256 (setq count (1- count)))) |
3257 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3258 (defun gnus-summary-mark-as-read-backward (count) |
257 | 3259 "Mark current article as read, and then go backward. |
3260 Argument COUNT specifies number of articles marked as read" | |
3261 (interactive "p") | |
3262 (while (> count 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3263 (gnus-summary-mark-as-read) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3264 (gnus-summary-prev-subject 1 'unread-only) |
257 | 3265 (setq count (1- count)))) |
3266 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3267 (defun gnus-summary-mark-as-read (&optional article mark) |
257 | 3268 "Mark current article as read. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3269 Optional 1st argument ARTICLE specifies article number to be marked as read. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3270 Optional 2nd argument MARK specifies a string inserted at beginning of line. |
257 | 3271 Any kind of string (length 1) except for a space and `-' is ok." |
3272 (save-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3273 (set-buffer gnus-summary-buffer) |
257 | 3274 ;; First of all, show hidden thread subtrees. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3275 (gnus-summary-show-thread) |
257 | 3276 (let* ((buffer-read-only nil) |
3277 (mark (or mark "D")) ;Default mark is `D'. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3278 (current (gnus-summary-article-number)) |
257 | 3279 (article (or article current))) |
3280 (gnus-mark-article-as-read article) | |
3281 (if (or (eq article current) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3282 (gnus-summary-goto-subject article)) |
257 | 3283 (progn |
3284 (beginning-of-line) | |
3285 (delete-char 1) | |
3286 (insert mark))) | |
3287 ))) | |
3288 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3289 (defun gnus-summary-clear-mark-forward (count) |
257 | 3290 "Remove current article's mark, and go forward. |
3291 Argument COUNT specifies number of articles unmarked" | |
3292 (interactive "p") | |
3293 (while (> count 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3294 (gnus-summary-mark-as-unread nil t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3295 (gnus-summary-next-subject 1 nil) |
257 | 3296 (setq count (1- count)))) |
3297 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3298 (defun gnus-summary-clear-mark-backward (count) |
257 | 3299 "Remove current article's mark, and go backward. |
3300 Argument COUNT specifies number of articles unmarked" | |
3301 (interactive "p") | |
3302 (while (> count 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3303 (gnus-summary-mark-as-unread nil t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3304 (gnus-summary-prev-subject 1 nil) |
257 | 3305 (setq count (1- count)))) |
3306 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3307 (defun gnus-summary-delete-marked-as-read () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3308 "Delete lines which is marked as read." |
257 | 3309 (interactive) |
3310 (if gnus-newsgroup-unreads | |
3311 (let ((buffer-read-only nil)) | |
3312 (save-excursion | |
3313 (goto-char (point-min)) | |
3314 (delete-non-matching-lines "^[ ---]")) | |
3315 ;; Adjust point. | |
3316 (if (eobp) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3317 (gnus-summary-prev-subject 1) |
257 | 3318 (beginning-of-line) |
3319 (search-forward ":" nil t))) | |
3320 ;; It is not so good idea to make the buffer empty. | |
3321 (message "All articles are marked as read") | |
3322 )) | |
3323 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3324 (defun gnus-summary-delete-marked-with (marks) |
257 | 3325 "Delete lines which are marked with MARKS (e.g. \"DK\")." |
3326 (interactive "sMarks: ") | |
3327 (let ((buffer-read-only nil)) | |
3328 (save-excursion | |
3329 (goto-char (point-min)) | |
3330 (delete-matching-lines (concat "^[" marks "]"))) | |
3331 ;; Adjust point. | |
3332 (or (zerop (buffer-size)) | |
3333 (if (eobp) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3334 (gnus-summary-prev-subject 1) |
257 | 3335 (beginning-of-line) |
3336 (search-forward ":" nil t))) | |
3337 )) | |
3338 | |
3339 ;; Thread-based commands. | |
3340 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3341 (defun gnus-summary-toggle-threads (arg) |
257 | 3342 "Toggle showing conversation threads. |
3343 With arg, turn showing conversation threads on iff arg is positive." | |
3344 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3345 (let ((current (gnus-summary-article-number))) |
257 | 3346 (setq gnus-show-threads |
3347 (if (null arg) (not gnus-show-threads) | |
3348 (> (prefix-numeric-value arg) 0))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3349 (gnus-summary-prepare) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3350 (gnus-summary-goto-subject current) |
257 | 3351 )) |
3352 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3353 (defun gnus-summary-show-all-threads () |
257 | 3354 "Show all thread subtrees." |
3355 (interactive) | |
3356 (if gnus-show-threads | |
3357 (save-excursion | |
3358 (let ((buffer-read-only nil)) | |
3359 (subst-char-in-region (point-min) (point-max) ?\^M ?\n t) | |
3360 )))) | |
3361 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3362 (defun gnus-summary-show-thread () |
257 | 3363 "Show thread subtrees." |
3364 (interactive) | |
3365 (if gnus-show-threads | |
3366 (save-excursion | |
3367 (let ((buffer-read-only nil)) | |
3368 (subst-char-in-region (progn | |
3369 (beginning-of-line) (point)) | |
3370 (progn | |
3371 (end-of-line) (point)) | |
3372 ?\^M ?\n t) | |
3373 )))) | |
3374 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3375 (defun gnus-summary-hide-all-threads () |
257 | 3376 "Hide all thread subtrees." |
3377 (interactive) | |
3378 (if gnus-show-threads | |
3379 (save-excursion | |
3380 ;; Adjust cursor point. | |
3381 (goto-char (point-min)) | |
3382 (search-forward ":" nil t) | |
3383 (let ((level (current-column))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3384 (gnus-summary-hide-thread) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3385 (while (gnus-summary-search-forward) |
257 | 3386 (and (>= level (current-column)) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3387 (gnus-summary-hide-thread))) |
257 | 3388 )))) |
3389 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3390 (defun gnus-summary-hide-thread () |
257 | 3391 "Hide thread subtrees." |
3392 (interactive) | |
3393 (if gnus-show-threads | |
3394 (save-excursion | |
3395 ;; Adjust cursor point. | |
3396 (beginning-of-line) | |
3397 (search-forward ":" nil t) | |
3398 (let ((buffer-read-only nil) | |
3399 (init (point)) | |
3400 (last (point)) | |
3401 (level (current-column))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3402 (while (and (gnus-summary-search-forward) |
257 | 3403 (< level (current-column))) |
3404 ;; Interested in lower levels. | |
3405 (if (< level (current-column)) | |
3406 (progn | |
3407 (setq last (point)) | |
3408 )) | |
3409 ) | |
3410 (subst-char-in-region init last ?\n ?\^M t) | |
3411 )))) | |
3412 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3413 (defun gnus-summary-next-thread (n) |
257 | 3414 "Go to the same level next thread. |
3415 Argument N specifies the number of threads." | |
3416 (interactive "p") | |
3417 ;; Adjust cursor point. | |
3418 (beginning-of-line) | |
3419 (search-forward ":" nil t) | |
3420 (let ((init (point)) | |
3421 (last (point)) | |
3422 (level (current-column))) | |
3423 (while (and (> n 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3424 (gnus-summary-search-forward) |
257 | 3425 (<= level (current-column))) |
3426 ;; We have to skip lower levels. | |
3427 (if (= level (current-column)) | |
3428 (progn | |
3429 (setq last (point)) | |
3430 (setq n (1- n)) | |
3431 )) | |
3432 ) | |
3433 ;; Return non-nil if successfully move to the next. | |
3434 (prog1 (not (= init last)) | |
3435 (goto-char last)) | |
3436 )) | |
3437 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3438 (defun gnus-summary-prev-thread (n) |
257 | 3439 "Go to the same level previous thread. |
3440 Argument N specifies the number of threads." | |
3441 (interactive "p") | |
3442 ;; Adjust cursor point. | |
3443 (beginning-of-line) | |
3444 (search-forward ":" nil t) | |
3445 (let ((init (point)) | |
3446 (last (point)) | |
3447 (level (current-column))) | |
3448 (while (and (> n 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3449 (gnus-summary-search-backward) |
257 | 3450 (<= level (current-column))) |
3451 ;; We have to skip lower levels. | |
3452 (if (= level (current-column)) | |
3453 (progn | |
3454 (setq last (point)) | |
3455 (setq n (1- n)) | |
3456 )) | |
3457 ) | |
3458 ;; Return non-nil if successfully move to the previous. | |
3459 (prog1 (not (= init last)) | |
3460 (goto-char last)) | |
3461 )) | |
3462 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3463 (defun gnus-summary-down-thread (d) |
257 | 3464 "Go downward current thread. |
3465 Argument D specifies the depth goes down." | |
3466 (interactive "p") | |
3467 ;; Adjust cursor point. | |
3468 (beginning-of-line) | |
3469 (search-forward ":" nil t) | |
3470 (let ((last (point)) | |
3471 (level (current-column))) | |
3472 (while (and (> d 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3473 (gnus-summary-search-forward) |
257 | 3474 (<= level (current-column))) ;<= can be <. Which do you like? |
3475 ;; We have to skip the same levels. | |
3476 (if (< level (current-column)) | |
3477 (progn | |
3478 (setq last (point)) | |
3479 (setq level (current-column)) | |
3480 (setq d (1- d)) | |
3481 )) | |
3482 ) | |
3483 (goto-char last) | |
3484 )) | |
3485 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3486 (defun gnus-summary-up-thread (d) |
257 | 3487 "Go upward current thread. |
3488 Argument D specifies the depth goes up." | |
3489 (interactive "p") | |
3490 ;; Adjust cursor point. | |
3491 (beginning-of-line) | |
3492 (search-forward ":" nil t) | |
3493 (let ((last (point)) | |
3494 (level (current-column))) | |
3495 (while (and (> d 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3496 (gnus-summary-search-backward)) |
257 | 3497 ;; We have to skip the same levels. |
3498 (if (> level (current-column)) | |
3499 (progn | |
3500 (setq last (point)) | |
3501 (setq level (current-column)) | |
3502 (setq d (1- d)) | |
3503 )) | |
3504 ) | |
3505 (goto-char last) | |
3506 )) | |
3507 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3508 (defun gnus-summary-kill-thread (unmark) |
257 | 3509 "Mark articles under current thread as read. |
3510 If argument UNMARK is positive, remove any kinds of marks. | |
3511 If argument UNMARK is negative, mark articles as unread instead." | |
3512 (interactive "P") | |
3513 (if unmark | |
3514 (setq unmark (prefix-numeric-value unmark))) | |
3515 ;; Adjust cursor point. | |
3516 (beginning-of-line) | |
3517 (search-forward ":" nil t) | |
3518 (save-excursion | |
3519 (let ((level (current-column))) | |
3520 ;; Mark current article. | |
3521 (cond ((null unmark) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3522 (gnus-summary-mark-as-read nil "K")) |
257 | 3523 ((> unmark 0) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3524 (gnus-summary-mark-as-unread nil t)) |
257 | 3525 (t |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3526 (gnus-summary-mark-as-unread)) |
257 | 3527 ) |
3528 ;; Mark following articles. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3529 (while (and (gnus-summary-search-forward) |
257 | 3530 (< level (current-column))) |
3531 (cond ((null unmark) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3532 (gnus-summary-mark-as-read nil "K")) |
257 | 3533 ((> unmark 0) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3534 (gnus-summary-mark-as-unread nil t)) |
257 | 3535 (t |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3536 (gnus-summary-mark-as-unread)) |
257 | 3537 )) |
3538 )) | |
3539 ;; Hide killed subtrees. | |
3540 (and (null unmark) | |
3541 gnus-thread-hide-killed | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3542 (gnus-summary-hide-thread)) |
257 | 3543 ;; If marked as read, go to next unread subject. |
3544 (if (null unmark) | |
3545 ;; Go to next unread subject. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3546 (gnus-summary-next-subject 1 t)) |
257 | 3547 ) |
3548 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3549 (defun gnus-summary-toggle-truncation (arg) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3550 "Toggle truncation of summary lines. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3551 With arg, turn line truncation on iff arg is positive." |
257 | 3552 (interactive "P") |
3553 (setq truncate-lines | |
3554 (if (null arg) (not truncate-lines) | |
3555 (> (prefix-numeric-value arg) 0))) | |
3556 (redraw-display)) | |
3557 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3558 (defun gnus-summary-sort-by-number (reverse) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3559 "Sort Summary buffer by article number. |
257 | 3560 Argument REVERSE means reverse order." |
3561 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3562 (gnus-summary-keysort-summary |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3563 (function <) |
257 | 3564 (function |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3565 (lambda (a) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3566 (nntp-header-number a))) |
257 | 3567 reverse |
3568 )) | |
3569 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3570 (defun gnus-summary-sort-by-author (reverse) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3571 "Sort Summary buffer by author name alphabetically. |
257 | 3572 If case-fold-search is non-nil, case of letters is ignored. |
3573 Argument REVERSE means reverse order." | |
3574 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3575 (gnus-summary-keysort-summary |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3576 (function string-lessp) |
257 | 3577 (function |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3578 (lambda (a) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3579 (if case-fold-search |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3580 (downcase (nntp-header-from a)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3581 (nntp-header-from a)))) |
257 | 3582 reverse |
3583 )) | |
3584 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3585 (defun gnus-summary-sort-by-subject (reverse) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3586 "Sort Summary buffer by subject alphabetically. `Re:'s are ignored. |
257 | 3587 If case-fold-search is non-nil, case of letters is ignored. |
3588 Argument REVERSE means reverse order." | |
3589 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3590 (gnus-summary-keysort-summary |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3591 (function string-lessp) |
257 | 3592 (function |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3593 (lambda (a) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3594 (if case-fold-search |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3595 (downcase (gnus-simplify-subject (nntp-header-subject a) 're-only)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3596 (gnus-simplify-subject (nntp-header-subject a) 're-only)))) |
257 | 3597 reverse |
3598 )) | |
3599 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3600 (defun gnus-summary-sort-by-date (reverse) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3601 "Sort Summary buffer by date. |
257 | 3602 Argument REVERSE means reverse order." |
3603 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3604 (gnus-summary-keysort-summary |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3605 (function string-lessp) |
257 | 3606 (function |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3607 (lambda (a) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3608 (gnus-sortable-date (nntp-header-date a)))) |
257 | 3609 reverse |
3610 )) | |
3611 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3612 (defun gnus-summary-keysort-summary (predicate key &optional reverse) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3613 "Sort Summary buffer by PREDICATE using a value passed by KEY. |
257 | 3614 Optional argument REVERSE means reverse order." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3615 (let ((current (gnus-summary-article-number))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3616 (gnus-keysort-headers predicate key reverse) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3617 (gnus-summary-prepare) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3618 (gnus-summary-goto-subject current) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3619 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3620 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3621 (defun gnus-summary-sort-summary (predicate &optional reverse) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3622 "Sort Summary buffer by PREDICATE. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3623 Optional argument REVERSE means reverse order." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3624 (let ((current (gnus-summary-article-number))) |
257 | 3625 (gnus-sort-headers predicate reverse) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3626 (gnus-summary-prepare) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3627 (gnus-summary-goto-subject current) |
257 | 3628 )) |
3629 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3630 (defun gnus-summary-reselect-current-group (show-all) |
257 | 3631 "Once exit and then reselect the current newsgroup. |
3632 Prefix argument SHOW-ALL means to select all articles." | |
3633 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3634 (let ((current-subject (gnus-summary-article-number))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3635 (gnus-summary-exit t) |
257 | 3636 ;; We have to adjust the point of Group mode buffer because the |
3637 ;; current point was moved to the next unread newsgroup by | |
3638 ;; exiting. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3639 (gnus-summary-jump-to-group gnus-newsgroup-name) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3640 (gnus-group-read-group show-all t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3641 (gnus-summary-goto-subject current-subject) |
257 | 3642 )) |
3643 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3644 (defun gnus-summary-caesar-message (rotnum) |
257 | 3645 "Caesar rotates all letters of current message by 13/47 places. |
3646 With prefix arg, specifies the number of places to rotate each letter forward. | |
3647 Caesar rotates Japanese letters by 47 places in any case." | |
3648 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3649 (gnus-summary-select-article) |
257 | 3650 (gnus-overload-functions) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3651 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3652 (save-restriction |
3653 (widen) | |
3654 ;; We don't want to jump to the beginning of the message. | |
3655 ;; `save-excursion' does not do its job. | |
3656 (move-to-window-line 0) | |
3657 (let ((last (point))) | |
3658 (news-caesar-buffer-body rotnum) | |
3659 (goto-char last) | |
3660 (recenter 0) | |
3661 )) | |
3662 )) | |
3663 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3664 (defun gnus-summary-rmail-digest () |
257 | 3665 "Run RMAIL on current digest article. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3666 gnus-select-digest-hook will be called with no arguments, if that |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3667 value is non-nil. It is possible to modify the article so that Rmail |
257 | 3668 can work with it. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3669 gnus-rmail-digest-hook will be called with no arguments, if that value |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3670 is non-nil. The hook is intended to customize Rmail mode." |
257 | 3671 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3672 (gnus-summary-select-article) |
257 | 3673 (require 'rmail) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3674 (let ((artbuf gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3675 (digbuf (get-buffer-create gnus-digest-buffer)) |
257 | 3676 (mail-header-separator "")) |
3677 (set-buffer digbuf) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3678 (buffer-flush-undo (current-buffer)) |
257 | 3679 (setq buffer-read-only nil) |
3680 (erase-buffer) | |
3681 (insert-buffer-substring artbuf) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3682 (run-hooks 'gnus-select-digest-hook) |
257 | 3683 (gnus-convert-article-to-rmail) |
3684 (goto-char (point-min)) | |
3685 ;; Rmail initializations. | |
3686 (rmail-insert-rmail-file-header) | |
3687 (rmail-mode) | |
3688 (rmail-set-message-counters) | |
3689 (rmail-show-message) | |
3690 (condition-case () | |
3691 (progn | |
3692 (undigestify-rmail-message) | |
3693 (rmail-expunge) ;Delete original message. | |
3694 ;; File name is meaningless but `save-buffer' requires it. | |
3695 (setq buffer-file-name "GNUS Digest") | |
3696 (setq mode-line-buffer-identification | |
3697 (concat "Digest: " | |
3698 (nntp-header-subject gnus-current-headers))) | |
3699 ;; There is no need to write this buffer to a file. | |
3700 (make-local-variable 'write-file-hooks) | |
3701 (setq write-file-hooks | |
3702 (list (function | |
3703 (lambda () | |
3704 (set-buffer-modified-p nil) | |
3705 (message "(No changes need to be saved)") | |
3706 'no-need-to-write-this-buffer)))) | |
3707 ;; Default file name saving digest messages. | |
3708 (setq rmail-last-rmail-file | |
3709 (funcall gnus-rmail-save-name | |
3710 gnus-newsgroup-name | |
3711 gnus-current-headers | |
3712 gnus-newsgroup-last-rmail | |
3713 )) | |
3714 (setq rmail-last-file | |
3715 (funcall gnus-mail-save-name | |
3716 gnus-newsgroup-name | |
3717 gnus-current-headers | |
3718 gnus-newsgroup-last-mail | |
3719 )) | |
3720 ;; Prevent generating new buffer named ***<N> each time. | |
3721 (setq rmail-summary-buffer | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3722 (get-buffer-create gnus-digest-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3723 (run-hooks 'gnus-rmail-digest-hook) |
257 | 3724 ;; Take all windows safely. |
3725 (gnus-configure-windows '(1 0 0)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3726 (pop-to-buffer gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3727 ;; Use Summary Article windows for Digest summary and |
257 | 3728 ;; Digest buffers. |
3729 (if gnus-digest-show-summary | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3730 (let ((gnus-summary-buffer gnus-digest-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3731 (gnus-article-buffer gnus-digest-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3732 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3733 (pop-to-buffer gnus-digest-buffer) |
257 | 3734 (rmail-summary) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3735 (pop-to-buffer gnus-digest-summary-buffer) |
257 | 3736 (message (substitute-command-keys |
3737 "Type \\[rmail-summary-quit] to return to GNUS"))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3738 (let ((gnus-summary-buffer gnus-digest-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3739 (gnus-configure-windows 'summary) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3740 (pop-to-buffer gnus-digest-buffer) |
257 | 3741 (message (substitute-command-keys |
3742 "Type \\[rmail-quit] to return to GNUS"))) | |
3743 ) | |
3744 ;; Move the buffers to the end of buffer list. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3745 (bury-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3746 (bury-buffer gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3747 (bury-buffer gnus-digest-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3748 (bury-buffer gnus-digest-buffer)) |
257 | 3749 (error (set-buffer-modified-p nil) |
3750 (kill-buffer digbuf) | |
3751 ;; This command should not signal an error because the | |
3752 ;; command is called from hooks. | |
3753 (ding) (message "Article is not a digest"))) | |
3754 )) | |
3755 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3756 (defun gnus-summary-save-article () |
257 | 3757 "Save this article using default saver function. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3758 The variable `gnus-default-article-saver' specifies the saver function." |
257 | 3759 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3760 (gnus-summary-select-article gnus-save-all-headers gnus-save-all-headers) |
257 | 3761 (if gnus-default-article-saver |
3762 (call-interactively gnus-default-article-saver) | |
3763 (error "No default saver is defined."))) | |
3764 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3765 (defun gnus-summary-save-in-rmail (&optional filename) |
257 | 3766 "Append this article to Rmail file. |
3767 Optional argument FILENAME specifies file name. | |
3768 Directory to save to is default to `gnus-article-save-directory' which | |
3769 is initialized from the SAVEDIR environment variable." | |
3770 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3771 (gnus-summary-select-article gnus-save-all-headers gnus-save-all-headers) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3772 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3773 (save-excursion |
3774 (save-restriction | |
3775 (widen) | |
3776 (let ((default-name | |
3777 (funcall gnus-rmail-save-name | |
3778 gnus-newsgroup-name | |
3779 gnus-current-headers | |
3780 gnus-newsgroup-last-rmail | |
3781 ))) | |
3782 (or filename | |
3783 (setq filename | |
3784 (read-file-name | |
3785 (concat "Save article in Rmail file: (default " | |
3786 (file-name-nondirectory default-name) | |
3787 ") ") | |
3788 (file-name-directory default-name) | |
3789 default-name))) | |
3790 (gnus-make-directory (file-name-directory filename)) | |
3791 (gnus-output-to-rmail filename) | |
3792 ;; Remember the directory name to save articles. | |
3793 (setq gnus-newsgroup-last-rmail filename) | |
3794 ))) | |
3795 )) | |
3796 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3797 (defun gnus-summary-save-in-mail (&optional filename) |
257 | 3798 "Append this article to Unix mail file. |
3799 Optional argument FILENAME specifies file name. | |
3800 Directory to save to is default to `gnus-article-save-directory' which | |
3801 is initialized from the SAVEDIR environment variable." | |
3802 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3803 (gnus-summary-select-article gnus-save-all-headers gnus-save-all-headers) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3804 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3805 (save-excursion |
3806 (save-restriction | |
3807 (widen) | |
3808 (let ((default-name | |
3809 (funcall gnus-mail-save-name | |
3810 gnus-newsgroup-name | |
3811 gnus-current-headers | |
3812 gnus-newsgroup-last-mail | |
3813 ))) | |
3814 (or filename | |
3815 (setq filename | |
3816 (read-file-name | |
3817 (concat "Save article in Unix mail file: (default " | |
3818 (file-name-nondirectory default-name) | |
3819 ") ") | |
3820 (file-name-directory default-name) | |
3821 default-name))) | |
3822 (gnus-make-directory (file-name-directory filename)) | |
3823 (rmail-output filename) | |
3824 ;; Remember the directory name to save articles. | |
3825 (setq gnus-newsgroup-last-mail filename) | |
3826 ))) | |
3827 )) | |
3828 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3829 (defun gnus-summary-save-in-file (&optional filename) |
257 | 3830 "Append this article to file. |
3831 Optional argument FILENAME specifies file name. | |
3832 Directory to save to is default to `gnus-article-save-directory' which | |
3833 is initialized from the SAVEDIR environment variable." | |
3834 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3835 (gnus-summary-select-article gnus-save-all-headers gnus-save-all-headers) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3836 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3837 (save-excursion |
3838 (save-restriction | |
3839 (widen) | |
3840 (let ((default-name | |
3841 (funcall gnus-file-save-name | |
3842 gnus-newsgroup-name | |
3843 gnus-current-headers | |
3844 gnus-newsgroup-last-file | |
3845 ))) | |
3846 (or filename | |
3847 (setq filename | |
3848 (read-file-name | |
3849 (concat "Save article in file: (default " | |
3850 (file-name-nondirectory default-name) | |
3851 ") ") | |
3852 (file-name-directory default-name) | |
3853 default-name))) | |
3854 (gnus-make-directory (file-name-directory filename)) | |
3855 (gnus-output-to-file filename) | |
3856 ;; Remember the directory name to save articles. | |
3857 (setq gnus-newsgroup-last-file filename) | |
3858 ))) | |
3859 )) | |
3860 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3861 (defun gnus-summary-save-in-folder (&optional folder) |
257 | 3862 "Save this article to MH folder (using `rcvstore' in MH library). |
3863 Optional argument FOLDER specifies folder name." | |
3864 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3865 (gnus-summary-select-article gnus-save-all-headers gnus-save-all-headers) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3866 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3867 (save-restriction |
3868 (widen) | |
3869 ;; Thanks to yuki@flab.Fujitsu.JUNET and ohm@kaba.junet. | |
3870 (mh-find-path) | |
3871 (let ((folder | |
3872 (or folder | |
3873 (mh-prompt-for-folder "Save article in" | |
3874 (funcall gnus-folder-save-name | |
3875 gnus-newsgroup-name | |
3876 gnus-current-headers | |
3877 gnus-newsgroup-last-folder | |
3878 ) | |
3879 t | |
3880 ))) | |
3881 (errbuf (get-buffer-create " *GNUS rcvstore*"))) | |
3882 (unwind-protect | |
3883 (call-process-region (point-min) (point-max) | |
3884 (expand-file-name "rcvstore" mh-lib) | |
3885 nil errbuf nil folder) | |
3886 (set-buffer errbuf) | |
3887 (if (zerop (buffer-size)) | |
3888 (message "Article saved in folder: %s" folder) | |
3889 (message "%s" (buffer-string))) | |
3890 (kill-buffer errbuf) | |
3891 (setq gnus-newsgroup-last-folder folder)) | |
3892 )) | |
3893 )) | |
3894 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3895 (defun gnus-summary-pipe-output () |
257 | 3896 "Pipe this article to subprocess." |
3897 (interactive) | |
3898 ;; Ignore `gnus-save-all-headers' since this is not save command. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3899 ;;(gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3900 ;; Huuum. Is this right? |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3901 (gnus-summary-select-article gnus-save-all-headers gnus-save-all-headers) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3902 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3903 (save-restriction |
3904 (widen) | |
3905 (let ((command (read-string "Shell command on article: " | |
3906 gnus-last-shell-command))) | |
3907 (if (string-equal command "") | |
3908 (setq command gnus-last-shell-command)) | |
3909 (shell-command-on-region (point-min) (point-max) command nil) | |
3910 (setq gnus-last-shell-command command) | |
3911 )) | |
3912 )) | |
3913 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3914 (defun gnus-summary-catchup (all &optional quietly) |
257 | 3915 "Mark all articles not marked as unread in this newsgroup as read. |
3916 If prefix argument ALL is non-nil, all articles are marked as read." | |
3917 (interactive "P") | |
3918 (if (or quietly | |
3919 (y-or-n-p | |
3920 (if all | |
3921 "Do you really want to mark everything as read? " | |
3922 "Delete all articles not marked as unread? "))) | |
3923 (let ((unmarked | |
3924 (gnus-set-difference gnus-newsgroup-unreads | |
3925 (if (not all) gnus-newsgroup-marked)))) | |
3926 (message "") ;Erase "Yes or No" question. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3927 ;; Hidden thread subtrees must be searched for ,too. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3928 (gnus-summary-show-all-threads) |
257 | 3929 (while unmarked |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3930 (gnus-summary-mark-as-read (car unmarked) "C") |
257 | 3931 (setq unmarked (cdr unmarked)) |
3932 )) | |
3933 )) | |
3934 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3935 (defun gnus-summary-catchup-all (&optional quietly) |
257 | 3936 "Mark all articles in this newsgroup as read." |
3937 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3938 (gnus-summary-catchup t quietly)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3939 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3940 (defun gnus-summary-catchup-and-exit (all &optional quietly) |
257 | 3941 "Mark all articles not marked as unread in this newsgroup as read, then exit. |
3942 If prefix argument ALL is non-nil, all articles are marked as read." | |
3943 (interactive "P") | |
3944 (if (or quietly | |
3945 (y-or-n-p | |
3946 (if all | |
3947 "Do you really want to mark everything as read? " | |
3948 "Delete all articles not marked as unread? "))) | |
3949 (let ((unmarked | |
3950 (gnus-set-difference gnus-newsgroup-unreads | |
3951 (if (not all) gnus-newsgroup-marked)))) | |
3952 (message "") ;Erase "Yes or No" question. | |
3953 (while unmarked | |
3954 (gnus-mark-article-as-read (car unmarked)) | |
3955 (setq unmarked (cdr unmarked))) | |
3956 ;; Select next newsgroup or exit. | |
3957 (cond ((eq gnus-auto-select-next 'quietly) | |
3958 ;; Select next newsgroup quietly. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3959 (gnus-summary-next-group nil)) |
257 | 3960 (t |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3961 (gnus-summary-exit))) |
257 | 3962 ))) |
3963 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3964 (defun gnus-summary-catchup-all-and-exit (&optional quietly) |
257 | 3965 "Mark all articles in this newsgroup as read, and then exit." |
3966 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3967 (gnus-summary-catchup-and-exit t quietly)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3968 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3969 (defun gnus-summary-edit-global-kill () |
257 | 3970 "Edit a global KILL file." |
3971 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3972 (setq gnus-current-kill-article (gnus-summary-article-number)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3973 (gnus-kill-file-edit-file nil) ;Nil stands for global KILL file. |
257 | 3974 (message |
3975 (substitute-command-keys | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3976 "Editing a global KILL file (Type \\[gnus-kill-file-exit] to exit)"))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3977 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3978 (defun gnus-summary-edit-local-kill () |
257 | 3979 "Edit a local KILL file applied to the current newsgroup." |
3980 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3981 (setq gnus-current-kill-article (gnus-summary-article-number)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3982 (gnus-kill-file-edit-file gnus-newsgroup-name) |
257 | 3983 (message |
3984 (substitute-command-keys | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3985 "Editing a local KILL file (Type \\[gnus-kill-file-exit] to exit)"))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3986 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3987 (defun gnus-summary-exit (&optional temporary) |
257 | 3988 "Exit reading current newsgroup, and then return to group selection mode. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3989 gnus-exit-group-hook is called with no arguments if that value is non-nil." |
257 | 3990 (interactive) |
3991 (let ((updated nil) | |
3992 (gnus-newsgroup-headers gnus-newsgroup-headers) | |
3993 (gnus-newsgroup-unreads gnus-newsgroup-unreads) | |
3994 (gnus-newsgroup-unselected gnus-newsgroup-unselected) | |
3995 (gnus-newsgroup-marked gnus-newsgroup-marked)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3996 ;; Important internal variables are saved, so we can reenter |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3997 ;; Summary buffer even if hook changes them. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3998 (run-hooks 'gnus-exit-group-hook) |
257 | 3999 (gnus-update-unread-articles gnus-newsgroup-name |
4000 (append gnus-newsgroup-unselected | |
4001 gnus-newsgroup-unreads) | |
4002 gnus-newsgroup-marked) | |
4003 ;; T means ignore unsubscribed newsgroups. | |
4004 (if gnus-use-cross-reference | |
4005 (setq updated | |
4006 (gnus-mark-as-read-by-xref gnus-newsgroup-name | |
4007 gnus-newsgroup-headers | |
4008 gnus-newsgroup-unreads | |
4009 (eq gnus-use-cross-reference t) | |
4010 ))) | |
4011 ;; Do not switch windows but change the buffer to work. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4012 (set-buffer gnus-group-buffer) |
257 | 4013 ;; Update cross referenced group info. |
4014 (while updated | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4015 (gnus-group-update-group (car updated) t) ;Ignore invisible group. |
257 | 4016 (setq updated (cdr updated))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4017 (gnus-group-update-group gnus-newsgroup-name)) |
257 | 4018 ;; Make sure where I was, and go to next newsgroup. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4019 (gnus-group-jump-to-group gnus-newsgroup-name) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4020 (gnus-group-next-unread-group 1) |
257 | 4021 (if temporary |
4022 ;; If exiting temporary, caller should adjust Group mode | |
4023 ;; buffer point by itself. | |
4024 nil ;Nothing to do. | |
4025 ;; Return to Group mode buffer. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4026 (if (get-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4027 (bury-buffer gnus-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4028 (if (get-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4029 (bury-buffer gnus-article-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4030 (gnus-configure-windows 'newsgroups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4031 (pop-to-buffer gnus-group-buffer))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4032 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4033 (defun gnus-summary-quit () |
257 | 4034 "Quit reading current newsgroup without updating read article info." |
4035 (interactive) | |
4036 (if (y-or-n-p "Do you really wanna quit reading this group? ") | |
4037 (progn | |
4038 (message "") ;Erase "Yes or No" question. | |
4039 ;; Return to Group selection mode. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4040 (if (get-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4041 (bury-buffer gnus-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4042 (if (get-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4043 (bury-buffer gnus-article-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4044 (gnus-configure-windows 'newsgroups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4045 (pop-to-buffer gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4046 (gnus-group-jump-to-group gnus-newsgroup-name) ;Make sure where I was. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4047 (gnus-group-next-group 1) ;(gnus-group-next-unread-group 1) |
257 | 4048 ))) |
4049 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4050 (defun gnus-summary-describe-briefly () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4051 "Describe Summary mode commands briefly." |
257 | 4052 (interactive) |
4053 (message | |
4054 (concat | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4055 (substitute-command-keys "\\[gnus-summary-next-page]:Select ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4056 (substitute-command-keys "\\[gnus-summary-next-unread-article]:Forward ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4057 (substitute-command-keys "\\[gnus-summary-prev-unread-article]:Backward ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4058 (substitute-command-keys "\\[gnus-summary-exit]:Exit ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4059 (substitute-command-keys "\\[gnus-info-find-node]:Run Info ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4060 (substitute-command-keys "\\[gnus-summary-describe-briefly]:This help") |
257 | 4061 ))) |
4062 | |
4063 | |
4064 ;;; | |
4065 ;;; GNUS Article Mode | |
4066 ;;; | |
4067 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4068 (if gnus-article-mode-map |
257 | 4069 nil |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4070 (setq gnus-article-mode-map (make-keymap)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4071 (suppress-keymap gnus-article-mode-map) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4072 (define-key gnus-article-mode-map " " 'gnus-article-next-page) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4073 (define-key gnus-article-mode-map "\177" 'gnus-article-prev-page) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4074 (define-key gnus-article-mode-map "r" 'gnus-article-refer-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4075 (define-key gnus-article-mode-map "o" 'gnus-article-pop-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4076 (define-key gnus-article-mode-map "h" 'gnus-article-show-summary) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4077 (define-key gnus-article-mode-map "s" 'gnus-article-show-summary) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4078 (define-key gnus-article-mode-map "?" 'gnus-article-describe-briefly) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4079 (define-key gnus-article-mode-map "\C-c\C-i" 'gnus-info-find-node)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4080 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4081 (defun gnus-article-mode () |
257 | 4082 "Major mode for browsing through an article. |
4083 All normal editing commands are turned off. | |
4084 Instead, these commands are available: | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4085 \\{gnus-article-mode-map} |
257 | 4086 |
4087 Various hooks for customization: | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4088 gnus-article-mode-hook |
257 | 4089 Entry to this mode calls the value with no arguments, if that |
4090 value is non-nil. | |
4091 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4092 gnus-article-prepare-hook |
257 | 4093 Called with no arguments after an article is prepared for reading, |
4094 if that value is non-nil." | |
4095 (interactive) | |
4096 (kill-all-local-variables) | |
4097 ;; Gee. Why don't you upgrade? | |
4098 (cond ((boundp 'mode-line-modified) | |
4099 (setq mode-line-modified "--- ")) | |
4100 ((listp (default-value 'mode-line-format)) | |
4101 (setq mode-line-format | |
4102 (cons "--- " (cdr (default-value 'mode-line-format)))))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4103 ;; To disable display-time facility. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4104 ;;(make-local-variable 'global-mode-string) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4105 ;;(setq global-mode-string nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4106 (setq major-mode 'gnus-article-mode) |
257 | 4107 (setq mode-name "Article") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4108 (make-local-variable 'minor-mode-alist) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4109 (or (assq 'gnus-show-mime minor-mode-alist) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4110 (setq minor-mode-alist |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4111 (cons (list 'gnus-show-mime " MIME") minor-mode-alist))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4112 (gnus-article-set-mode-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4113 (use-local-map gnus-article-mode-map) |
257 | 4114 (make-local-variable 'page-delimiter) |
4115 (setq page-delimiter gnus-page-delimiter) | |
4116 (make-local-variable 'mail-header-separator) | |
4117 (setq mail-header-separator "") ;For caesar function. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4118 (buffer-flush-undo (current-buffer)) |
257 | 4119 (setq buffer-read-only t) ;Disable modification |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4120 (run-hooks 'gnus-article-mode-hook)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4121 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4122 (defun gnus-article-setup-buffer () |
257 | 4123 "Initialize Article mode buffer." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4124 (or (get-buffer gnus-article-buffer) |
257 | 4125 (save-excursion |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4126 (set-buffer (get-buffer-create gnus-article-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4127 (gnus-article-mode)) |
257 | 4128 )) |
4129 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4130 (defun gnus-article-prepare (article &optional all-headers) |
257 | 4131 "Prepare ARTICLE in Article mode buffer. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4132 ARTICLE can be either a article number or Message-ID. |
257 | 4133 If optional argument ALL-HEADERS is non-nil, all headers are inserted." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4134 ;; Make sure a connection to NNTP server is alive. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4135 (if (not (gnus-server-opened)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4136 (progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4137 (gnus-start-news-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4138 (gnus-request-group gnus-newsgroup-name))) |
257 | 4139 (save-excursion |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4140 (set-buffer gnus-article-buffer) |
257 | 4141 (let ((buffer-read-only nil)) |
4142 (erase-buffer) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4143 ;; mhspool does not work with Message-ID. So, let's translate |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4144 ;; it into an article number as possible as can. This may help |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4145 ;; nnspool too. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4146 ;; Note: this conversion must be done here since if the article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4147 ;; is specified by number or message-id has a different meaning |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4148 ;; in the following. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4149 (if (let* ((header |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4150 (and (stringp article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4151 (gnus-get-header-by-id article))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4152 (article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4153 (if header |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4154 (nntp-header-number header) article))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4155 (gnus-request-article article)) |
257 | 4156 (progn |
4157 ;; Prepare article buffer | |
4158 (insert-buffer-substring nntp-server-buffer) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4159 ;; gnus-have-all-headers must be either T or NIL. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4160 (setq gnus-have-all-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4161 (not (not (or all-headers gnus-show-all-headers)))) |
257 | 4162 (if (and (numberp article) |
4163 (not (eq article gnus-current-article))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4164 ;; Seems me that a new article has been selected. |
257 | 4165 (progn |
4166 ;; gnus-current-article must be an article number. | |
4167 (setq gnus-last-article gnus-current-article) | |
4168 (setq gnus-current-article article) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4169 ;; (setq gnus-current-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4170 ;; (gnus-find-header-by-number gnus-newsgroup-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4171 ;; gnus-current-article)) |
257 | 4172 (setq gnus-current-headers |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4173 (gnus-get-header-by-number gnus-current-article)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4174 (run-hooks 'gnus-mark-article-hook) |
257 | 4175 )) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4176 ;; Clear article history only when the article is |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4177 ;; retrieved by the article number. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4178 (if (numberp article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4179 (setq gnus-current-history nil)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4180 ;; Hooks for modifying contents of the article. This hook |
257 | 4181 ;; must be called before being narrowed. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4182 (run-hooks 'gnus-article-prepare-hook) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4183 ;; Decode MIME message. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4184 (if (and gnus-show-mime |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4185 (gnus-fetch-field "Mime-Version")) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4186 (funcall gnus-show-mime-method)) |
257 | 4187 ;; Delete unnecessary headers. |
4188 (or gnus-have-all-headers | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4189 (gnus-article-delete-headers)) |
257 | 4190 ;; Do page break. |
4191 (goto-char (point-min)) | |
4192 (if gnus-break-pages | |
4193 (gnus-narrow-to-page)) | |
4194 ;; Next function must be called after setting | |
4195 ;; `gnus-current-article' variable and narrowed to page. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4196 (gnus-article-set-mode-line) |
257 | 4197 ) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4198 ;; There is no such article. |
257 | 4199 (if (numberp article) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4200 (gnus-summary-mark-as-read article)) |
257 | 4201 (ding) (message "No such article (may be canceled)")) |
4202 ))) | |
4203 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4204 (defun gnus-article-show-all-headers () |
257 | 4205 "Show all article headers in Article mode buffer." |
4206 (or gnus-have-all-headers | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4207 (gnus-article-prepare gnus-current-article t))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4208 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4209 ;;(defun gnus-article-set-mode-line () |
257 | 4210 ;; "Set Article mode line string." |
4211 ;; (setq mode-line-buffer-identification | |
4212 ;; (list 17 | |
4213 ;; (format "GNUS: %s {%d-%d} %d" | |
4214 ;; gnus-newsgroup-name | |
4215 ;; gnus-newsgroup-begin | |
4216 ;; gnus-newsgroup-end | |
4217 ;; gnus-current-article | |
4218 ;; ))) | |
4219 ;; (set-buffer-modified-p t)) | |
4220 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4221 ;;(defun gnus-article-set-mode-line () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4222 ;; "Set Article mode line string." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4223 ;; (let ((unmarked |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4224 ;; (- (length gnus-newsgroup-unreads) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4225 ;; (length (gnus-intersection |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4226 ;; gnus-newsgroup-unreads gnus-newsgroup-marked)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4227 ;; (unselected |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4228 ;; (- (length gnus-newsgroup-unselected) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4229 ;; (length (gnus-intersection |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4230 ;; gnus-newsgroup-unselected gnus-newsgroup-marked))))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4231 ;; (setq mode-line-buffer-identification |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4232 ;; (list 17 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4233 ;; (format "GNUS: %s{%d} %s" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4234 ;; gnus-newsgroup-name |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4235 ;; gnus-current-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4236 ;; ;; This is proposed by tale@pawl.rpi.edu. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4237 ;; (cond ((and (zerop unmarked) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4238 ;; (zerop unselected)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4239 ;; " ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4240 ;; ((zerop unselected) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4241 ;; (format "%d more" unmarked)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4242 ;; (t |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4243 ;; (format "%d(+%d) more" unmarked unselected))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4244 ;; )))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4245 ;; (set-buffer-modified-p t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4246 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4247 ;; New implementation in gnus 3.14.3 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4248 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4249 (defun gnus-article-set-mode-line () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4250 "Set Article mode line string. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4251 If you don't like it, define your own gnus-article-set-mode-line." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4252 (let ((maxlen 15) ;Maximum subject length |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4253 (subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4254 (if gnus-current-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4255 (nntp-header-subject gnus-current-headers) ""))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4256 ;; The value must be a string to escape %-constructs because of subject. |
257 | 4257 (setq mode-line-buffer-identification |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4258 (format "GNUS: %s%s %s%s%s" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4259 gnus-newsgroup-name |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4260 (if gnus-current-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4261 (format "/%d" gnus-current-article) "") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4262 (substring subject 0 (min (length subject) maxlen)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4263 (if (> (length subject) maxlen) "..." "") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4264 (make-string (max 0 (- 17 (length subject))) ? ) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4265 ))) |
257 | 4266 (set-buffer-modified-p t)) |
4267 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4268 (defun gnus-article-delete-headers () |
257 | 4269 "Delete unnecessary headers." |
4270 (save-excursion | |
4271 (save-restriction | |
4272 (goto-char (point-min)) | |
4273 (narrow-to-region (point-min) | |
4274 (progn (search-forward "\n\n" nil 'move) (point))) | |
4275 (goto-char (point-min)) | |
4276 (and (stringp gnus-ignored-headers) | |
4277 (while (re-search-forward gnus-ignored-headers nil t) | |
4278 (beginning-of-line) | |
4279 (delete-region (point) | |
4280 (progn (re-search-forward "\n[^ \t]") | |
4281 (forward-char -1) | |
4282 (point))))) | |
4283 ))) | |
4284 | |
4285 ;; Working on article's buffer | |
4286 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4287 (defun gnus-article-next-page (lines) |
257 | 4288 "Show next page of current article. |
4289 If end of article, return non-nil. Otherwise return nil. | |
4290 Argument LINES specifies lines to be scrolled up." | |
4291 (interactive "P") | |
4292 (move-to-window-line -1) | |
4293 ;; Fixed by enami@ptgd.sony.co.jp (enami tsugutomo) | |
4294 (if (save-excursion | |
4295 (end-of-line) | |
4296 (and (pos-visible-in-window-p) ;Not continuation line. | |
4297 (eobp))) | |
4298 ;; Nothing in this page. | |
4299 (if (or (not gnus-break-pages) | |
4300 (save-excursion | |
4301 (save-restriction | |
4302 (widen) (forward-line 1) (eobp)))) ;Real end-of-buffer? | |
4303 t ;Nothing more. | |
4304 (gnus-narrow-to-page 1) ;Go to next page. | |
4305 nil | |
4306 ) | |
4307 ;; More in this page. | |
4308 (condition-case () | |
4309 (scroll-up lines) | |
4310 (end-of-buffer | |
4311 ;; Long lines may cause an end-of-buffer error. | |
4312 (goto-char (point-max)))) | |
4313 nil | |
4314 )) | |
4315 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4316 (defun gnus-article-prev-page (lines) |
257 | 4317 "Show previous page of current article. |
4318 Argument LINES specifies lines to be scrolled down." | |
4319 (interactive "P") | |
4320 (move-to-window-line 0) | |
4321 (if (and gnus-break-pages | |
4322 (bobp) | |
4323 (not (save-restriction (widen) (bobp)))) ;Real beginning-of-buffer? | |
4324 (progn | |
4325 (gnus-narrow-to-page -1) ;Go to previous page. | |
4326 (goto-char (point-max)) | |
4327 (recenter -1)) | |
4328 (scroll-down lines))) | |
4329 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4330 (defun gnus-article-next-digest (nth) |
257 | 4331 "Move to head of NTH next digested message. |
4332 Set mark at end of digested message." | |
4333 ;; Stop page breaking in digest mode. | |
4334 (widen) | |
4335 (end-of-line) | |
4336 ;; Skip NTH - 1 digest. | |
4337 ;; Suggested by Khalid Sattar <admin@cs.exeter.ac.uk>. | |
4338 ;; Digest separator is customizable. | |
4339 ;; Suggested by Skip Montanaro <montanaro@sprite.crd.ge.com>. | |
4340 (while (and (> nth 1) | |
4341 (re-search-forward gnus-digest-separator nil 'move)) | |
4342 (setq nth (1- nth))) | |
4343 (if (re-search-forward gnus-digest-separator nil t) | |
4344 (let ((begin (point))) | |
4345 ;; Search for end of this message. | |
4346 (end-of-line) | |
4347 (if (re-search-forward gnus-digest-separator nil t) | |
4348 (progn | |
4349 (search-backward "\n\n") ;This may be incorrect. | |
4350 (forward-line 1)) | |
4351 (goto-char (point-max))) | |
4352 (push-mark) ;Set mark at end of digested message. | |
4353 (goto-char begin) | |
4354 (beginning-of-line) | |
4355 ;; Show From: and Subject: fields. | |
4356 (recenter 1)) | |
4357 (message "End of message") | |
4358 )) | |
4359 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4360 (defun gnus-article-prev-digest (nth) |
257 | 4361 "Move to head of NTH previous digested message." |
4362 ;; Stop page breaking in digest mode. | |
4363 (widen) | |
4364 (beginning-of-line) | |
4365 ;; Skip NTH - 1 digest. | |
4366 ;; Suggested by Khalid Sattar <admin@cs.exeter.ac.uk>. | |
4367 ;; Digest separator is customizable. | |
4368 ;; Suggested by Skip Montanaro <montanaro@sprite.crd.ge.com>. | |
4369 (while (and (> nth 1) | |
4370 (re-search-backward gnus-digest-separator nil 'move)) | |
4371 (setq nth (1- nth))) | |
4372 (if (re-search-backward gnus-digest-separator nil t) | |
4373 (let ((begin (point))) | |
4374 ;; Search for end of this message. | |
4375 (end-of-line) | |
4376 (if (re-search-forward gnus-digest-separator nil t) | |
4377 (progn | |
4378 (search-backward "\n\n") ;This may be incorrect. | |
4379 (forward-line 1)) | |
4380 (goto-char (point-max))) | |
4381 (push-mark) ;Set mark at end of digested message. | |
4382 (goto-char begin) | |
4383 ;; Show From: and Subject: fields. | |
4384 (recenter 1)) | |
4385 (goto-char (point-min)) | |
4386 (message "Top of message") | |
4387 )) | |
4388 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4389 (defun gnus-article-refer-article () |
257 | 4390 "Read article specified by message-id around point." |
4391 (interactive) | |
4392 (save-window-excursion | |
4393 (save-excursion | |
4394 (re-search-forward ">" nil t) ;Move point to end of "<....>". | |
4395 (if (re-search-backward "\\(<[^<> \t\n]+>\\)" nil t) | |
4396 (let ((message-id | |
4397 (buffer-substring (match-beginning 1) (match-end 1)))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4398 (set-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4399 (gnus-summary-refer-article message-id)) |
257 | 4400 (error "No references around point")) |
4401 ))) | |
4402 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4403 (defun gnus-article-pop-article () |
257 | 4404 "Pop up article history." |
4405 (interactive) | |
4406 (save-window-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4407 (set-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4408 (gnus-summary-refer-article nil))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4409 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4410 (defun gnus-article-show-summary () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4411 "Reconfigure windows to show Summary buffer." |
257 | 4412 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4413 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4414 (pop-to-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4415 (gnus-summary-goto-subject gnus-current-article)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4416 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4417 (defun gnus-article-describe-briefly () |
257 | 4418 "Describe Article mode commands briefly." |
4419 (interactive) | |
4420 (message | |
4421 (concat | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4422 (substitute-command-keys "\\[gnus-article-next-page]:Next page ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4423 (substitute-command-keys "\\[gnus-article-prev-page]:Prev page ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4424 (substitute-command-keys "\\[gnus-article-show-summary]:Show Summary ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4425 (substitute-command-keys "\\[gnus-info-find-node]:Run Info ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4426 (substitute-command-keys "\\[gnus-article-describe-briefly]:This help") |
257 | 4427 ))) |
4428 | |
4429 | |
4430 ;;; | |
4431 ;;; GNUS KILL-File Mode | |
4432 ;;; | |
4433 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4434 (if gnus-kill-file-mode-map |
257 | 4435 nil |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4436 (setq gnus-kill-file-mode-map (copy-keymap emacs-lisp-mode-map)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4437 (define-key gnus-kill-file-mode-map "\C-c\C-k\C-s" 'gnus-kill-file-kill-by-subject) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4438 (define-key gnus-kill-file-mode-map "\C-c\C-k\C-a" 'gnus-kill-file-kill-by-author) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4439 (define-key gnus-kill-file-mode-map "\C-c\C-a" 'gnus-kill-file-apply-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4440 (define-key gnus-kill-file-mode-map "\C-c\C-e" 'gnus-kill-file-apply-last-sexp) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4441 (define-key gnus-kill-file-mode-map "\C-c\C-c" 'gnus-kill-file-exit) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4442 (define-key gnus-kill-file-mode-map "\C-c\C-i" 'gnus-info-find-node)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4443 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4444 (defun gnus-kill-file-mode () |
257 | 4445 "Major mode for editing KILL file. |
4446 | |
4447 In addition to Emacs-Lisp Mode, the following commands are available: | |
4448 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4449 \\[gnus-kill-file-kill-by-subject] Insert KILL command for current subject. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4450 \\[gnus-kill-file-kill-by-author] Insert KILL command for current author. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4451 \\[gnus-kill-file-apply-buffer] Apply current buffer to selected newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4452 \\[gnus-kill-file-apply-last-sexp] Apply sexp before point to selected newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4453 \\[gnus-kill-file-exit] Save file and exit editing KILL file. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4454 \\[gnus-info-find-node] Read Info about KILL file. |
257 | 4455 |
4456 A KILL file contains lisp expressions to be applied to a selected | |
4457 newsgroup. The purpose is to mark articles as read on the basis of | |
4458 some set of regexps. A global KILL file is applied to every newsgroup, | |
4459 and a local KILL file is applied to a specified newsgroup. Since a | |
4460 global KILL file is applied to every newsgroup, for better performance | |
4461 use a local one. | |
4462 | |
4463 A KILL file can contain any kind of Emacs lisp expressions expected | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4464 to be evaluated in the Summary buffer. Writing lisp programs for this |
257 | 4465 purpose is not so easy because the internal working of GNUS must be |
4466 well-known. For this reason, GNUS provides a general function which | |
4467 does this easily for non-Lisp programmers. | |
4468 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4469 The `gnus-kill' function executes commands available in Summary Mode |
257 | 4470 by their key sequences. `gnus-kill' should be called with FIELD, |
4471 REGEXP and optional COMMAND and ALL. FIELD is a string representing | |
4472 the header field or an empty string. If FIELD is an empty string, the | |
4473 entire article body is searched for. REGEXP is a string which is | |
4474 compared with FIELD value. COMMAND is a string representing a valid | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4475 key sequence in Summary Mode or Lisp expression. COMMAND is default to |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4476 '(gnus-summary-mark-as-read nil \"X\"). Make sure that COMMAND is |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4477 executed in the Summary buffer. If the second optional argument ALL |
257 | 4478 is non-nil, the COMMAND is applied to articles which are already |
4479 marked as read or unread. Articles which are marked are skipped over | |
4480 by default. | |
4481 | |
4482 For example, if you want to mark articles of which subjects contain | |
4483 the string `AI' as read, a possible KILL file may look like: | |
4484 | |
4485 (gnus-kill \"Subject\" \"AI\") | |
4486 | |
4487 If you want to mark articles with `D' instead of `X', you can use | |
4488 the following expression: | |
4489 | |
4490 (gnus-kill \"Subject\" \"AI\" \"d\") | |
4491 | |
4492 In this example it is assumed that the command | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4493 `gnus-summary-mark-as-read-forward' is assigned to `d' in Summary Mode. |
257 | 4494 |
4495 It is possible to delete unnecessary headers which are marked with | |
4496 `X' in a KILL file as follows: | |
4497 | |
4498 (gnus-expunge \"X\") | |
4499 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4500 If the Summary buffer is empty after applying KILL files, GNUS will |
257 | 4501 exit the selected newsgroup normally. If headers which are marked |
4502 with `D' are deleted in a KILL file, it is impossible to read articles | |
4503 which are marked as read in the previous GNUS sessions. Marks other | |
4504 than `D' should be used for articles which should really be deleted. | |
4505 | |
4506 Entry to this mode calls emacs-lisp-mode-hook and | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4507 gnus-kill-file-mode-hook with no arguments, if that value is non-nil." |
257 | 4508 (interactive) |
4509 (kill-all-local-variables) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4510 (use-local-map gnus-kill-file-mode-map) |
257 | 4511 (set-syntax-table emacs-lisp-mode-syntax-table) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4512 (setq major-mode 'gnus-kill-file-mode) |
257 | 4513 (setq mode-name "KILL-File") |
4514 (lisp-mode-variables nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4515 (run-hooks 'emacs-lisp-mode-hook 'gnus-kill-file-mode-hook)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4516 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4517 (defun gnus-kill-file-edit-file (newsgroup) |
257 | 4518 "Begin editing a KILL file of NEWSGROUP. |
4519 If NEWSGROUP is nil, the global KILL file is selected." | |
4520 (interactive "sNewsgroup: ") | |
4521 (let ((file (gnus-newsgroup-kill-file newsgroup))) | |
4522 (gnus-make-directory (file-name-directory file)) | |
4523 ;; Save current window configuration if this is first invocation. | |
4524 (or (and (get-file-buffer file) | |
4525 (get-buffer-window (get-file-buffer file))) | |
4526 (setq gnus-winconf-kill-file (current-window-configuration))) | |
4527 ;; Hack windows. | |
4528 (let ((buffer (find-file-noselect file))) | |
4529 (cond ((get-buffer-window buffer) | |
4530 (pop-to-buffer buffer)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4531 ((eq major-mode 'gnus-group-mode) |
257 | 4532 (gnus-configure-windows '(1 0 0)) ;Take all windows. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4533 (pop-to-buffer gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4534 (let ((gnus-summary-buffer buffer)) |
257 | 4535 (gnus-configure-windows '(1 1 0)) ;Split into two. |
4536 (pop-to-buffer buffer))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4537 ((eq major-mode 'gnus-summary-mode) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4538 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4539 (pop-to-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4540 (bury-buffer gnus-article-buffer) |
257 | 4541 (switch-to-buffer buffer)) |
4542 (t ;No good rules. | |
4543 (find-file-other-window file)) | |
4544 )) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4545 (gnus-kill-file-mode) |
257 | 4546 )) |
4547 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4548 (defun gnus-kill-file-kill-by-subject () |
257 | 4549 "Insert KILL command for current subject." |
4550 (interactive) | |
4551 (insert | |
4552 (format "(gnus-kill \"Subject\" %s)\n" | |
4553 (prin1-to-string | |
4554 (if gnus-current-kill-article | |
4555 (regexp-quote | |
4556 (nntp-header-subject | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4557 ;; No need to speed up this command. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4558 ;;(gnus-get-header-by-number gnus-current-kill-article) |
257 | 4559 (gnus-find-header-by-number gnus-newsgroup-headers |
4560 gnus-current-kill-article))) | |
4561 ""))))) | |
4562 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4563 (defun gnus-kill-file-kill-by-author () |
257 | 4564 "Insert KILL command for current author." |
4565 (interactive) | |
4566 (insert | |
4567 (format "(gnus-kill \"From\" %s)\n" | |
4568 (prin1-to-string | |
4569 (if gnus-current-kill-article | |
4570 (regexp-quote | |
4571 (nntp-header-from | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4572 ;; No need to speed up this command. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4573 ;;(gnus-get-header-by-number gnus-current-kill-article) |
257 | 4574 (gnus-find-header-by-number gnus-newsgroup-headers |
4575 gnus-current-kill-article))) | |
4576 ""))))) | |
4577 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4578 (defun gnus-kill-file-apply-buffer () |
257 | 4579 "Apply current buffer to current newsgroup." |
4580 (interactive) | |
4581 (if (and gnus-current-kill-article | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4582 (get-buffer gnus-summary-buffer)) |
257 | 4583 ;; Assume newsgroup is selected. |
4584 (let ((string (concat "(progn \n" (buffer-string) "\n)" ))) | |
4585 (save-excursion | |
4586 (save-window-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4587 (pop-to-buffer gnus-summary-buffer) |
257 | 4588 (eval (car (read-from-string string)))))) |
4589 (ding) (message "No newsgroup is selected."))) | |
4590 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4591 (defun gnus-kill-file-apply-last-sexp () |
257 | 4592 "Apply sexp before point in current buffer to current newsgroup." |
4593 (interactive) | |
4594 (if (and gnus-current-kill-article | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4595 (get-buffer gnus-summary-buffer)) |
257 | 4596 ;; Assume newsgroup is selected. |
4597 (let ((string | |
4598 (buffer-substring | |
4599 (save-excursion (forward-sexp -1) (point)) (point)))) | |
4600 (save-excursion | |
4601 (save-window-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4602 (pop-to-buffer gnus-summary-buffer) |
257 | 4603 (eval (car (read-from-string string)))))) |
4604 (ding) (message "No newsgroup is selected."))) | |
4605 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4606 (defun gnus-kill-file-exit () |
257 | 4607 "Save a KILL file, then return to the previous buffer." |
4608 (interactive) | |
4609 (save-buffer) | |
4610 (let ((killbuf (current-buffer))) | |
4611 ;; We don't want to return to Article buffer. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4612 (and (get-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4613 (bury-buffer (get-buffer gnus-article-buffer))) |
257 | 4614 ;; Delete the KILL file windows. |
4615 (delete-windows-on killbuf) | |
4616 ;; Restore last window configuration if available. | |
4617 (and gnus-winconf-kill-file | |
4618 (set-window-configuration gnus-winconf-kill-file)) | |
4619 (setq gnus-winconf-kill-file nil) | |
4620 ;; Kill the KILL file buffer. Suggested by tale@pawl.rpi.edu. | |
4621 (kill-buffer killbuf))) | |
4622 | |
4623 | |
4624 ;;; | |
4625 ;;; Utility functions | |
4626 ;;; | |
4627 | |
4628 ;; Basic ideas by emv@math.lsa.umich.edu (Edward Vielmetti) | |
4629 | |
4630 (defun gnus-batch-kill () | |
4631 "Run batched KILL. | |
4632 Usage: emacs -batch -l gnus -f gnus-batch-kill NEWSGROUP ..." | |
4633 (if (not noninteractive) | |
4634 (error "gnus-batch-kill is to be used only with -batch")) | |
4635 (let* ((group nil) | |
4636 (subscribed nil) | |
4637 (newsrc nil) | |
4638 (yes-and-no | |
4639 (gnus-parse-n-options | |
4640 (apply (function concat) | |
4641 (mapcar (function (lambda (g) (concat g " "))) | |
4642 command-line-args-left)))) | |
4643 (yes (car yes-and-no)) | |
4644 (no (cdr yes-and-no)) | |
4645 ;; Disable verbose message. | |
4646 (gnus-novice-user nil) | |
4647 (gnus-large-newsgroup nil) | |
4648 (nntp-large-newsgroup nil)) | |
4649 ;; Eat all arguments. | |
4650 (setq command-line-args-left nil) | |
4651 ;; Startup GNUS. | |
4652 (gnus) | |
4653 ;; Apply kills to specified newsgroups in command line arguments. | |
4654 (setq newsrc (copy-sequence gnus-newsrc-assoc)) | |
4655 (while newsrc | |
4656 (setq group (car (car newsrc))) | |
4657 (setq subscribed (nth 1 (car newsrc))) | |
4658 (setq newsrc (cdr newsrc)) | |
4659 (if (and subscribed | |
4660 (not (zerop (nth 1 (gnus-gethash group gnus-unread-hashtb)))) | |
4661 (if yes | |
4662 (string-match yes group) t) | |
4663 (or (null no) | |
4664 (not (string-match no group)))) | |
4665 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4666 (gnus-summary-read-group group nil t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4667 (if (eq (current-buffer) (get-buffer gnus-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4668 (gnus-summary-exit t)) |
257 | 4669 )) |
4670 ) | |
4671 ;; Finally, exit Emacs. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4672 (set-buffer gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4673 (gnus-group-exit) |
257 | 4674 )) |
4675 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4676 ;; For saving articles |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4677 |
257 | 4678 (defun gnus-Numeric-save-name (newsgroup headers &optional last-file) |
4679 "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. | |
4680 If variable `gnus-use-long-file-name' is nil, it is ~/News/News.group/num. | |
4681 Otherwise, it is like ~/News/news/group/num." | |
4682 (let ((default | |
4683 (expand-file-name | |
4684 (concat (if gnus-use-long-file-name | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4685 (gnus-capitalize-newsgroup newsgroup) |
257 | 4686 (gnus-newsgroup-directory-form newsgroup)) |
4687 "/" (int-to-string (nntp-header-number headers))) | |
4688 (or gnus-article-save-directory "~/News")))) | |
4689 (if (and last-file | |
4690 (string-equal (file-name-directory default) | |
4691 (file-name-directory last-file)) | |
4692 (string-match "^[0-9]+$" (file-name-nondirectory last-file))) | |
4693 default | |
4694 (or last-file default)))) | |
4695 | |
4696 (defun gnus-numeric-save-name (newsgroup headers &optional last-file) | |
4697 "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. | |
4698 If variable `gnus-use-long-file-name' is nil, it is ~/News/news.group/num. | |
4699 Otherwise, it is like ~/News/news/group/num." | |
4700 (let ((default | |
4701 (expand-file-name | |
4702 (concat (if gnus-use-long-file-name | |
4703 newsgroup | |
4704 (gnus-newsgroup-directory-form newsgroup)) | |
4705 "/" (int-to-string (nntp-header-number headers))) | |
4706 (or gnus-article-save-directory "~/News")))) | |
4707 (if (and last-file | |
4708 (string-equal (file-name-directory default) | |
4709 (file-name-directory last-file)) | |
4710 (string-match "^[0-9]+$" (file-name-nondirectory last-file))) | |
4711 default | |
4712 (or last-file default)))) | |
4713 | |
4714 (defun gnus-Plain-save-name (newsgroup headers &optional last-file) | |
4715 "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. | |
4716 If variable `gnus-use-long-file-name' is nil, it is ~/News/News.group. | |
4717 Otherwise, it is like ~/News/news/group/news." | |
4718 (or last-file | |
4719 (expand-file-name | |
4720 (if gnus-use-long-file-name | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4721 (gnus-capitalize-newsgroup newsgroup) |
257 | 4722 (concat (gnus-newsgroup-directory-form newsgroup) "/news")) |
4723 (or gnus-article-save-directory "~/News")))) | |
4724 | |
4725 (defun gnus-plain-save-name (newsgroup headers &optional last-file) | |
4726 "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. | |
4727 If variable `gnus-use-long-file-name' is nil, it is ~/News/news.group. | |
4728 Otherwise, it is like ~/News/news/group/news." | |
4729 (or last-file | |
4730 (expand-file-name | |
4731 (if gnus-use-long-file-name | |
4732 newsgroup | |
4733 (concat (gnus-newsgroup-directory-form newsgroup) "/news")) | |
4734 (or gnus-article-save-directory "~/News")))) | |
4735 | |
4736 (defun gnus-Folder-save-name (newsgroup headers &optional last-folder) | |
4737 "Generate folder name from NEWSGROUP, HEADERS, and optional LAST-FOLDER. | |
4738 If variable `gnus-use-long-file-name' is nil, it is +News.group. | |
4739 Otherwise, it is like +news/group." | |
4740 (or last-folder | |
4741 (concat "+" | |
4742 (if gnus-use-long-file-name | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4743 (gnus-capitalize-newsgroup newsgroup) |
257 | 4744 (gnus-newsgroup-directory-form newsgroup))))) |
4745 | |
4746 (defun gnus-folder-save-name (newsgroup headers &optional last-folder) | |
4747 "Generate folder name from NEWSGROUP, HEADERS, and optional LAST-FOLDER. | |
4748 If variable `gnus-use-long-file-name' is nil, it is +news.group. | |
4749 Otherwise, it is like +news/group." | |
4750 (or last-folder | |
4751 (concat "+" | |
4752 (if gnus-use-long-file-name | |
4753 newsgroup | |
4754 (gnus-newsgroup-directory-form newsgroup))))) | |
4755 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4756 ;; For KILL files |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4757 |
257 | 4758 (defun gnus-apply-kill-file () |
4759 "Apply KILL file to the current newsgroup." | |
4760 ;; Apply the global KILL file. | |
4761 (load (gnus-newsgroup-kill-file nil) t nil t) | |
4762 ;; And then apply the local KILL file. | |
4763 (load (gnus-newsgroup-kill-file gnus-newsgroup-name) t nil t)) | |
4764 | |
4765 (defun gnus-Newsgroup-kill-file (newsgroup) | |
4766 "Return the name of a KILL file of NEWSGROUP. | |
4767 If NEWSGROUP is nil, return the global KILL file instead." | |
4768 (cond ((or (null newsgroup) | |
4769 (string-equal newsgroup "")) | |
4770 ;; The global KILL file is placed at top of the directory. | |
4771 (expand-file-name gnus-kill-file-name | |
4772 (or gnus-article-save-directory "~/News"))) | |
4773 (gnus-use-long-file-name | |
4774 ;; Append ".KILL" to capitalized newsgroup name. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4775 (expand-file-name (concat (gnus-capitalize-newsgroup newsgroup) |
257 | 4776 "." gnus-kill-file-name) |
4777 (or gnus-article-save-directory "~/News"))) | |
4778 (t | |
4779 ;; Place "KILL" under the hierarchical directory. | |
4780 (expand-file-name (concat (gnus-newsgroup-directory-form newsgroup) | |
4781 "/" gnus-kill-file-name) | |
4782 (or gnus-article-save-directory "~/News"))) | |
4783 )) | |
4784 | |
4785 (defun gnus-newsgroup-kill-file (newsgroup) | |
4786 "Return the name of a KILL file of NEWSGROUP. | |
4787 If NEWSGROUP is nil, return the global KILL file instead." | |
4788 (cond ((or (null newsgroup) | |
4789 (string-equal newsgroup "")) | |
4790 ;; The global KILL file is placed at top of the directory. | |
4791 (expand-file-name gnus-kill-file-name | |
4792 (or gnus-article-save-directory "~/News"))) | |
4793 (gnus-use-long-file-name | |
4794 ;; Append ".KILL" to newsgroup name. | |
4795 (expand-file-name (concat newsgroup "." gnus-kill-file-name) | |
4796 (or gnus-article-save-directory "~/News"))) | |
4797 (t | |
4798 ;; Place "KILL" under the hierarchical directory. | |
4799 (expand-file-name (concat (gnus-newsgroup-directory-form newsgroup) | |
4800 "/" gnus-kill-file-name) | |
4801 (or gnus-article-save-directory "~/News"))) | |
4802 )) | |
4803 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4804 ;; For subscribing new newsgroup |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4805 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4806 (defun gnus-subscribe-randomly (newsgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4807 "Subscribe new NEWSGROUP and insert it at the beginning of newsgroups." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4808 (gnus-subscribe-newsgroup newsgroup |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4809 (car (car gnus-newsrc-assoc)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4810 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4811 (defun gnus-subscribe-alphabetically (newgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4812 "Subscribe new NEWSGROUP and insert it in strict alphabetic order." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4813 ;; Basic ideas by mike-w@cs.aukuni.ac.nz (Mike Williams) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4814 (let ((groups gnus-newsrc-assoc) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4815 (before nil)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4816 (while (and (not before) groups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4817 (if (string< newgroup (car (car groups))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4818 (setq before (car (car groups))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4819 (setq groups (cdr groups)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4820 (gnus-subscribe-newsgroup newgroup before) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4821 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4822 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4823 (defun gnus-subscribe-hierarchically (newgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4824 "Subscribe new NEWSGROUP and insert it in hierarchical newsgroup order." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4825 ;; Basic ideas by mike-w@cs.aukuni.ac.nz (Mike Williams) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4826 (save-excursion |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4827 (set-buffer (find-file-noselect gnus-current-startup-file)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4828 (let ((groupkey newgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4829 (before nil)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4830 (while (and (not before) groupkey) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4831 (goto-char (point-min)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4832 (let ((groupkey-re |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4833 (concat "^\\(" (regexp-quote groupkey) ".*\\)[!:]"))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4834 (while (and (re-search-forward groupkey-re nil t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4835 (progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4836 (setq before (buffer-substring |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4837 (match-beginning 1) (match-end 1))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4838 (string< before newgroup))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4839 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4840 ;; Remove tail of newsgroup name (eg. a.b.c -> a.b) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4841 (setq groupkey |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4842 (if (string-match "^\\(.*\\)\\.[^.]+$" groupkey) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4843 (substring groupkey (match-beginning 1) (match-end 1))))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4844 (gnus-subscribe-newsgroup newgroup before) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4845 ))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4846 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4847 (defun gnus-subscribe-interactively (newsgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4848 "Subscribe new NEWSGROUP interactively. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4849 It is inserted in hierarchical newsgroup order if subscribed. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4850 Unless, it is killed." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4851 (if (y-or-n-p (format "Subscribe new newsgroup: %s " newsgroup)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4852 (gnus-subscribe-hierarchically newsgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4853 ;; Save in kill-ring |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4854 (gnus-subscribe-newsgroup newsgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4855 (gnus-kill-newsgroup newsgroup))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4856 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4857 (defun gnus-subscribe-newsgroup (newsgroup &optional next) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4858 "Subscribe new NEWSGROUP. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4859 If optional argument NEXT is non-nil, it is inserted before NEXT." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4860 (gnus-insert-newsgroup (list newsgroup t) next) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4861 (message "Subscribe newsgroup: %s" newsgroup)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4862 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4863 ;; For directories |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4864 |
257 | 4865 (defun gnus-newsgroup-directory-form (newsgroup) |
4866 "Make hierarchical directory name from NEWSGROUP name." | |
4867 (let ((newsgroup (substring newsgroup 0)) ;Copy string. | |
4868 (len (length newsgroup)) | |
4869 (idx 0)) | |
4870 ;; Replace all occurence of `.' with `/'. | |
4871 (while (< idx len) | |
4872 (if (= (aref newsgroup idx) ?.) | |
4873 (aset newsgroup idx ?/)) | |
4874 (setq idx (1+ idx))) | |
4875 newsgroup | |
4876 )) | |
4877 | |
4878 (defun gnus-make-directory (directory) | |
4879 "Make DIRECTORY recursively." | |
4880 (let ((directory (expand-file-name directory default-directory))) | |
4881 (or (file-exists-p directory) | |
4882 (gnus-make-directory-1 "" directory)) | |
4883 )) | |
4884 | |
4885 (defun gnus-make-directory-1 (head tail) | |
4886 (cond ((string-match "^/\\([^/]+\\)" tail) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4887 ;; ange-ftp interferes with calling match-* after |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4888 ;; calling file-name-as-directory. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4889 (let ((beg (match-beginning 1)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4890 (end (match-end 1))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4891 (setq head (concat (file-name-as-directory head) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4892 (substring tail beg end))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4893 (or (file-exists-p head) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4894 (call-process "mkdir" nil nil nil head)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4895 (gnus-make-directory-1 head (substring tail end)))) |
257 | 4896 ((string-equal tail "") t) |
4897 )) | |
4898 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4899 (defun gnus-capitalize-newsgroup (newsgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4900 "Capitalize NEWSGROUP name with treating '.' and '-' as part of words." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4901 ;; Suggested by "Jonathan I. Kamens" <jik@pit-manager.MIT.EDU>. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4902 (let ((current-syntax-table (copy-syntax-table (syntax-table)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4903 (unwind-protect |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4904 (progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4905 (modify-syntax-entry ?- "w") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4906 (modify-syntax-entry ?. "w") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4907 (capitalize newsgroup)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4908 (set-syntax-table current-syntax-table)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4909 |
257 | 4910 (defun gnus-simplify-subject (subject &optional re-only) |
4911 "Remove `Re:' and words in parentheses. | |
4912 If optional argument RE-ONLY is non-nil, strip `Re:' only." | |
4913 (let ((case-fold-search t)) ;Ignore case. | |
4914 ;; Remove `Re:' and `Re^N:'. | |
4915 (if (string-match "\\`\\(re\\(\\^[0-9]+\\)?:[ \t]+\\)+" subject) | |
4916 (setq subject (substring subject (match-end 0)))) | |
4917 ;; Remove words in parentheses from end. | |
4918 (or re-only | |
4919 (while (string-match "[ \t\n]*([^()]*)[ \t\n]*\\'" subject) | |
4920 (setq subject (substring subject 0 (match-beginning 0))))) | |
4921 ;; Return subject string. | |
4922 subject | |
4923 )) | |
4924 | |
4925 (defun gnus-optional-lines-and-from (header) | |
4926 "Return a string like `NNN:AUTHOR' from HEADER." | |
4927 (let ((name-length (length "umerin@photon"))) | |
4928 (substring (format "%3d:%s" | |
4929 ;; Lines of the article. | |
4930 ;; Suggested by dana@bellcore.com. | |
4931 (nntp-header-lines header) | |
4932 ;; Its author. | |
4933 (concat (mail-strip-quoted-names | |
4934 (nntp-header-from header)) | |
4935 (make-string name-length ? ))) | |
4936 ;; 4 stands for length of `NNN:'. | |
4937 0 (+ 4 name-length)))) | |
4938 | |
4939 (defun gnus-optional-lines (header) | |
4940 "Return a string like `NNN' from HEADER." | |
4941 (format "%4d" (nntp-header-lines header))) | |
4942 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4943 ;; Basic ideas by flee@cs.psu.edu (Felix Lee) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4944 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4945 (defun gnus-keysort-headers (predicate key &optional reverse) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4946 "Sort current headers by PREDICATE using a value passed by KEY safely. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4947 *Safely* means C-g quitting is disabled during sort. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4948 Optional argument REVERSE means reverse order." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4949 (let ((inhibit-quit t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4950 (setq gnus-newsgroup-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4951 (if reverse |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4952 (nreverse |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4953 (gnus-keysort (nreverse gnus-newsgroup-headers) predicate key)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4954 (gnus-keysort gnus-newsgroup-headers predicate key))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4955 ;; Make sure we don't have to call |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4956 ;; gnus-clear-hashtables-for-newsgroup-headers to clear hash |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4957 ;; tables for the variable gnus-newsgroup-headers since no new |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4958 ;; entry is added to nor deleted from the variable. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4959 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4960 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4961 (defun gnus-keysort (list predicate key) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4962 "Sort LIST by PREDICATE using a value passed by KEY." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4963 (mapcar (function cdr) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4964 (sort (mapcar (function (lambda (a) (cons (funcall key a) a))) list) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4965 (function (lambda (a b) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4966 (funcall predicate (car a) (car b))))))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4967 |
257 | 4968 (defun gnus-sort-headers (predicate &optional reverse) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4969 "Sort current headers by PREDICATE safely. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4970 *Safely* means C-g quitting is disabled during sort. |
257 | 4971 Optional argument REVERSE means reverse order." |
4972 (let ((inhibit-quit t)) | |
4973 (setq gnus-newsgroup-headers | |
4974 (if reverse | |
4975 (nreverse (sort (nreverse gnus-newsgroup-headers) predicate)) | |
4976 (sort gnus-newsgroup-headers predicate))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4977 ;; Make sure we don't have to call |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4978 ;; gnus-clear-hashtables-for-newsgroup-headers to clear hash |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4979 ;; tables for the variable gnus-newsgroup-headers since no new |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4980 ;; entry is added to nor deleted from the variable. |
257 | 4981 )) |
4982 | |
4983 (defun gnus-string-lessp (a b) | |
4984 "Return T if first arg string is less than second in lexicographic order. | |
4985 If case-fold-search is non-nil, case of letters is ignored." | |
4986 (if case-fold-search | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4987 (string-lessp (downcase a) (downcase b)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4988 (string-lessp a b))) |
257 | 4989 |
4990 (defun gnus-date-lessp (date1 date2) | |
4991 "Return T if DATE1 is earlyer than DATE2." | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4992 (string-lessp (gnus-sortable-date date1) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4993 (gnus-sortable-date date2))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4994 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4995 (defun gnus-sortable-date (date) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4996 "Make sortable string by string-lessp from DATE. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4997 Timezone package is used." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4998 (let* ((date (timezone-parse-date date)) ;[Y M D T] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4999 (year (string-to-int (aref date 0))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5000 (month (string-to-int (aref date 1))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5001 (day (string-to-int (aref date 2))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5002 (time (aref date 3))) ;HH:MM:SS |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5003 ;; Timezone package is used. But, we don't have to care about |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5004 ;; the timezone since article's timezones are always GMT. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5005 (timezone-make-sortable-date year month day time) |
257 | 5006 )) |
5007 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5008 ;;(defun gnus-sortable-date (date) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5009 ;; "Make sortable string by string-lessp from DATE." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5010 ;; (let ((month '(("JAN" . " 1")("FEB" . " 2")("MAR" . " 3") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5011 ;; ("APR" . " 4")("MAY" . " 5")("JUN" . " 6") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5012 ;; ("JUL" . " 7")("AUG" . " 8")("SEP" . " 9") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5013 ;; ("OCT" . "10")("NOV" . "11")("DEC" . "12"))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5014 ;; (date (or date ""))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5015 ;; ;; Can understand the following styles: |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5016 ;; ;; (1) 14 Apr 89 03:20:12 GMT |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5017 ;; ;; (2) Fri, 17 Mar 89 4:01:33 GMT |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5018 ;; (if (string-match |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5019 ;; "\\([0-9]+\\) \\([^ ,]+\\) \\([0-9]+\\) \\([0-9:]+\\)" date) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5020 ;; (concat |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5021 ;; ;; Year |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5022 ;; (substring date (match-beginning 3) (match-end 3)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5023 ;; ;; Month |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5024 ;; (cdr |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5025 ;; (assoc |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5026 ;; (upcase (substring date (match-beginning 2) (match-end 2))) month)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5027 ;; ;; Day |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5028 ;; (format "%2d" (string-to-int |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5029 ;; (substring date |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5030 ;; (match-beginning 1) (match-end 1)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5031 ;; ;; Time |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5032 ;; (substring date (match-beginning 4) (match-end 4))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5033 ;; ;; Cannot understand DATE string. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5034 ;; date |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5035 ;; ) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5036 ;; )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5037 |
257 | 5038 (defun gnus-fetch-field (field) |
5039 "Return the value of the header FIELD of current article." | |
5040 (save-excursion | |
5041 (save-restriction | |
5042 (widen) | |
5043 (goto-char (point-min)) | |
5044 (narrow-to-region (point-min) | |
5045 (progn (search-forward "\n\n" nil 'move) (point))) | |
5046 (mail-fetch-field field)))) | |
5047 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5048 (fset 'gnus-expunge 'gnus-summary-delete-marked-with) |
257 | 5049 |
5050 (defun gnus-kill (field regexp &optional command all) | |
5051 "If FIELD of an article matches REGEXP, execute COMMAND. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5052 Optional 1st argument COMMAND is default to |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5053 (gnus-summary-mark-as-read nil \"X\"). |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5054 If optional 2nd argument ALL is non-nil, articles marked are also applied to. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5055 If FIELD is an empty string (or nil), entire article body is searched for. |
257 | 5056 COMMAND must be a lisp expression or a string representing a key sequence." |
5057 ;; We don't want to change current point nor window configuration. | |
5058 (save-excursion | |
5059 (save-window-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5060 ;; Selected window must be Summary buffer to execute keyboard |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5061 ;; macros correctly. See command_loop_1. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5062 (switch-to-buffer gnus-summary-buffer 'norecord) |
257 | 5063 (goto-char (point-min)) ;From the beginning. |
5064 (if (null command) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5065 (setq command '(gnus-summary-mark-as-read nil "X"))) |
257 | 5066 (gnus-execute field regexp command nil (not all)) |
5067 ))) | |
5068 | |
5069 (defun gnus-execute (field regexp form &optional backward ignore-marked) | |
5070 "If FIELD of article header matches REGEXP, execute lisp FORM (or a string). | |
5071 If FIELD is an empty string (or nil), entire article body is searched for. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5072 If optional 1st argument BACKWARD is non-nil, do backward instead. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5073 If optional 2nd argument IGNORE-MARKED is non-nil, articles which are |
257 | 5074 marked as read or unread are ignored." |
5075 (let ((function nil) | |
5076 (header nil) | |
5077 (article nil)) | |
5078 (if (string-equal field "") | |
5079 (setq field nil)) | |
5080 (if (null field) | |
5081 nil | |
5082 (or (stringp field) | |
5083 (setq field (symbol-name field))) | |
5084 ;; Get access function of header filed. | |
5085 (setq function (intern-soft (concat "gnus-header-" (downcase field)))) | |
5086 (if (and function (fboundp function)) | |
5087 (setq function (symbol-function function)) | |
5088 (error "Unknown header field: \"%s\"" field))) | |
5089 ;; Make FORM funcallable. | |
5090 (if (and (listp form) (not (eq (car form) 'lambda))) | |
5091 (setq form (list 'lambda nil form))) | |
5092 ;; Starting from the current article. | |
5093 (or (and ignore-marked | |
5094 ;; Articles marked as read and unread should be ignored. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5095 (setq article (gnus-summary-article-number)) |
257 | 5096 (or (not (memq article gnus-newsgroup-unreads)) ;Marked as read. |
5097 (memq article gnus-newsgroup-marked) ;Marked as unread. | |
5098 )) | |
5099 (gnus-execute-1 function regexp form)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5100 (while (gnus-summary-search-subject backward ignore-marked nil) |
257 | 5101 (gnus-execute-1 function regexp form)) |
5102 )) | |
5103 | |
5104 (defun gnus-execute-1 (function regexp form) | |
5105 (save-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5106 ;; The point of Summary buffer must be saved during execution. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5107 (let ((article (gnus-summary-article-number))) |
257 | 5108 (if (null article) |
5109 nil ;Nothing to do. | |
5110 (if function | |
5111 ;; Compare with header field. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5112 (let (;;(header (gnus-find-header-by-number |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5113 ;; gnus-newsgroup-headers article)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5114 (header (gnus-get-header-by-number article)) |
257 | 5115 (value nil)) |
5116 (and header | |
5117 (progn | |
5118 (setq value (funcall function header)) | |
5119 ;; Number (Lines:) or symbol must be converted to string. | |
5120 (or (stringp value) | |
5121 (setq value (prin1-to-string value))) | |
5122 (string-match regexp value)) | |
5123 (if (stringp form) ;Keyboard macro. | |
5124 (execute-kbd-macro form) | |
5125 (funcall form)))) | |
5126 ;; Search article body. | |
5127 (let ((gnus-current-article nil) ;Save article pointer. | |
5128 (gnus-last-article nil) | |
5129 (gnus-break-pages nil) ;No need to break pages. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5130 (gnus-mark-article-hook nil)) ;Inhibit marking as read. |
257 | 5131 (message "Searching for article: %d..." article) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5132 (gnus-article-setup-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5133 (gnus-article-prepare article t) |
257 | 5134 (if (save-excursion |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5135 (set-buffer gnus-article-buffer) |
257 | 5136 (goto-char (point-min)) |
5137 (re-search-forward regexp nil t)) | |
5138 (if (stringp form) ;Keyboard macro. | |
5139 (execute-kbd-macro form) | |
5140 (funcall form)))) | |
5141 )) | |
5142 ))) | |
5143 | |
5144 ;;; caesar-region written by phr@prep.ai.mit.edu Nov 86 | |
5145 ;;; modified by tower@prep Nov 86 | |
5146 ;;; Modified by umerin@flab.flab.Fujitsu.JUNET for ROT47. | |
5147 | |
5148 (defun gnus-caesar-region (&optional n) | |
5149 "Caesar rotation of region by N, default 13, for decrypting netnews. | |
5150 ROT47 will be performed for Japanese text in any case." | |
5151 (interactive (if current-prefix-arg ; Was there a prefix arg? | |
5152 (list (prefix-numeric-value current-prefix-arg)) | |
5153 (list nil))) | |
5154 (cond ((not (numberp n)) (setq n 13)) | |
5155 ((< n 0) (setq n (- 26 (% (- n) 26)))) | |
5156 (t (setq n (% n 26)))) ;canonicalize N | |
5157 (if (not (zerop n)) ; no action needed for a rot of 0 | |
5158 (progn | |
5159 (if (or (not (boundp 'caesar-translate-table)) | |
5160 (/= (aref caesar-translate-table ?a) (+ ?a n))) | |
5161 (let ((i 0) (lower "abcdefghijklmnopqrstuvwxyz") upper) | |
5162 (message "Building caesar-translate-table...") | |
5163 (setq caesar-translate-table (make-vector 256 0)) | |
5164 (while (< i 256) | |
5165 (aset caesar-translate-table i i) | |
5166 (setq i (1+ i))) | |
5167 (setq lower (concat lower lower) upper (upcase lower) i 0) | |
5168 (while (< i 26) | |
5169 (aset caesar-translate-table (+ ?a i) (aref lower (+ i n))) | |
5170 (aset caesar-translate-table (+ ?A i) (aref upper (+ i n))) | |
5171 (setq i (1+ i))) | |
5172 ;; ROT47 for Japanese text. | |
5173 ;; Thanks to ichikawa@flab.fujitsu.junet. | |
5174 (setq i 161) | |
5175 (let ((t1 (logior ?O 128)) | |
5176 (t2 (logior ?! 128)) | |
5177 (t3 (logior ?~ 128))) | |
5178 (while (< i 256) | |
5179 (aset caesar-translate-table i | |
5180 (let ((v (aref caesar-translate-table i))) | |
5181 (if (<= v t1) (if (< v t2) v (+ v 47)) | |
5182 (if (<= v t3) (- v 47) v)))) | |
5183 (setq i (1+ i)))) | |
5184 (message "Building caesar-translate-table... done"))) | |
5185 (let ((from (region-beginning)) | |
5186 (to (region-end)) | |
5187 (i 0) str len) | |
5188 (setq str (buffer-substring from to)) | |
5189 (setq len (length str)) | |
5190 (while (< i len) | |
5191 (aset str i (aref caesar-translate-table (aref str i))) | |
5192 (setq i (1+ i))) | |
5193 (goto-char from) | |
5194 (delete-region from to) | |
5195 (insert str))))) | |
5196 | |
5197 ;; Functions accessing headers. | |
5198 ;; Functions are more convenient than macros in some case. | |
5199 | |
5200 (defun gnus-header-number (header) | |
5201 "Return article number in HEADER." | |
5202 (nntp-header-number header)) | |
5203 | |
5204 (defun gnus-header-subject (header) | |
5205 "Return subject string in HEADER." | |
5206 (nntp-header-subject header)) | |
5207 | |
5208 (defun gnus-header-from (header) | |
5209 "Return author string in HEADER." | |
5210 (nntp-header-from header)) | |
5211 | |
5212 (defun gnus-header-xref (header) | |
5213 "Return xref string in HEADER." | |
5214 (nntp-header-xref header)) | |
5215 | |
5216 (defun gnus-header-lines (header) | |
5217 "Return lines in HEADER." | |
5218 (nntp-header-lines header)) | |
5219 | |
5220 (defun gnus-header-date (header) | |
5221 "Return date in HEADER." | |
5222 (nntp-header-date header)) | |
5223 | |
5224 (defun gnus-header-id (header) | |
5225 "Return Id in HEADER." | |
5226 (nntp-header-id header)) | |
5227 | |
5228 (defun gnus-header-references (header) | |
5229 "Return references in HEADER." | |
5230 (nntp-header-references header)) | |
5231 | |
5232 | |
5233 ;;; | |
5234 ;;; Article savers. | |
5235 ;;; | |
5236 | |
5237 (defun gnus-output-to-rmail (file-name) | |
5238 "Append the current article to an Rmail file named FILE-NAME." | |
5239 (require 'rmail) | |
5240 ;; Most of these codes are borrowed from rmailout.el. | |
5241 (setq file-name (expand-file-name file-name)) | |
5242 (setq rmail-last-rmail-file file-name) | |
5243 (let ((artbuf (current-buffer)) | |
5244 (tmpbuf (get-buffer-create " *GNUS-output*"))) | |
5245 (save-excursion | |
5246 (or (get-file-buffer file-name) | |
5247 (file-exists-p file-name) | |
5248 (if (yes-or-no-p | |
5249 (concat "\"" file-name "\" does not exist, create it? ")) | |
5250 (let ((file-buffer (create-file-buffer file-name))) | |
5251 (save-excursion | |
5252 (set-buffer file-buffer) | |
5253 (rmail-insert-rmail-file-header) | |
5254 (let ((require-final-newline nil)) | |
5255 (write-region (point-min) (point-max) file-name t 1))) | |
5256 (kill-buffer file-buffer)) | |
5257 (error "Output file does not exist"))) | |
5258 (set-buffer tmpbuf) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5259 (buffer-flush-undo (current-buffer)) |
257 | 5260 (erase-buffer) |
5261 (insert-buffer-substring artbuf) | |
5262 (gnus-convert-article-to-rmail) | |
5263 ;; Decide whether to append to a file or to an Emacs buffer. | |
5264 (let ((outbuf (get-file-buffer file-name))) | |
5265 (if (not outbuf) | |
5266 (append-to-file (point-min) (point-max) file-name) | |
5267 ;; File has been visited, in buffer OUTBUF. | |
5268 (set-buffer outbuf) | |
5269 (let ((buffer-read-only nil) | |
5270 (msg (and (boundp 'rmail-current-message) | |
5271 rmail-current-message))) | |
5272 ;; If MSG is non-nil, buffer is in RMAIL mode. | |
5273 (if msg | |
5274 (progn (widen) | |
5275 (narrow-to-region (point-max) (point-max)))) | |
5276 (insert-buffer-substring tmpbuf) | |
5277 (if msg | |
5278 (progn | |
5279 (goto-char (point-min)) | |
5280 (widen) | |
5281 (search-backward "\^_") | |
5282 (narrow-to-region (point) (point-max)) | |
5283 (goto-char (1+ (point-min))) | |
5284 (rmail-count-new-messages t) | |
5285 (rmail-show-message msg)))))) | |
5286 ) | |
5287 (kill-buffer tmpbuf) | |
5288 )) | |
5289 | |
5290 (defun gnus-output-to-file (file-name) | |
5291 "Append the current article to a file named FILE-NAME." | |
5292 (setq file-name (expand-file-name file-name)) | |
5293 (let ((artbuf (current-buffer)) | |
5294 (tmpbuf (get-buffer-create " *GNUS-output*"))) | |
5295 (save-excursion | |
5296 (set-buffer tmpbuf) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5297 (buffer-flush-undo (current-buffer)) |
257 | 5298 (erase-buffer) |
5299 (insert-buffer-substring artbuf) | |
5300 ;; Append newline at end of the buffer as separator, and then | |
5301 ;; save it to file. | |
5302 (goto-char (point-max)) | |
5303 (insert "\n") | |
5304 (append-to-file (point-min) (point-max) file-name)) | |
5305 (kill-buffer tmpbuf) | |
5306 )) | |
5307 | |
5308 (defun gnus-convert-article-to-rmail () | |
5309 "Convert article in current buffer to Rmail message format." | |
5310 (let ((buffer-read-only nil)) | |
5311 ;; Convert article directly into Babyl format. | |
5312 ;; Suggested by Rob Austein <sra@lcs.mit.edu> | |
5313 (goto-char (point-min)) | |
5314 (insert "\^L\n0, unseen,,\n*** EOOH ***\n") | |
5315 (while (search-forward "\n\^_" nil t) ;single char | |
5316 (replace-match "\n^_")) ;2 chars: "^" and "_" | |
5317 (goto-char (point-max)) | |
5318 (insert "\^_"))) | |
5319 | |
5320 ;;(defun gnus-convert-article-to-rmail () | |
5321 ;; "Convert article in current buffer to Rmail message format." | |
5322 ;; (let ((buffer-read-only nil)) | |
5323 ;; ;; Insert special header of Unix mail. | |
5324 ;; (goto-char (point-min)) | |
5325 ;; (insert "From " | |
5326 ;; (or (mail-strip-quoted-names (mail-fetch-field "from")) | |
5327 ;; "unknown") | |
5328 ;; " " (current-time-string) "\n") | |
5329 ;; ;; Stop quoting `From' since this seems unnecessary in most cases. | |
5330 ;; ;; ``Quote'' "\nFrom " as "\n>From " | |
5331 ;; ;;(while (search-forward "\nFrom " nil t) | |
5332 ;; ;; (forward-char -5) | |
5333 ;; ;; (insert ?>)) | |
5334 ;; ;; Convert article to babyl format. | |
5335 ;; (rmail-convert-to-babyl-format) | |
5336 ;; )) | |
5337 | |
5338 | |
5339 ;;; | |
5340 ;;; Internal functions. | |
5341 ;;; | |
5342 | |
5343 (defun gnus-start-news-server (&optional confirm) | |
5344 "Open network stream to remote NNTP server. | |
5345 If optional argument CONFIRM is non-nil, ask you host that NNTP server | |
5346 is running even if it is defined. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5347 Run gnus-open-server-hook just before opening news server." |
257 | 5348 (if (gnus-server-opened) |
5349 ;; Stream is already opened. | |
5350 nil | |
5351 ;; Open NNTP server. | |
5352 (if (or confirm | |
5353 (null gnus-nntp-server)) | |
5354 (if (and (boundp 'gnus-secondary-servers) gnus-secondary-servers) | |
5355 ;; Read server name with completion. | |
5356 (setq gnus-nntp-server | |
5357 (completing-read "NNTP server: " | |
5358 (cons (list gnus-nntp-server) | |
5359 gnus-secondary-servers) | |
5360 nil nil gnus-nntp-server)) | |
5361 (setq gnus-nntp-server | |
5362 (read-string "NNTP server: " gnus-nntp-server)))) | |
5363 ;; If no server name is given, local host is assumed. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5364 (if (or (string-equal gnus-nntp-server "") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5365 (string-equal gnus-nntp-server "::")) ;RMS preference. |
257 | 5366 (setq gnus-nntp-server (system-name))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5367 ;; gnus-nntp-server must be either (system-name), ':DIRECTORY', or |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5368 ;; nntp server name. I mean '::' cannot be a value of |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5369 ;; gnus-nntp-server. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5370 (cond ((and (null gnus-nntp-service) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5371 (string-equal gnus-nntp-server (system-name))) |
716
f11e7af7c0d9
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
711
diff
changeset
|
5372 (require 'nnspool) |
f11e7af7c0d9
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
711
diff
changeset
|
5373 (gnus-define-access-method 'nnspool) |
f11e7af7c0d9
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
711
diff
changeset
|
5374 (message "Looking up local news spool...")) |
f11e7af7c0d9
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
711
diff
changeset
|
5375 ((string-match ":" gnus-nntp-server) |
257 | 5376 ;; :DIRECTORY |
5377 (require 'mhspool) | |
5378 (gnus-define-access-method 'mhspool) | |
5379 (message "Looking up private directory...")) | |
5380 (t | |
5381 (gnus-define-access-method 'nntp) | |
5382 (message "Connecting to NNTP server on %s..." gnus-nntp-server))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5383 (run-hooks 'gnus-open-server-hook) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5384 (cond ((gnus-server-opened) ;Maybe opened in gnus-open-server-hook. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5385 (message "")) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5386 ((gnus-open-server gnus-nntp-server gnus-nntp-service) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5387 (message "")) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5388 (t |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5389 (error |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5390 (gnus-nntp-message |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5391 (format "Cannot open NNTP server on %s" gnus-nntp-server))))) |
257 | 5392 )) |
5393 | |
5394 ;; Dummy functions used only once. Should return nil. | |
5395 (defun gnus-server-opened () nil) | |
5396 (defun gnus-close-server () nil) | |
5397 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5398 (defun gnus-nntp-message (&optional message) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5399 "Return a message returned from NNTP server. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5400 If no message is available and optional MESSAGE is given, return it." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5401 (let ((status (gnus-status-message)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5402 (message (or message ""))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5403 (if (and (stringp status) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5404 (> (length status) 0)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5405 status message))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5406 |
257 | 5407 (defun gnus-define-access-method (method &optional access-methods) |
5408 "Define access functions for the access METHOD. | |
5409 Methods defintion is taken from optional argument ACCESS-METHODS or | |
5410 the variable gnus-access-methods." | |
5411 (let ((bindings | |
5412 (cdr (assoc method (or access-methods gnus-access-methods))))) | |
5413 (if (null bindings) | |
5414 (error "Unknown access method: %s" method) | |
5415 ;; Should not use symbol-function here since overload does not work. | |
5416 (while bindings | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5417 ;; Alist syntax is different from that of 3.14.3. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5418 (fset (car (car bindings)) (car (cdr (car bindings)))) |
257 | 5419 (setq bindings (cdr bindings))) |
5420 ))) | |
5421 | |
5422 (defun gnus-select-newsgroup (group &optional show-all) | |
5423 "Select newsgroup GROUP. | |
5424 If optional argument SHOW-ALL is non-nil, all of articles in the group | |
5425 are selected." | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5426 ;; Make sure a connection to NNTP server is alive. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5427 (gnus-start-news-server) |
257 | 5428 (if (gnus-request-group group) |
5429 (let ((articles nil)) | |
5430 (setq gnus-newsgroup-name group) | |
5431 (setq gnus-newsgroup-unreads | |
5432 (gnus-uncompress-sequence | |
5433 (nthcdr 2 (gnus-gethash group gnus-unread-hashtb)))) | |
5434 (cond (show-all | |
5435 ;; Select all active articles. | |
5436 (setq articles | |
5437 (gnus-uncompress-sequence | |
5438 (nthcdr 2 (gnus-gethash group gnus-active-hashtb))))) | |
5439 (t | |
5440 ;; Select unread articles only. | |
5441 (setq articles gnus-newsgroup-unreads))) | |
5442 ;; Require confirmation if selecting large newsgroup. | |
5443 (setq gnus-newsgroup-unselected nil) | |
5444 (if (not (numberp gnus-large-newsgroup)) | |
5445 nil | |
5446 (let ((selected nil) | |
5447 (number (length articles))) | |
5448 (if (> number gnus-large-newsgroup) | |
5449 (progn | |
5450 (condition-case () | |
5451 (let ((input | |
5452 (read-string | |
5453 (format | |
5454 "How many articles from %s (default %d): " | |
5455 gnus-newsgroup-name number)))) | |
5456 (setq selected | |
5457 (if (string-equal input "") | |
5458 number (string-to-int input)))) | |
5459 (quit | |
5460 (setq selected 0))) | |
5461 (cond ((and (> selected 0) | |
5462 (< selected number)) | |
5463 ;; Select last N articles. | |
5464 (setq articles (nthcdr (- number selected) articles))) | |
5465 ((and (< selected 0) | |
5466 (< (- 0 selected) number)) | |
5467 ;; Select first N articles. | |
5468 (setq selected (- 0 selected)) | |
5469 (setq articles (copy-sequence articles)) | |
5470 (setcdr (nthcdr (1- selected) articles) nil)) | |
5471 ((zerop selected) | |
5472 (setq articles nil)) | |
5473 ;; Otherwise select all. | |
5474 ) | |
5475 ;; Get unselected unread articles. | |
5476 (setq gnus-newsgroup-unselected | |
5477 (gnus-set-difference gnus-newsgroup-unreads articles)) | |
5478 )) | |
5479 )) | |
5480 ;; Get headers list. | |
5481 (setq gnus-newsgroup-headers (gnus-retrieve-headers articles)) | |
5482 ;; UNREADS may contain expired articles, so we have to remove | |
5483 ;; them from the list. | |
5484 (setq gnus-newsgroup-unreads | |
5485 (gnus-intersection gnus-newsgroup-unreads | |
5486 (mapcar | |
5487 (function | |
5488 (lambda (header) | |
5489 (nntp-header-number header))) | |
5490 gnus-newsgroup-headers))) | |
5491 ;; Marked article must be a subset of unread articles. | |
5492 (setq gnus-newsgroup-marked | |
5493 (gnus-intersection (append gnus-newsgroup-unselected | |
5494 gnus-newsgroup-unreads) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5495 (cdr |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5496 (gnus-gethash group gnus-marked-hashtb)))) |
257 | 5497 ;; First and last article in this newsgroup. |
5498 (setq gnus-newsgroup-begin | |
5499 (if gnus-newsgroup-headers | |
5500 (nntp-header-number (car gnus-newsgroup-headers)) | |
5501 0 | |
5502 )) | |
5503 (setq gnus-newsgroup-end | |
5504 (if gnus-newsgroup-headers | |
5505 (nntp-header-number | |
5506 (gnus-last-element gnus-newsgroup-headers)) | |
5507 0 | |
5508 )) | |
5509 ;; File name that an article was saved last. | |
5510 (setq gnus-newsgroup-last-rmail nil) | |
5511 (setq gnus-newsgroup-last-mail nil) | |
5512 (setq gnus-newsgroup-last-folder nil) | |
5513 (setq gnus-newsgroup-last-file nil) | |
5514 ;; Reset article pointer etc. | |
5515 (setq gnus-current-article nil) | |
5516 (setq gnus-current-headers nil) | |
5517 (setq gnus-current-history nil) | |
5518 (setq gnus-have-all-headers nil) | |
5519 (setq gnus-last-article nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5520 ;; Clear old hash tables for the variable gnus-newsgroup-headers. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5521 (gnus-clear-hashtables-for-newsgroup-headers) |
257 | 5522 ;; GROUP is successfully selected. |
5523 t | |
5524 ) | |
5525 )) | |
5526 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5527 ;; Hacking for making header search much faster. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5528 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5529 (defun gnus-get-header-by-number (number) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5530 "Return a header specified by a NUMBER. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5531 If the variable gnus-newsgroup-headers is updated, the hashed table |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5532 gnus-newsgroup-headers-hashtb-by-number must be set to nil to indicate |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5533 rehash is necessary." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5534 (or gnus-newsgroup-headers-hashtb-by-number |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5535 (gnus-make-headers-hashtable-by-number)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5536 (gnus-gethash (int-to-string number) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5537 gnus-newsgroup-headers-hashtb-by-number)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5538 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5539 (defun gnus-get-header-by-id (id) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5540 "Return a header specified by an ID. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5541 If the variable gnus-newsgroup-headers is updated, the hashed table |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5542 gnus-newsgroup-headers-hashtb-by-id must be set to nil to indicate |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5543 rehash is necessary." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5544 (or gnus-newsgroup-headers-hashtb-by-id |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5545 (gnus-make-headers-hashtable-by-id)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5546 (and (stringp id) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5547 (gnus-gethash id gnus-newsgroup-headers-hashtb-by-id))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5548 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5549 (defun gnus-make-headers-hashtable-by-number () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5550 "Make hashtable for the variable gnus-newsgroup-headers by number." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5551 (let ((header nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5552 (headers gnus-newsgroup-headers)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5553 (setq gnus-newsgroup-headers-hashtb-by-number |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5554 (gnus-make-hashtable (length headers))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5555 (while headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5556 (setq header (car headers)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5557 (gnus-sethash (int-to-string (nntp-header-number header)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5558 header gnus-newsgroup-headers-hashtb-by-number) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5559 (setq headers (cdr headers)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5560 ))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5561 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5562 (defun gnus-make-headers-hashtable-by-id () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5563 "Make hashtable for the variable gnus-newsgroup-headers by id." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5564 (let ((header nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5565 (headers gnus-newsgroup-headers)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5566 (setq gnus-newsgroup-headers-hashtb-by-id |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5567 (gnus-make-hashtable (length headers))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5568 (while headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5569 (setq header (car headers)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5570 (gnus-sethash (nntp-header-id header) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5571 header gnus-newsgroup-headers-hashtb-by-id) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5572 (setq headers (cdr headers)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5573 ))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5574 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5575 (defun gnus-clear-hashtables-for-newsgroup-headers () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5576 "Clear hash tables created for the variable gnus-newsgroup-headers." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5577 (setq gnus-newsgroup-headers-hashtb-by-id nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5578 (setq gnus-newsgroup-headers-hashtb-by-number nil)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5579 |
257 | 5580 (defun gnus-more-header-backward () |
5581 "Find new header backward." | |
5582 (let ((first | |
5583 (car (nth 2 (gnus-gethash gnus-newsgroup-name gnus-active-hashtb)))) | |
5584 (artnum gnus-newsgroup-begin) | |
5585 (header nil)) | |
5586 (while (and (not header) | |
5587 (> artnum first)) | |
5588 (setq artnum (1- artnum)) | |
5589 (setq header (car (gnus-retrieve-headers (list artnum))))) | |
5590 header | |
5591 )) | |
5592 | |
5593 (defun gnus-more-header-forward () | |
5594 "Find new header forward." | |
5595 (let ((last | |
5596 (cdr (nth 2 (gnus-gethash gnus-newsgroup-name gnus-active-hashtb)))) | |
5597 (artnum gnus-newsgroup-end) | |
5598 (header nil)) | |
5599 (while (and (not header) | |
5600 (< artnum last)) | |
5601 (setq artnum (1+ artnum)) | |
5602 (setq header (car (gnus-retrieve-headers (list artnum))))) | |
5603 header | |
5604 )) | |
5605 | |
5606 (defun gnus-extend-newsgroup (header &optional backward) | |
5607 "Extend newsgroup selection with HEADER. | |
5608 Optional argument BACKWARD means extend toward backward." | |
5609 (if header | |
5610 (let ((artnum (nntp-header-number header))) | |
5611 (setq gnus-newsgroup-headers | |
5612 (if backward | |
5613 (cons header gnus-newsgroup-headers) | |
5614 (append gnus-newsgroup-headers (list header)))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5615 ;; Clear current hash tables for the variable gnus-newsgroup-headers. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5616 (gnus-clear-hashtables-for-newsgroup-headers) |
257 | 5617 ;; We have to update unreads and unselected, but don't have to |
5618 ;; care about gnus-newsgroup-marked. | |
5619 (if (memq artnum gnus-newsgroup-unselected) | |
5620 (setq gnus-newsgroup-unreads | |
5621 (cons artnum gnus-newsgroup-unreads))) | |
5622 (setq gnus-newsgroup-unselected | |
5623 (delq artnum gnus-newsgroup-unselected)) | |
5624 (setq gnus-newsgroup-begin (min gnus-newsgroup-begin artnum)) | |
5625 (setq gnus-newsgroup-end (max gnus-newsgroup-end artnum)) | |
5626 ))) | |
5627 | |
5628 (defun gnus-mark-article-as-read (article) | |
5629 "Remember that ARTICLE is marked as read." | |
5630 ;; Remove from unread and marked list. | |
5631 (setq gnus-newsgroup-unreads | |
5632 (delq article gnus-newsgroup-unreads)) | |
5633 (setq gnus-newsgroup-marked | |
5634 (delq article gnus-newsgroup-marked))) | |
5635 | |
5636 (defun gnus-mark-article-as-unread (article &optional clear-mark) | |
5637 "Remember that ARTICLE is marked as unread. | |
5638 Optional argument CLEAR-MARK means ARTICLE should not be remembered | |
5639 that it was marked as read once." | |
5640 ;; Add to unread list. | |
5641 (or (memq article gnus-newsgroup-unreads) | |
5642 (setq gnus-newsgroup-unreads | |
5643 (cons article gnus-newsgroup-unreads))) | |
5644 ;; If CLEAR-MARK is non-nil, the article must be removed from marked | |
5645 ;; list. Otherwise, it must be added to the list. | |
5646 (if clear-mark | |
5647 (setq gnus-newsgroup-marked | |
5648 (delq article gnus-newsgroup-marked)) | |
5649 (or (memq article gnus-newsgroup-marked) | |
5650 (setq gnus-newsgroup-marked | |
5651 (cons article gnus-newsgroup-marked))))) | |
5652 | |
5653 (defun gnus-clear-system () | |
5654 "Clear all variables and buffer." | |
5655 ;; Clear GNUS variables. | |
5656 (let ((variables gnus-variable-list)) | |
5657 (while variables | |
5658 (set (car variables) nil) | |
5659 (setq variables (cdr variables)))) | |
5660 ;; Clear other internal variables. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5661 (setq gnus-newsrc-hashtb nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5662 (setq gnus-marked-hashtb nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5663 (setq gnus-killed-hashtb nil) |
257 | 5664 (setq gnus-active-hashtb nil) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5665 (setq gnus-octive-hashtb nil) |
257 | 5666 (setq gnus-unread-hashtb nil) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5667 (setq gnus-newsgroup-headers nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5668 (setq gnus-newsgroup-headers-hashtb-by-id nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5669 (setq gnus-newsgroup-headers-hashtb-by-number nil) |
257 | 5670 ;; Kill the startup file. |
5671 (and gnus-current-startup-file | |
5672 (get-file-buffer gnus-current-startup-file) | |
5673 (kill-buffer (get-file-buffer gnus-current-startup-file))) | |
5674 (setq gnus-current-startup-file nil) | |
5675 ;; Kill GNUS buffers. | |
5676 (let ((buffers gnus-buffer-list)) | |
5677 (while buffers | |
5678 (if (get-buffer (car buffers)) | |
5679 (kill-buffer (car buffers))) | |
5680 (setq buffers (cdr buffers)) | |
5681 ))) | |
5682 | |
5683 (defun gnus-configure-windows (action) | |
5684 "Configure GNUS windows according to the next ACTION. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5685 The ACTION is either a symbol, such as `summary', or a |
257 | 5686 configuration list such as `(1 1 2)'. If ACTION is not a list, |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5687 configuration list is got from the variable gnus-window-configuration." |
257 | 5688 (let* ((windows |
5689 (if (listp action) | |
5690 action (car (cdr (assq action gnus-window-configuration))))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5691 (grpwin (get-buffer-window gnus-group-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5692 (subwin (get-buffer-window gnus-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5693 (artwin (get-buffer-window gnus-article-buffer)) |
257 | 5694 (winsum nil) |
5695 (height nil) | |
5696 (grpheight 0) | |
5697 (subheight 0) | |
5698 (artheight 0)) | |
5699 (if (or (null windows) ;No configuration is specified. | |
5700 (and (eq (null grpwin) | |
5701 (zerop (nth 0 windows))) | |
5702 (eq (null subwin) | |
5703 (zerop (nth 1 windows))) | |
5704 (eq (null artwin) | |
5705 (zerop (nth 2 windows))))) | |
5706 ;; No need to change window configuration. | |
5707 nil | |
5708 (select-window (or grpwin subwin artwin (selected-window))) | |
5709 ;; First of all, compute the height of each window. | |
5710 (cond (gnus-use-full-window | |
5711 ;; Take up the entire screen. | |
5712 (delete-other-windows) | |
5713 (setq height (window-height (selected-window)))) | |
5714 (t | |
5715 (setq height (+ (if grpwin (window-height grpwin) 0) | |
5716 (if subwin (window-height subwin) 0) | |
5717 (if artwin (window-height artwin) 0))))) | |
5718 ;; The Newsgroup buffer exits always. So, use it to extend the | |
5719 ;; Group window so as to get enough window space. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5720 (switch-to-buffer gnus-group-buffer 'norecord) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5721 (and (get-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5722 (delete-windows-on gnus-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5723 (and (get-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5724 (delete-windows-on gnus-article-buffer)) |
257 | 5725 ;; Compute expected window height. |
5726 (setq winsum (apply (function +) windows)) | |
5727 (if (not (zerop (nth 0 windows))) | |
5728 (setq grpheight (max window-min-height | |
5729 (/ (* height (nth 0 windows)) winsum)))) | |
5730 (if (not (zerop (nth 1 windows))) | |
5731 (setq subheight (max window-min-height | |
5732 (/ (* height (nth 1 windows)) winsum)))) | |
5733 (if (not (zerop (nth 2 windows))) | |
5734 (setq artheight (max window-min-height | |
5735 (/ (* height (nth 2 windows)) winsum)))) | |
5736 (setq height (+ grpheight subheight artheight)) | |
5737 (enlarge-window (max 0 (- height (window-height (selected-window))))) | |
5738 ;; Then split the window. | |
5739 (and (not (zerop artheight)) | |
5740 (or (not (zerop grpheight)) | |
5741 (not (zerop subheight))) | |
5742 (split-window-vertically (+ grpheight subheight))) | |
5743 (and (not (zerop grpheight)) | |
5744 (not (zerop subheight)) | |
5745 (split-window-vertically grpheight)) | |
5746 ;; Then select buffers in each window. | |
5747 (and (not (zerop grpheight)) | |
5748 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5749 (switch-to-buffer gnus-group-buffer 'norecord) |
257 | 5750 (other-window 1))) |
5751 (and (not (zerop subheight)) | |
5752 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5753 (switch-to-buffer gnus-summary-buffer 'norecord) |
257 | 5754 (other-window 1))) |
5755 (and (not (zerop artheight)) | |
5756 (progn | |
5757 ;; If Article buffer does not exist, it will be created | |
5758 ;; and initialized. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5759 (gnus-article-setup-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5760 (switch-to-buffer gnus-article-buffer 'norecord))) |
257 | 5761 ) |
5762 )) | |
5763 | |
5764 (defun gnus-find-header-by-number (headers number) | |
5765 "Return a header which is a element of HEADERS and has NUMBER." | |
5766 (let ((found nil)) | |
5767 (while (and headers (not found)) | |
5768 ;; We cannot use `=' to accept non-numeric NUMBER. | |
5769 (if (eq number (nntp-header-number (car headers))) | |
5770 (setq found (car headers))) | |
5771 (setq headers (cdr headers))) | |
5772 found | |
5773 )) | |
5774 | |
5775 (defun gnus-find-header-by-id (headers id) | |
5776 "Return a header which is a element of HEADERS and has Message-ID." | |
5777 (let ((found nil)) | |
5778 (while (and headers (not found)) | |
5779 (if (string-equal id (nntp-header-id (car headers))) | |
5780 (setq found (car headers))) | |
5781 (setq headers (cdr headers))) | |
5782 found | |
5783 )) | |
5784 | |
5785 (defun gnus-version () | |
5786 "Version numbers of this version of GNUS." | |
5787 (interactive) | |
5788 (cond ((and (boundp 'mhspool-version) (boundp 'nnspool-version)) | |
5789 (message "%s; %s; %s; %s" | |
5790 gnus-version nntp-version nnspool-version mhspool-version)) | |
5791 ((boundp 'mhspool-version) | |
5792 (message "%s; %s; %s" | |
5793 gnus-version nntp-version mhspool-version)) | |
5794 ((boundp 'nnspool-version) | |
5795 (message "%s; %s; %s" | |
5796 gnus-version nntp-version nnspool-version)) | |
5797 (t | |
5798 (message "%s; %s" gnus-version nntp-version)))) | |
5799 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5800 (defun gnus-info-find-node () |
257 | 5801 "Find Info documentation of GNUS." |
5802 (interactive) | |
5803 (require 'info) | |
5804 ;; Enlarge info window if needed. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5805 (cond ((eq major-mode 'gnus-group-mode) |
257 | 5806 (gnus-configure-windows '(1 0 0)) ;Take all windows. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5807 (pop-to-buffer gnus-group-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5808 ((eq major-mode 'gnus-summary-mode) |
257 | 5809 (gnus-configure-windows '(0 1 0)) ;Take all windows. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5810 (pop-to-buffer gnus-summary-buffer))) |
2845
7a48e4a67e8c
(gnus-info-directory): Variable removed.
Roland McGrath <roland@gnu.org>
parents:
2843
diff
changeset
|
5811 (Info-goto-node (car (cdr (assq major-mode gnus-info-nodes))))) |
257 | 5812 |
5813 (defun gnus-overload-functions (&optional overloads) | |
5814 "Overload functions specified by optional argument OVERLOADS. | |
5815 If nothing is specified, use the variable gnus-overload-functions." | |
5816 (let ((defs nil) | |
5817 (overloads (or overloads gnus-overload-functions))) | |
5818 (while overloads | |
5819 (setq defs (car overloads)) | |
5820 (setq overloads (cdr overloads)) | |
5821 ;; Load file before overloading function if necessary. Make | |
5822 ;; sure we cannot use `requre' always. | |
5823 (and (not (fboundp (car defs))) | |
5824 (car (cdr (cdr defs))) | |
5825 (load (car (cdr (cdr defs))) nil 'nomessage)) | |
5826 (fset (car defs) (car (cdr defs))) | |
5827 ))) | |
5828 | |
5829 (defun gnus-make-threads (newsgroup-headers) | |
5830 "Make conversation threads tree from NEWSGROUP-HEADERS." | |
5831 (let ((headers newsgroup-headers) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5832 (refer nil) |
257 | 5833 (h nil) |
5834 (d nil) | |
5835 (roots nil) | |
5836 (dependencies nil)) | |
5837 ;; Make message dependency alist. | |
5838 (while headers | |
5839 (setq h (car headers)) | |
5840 (setq headers (cdr headers)) | |
5841 ;; Ignore invalid headers. | |
5842 (if (vectorp h) ;Depends on nntp.el. | |
5843 (progn | |
5844 ;; Ignore broken references, e.g "<123@a.b.c". | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5845 (setq refer (nntp-header-references h)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5846 (setq d (and refer |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5847 (string-match "\\(<[^<>]+>\\)[^>]*$" refer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5848 ;; (gnus-find-header-by-id |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5849 ;; newsgroup-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5850 ;; (substring refer (match-beginning 1) (match-end 1))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5851 ;; In fact if the variable newsgroup-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5852 ;; is not 'equal' to the variable |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5853 ;; gnus-newsgroup-headers, the following |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5854 ;; function call may return bogus value. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5855 (gnus-get-header-by-id |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5856 (substring refer (match-beginning 1) (match-end 1))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5857 )) |
257 | 5858 ;; Check subject equality. |
5859 (or gnus-thread-ignore-subject | |
5860 (null d) | |
5861 (string-equal (gnus-simplify-subject | |
5862 (nntp-header-subject h) 're) | |
5863 (gnus-simplify-subject | |
5864 (nntp-header-subject d) 're)) | |
5865 ;; H should be a thread root. | |
5866 (setq d nil)) | |
5867 ;; H depends on D. | |
5868 (setq dependencies | |
5869 (cons (cons h d) dependencies)) | |
5870 ;; H is a thread root. | |
5871 (if (null d) | |
5872 (setq roots (cons h roots))) | |
5873 )) | |
5874 ) | |
5875 ;; Make complete threads from the roots. | |
5876 ;; Note: dependencies are in reverse order, but | |
5877 ;; gnus-make-threads-1 processes it in reverse order again. So, | |
5878 ;; we don't have to worry about it. | |
5879 (mapcar | |
5880 (function | |
5881 (lambda (root) | |
5882 (gnus-make-threads-1 root dependencies))) (nreverse roots)) | |
5883 )) | |
5884 | |
5885 (defun gnus-make-threads-1 (parent dependencies) | |
5886 (let ((children nil) | |
5887 (d nil) | |
5888 (depends dependencies)) | |
5889 ;; Find children. | |
5890 (while depends | |
5891 (setq d (car depends)) | |
5892 (setq depends (cdr depends)) | |
5893 (and (cdr d) | |
5894 (eq (nntp-header-id parent) (nntp-header-id (cdr d))) | |
5895 (setq children (cons (car d) children)))) | |
5896 ;; Go down. | |
5897 (cons parent | |
5898 (mapcar | |
5899 (function | |
5900 (lambda (child) | |
5901 (gnus-make-threads-1 child dependencies))) children)) | |
5902 )) | |
5903 | |
5904 (defun gnus-narrow-to-page (&optional arg) | |
5905 "Make text outside current page invisible except for page delimiter. | |
5906 A numeric arg specifies to move forward or backward by that many pages, | |
5907 thus showing a page other than the one point was originally in." | |
5908 (interactive "P") | |
5909 (setq arg (if arg (prefix-numeric-value arg) 0)) | |
5910 (save-excursion | |
5911 (forward-page -1) ;Beginning of current page. | |
5912 (widen) | |
5913 (if (> arg 0) | |
5914 (forward-page arg) | |
5915 (if (< arg 0) | |
5916 (forward-page (1- arg)))) | |
5917 ;; Find the end of the page. | |
5918 (forward-page) | |
5919 ;; If we stopped due to end of buffer, stay there. | |
5920 ;; If we stopped after a page delimiter, put end of restriction | |
5921 ;; at the beginning of that line. | |
5922 ;; These are commented out. | |
5923 ;; (if (save-excursion (beginning-of-line) | |
5924 ;; (looking-at page-delimiter)) | |
5925 ;; (beginning-of-line)) | |
5926 (narrow-to-region (point) | |
5927 (progn | |
5928 ;; Find the top of the page. | |
5929 (forward-page -1) | |
5930 ;; If we found beginning of buffer, stay there. | |
5931 ;; If extra text follows page delimiter on same line, | |
5932 ;; include it. | |
5933 ;; Otherwise, show text starting with following line. | |
5934 (if (and (eolp) (not (bobp))) | |
5935 (forward-line 1)) | |
5936 (point))) | |
5937 )) | |
5938 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5939 ;; Create hash table for alist, such as gnus-newsrc-assoc, |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5940 ;; gnus-killed-assoc, and gnus-marked-assoc. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5941 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5942 (defun gnus-make-hashtable-from-alist (alist &optional hashsize) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5943 "Return hash table for ALIST. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5944 Optional argument HASHSIZE specifies the hashtable size. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5945 Hash key is a car of alist element, which must be a string." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5946 (let ((hashtb (gnus-make-hashtable (or hashsize (length alist))))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5947 (while alist |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5948 (gnus-sethash (car (car alist)) ;Newsgroup name |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5949 (car alist) ;Alist element |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5950 hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5951 (setq alist (cdr alist))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5952 hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5953 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5954 |
257 | 5955 (defun gnus-last-element (list) |
5956 "Return last element of LIST." | |
5957 (let ((last nil)) | |
5958 (while list | |
5959 (if (null (cdr list)) | |
5960 (setq last (car list))) | |
5961 (setq list (cdr list))) | |
5962 last | |
5963 )) | |
5964 | |
5965 (defun gnus-set-difference (list1 list2) | |
5966 "Return a list of elements of LIST1 that do not appear in LIST2." | |
5967 (let ((list1 (copy-sequence list1))) | |
5968 (while list2 | |
5969 (setq list1 (delq (car list2) list1)) | |
5970 (setq list2 (cdr list2))) | |
5971 list1 | |
5972 )) | |
5973 | |
5974 (defun gnus-intersection (list1 list2) | |
5975 "Return a list of elements that appear in both LIST1 and LIST2." | |
5976 (let ((result nil)) | |
5977 (while list2 | |
5978 (if (memq (car list2) list1) | |
5979 (setq result (cons (car list2) result))) | |
5980 (setq list2 (cdr list2))) | |
5981 result | |
5982 )) | |
5983 | |
5984 | |
5985 ;;; | |
5986 ;;; Get information about active articles, already read articles, and | |
5987 ;;; still unread articles. | |
5988 ;;; | |
5989 | |
5990 ;; GNUS internal format of gnus-newsrc-assoc and gnus-killed-assoc: | |
5991 ;; (("general" t (1 . 1)) | |
5992 ;; ("misc" t (1 . 10) (12 . 15)) | |
5993 ;; ("test" nil (1 . 99)) ...) | |
5994 ;; GNUS internal format of gnus-marked-assoc: | |
5995 ;; (("general" 1 2 3) | |
5996 ;; ("misc" 2) ...) | |
5997 ;; GNUS internal format of gnus-active-hashtb: | |
5998 ;; (("general" t (1 . 1)) | |
5999 ;; ("misc" t (1 . 10)) | |
6000 ;; ("test" nil (1 . 99)) ...) | |
6001 ;; GNUS internal format of gnus-unread-hashtb: | |
6002 ;; (("general" 1 (1 . 1)) | |
6003 ;; ("misc" 14 (1 . 10) (12 . 15)) | |
6004 ;; ("test" 99 (1 . 99)) ...) | |
6005 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6006 (defun gnus-setup-news (&optional rawfile) |
257 | 6007 "Setup news information. |
6008 If optional argument RAWFILE is non-nil, force to read raw startup file." | |
6009 (let ((init (not (and gnus-newsrc-assoc | |
6010 gnus-active-hashtb | |
6011 gnus-unread-hashtb | |
6012 (not rawfile) | |
6013 )))) | |
6014 ;; We have to clear some variables to re-initialize news info. | |
6015 (if init | |
6016 (setq gnus-newsrc-assoc nil | |
6017 gnus-active-hashtb nil | |
6018 gnus-unread-hashtb nil)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6019 (gnus-read-active-file) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6020 ;; Initialize only once. |
257 | 6021 (if init |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6022 (progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6023 ;; Get distributions only once. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6024 (gnus-read-distributions-file) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6025 ;; newsrc file must be read after reading active file since |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6026 ;; its size is used to guess the size of gnus-newsrc-hashtb. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6027 (gnus-read-newsrc-file rawfile) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6028 )) |
257 | 6029 (gnus-expire-marked-articles) |
6030 (gnus-get-unread-articles) | |
6031 ;; Check new newsgroups and subscribe them. | |
6032 (if init | |
6033 (let ((new-newsgroups (gnus-find-new-newsgroups))) | |
6034 (while new-newsgroups | |
6035 (funcall gnus-subscribe-newsgroup-method (car new-newsgroups)) | |
6036 (setq new-newsgroups (cdr new-newsgroups)) | |
6037 ))) | |
6038 )) | |
6039 | |
6040 (defun gnus-add-newsgroup (newsgroup) | |
6041 "Subscribe new NEWSGROUP safely and put it at top." | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6042 (and (null (gnus-gethash newsgroup gnus-newsrc-hashtb)) ;Really new? |
257 | 6043 (gnus-gethash newsgroup gnus-active-hashtb) ;Really exist? |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6044 (gnus-insert-newsgroup (or (gnus-gethash newsgroup gnus-killed-hashtb) |
257 | 6045 (list newsgroup t)) |
6046 (car (car gnus-newsrc-assoc))))) | |
6047 | |
6048 (defun gnus-find-new-newsgroups () | |
6049 "Looking for new newsgroups and return names. | |
6050 `-n' option of options line in .newsrc file is recognized." | |
6051 (let ((group nil) | |
6052 (new-newsgroups nil)) | |
6053 (mapatoms | |
6054 (function | |
6055 (lambda (sym) | |
6056 (setq group (symbol-name sym)) | |
6057 ;; Taking account of `-n' option. | |
6058 (and (or (null gnus-newsrc-options-n-no) | |
6059 (not (string-match gnus-newsrc-options-n-no group)) | |
6060 (and gnus-newsrc-options-n-yes | |
6061 (string-match gnus-newsrc-options-n-yes group))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6062 (null (gnus-gethash group gnus-killed-hashtb)) ;Ignore killed. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6063 (null (gnus-gethash group gnus-newsrc-hashtb)) ;Really new. |
257 | 6064 ;; Find new newsgroup. |
6065 (setq new-newsgroups | |
6066 (cons group new-newsgroups))) | |
6067 )) | |
6068 gnus-active-hashtb) | |
6069 ;; Return new newsgroups. | |
6070 new-newsgroups | |
6071 )) | |
6072 | |
6073 (defun gnus-kill-newsgroup (group) | |
6074 "Kill GROUP from gnus-newsrc-assoc, .newsrc and gnus-unread-hashtb." | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6075 (let ((info (gnus-gethash group gnus-newsrc-hashtb))) |
257 | 6076 (if (null info) |
6077 nil | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6078 ;; Delete from gnus-newsrc-assoc and gnus-newsrc-hashtb. |
257 | 6079 (setq gnus-newsrc-assoc (delq info gnus-newsrc-assoc)) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6080 (gnus-sethash group nil gnus-newsrc-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6081 ;; Add to gnus-killed-assoc and gnus-killed-hashtb. |
257 | 6082 (setq gnus-killed-assoc |
6083 (cons info | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6084 (delq (gnus-gethash group gnus-killed-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6085 gnus-killed-assoc))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6086 (gnus-sethash group info gnus-killed-hashtb) |
257 | 6087 ;; Clear unread hashtable. |
6088 ;; Thanks cwitty@csli.Stanford.EDU (Carl Witty). | |
6089 (gnus-sethash group nil gnus-unread-hashtb) | |
6090 ;; Then delete from .newsrc | |
6091 (gnus-update-newsrc-buffer group 'delete) | |
6092 ;; Return the deleted newsrc entry. | |
6093 info | |
6094 ))) | |
6095 | |
6096 (defun gnus-insert-newsgroup (info &optional next) | |
6097 "Insert newsrc INFO entry before NEXT. | |
6098 If optional argument NEXT is nil, appended to the last." | |
6099 (if (null info) | |
6100 (error "Invalid argument: %s" info)) | |
6101 (let* ((group (car info)) ;Newsgroup name. | |
6102 (range | |
6103 (gnus-difference-of-range | |
6104 (nth 2 (gnus-gethash group gnus-active-hashtb)) (nthcdr 2 info)))) | |
6105 ;; Check duplication. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6106 (if (gnus-gethash group gnus-newsrc-hashtb) |
257 | 6107 (error "Duplicated: %s" group)) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6108 ;; Insert to gnus-newsrc-assoc and gnus-newsrc-hashtb. |
257 | 6109 (if (string-equal next (car (car gnus-newsrc-assoc))) |
6110 (setq gnus-newsrc-assoc | |
6111 (cons info gnus-newsrc-assoc)) | |
6112 (let ((found nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6113 (rest (cdr gnus-newsrc-assoc)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6114 (tail gnus-newsrc-assoc)) |
257 | 6115 ;; Seach insertion point. |
6116 (while (and (not found) rest) | |
6117 (if (string-equal next (car (car rest))) | |
6118 (setq found t) | |
6119 (setq rest (cdr rest)) | |
6120 (setq tail (cdr tail)) | |
6121 )) | |
6122 ;; Find it. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6123 (if (consp tail) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6124 (setcdr tail (cons info rest)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6125 ;; gnus-newsrc-assoc must be nil. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6126 (setq gnus-newsrc-assoc |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6127 (append gnus-newsrc-assoc (cons info rest)))) |
257 | 6128 )) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6129 (gnus-sethash group info gnus-newsrc-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6130 ;; Delete from gnus-killed-assoc and gnus-killed-hashtb. |
257 | 6131 (setq gnus-killed-assoc |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6132 (delq (gnus-gethash group gnus-killed-hashtb) gnus-killed-assoc)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6133 (gnus-sethash group nil gnus-killed-hashtb) |
257 | 6134 ;; Then insert to .newsrc. |
6135 (gnus-update-newsrc-buffer group nil next) | |
6136 ;; Add to gnus-unread-hashtb. | |
6137 (gnus-sethash group | |
6138 (cons group ;Newsgroup name. | |
6139 (cons (gnus-number-of-articles range) range)) | |
6140 gnus-unread-hashtb) | |
6141 )) | |
6142 | |
6143 (defun gnus-check-killed-newsgroups () | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6144 "Check consistency between gnus-newsrc-assoc and gnus-killed-assoc. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6145 gnus-killed-hashtb is also updated." |
257 | 6146 (let ((group nil) |
6147 (new-killed nil) | |
6148 (old-killed gnus-killed-assoc)) | |
6149 (while old-killed | |
6150 (setq group (car (car old-killed))) | |
6151 (and (or (null gnus-newsrc-options-n-no) | |
6152 (not (string-match gnus-newsrc-options-n-no group)) | |
6153 (and gnus-newsrc-options-n-yes | |
6154 (string-match gnus-newsrc-options-n-yes group))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6155 (null (gnus-gethash group gnus-newsrc-hashtb)) ;No duplication. |
257 | 6156 ;; Subscribed in options line and not in gnus-newsrc-assoc. |
6157 (setq new-killed | |
6158 (cons (car old-killed) new-killed))) | |
6159 (setq old-killed (cdr old-killed)) | |
6160 ) | |
6161 (setq gnus-killed-assoc (nreverse new-killed)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6162 (setq gnus-killed-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6163 (gnus-make-hashtable-from-alist gnus-killed-assoc)) |
257 | 6164 )) |
6165 | |
6166 (defun gnus-check-bogus-newsgroups (&optional confirm) | |
6167 "Delete bogus newsgroups. | |
6168 If optional argument CONFIRM is non-nil, confirm deletion of newsgroups." | |
6169 (let ((group nil) ;Newsgroup name temporary used. | |
6170 (old-newsrc gnus-newsrc-assoc) | |
6171 (new-newsrc nil) | |
6172 (bogus nil) ;List of bogus newsgroups. | |
6173 (old-killed gnus-killed-assoc) | |
6174 (new-killed nil) | |
6175 (old-marked gnus-marked-assoc) | |
6176 (new-marked nil)) | |
6177 (message "Checking bogus newsgroups...") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6178 ;; Update gnus-newsrc-assoc and gnus-newsrc-hashtb. |
257 | 6179 (while old-newsrc |
6180 (setq group (car (car old-newsrc))) | |
6181 (if (or (gnus-gethash group gnus-active-hashtb) | |
6182 (and confirm | |
6183 (not (y-or-n-p | |
6184 (format "Delete bogus newsgroup: %s " group))))) | |
6185 ;; Active newsgroup. | |
6186 (setq new-newsrc (cons (car old-newsrc) new-newsrc)) | |
6187 ;; Found a bogus newsgroup. | |
6188 (setq bogus (cons group bogus))) | |
6189 (setq old-newsrc (cdr old-newsrc)) | |
6190 ) | |
6191 (setq gnus-newsrc-assoc (nreverse new-newsrc)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6192 (setq gnus-newsrc-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6193 (gnus-make-hashtable-from-alist gnus-newsrc-assoc)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6194 ;; Update gnus-killed-assoc and gnus-killed-hashtb. |
257 | 6195 ;; The killed newsgroups are deleted without any confirmations. |
6196 (while old-killed | |
6197 (setq group (car (car old-killed))) | |
6198 (and (gnus-gethash group gnus-active-hashtb) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6199 (null (gnus-gethash group gnus-newsrc-hashtb)) |
257 | 6200 ;; Active and really killed newsgroup. |
6201 (setq new-killed (cons (car old-killed) new-killed))) | |
6202 (setq old-killed (cdr old-killed)) | |
6203 ) | |
6204 (setq gnus-killed-assoc (nreverse new-killed)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6205 (setq gnus-killed-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6206 (gnus-make-hashtable-from-alist gnus-killed-assoc)) |
257 | 6207 ;; Remove BOGUS from .newsrc file. |
6208 (while bogus | |
6209 (gnus-update-newsrc-buffer (car bogus) 'delete) | |
6210 (setq bogus (cdr bogus))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6211 ;; Update gnus-marked-assoc and gnus-marked-hashtb. |
257 | 6212 (while old-marked |
6213 (setq group (car (car old-marked))) | |
6214 (if (and (cdr (car old-marked)) ;Non-empty? | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6215 (gnus-gethash group gnus-newsrc-hashtb)) ;Not bogus? |
257 | 6216 (setq new-marked (cons (car old-marked) new-marked))) |
6217 (setq old-marked (cdr old-marked))) | |
6218 (setq gnus-marked-assoc new-marked) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6219 (setq gnus-marked-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6220 (gnus-make-hashtable-from-alist gnus-marked-assoc)) |
257 | 6221 (message "Checking bogus newsgroups... done") |
6222 )) | |
6223 | |
6224 (defun gnus-get-unread-articles () | |
6225 "Compute diffs between active and read articles." | |
6226 (let ((read gnus-newsrc-assoc) | |
6227 (group-info nil) | |
6228 (group-name nil) | |
6229 (active nil) | |
6230 (range nil)) | |
6231 (message "Checking new news...") | |
6232 (or gnus-unread-hashtb | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6233 (setq gnus-unread-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6234 (gnus-make-hashtable (length gnus-active-hashtb)))) |
257 | 6235 (while read |
6236 (setq group-info (car read)) ;About one newsgroup | |
6237 (setq group-name (car group-info)) | |
6238 (setq active (nth 2 (gnus-gethash group-name gnus-active-hashtb))) | |
6239 (if (and gnus-octive-hashtb | |
6240 ;; Is nothing changed? | |
6241 (equal active | |
6242 (nth 2 (gnus-gethash group-name gnus-octive-hashtb))) | |
6243 ;; Is this newsgroup in the unread hash table? | |
6244 (gnus-gethash group-name gnus-unread-hashtb) | |
6245 ) | |
6246 nil ;Nothing to do. | |
6247 (setq range (gnus-difference-of-range active (nthcdr 2 group-info))) | |
6248 (gnus-sethash group-name | |
6249 (cons group-name ;Group name | |
6250 (cons (gnus-number-of-articles range) | |
6251 range)) ;Range of unread articles | |
6252 gnus-unread-hashtb) | |
6253 ) | |
6254 (setq read (cdr read)) | |
6255 ) | |
6256 (message "Checking new news... done") | |
6257 )) | |
6258 | |
6259 (defun gnus-expire-marked-articles () | |
6260 "Check expired article which is marked as unread." | |
6261 (let ((marked-assoc gnus-marked-assoc) | |
6262 (updated-assoc nil) | |
6263 (marked nil) ;Current marked info. | |
6264 (articles nil) ;List of marked articles. | |
6265 (updated nil) ;List of real marked. | |
6266 (begin nil)) | |
6267 (while marked-assoc | |
6268 (setq marked (car marked-assoc)) | |
6269 (setq articles (cdr marked)) | |
6270 (setq updated nil) | |
6271 (setq begin | |
6272 (car (nth 2 (gnus-gethash (car marked) gnus-active-hashtb)))) | |
6273 (while (and begin articles) | |
6274 (if (>= (car articles) begin) | |
6275 ;; This article is still active. | |
6276 (setq updated (cons (car articles) updated))) | |
6277 (setq articles (cdr articles))) | |
6278 (if updated | |
6279 (setq updated-assoc | |
6280 (cons (cons (car marked) updated) updated-assoc))) | |
6281 (setq marked-assoc (cdr marked-assoc))) | |
6282 (setq gnus-marked-assoc updated-assoc) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6283 (setq gnus-marked-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6284 (gnus-make-hashtable-from-alist gnus-marked-assoc)) |
257 | 6285 )) |
6286 | |
6287 (defun gnus-mark-as-read-by-xref | |
6288 (group headers unreads &optional subscribed-only) | |
6289 "Mark articles as read using cross references and return updated newsgroups. | |
6290 Arguments are GROUP, HEADERS, UNREADS, and optional SUBSCRIBED-ONLY." | |
6291 (let ((xref-list nil) | |
6292 (header nil) | |
6293 (xrefs nil) ;One Xref: field info. | |
6294 (xref nil) ;(NEWSGROUP . ARTICLE) | |
6295 (gname nil) ;Newsgroup name | |
6296 (article nil)) ;Article number | |
6297 (while headers | |
6298 (setq header (car headers)) | |
6299 (if (memq (nntp-header-number header) unreads) | |
6300 ;; This article is not yet marked as read. | |
6301 nil | |
6302 (setq xrefs (gnus-parse-xref-field (nntp-header-xref header))) | |
6303 ;; For each cross reference info. in one Xref: field. | |
6304 (while xrefs | |
6305 (setq xref (car xrefs)) | |
6306 (setq gname (car xref)) ;Newsgroup name | |
6307 (setq article (cdr xref)) ;Article number | |
6308 (or (string-equal group gname) ;Ignore current newsgroup. | |
6309 ;; Ignore unsubscribed newsgroup if requested. | |
6310 (and subscribed-only | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6311 (not (nth 1 (gnus-gethash gname gnus-newsrc-hashtb)))) |
257 | 6312 ;; Ignore article marked as unread. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6313 (memq article (cdr (gnus-gethash gname gnus-marked-hashtb))) |
257 | 6314 (let ((group-xref (assoc gname xref-list))) |
6315 (if group-xref | |
6316 (if (memq article (cdr group-xref)) | |
6317 nil ;Alread marked. | |
6318 (setcdr group-xref (cons article (cdr group-xref)))) | |
6319 ;; Create new assoc entry for GROUP. | |
6320 (setq xref-list (cons (list gname article) xref-list))) | |
6321 )) | |
6322 (setq xrefs (cdr xrefs)) | |
6323 )) | |
6324 (setq headers (cdr headers))) | |
6325 ;; Mark cross referenced articles as read. | |
6326 (gnus-mark-xrefed-as-read xref-list) | |
6327 ;;(message "%s %s" (prin1-to-string unreads) (prin1-to-string xref-list)) | |
6328 ;; Return list of updated group name. | |
6329 (mapcar (function car) xref-list) | |
6330 )) | |
6331 | |
6332 (defun gnus-parse-xref-field (xref-value) | |
6333 "Parse Xref: field value, and return list of `(group . article-id)'." | |
6334 (let ((xref-list nil) | |
6335 (xref-value (or xref-value ""))) | |
6336 ;; Remove server host name. | |
6337 (if (string-match "^[ \t]*[^ \t,]+[ \t,]+\\(.*\\)$" xref-value) | |
6338 (setq xref-value (substring xref-value (match-beginning 1))) | |
6339 (setq xref-value nil)) | |
6340 ;; Process each xref info. | |
6341 (while xref-value | |
6342 (if (string-match | |
6343 "^[ \t,]*\\([^ \t,]+\\):\\([0-9]+\\)[^0-9]*" xref-value) | |
6344 (progn | |
6345 (setq xref-list | |
6346 (cons | |
6347 (cons | |
6348 ;; Group name | |
6349 (substring xref-value (match-beginning 1) (match-end 1)) | |
6350 ;; Article-ID | |
6351 (string-to-int | |
6352 (substring xref-value (match-beginning 2) (match-end 2)))) | |
6353 xref-list)) | |
6354 (setq xref-value (substring xref-value (match-end 2)))) | |
6355 (setq xref-value nil))) | |
6356 ;; Return alist. | |
6357 xref-list | |
6358 )) | |
6359 | |
6360 (defun gnus-mark-xrefed-as-read (xrefs) | |
6361 "Update unread article information using XREFS alist." | |
6362 (let ((group nil) | |
6363 (idlist nil) | |
6364 (unread nil)) | |
6365 (while xrefs | |
6366 (setq group (car (car xrefs))) | |
6367 (setq idlist (cdr (car xrefs))) | |
6368 (setq unread (gnus-uncompress-sequence | |
6369 (nthcdr 2 (gnus-gethash group gnus-unread-hashtb)))) | |
6370 (while idlist | |
6371 (setq unread (delq (car idlist) unread)) | |
6372 (setq idlist (cdr idlist))) | |
6373 (gnus-update-unread-articles group unread 'ignore) | |
6374 (setq xrefs (cdr xrefs)) | |
6375 ))) | |
6376 | |
6377 (defun gnus-update-unread-articles (group unread-list marked-list) | |
6378 "Update unread articles of GROUP using UNREAD-LIST and MARKED-LIST." | |
6379 (let ((active (nth 2 (gnus-gethash group gnus-active-hashtb))) | |
6380 (unread (gnus-gethash group gnus-unread-hashtb))) | |
6381 (if (or (null active) (null unread)) | |
6382 ;; Ignore unknown newsgroup. | |
6383 nil | |
6384 ;; Update gnus-unread-hashtb. | |
6385 (if unread-list | |
6386 (setcdr (cdr unread) | |
6387 (gnus-compress-sequence unread-list)) | |
6388 ;; All of the articles are read. | |
6389 (setcdr (cdr unread) '((0 . 0)))) | |
6390 ;; Number of unread articles. | |
6391 (setcar (cdr unread) | |
6392 (gnus-number-of-articles (nthcdr 2 unread))) | |
6393 ;; Update gnus-newsrc-assoc. | |
6394 (if (> (car active) 0) | |
6395 ;; Articles from 1 to N are not active. | |
6396 (setq active (cons 1 (cdr active)))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6397 (setcdr (cdr (gnus-gethash group gnus-newsrc-hashtb)) |
257 | 6398 (gnus-difference-of-range active (nthcdr 2 unread))) |
6399 ;; Update .newsrc buffer. | |
6400 (gnus-update-newsrc-buffer group) | |
6401 ;; Update gnus-marked-assoc. | |
6402 (if (listp marked-list) ;Includes NIL. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6403 (let ((marked (gnus-gethash group gnus-marked-hashtb))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6404 (cond (marked ;There is an entry. |
257 | 6405 (setcdr marked marked-list)) |
6406 (marked-list ;Non-NIL. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6407 (let ((info (cons group marked-list))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6408 ;; hashtb must share the same cons cell. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6409 (setq gnus-marked-assoc |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6410 (cons info gnus-marked-assoc)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6411 (gnus-sethash group info gnus-marked-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6412 )) |
257 | 6413 ))) |
6414 ))) | |
6415 | |
6416 (defun gnus-read-active-file () | |
6417 "Get active file from NNTP server." | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6418 ;; Make sure a connection to NNTP server is alive. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6419 (gnus-start-news-server) |
257 | 6420 (message "Reading active file...") |
6421 (if (gnus-request-list) ;Get active file from server | |
6422 (save-excursion | |
6423 (set-buffer nntp-server-buffer) | |
6424 (gnus-active-to-gnus-format) | |
6425 (message "Reading active file... done")) | |
6426 (error "Cannot read active file from NNTP server."))) | |
6427 | |
6428 (defun gnus-active-to-gnus-format () | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6429 "Convert active file format to internal format. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6430 Lines matching gnus-ignored-newsgroups are ignored." |
257 | 6431 ;; Delete unnecessary lines. |
6432 (goto-char (point-min)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6433 ;;(delete-matching-lines "^to\\..*$") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6434 (delete-matching-lines gnus-ignored-newsgroups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6435 ;; Save OLD active info. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6436 (setq gnus-octive-hashtb gnus-active-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6437 ;; Make large enough hash table. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6438 (setq gnus-active-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6439 (gnus-make-hashtable (count-lines (point-min) (point-max)))) |
257 | 6440 ;; Store active file in hashtable. |
6441 (goto-char (point-min)) | |
6442 (while | |
6443 (re-search-forward | |
6444 "^\\([^ \t]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\([ymn]\\).*$" | |
6445 nil t) | |
6446 (gnus-sethash | |
6447 (buffer-substring (match-beginning 1) (match-end 1)) | |
6448 (list (buffer-substring (match-beginning 1) (match-end 1)) | |
6449 (string-equal | |
6450 "y" (buffer-substring (match-beginning 4) (match-end 4))) | |
6451 (cons (string-to-int | |
6452 (buffer-substring (match-beginning 3) (match-end 3))) | |
6453 (string-to-int | |
6454 (buffer-substring (match-beginning 2) (match-end 2))))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6455 gnus-active-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6456 )) |
257 | 6457 |
6458 (defun gnus-read-newsrc-file (&optional rawfile) | |
6459 "Read startup FILE. | |
6460 If optional argument RAWFILE is non-nil, the raw startup file is read." | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6461 (setq gnus-current-startup-file (gnus-make-newsrc-file gnus-startup-file)) |
257 | 6462 ;; Reset variables which may be included in the quick startup file. |
6463 (let ((variables gnus-variable-list)) | |
6464 (while variables | |
6465 (set (car variables) nil) | |
6466 (setq variables (cdr variables)))) | |
6467 (let* ((newsrc-file gnus-current-startup-file) | |
6468 (quick-file (concat newsrc-file ".el")) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6469 (quick-loaded nil)) |
257 | 6470 (save-excursion |
6471 ;; Prepare .newsrc buffer. | |
6472 (set-buffer (find-file-noselect newsrc-file)) | |
6473 ;; It is not so good idea turning off undo. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6474 ;;(buffer-flush-undo (current-buffer)) |
257 | 6475 ;; Load quick .newsrc to restore gnus-marked-assoc and |
6476 ;; gnus-killed-assoc even if gnus-newsrc-assoc is out of date. | |
6477 (condition-case nil | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6478 (progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6479 (setq quick-loaded (load quick-file t t t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6480 ;; Recreate hashtables. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6481 (setq gnus-killed-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6482 (gnus-make-hashtable-from-alist gnus-killed-assoc)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6483 (setq gnus-marked-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6484 (gnus-make-hashtable-from-alist gnus-marked-assoc)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6485 ) |
257 | 6486 (error nil)) |
6487 (cond ((and (not rawfile) ;Not forced to read the raw file. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6488 ;; .newsrc.el is newer than .newsrc. |
3474
9eaa2151f7f6
(gnus-summary-isearch-article): Call isearch-forward
Richard M. Stallman <rms@gnu.org>
parents:
3331
diff
changeset
|
6489 ;; Do it this way in case timestamps are identical |
9eaa2151f7f6
(gnus-summary-isearch-article): Call isearch-forward
Richard M. Stallman <rms@gnu.org>
parents:
3331
diff
changeset
|
6490 ;; (on fast machines/disks). |
9eaa2151f7f6
(gnus-summary-isearch-article): Call isearch-forward
Richard M. Stallman <rms@gnu.org>
parents:
3331
diff
changeset
|
6491 (not (file-newer-than-file-p newsrc-file quick-file)) |
257 | 6492 quick-loaded |
6493 gnus-newsrc-assoc ;Really loaded? | |
6494 ) | |
6495 ;; We don't have to read the raw startup file. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6496 ;; gnus-newsrc-assoc may be defined in the quick startup file. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6497 ;; So, we have to define the hashtable here. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6498 (setq gnus-newsrc-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6499 (gnus-make-hashtable-from-alist gnus-newsrc-assoc))) |
257 | 6500 (t |
6501 ;; Since .newsrc file is newer than quick file, read it. | |
6502 (message "Reading %s..." newsrc-file) | |
6503 (gnus-newsrc-to-gnus-format) | |
6504 (gnus-check-killed-newsgroups) | |
6505 (message "Reading %s... Done" newsrc-file))) | |
6506 ))) | |
6507 | |
6508 (defun gnus-make-newsrc-file (file) | |
6509 "Make server dependent file name by catenating FILE and server host name." | |
6510 (let* ((file (expand-file-name file nil)) | |
6511 (real-file (concat file "-" gnus-nntp-server))) | |
6512 (if (file-exists-p real-file) | |
6513 real-file file) | |
6514 )) | |
6515 | |
6516 (defun gnus-newsrc-to-gnus-format () | |
6517 "Parse current buffer as .newsrc file." | |
6518 (let ((newsgroup nil) | |
6519 (subscribe nil) | |
6520 (ranges nil) | |
6521 (subrange nil) | |
6522 (read-list nil)) | |
6523 ;; We have to re-initialize these variable (except for | |
6524 ;; gnus-marked-assoc and gnus-killed-assoc) because quick startup | |
6525 ;; file may contain bogus values. | |
6526 (setq gnus-newsrc-options nil) | |
6527 (setq gnus-newsrc-options-n-yes nil) | |
6528 (setq gnus-newsrc-options-n-no nil) | |
6529 (setq gnus-newsrc-assoc nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6530 ;; Make large enough hash table. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6531 (setq gnus-newsrc-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6532 (gnus-make-hashtable |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6533 (max (length gnus-active-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6534 (count-lines (point-min) (point-max))))) |
257 | 6535 ;; Save options line to variable. |
6536 ;; Lines beginning with white spaces are treated as continuation | |
6537 ;; line. Refer man page of newsrc(5). | |
6538 (goto-char (point-min)) | |
6539 (if (re-search-forward | |
6540 "^[ \t]*options[ \t]*\\(.*\\(\n[ \t]+.*\\)*\\)[ \t]*$" nil t) | |
6541 (progn | |
6542 ;; Save entire options line. | |
6543 (setq gnus-newsrc-options | |
6544 (buffer-substring (match-beginning 1) (match-end 1))) | |
6545 ;; Compile "-n" option. | |
6546 (if (string-match "\\(^\\|[ \t\n]\\)-n" gnus-newsrc-options) | |
6547 (let ((yes-and-no | |
6548 (gnus-parse-n-options | |
6549 (substring gnus-newsrc-options (match-end 0))))) | |
6550 (setq gnus-newsrc-options-n-yes (car yes-and-no)) | |
6551 (setq gnus-newsrc-options-n-no (cdr yes-and-no)) | |
6552 )) | |
6553 )) | |
6554 ;; Parse body of .newsrc file | |
6555 ;; Options line continuation lines must be also considered here. | |
6556 ;; Before supporting continuation lines, " newsgroup ! 1-5" was | |
6557 ;; okay, but now it is invalid. It should be "newsgroup! 1-5". | |
6558 (goto-char (point-min)) | |
6559 ;; Due to overflows in regex.c, change the following regexp: | |
6560 ;; "^\\([^:! \t\n]+\\)\\([:!]\\)[ \t]*\\(.*\\)$" | |
6561 ;; Suggested by composer@bucsf.bu.edu (Jeff Kellem). | |
6562 (while (re-search-forward | |
6563 "^\\([^:! \t\n]+\\)\\([:!]\\)[ \t]*\\(\\(...\\)*.*\\)$" nil t) | |
6564 (setq newsgroup (buffer-substring (match-beginning 1) (match-end 1))) | |
6565 ;; Check duplications of newsgroups. | |
6566 ;; Note: Checking the duplications takes very long time. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6567 (if (gnus-gethash newsgroup gnus-newsrc-hashtb) |
257 | 6568 (message "Ignore duplicated newsgroup: %s" newsgroup) |
6569 (setq subscribe | |
6570 (string-equal | |
6571 ":" (buffer-substring (match-beginning 2) (match-end 2)))) | |
6572 (setq ranges (buffer-substring (match-beginning 3) (match-end 3))) | |
6573 (setq read-list nil) | |
6574 (while (string-match "^[, \t]*\\([0-9-]+\\)" ranges) | |
6575 (setq subrange (substring ranges (match-beginning 1) (match-end 1))) | |
6576 (setq ranges (substring ranges (match-end 1))) | |
6577 (cond ((string-match "^\\([0-9]+\\)-\\([0-9]+\\)$" subrange) | |
6578 (setq read-list | |
6579 (cons | |
6580 (cons (string-to-int | |
6581 (substring subrange | |
6582 (match-beginning 1) (match-end 1))) | |
6583 (string-to-int | |
6584 (substring subrange | |
6585 (match-beginning 2) (match-end 2)))) | |
6586 read-list))) | |
6587 ((string-match "^[0-9]+$" subrange) | |
6588 (setq read-list | |
6589 (cons (cons (string-to-int subrange) | |
6590 (string-to-int subrange)) | |
6591 read-list))) | |
6592 (t | |
6593 (ding) (message "Ignoring bogus lines of %s" newsgroup) | |
6594 (sit-for 0)) | |
6595 )) | |
6596 (setq gnus-newsrc-assoc | |
6597 (cons (cons newsgroup (cons subscribe (nreverse read-list))) | |
6598 gnus-newsrc-assoc)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6599 ;; Update gnus-newsrc-hashtb one by one. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6600 (gnus-sethash newsgroup (car gnus-newsrc-assoc) gnus-newsrc-hashtb) |
257 | 6601 )) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6602 (setq gnus-newsrc-assoc (nreverse gnus-newsrc-assoc)) |
257 | 6603 )) |
6604 | |
6605 (defun gnus-parse-n-options (options) | |
6606 "Parse -n NEWSGROUPS options and return a cons of YES and NO regexps." | |
6607 (let ((yes nil) | |
6608 (no nil) | |
6609 (yes-or-no nil) ;`!' or not. | |
6610 (newsgroup nil)) | |
6611 ;; Parse each newsgroup description such as "comp.all". Commas | |
6612 ;; and white spaces can be a newsgroup separator. | |
6613 (while | |
6614 (string-match "^[ \t\n,]*\\(!?\\)\\([^--- \t\n,][^ \t\n,]*\\)" options) | |
6615 (setq yes-or-no | |
6616 (substring options (match-beginning 1) (match-end 1))) | |
6617 (setq newsgroup | |
6618 (regexp-quote | |
6619 (substring options | |
6620 (match-beginning 2) (match-end 2)))) | |
6621 (setq options (substring options (match-end 2))) | |
6622 ;; Rewrite "all" to ".+" not ".*". ".+" requires at least one | |
6623 ;; character. | |
6624 (while (string-match "\\(^\\|\\\\[.]\\)all\\(\\\\[.]\\|$\\)" newsgroup) | |
6625 (setq newsgroup | |
6626 (concat (substring newsgroup 0 (match-end 1)) | |
6627 ".+" | |
6628 (substring newsgroup (match-beginning 2))))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6629 ;; It is yes or no. |
257 | 6630 (cond ((string-equal yes-or-no "!") |
6631 (setq no (cons newsgroup no))) | |
6632 ((string-equal newsgroup ".+")) ;Ignore `all'. | |
6633 (t | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6634 (setq yes (cons newsgroup yes)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6635 ) |
257 | 6636 ;; Make a cons of regexps from parsing result. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6637 ;; We have to append \(\.\|$\) to prevent matching substring of |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6638 ;; newsgroup. For example, "jp.net" should not match with |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6639 ;; "jp.network". |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6640 ;; Fixes for large regexp problems are from yonezu@nak.math.keio.ac.jp. |
257 | 6641 (cons (if yes |
6642 (concat "^\\(" | |
6643 (apply (function concat) | |
6644 (mapcar | |
6645 (function | |
6646 (lambda (newsgroup) | |
6647 (concat newsgroup "\\|"))) | |
6648 (cdr yes))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6649 (car yes) "\\)\\(\\.\\|$\\)")) |
257 | 6650 (if no |
6651 (concat "^\\(" | |
6652 (apply (function concat) | |
6653 (mapcar | |
6654 (function | |
6655 (lambda (newsgroup) | |
6656 (concat newsgroup "\\|"))) | |
6657 (cdr no))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6658 (car no) "\\)\\(\\.\\|$\\)"))) |
257 | 6659 )) |
6660 | |
6661 (defun gnus-save-newsrc-file () | |
6662 "Save to .newsrc FILE." | |
6663 ;; Note: We cannot save .newsrc file if all newsgroups are removed | |
6664 ;; from the variable gnus-newsrc-assoc. | |
6665 (and (or gnus-newsrc-assoc gnus-killed-assoc) | |
6666 gnus-current-startup-file | |
6667 (save-excursion | |
6668 ;; A buffer containing .newsrc file may be deleted. | |
6669 (set-buffer (find-file-noselect gnus-current-startup-file)) | |
6670 (if (not (buffer-modified-p)) | |
6671 (message "(No changes need to be saved)") | |
6672 (message "Saving %s..." gnus-current-startup-file) | |
6673 (let ((make-backup-files t) | |
6674 (version-control nil) | |
6675 (require-final-newline t)) ;Don't ask even if requested. | |
6676 ;; Make backup file of master newsrc. | |
6677 ;; You can stop or change version control of backup file. | |
6678 ;; Suggested by jason@violet.berkeley.edu. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6679 (run-hooks 'gnus-save-newsrc-hook) |
257 | 6680 (save-buffer)) |
6681 ;; Quickly loadable .newsrc. | |
6682 (set-buffer (get-buffer-create " *GNUS-newsrc*")) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6683 (buffer-flush-undo (current-buffer)) |
257 | 6684 (erase-buffer) |
6685 (gnus-gnus-to-quick-newsrc-format) | |
6686 (let ((make-backup-files nil) | |
6687 (version-control nil) | |
6688 (require-final-newline t)) ;Don't ask even if requested. | |
6689 (write-file (concat gnus-current-startup-file ".el"))) | |
6690 (kill-buffer (current-buffer)) | |
6691 (message "Saving %s... Done" gnus-current-startup-file) | |
6692 )) | |
6693 )) | |
6694 | |
6695 (defun gnus-update-newsrc-buffer (group &optional delete next) | |
6696 "Incrementally update .newsrc buffer about GROUP. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6697 If optional 1st argument DELETE is non-nil, delete the group. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6698 If optional 2nd argument NEXT is non-nil, inserted before it." |
257 | 6699 (save-excursion |
6700 ;; Taking account of the killed startup file. | |
6701 ;; Suggested by tale@pawl.rpi.edu. | |
6702 (set-buffer (or (get-file-buffer gnus-current-startup-file) | |
6703 (find-file-noselect gnus-current-startup-file))) | |
6704 ;; Options line continuation lines must be also considered here. | |
6705 ;; Before supporting continuation lines, " newsgroup ! 1-5" was | |
6706 ;; okay, but now it is invalid. It should be "newsgroup! 1-5". | |
6707 (let ((deleted nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6708 (case-fold-search nil) ;Should NOT ignore case. |
257 | 6709 (buffer-read-only nil)) ;May be not modifiable. |
6710 ;; Delete ALL entries which match for GROUP. | |
6711 (goto-char (point-min)) | |
6712 (while (re-search-forward | |
6713 (concat "^" (regexp-quote group) "[:!]") nil t) | |
6714 (beginning-of-line) | |
6715 (delete-region (point) (progn (forward-line 1) (point))) | |
6716 (setq deleted t) ;Old entry is deleted. | |
6717 ) | |
6718 (if delete | |
6719 nil | |
6720 ;; Insert group entry. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6721 (let ((newsrc (gnus-gethash group gnus-newsrc-hashtb))) |
257 | 6722 (if (null newsrc) |
6723 nil | |
6724 ;; Find insertion point. | |
6725 (cond (deleted nil) ;Insert here. | |
6726 ((and (stringp next) | |
6727 (progn | |
6728 (goto-char (point-min)) | |
6729 (re-search-forward | |
6730 (concat "^" (regexp-quote next) "[:!]") nil t))) | |
6731 (beginning-of-line)) | |
6732 (t | |
6733 (goto-char (point-max)) | |
6734 (or (bolp) | |
6735 (insert "\n")))) | |
6736 ;; Insert after options line. | |
6737 (if (looking-at "^[ \t]*options\\([ \t]\\|$\\)") | |
6738 (progn | |
6739 (forward-line 1) | |
6740 ;; Skip continuation lines. | |
6741 (while (and (not (eobp)) | |
6742 (looking-at "^[ \t]+")) | |
6743 (forward-line 1)))) | |
6744 (insert group ;Group name | |
6745 (if (nth 1 newsrc) ": " "! ")) ;Subscribed? | |
6746 (gnus-ranges-to-newsrc-format (nthcdr 2 newsrc)) ;Read articles | |
6747 (insert "\n") | |
6748 ))) | |
6749 ))) | |
6750 | |
6751 (defun gnus-gnus-to-quick-newsrc-format () | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6752 "Insert GNUS variables such as gnus-newsrc-assoc in lisp format." |
257 | 6753 (insert ";; GNUS internal format of .newsrc.\n") |
6754 (insert ";; Touch .newsrc instead if you think to remove this file.\n") | |
6755 (let ((variable nil) | |
6756 (variables gnus-variable-list) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6757 ;; Temporary rebind to make changes |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6758 ;; gnus-check-killed-newsgroups in invisible. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6759 (gnus-killed-assoc gnus-killed-assoc) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6760 (gnus-killed-hashtb gnus-killed-hashtb)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6761 ;; Remove duplicated or unsubscribed newsgroups in |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6762 ;; gnus-killed-assoc (and gnus-killed-hashtb). |
257 | 6763 (gnus-check-killed-newsgroups) |
6764 ;; Then, insert lisp expressions. | |
6765 (while variables | |
6766 (setq variable (car variables)) | |
6767 (and (boundp variable) | |
6768 (symbol-value variable) | |
6769 (insert "(setq " (symbol-name variable) " '" | |
6770 (prin1-to-string (symbol-value variable)) | |
6771 ")\n")) | |
6772 (setq variables (cdr variables))) | |
6773 )) | |
6774 | |
6775 (defun gnus-ranges-to-newsrc-format (ranges) | |
6776 "Insert ranges of read articles." | |
6777 (let ((range nil)) ;Range is a pair of BEGIN and END. | |
6778 (while ranges | |
6779 (setq range (car ranges)) | |
6780 (setq ranges (cdr ranges)) | |
6781 (cond ((= (car range) (cdr range)) | |
6782 (if (= (car range) 0) | |
6783 (setq ranges nil) ;No unread articles. | |
6784 (insert (int-to-string (car range))) | |
6785 (if ranges (insert ",")) | |
6786 )) | |
6787 (t | |
6788 (insert (int-to-string (car range)) | |
6789 "-" | |
6790 (int-to-string (cdr range))) | |
6791 (if ranges (insert ",")) | |
6792 )) | |
6793 ))) | |
6794 | |
6795 (defun gnus-compress-sequence (numbers) | |
6796 "Convert list of sorted numbers to ranges." | |
6797 (let* ((numbers (sort (copy-sequence numbers) (function <))) | |
6798 (first (car numbers)) | |
6799 (last (car numbers)) | |
6800 (result nil)) | |
6801 (while numbers | |
6802 (cond ((= last (car numbers)) nil) ;Omit duplicated number | |
6803 ((= (1+ last) (car numbers)) ;Still in sequence | |
6804 (setq last (car numbers))) | |
6805 (t ;End of one sequence | |
6806 (setq result (cons (cons first last) result)) | |
6807 (setq first (car numbers)) | |
6808 (setq last (car numbers))) | |
6809 ) | |
6810 (setq numbers (cdr numbers)) | |
6811 ) | |
6812 (nreverse (cons (cons first last) result)) | |
6813 )) | |
6814 | |
6815 (defun gnus-uncompress-sequence (ranges) | |
6816 "Expand compressed format of sequence." | |
6817 (let ((first nil) | |
6818 (last nil) | |
6819 (result nil)) | |
6820 (while ranges | |
6821 (setq first (car (car ranges))) | |
6822 (setq last (cdr (car ranges))) | |
6823 (while (< first last) | |
6824 (setq result (cons first result)) | |
6825 (setq first (1+ first))) | |
6826 (setq result (cons first result)) | |
6827 (setq ranges (cdr ranges)) | |
6828 ) | |
6829 (nreverse result) | |
6830 )) | |
6831 | |
6832 (defun gnus-number-of-articles (range) | |
6833 "Compute number of articles from RANGE `((beg1 . end1) (beg2 . end2) ...)'." | |
6834 (let ((count 0)) | |
6835 (while range | |
6836 (if (/= (cdr (car range)) 0) | |
6837 ;; If end1 is 0, it must be skipped. Usually no articles in | |
6838 ;; this group. | |
6839 (setq count (+ count 1 (- (cdr (car range)) (car (car range)))))) | |
6840 (setq range (cdr range)) | |
6841 ) | |
6842 count ;Result | |
6843 )) | |
6844 | |
6845 (defun gnus-difference-of-range (src obj) | |
6846 "Compute (SRC - OBJ) on range. | |
6847 Range of SRC is expressed as `(beg . end)'. | |
6848 Range of OBJ is expressed as `((beg1 . end1) (beg2 . end2) ...)." | |
6849 (let ((beg (car src)) | |
6850 (end (cdr src)) | |
6851 (range nil)) ;This is result. | |
6852 ;; Src may be nil. | |
6853 (while (and src obj) | |
6854 (let ((beg1 (car (car obj))) | |
6855 (end1 (cdr (car obj)))) | |
6856 (cond ((> beg end) | |
6857 (setq obj nil)) ;Terminate loop | |
6858 ((< beg beg1) | |
6859 (setq range (cons (cons beg (min (1- beg1) end)) range)) | |
6860 (setq beg (1+ end1))) | |
6861 ((>= beg beg1) | |
6862 (setq beg (max beg (1+ end1)))) | |
6863 ) | |
6864 (setq obj (cdr obj)) ;Next OBJ | |
6865 )) | |
6866 ;; Src may be nil. | |
6867 (if (and src (<= beg end)) | |
6868 (setq range (cons (cons beg end) range))) | |
6869 ;; Result | |
6870 (if range | |
6871 (nreverse range) | |
6872 (list (cons 0 0))) | |
6873 )) | |
6874 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6875 (defun gnus-read-distributions-file () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6876 "Get distributions file from NNTP server (NNTP2 functionality)." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6877 ;; Make sure a connection to NNTP server is alive. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6878 (gnus-start-news-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6879 (message "Reading distributions file...") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6880 (setq gnus-distribution-list nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6881 (if (gnus-request-list-distributions) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6882 (save-excursion |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6883 (set-buffer nntp-server-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6884 (gnus-distributions-to-gnus-format) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6885 (message "Reading distributions file... done")) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6886 ;; It's not a fatal error. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6887 ;;(error "Cannot read distributions file from NNTP server.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6888 ) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6889 ;; Merge with user supplied default distributions. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6890 (let ((defaults (reverse gnus-local-distributions)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6891 (dist nil)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6892 (while defaults |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6893 (setq dist (assoc (car defaults) gnus-distribution-list)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6894 (if dist |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6895 (setq gnus-distribution-list |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6896 (delq dist gnus-distribution-list))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6897 (setq gnus-distribution-list |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6898 (cons (list (car defaults)) gnus-distribution-list)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6899 (setq defaults (cdr defaults)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6900 ))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6901 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6902 (defun gnus-distributions-to-gnus-format () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6903 "Convert distributions file format to internal format." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6904 (setq gnus-distribution-list nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6905 (goto-char (point-min)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6906 (while (re-search-forward "^\\([^ \t\n]+\\).*$" nil t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6907 (setq gnus-distribution-list |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6908 (cons (list (buffer-substring (match-beginning 1) (match-end 1))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6909 gnus-distribution-list))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6910 (setq gnus-distribution-list |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6911 (nreverse gnus-distribution-list))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6912 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6913 ;; Some older version of GNU Emacs does not support function |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6914 ;; `file-newer-than-file-p'. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6915 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6916 (or (fboundp 'file-newer-than-file-p) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6917 (defun file-newer-than-file-p (file1 file2) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6918 "Return t if file FILE1 is newer than file FILE2. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6919 If FILE1 does not exist, the answer is nil; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6920 otherwise, if FILE2 does not exist, the answer is t." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6921 (let ((mod1 (nth 5 (file-attributes file1))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6922 (mod2 (nth 5 (file-attributes file2)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6923 (cond ((not (file-exists-p file1)) nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6924 ((not (file-exists-p file2)) t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6925 ((and mod2 mod1) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6926 (or (< (car mod2) (car mod1)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6927 (and (= (car mod2) (car mod1)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6928 (<= (nth 1 mod2) (nth 1 mod1))))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6929 )))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6930 |
257 | 6931 |
6932 ;;Local variables: | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6933 ;;eval: (put 'gnus-eval-in-buffer-window 'lisp-indent-hook 1) |
257 | 6934 ;;end: |