Mercurial > emacs
annotate lisp/=gnus.el @ 10504:8a1bd0598b49
Comment change.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 20 Jan 1995 23:40:03 +0000 |
parents | 6270254bfd9a |
children | 0701b42497fc |
rev | line source |
---|---|
9550
5b91f8657de6
(gnus-group-group-name): Get rid of text properties.
Richard M. Stallman <rms@gnu.org>
parents:
8523
diff
changeset
|
1 ;;; gnus.el --- NNTP-based News Reader for GNU Emacs |
7300 | 2 ;; Copyright (C) 1987,88,89,90,93,94 Free Software Foundation, Inc. |
4173
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
3 |
4317 | 4 ;; Author: Masanobu UMEDA <umerin@mse.kyutech.ac.jp> |
4173
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
5 ;; Keywords: news |
807
4f28bd14272c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
716
diff
changeset
|
6 |
257 | 7 ;; This file is part of GNU Emacs. |
8 | |
711
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
9 ;; 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
|
10 ;; 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
|
11 ;; 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
|
12 ;; any later version. |
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
13 |
257 | 14 ;; 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
|
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
17 ;; GNU General Public License for more details. |
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
18 |
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
19 ;; 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
|
20 ;; 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
|
21 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
257 | 22 |
807
4f28bd14272c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
716
diff
changeset
|
23 ;;; Commentary: |
4f28bd14272c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
716
diff
changeset
|
24 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
25 ;; How to Install GNUS: |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
26 ;; (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
|
27 ;; nntp.elc). |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
28 ;; (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
|
29 ;; nntp.el. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
30 ;; (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
|
31 ;; 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
|
32 ;; byte-compile-file nnspool.el, too. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
33 ;; (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
|
34 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
35 ;; setenv NNTPSERVER flab |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
36 ;; setenv DOMAINNAME "stars.flab.Fujitsu.CO.JP" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
37 ;; setenv ORGANIZATION "Fujitsu Laboratories Ltd., Kawasaki, Japan." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
38 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
39 ;; 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
|
40 ;; or default.el as follows: |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
41 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
42 ;; (setq gnus-nntp-server "flab") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
43 ;; (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
|
44 ;; (setq gnus-local-organization "Fujitsu Laboratories Ltd., ...") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
45 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
46 ;; 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
|
47 ;; you don't have to define the domain. |
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 ;; (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
|
50 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
51 ;; (setq gnus-nntp-service 119) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
52 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
53 ;; Or, if you'd like to use a local news spool directly in stead |
10177 | 54 ;; of NNTP, set the variable to nil as follows: |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
55 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
56 ;; (setq gnus-nntp-service nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
57 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
58 ;; (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
|
59 ;; define the variable as follows: |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
60 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
61 ;; (setq gnus-use-generic-from t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
62 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
63 ;; (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
|
64 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
65 ;; (autoload 'gnus "gnus" "Read network news." t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
66 ;; (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
|
67 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
68 ;; (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
|
69 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
70 ;; (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
|
71 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
72 ;; 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
|
73 ;; private directory using GNUS. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
74 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
75 ;; 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
|
76 ;; 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
|
77 ;; communicating with NNTP server inside Emacs. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
78 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
79 ;; (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
|
80 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
81 ;; 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
|
82 ;; 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
|
83 ;; variable gnus-info-directory to that directory. |
257 | 84 ;; |
4173
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
85 ;; For getting more information about GNUS, consult USENET newsgorup |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
86 ;; gnu.emacs.gnus. |
257 | 87 |
88 ;; TO DO: | |
89 ;; (1) Incremental update of active info. | |
4173
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
90 ;; (2) Asynchronous transmission of large messages. |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
91 |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
92 ;;; Code: |
257 | 93 |
94 (require 'nntp) | |
95 (require 'mail-utils) | |
8470
999e5521d05a
Require timezone when loading this file.
Richard M. Stallman <rms@gnu.org>
parents:
8444
diff
changeset
|
96 (require 'timezone) |
257 | 97 |
4173
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
98 (defvar gnus-default-nntp-server nil |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
99 "*Specify default NNTP server. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
100 This variable should be defined in `site-init.el'.") |
4173
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
101 |
3331
3ab36486eede
(gnus-nntp-server): Use gnus-default-nntp-server.
Richard M. Stallman <rms@gnu.org>
parents:
2845
diff
changeset
|
102 (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
|
103 "*The name of the host running NNTP server. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
104 If it is a string starting with a colon, as in as `:DIRECTORY', then the |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
105 directory ~/DIRECTORY is used as the news spool. |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
106 This variable is initialized from the NNTPSERVER environment variable |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
107 or from `gnus-default-nntp-server'.") |
257 | 108 |
716
f11e7af7c0d9
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
711
diff
changeset
|
109 (defvar gnus-nntp-service "nntp" |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
110 "*NNTP service name (\"nntp\" or 119). |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
111 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
|
112 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
113 (defvar gnus-startup-file "~/.newsrc" |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
114 "*Your `.newsrc' file. Use `.newsrc-SERVER' instead if exists.") |
716
f11e7af7c0d9
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
711
diff
changeset
|
115 |
257 | 116 (defvar gnus-signature-file "~/.signature" |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
117 "*Your `.signature' file. Use `.signature-DISTRIBUTION' instead if exists.") |
257 | 118 |
119 (defvar gnus-use-cross-reference t | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
120 "*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
|
121 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
|
122 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
|
123 read in all newsgroups.") |
257 | 124 |
125 (defvar gnus-use-followup-to t | |
126 "*Specifies what to do with Followup-To: field. | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
127 If nil, ignore `Followup-to:' field. If t, use its value except for |
3591
507f64624555
Apply typo patches from Paul Eggert.
Jim Blandy <jimb@redhat.com>
parents:
3496
diff
changeset
|
128 `poster'. Otherwise, if not nil nor t, always use its value.") |
257 | 129 |
130 (defvar gnus-large-newsgroup 50 | |
131 "*The number of articles which indicates a large newsgroup. | |
132 If the number of articles in a newsgroup is greater than the value, | |
133 confirmation is required for selecting the newsgroup.") | |
134 | |
135 (defvar gnus-author-copy (getenv "AUTHORCOPY") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
136 "*File name saving a copy of an article posted using FCC: field. |
257 | 137 Initialized from the AUTHORCOPY environment variable. |
138 | |
139 Articles are saved using a function specified by the the variable | |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
140 `gnus-author-copy-saver' (`rmail-output' is default) if a file name is |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
141 given. Instead, if the first character of the name is `|', the |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
142 contents of the article is piped out to the named program. It is |
257 | 143 possible to save an article in an MH folder as follows: |
144 | |
7639 | 145 \(setq gnus-author-copy \"|/usr/local/lib/mh/rcvstore +Article\")") |
257 | 146 |
147 (defvar gnus-author-copy-saver (function rmail-output) | |
148 "*A function called with a file name to save an author copy to. | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
149 The default function is `rmail-output' which saves in inbox format.") |
257 | 150 |
151 (defvar gnus-use-long-file-name | |
152 (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
|
153 "*Non-nil means that a newsgroup name is used as a default file name |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
154 to save articles to. If it's nil, the directory form of a newsgroup is |
257 | 155 used instead.") |
156 | |
157 (defvar gnus-article-save-directory (getenv "SAVEDIR") | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
158 "*A directory name to save articles to (default is `~/News'). |
257 | 159 Initialized from the SAVEDIR environment variable.") |
160 | |
8439
e3040f870f4f
(gnus-kill-files-directory): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
8413
diff
changeset
|
161 (defvar gnus-kill-files-directory (getenv "SAVEDIR") |
e3040f870f4f
(gnus-kill-files-directory): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
8413
diff
changeset
|
162 "*A directory name to save kill files to (default to ~/News). |
e3040f870f4f
(gnus-kill-files-directory): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
8413
diff
changeset
|
163 Initialized from the SAVEDIR environment variable.") |
e3040f870f4f
(gnus-kill-files-directory): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
8413
diff
changeset
|
164 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
165 (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
|
166 "*A function to save articles in your favorite format. |
257 | 167 The function must be interactively callable (in other words, it must |
168 be an Emacs command). | |
169 | |
170 GNUS provides the following functions: | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
171 gnus-summary-save-in-rmail (in Rmail format) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
172 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
|
173 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
|
174 gnus-summary-save-in-file (in article format).") |
257 | 175 |
176 (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
|
177 "*A function generating a file name to save articles in Rmail format. |
257 | 178 The function is called with NEWSGROUP, HEADERS, and optional LAST-FILE.") |
179 | |
180 (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
|
181 "*A function generating a file name to save articles in Unix mail format. |
257 | 182 The function is called with NEWSGROUP, HEADERS, and optional LAST-FILE.") |
183 | |
184 (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
|
185 "*A function generating a file name to save articles in MH folder. |
257 | 186 The function is called with NEWSGROUP, HEADERS, and optional LAST-FOLDER.") |
187 | |
188 (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
|
189 "*A function generating a file name to save articles in article format. |
257 | 190 The function is called with NEWSGROUP, HEADERS, and optional LAST-FILE.") |
191 | |
192 (defvar gnus-kill-file-name "KILL" | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
193 "*File name of a KILL file.") |
257 | 194 |
195 (defvar gnus-novice-user t | |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
196 "*Non-nil means that you are a novice to USENET. |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
197 If non-nil, verbose messages may be displayed |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
198 or your confirmations may be required.") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
199 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
200 (defvar gnus-interactive-catchup t |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
201 "*Require your confirmation when catching up a newsgroup if non-nil.") |
257 | 202 |
203 (defvar gnus-interactive-post t | |
204 "*Newsgroup, subject, and distribution will be asked for if non-nil.") | |
205 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
206 (defvar gnus-interactive-exit t |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
207 "*Require your confirmation when exiting GNUS if non-nil.") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
208 |
257 | 209 (defvar gnus-user-login-name nil |
210 "*The login name of the user. | |
5911
cfd1fc2b1c7b
(gnus-user-login-name): Fix doc string.
Karl Heuer <kwzh@gnu.org>
parents:
5510
diff
changeset
|
211 Got from the function `user-login-name' if undefined.") |
257 | 212 |
213 (defvar gnus-user-full-name nil | |
214 "*The full name of the user. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
215 Got from the NAME environment variable if undefined.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
216 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
217 (defvar gnus-show-mime nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
218 "*Show MIME message if non-nil.") |
257 | 219 |
220 (defvar gnus-show-threads t | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
221 "*Show conversation threads in Summary Mode if non-nil.") |
257 | 222 |
223 (defvar gnus-thread-hide-subject t | |
224 "*Non-nil means hide subjects for thread subtrees.") | |
225 | |
226 (defvar gnus-thread-hide-subtree nil | |
227 "*Non-nil means hide thread subtrees initially. | |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
228 If non-nil, you have to run the command `gnus-summary-show-thread' by |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
229 hand or by using `gnus-select-article-hook' to show hidden threads.") |
257 | 230 |
231 (defvar gnus-thread-hide-killed t | |
232 "*Non-nil means hide killed thread subtrees automatically.") | |
233 | |
234 (defvar gnus-thread-ignore-subject nil | |
235 "*Don't take care of subject differences, but only references if non-nil. | |
236 If it is non-nil, some commands work with subjects do not work properly.") | |
237 | |
238 (defvar gnus-thread-indent-level 4 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
239 "*Indentation of thread subtrees.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
240 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
241 (defvar gnus-ignored-newsgroups "^to\\..*$" |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
242 "*A regexp to match uninteresting newsgroups in the active file. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
243 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
|
244 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
|
245 thus making them effectively invisible.") |
257 | 246 |
247 (defvar gnus-ignored-headers | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
248 "^Path:\\|^Posting-Version:\\|^Article-I.D.:\\|^Expires:\\|^Date-Received:\\|^References:\\|^Control:\\|^Xref:\\|^Lines:\\|^Posted:\\|^Relay-Version:\\|^Message-ID:\\|^Nf-ID:\\|^Nf-From:\\|^Approved:\\|^Sender:" |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
249 "*Header fields not worth displaying. |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
250 Ordinarily GNUS excludes these when displaying an article. |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
251 If you want to see them, ask to see the message with \"the full header\" |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
252 \(also known as \"the original header\").") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
253 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
254 (defvar gnus-required-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
255 '(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
|
256 "*All required fields for articles you post. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
257 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
|
258 and Path fields. Organization, Distribution and Lines are optional. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
259 If you want GNUS not to insert some field, remove it from this list.") |
257 | 260 |
261 (defvar gnus-show-all-headers nil | |
262 "*Show all headers of an article if non-nil.") | |
263 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
264 (defvar gnus-save-all-headers t |
257 | 265 "*Save all headers of an article if non-nil.") |
266 | |
267 (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
|
268 "*A function generating a optional string displayed in GNUS Summary |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
269 mode buffer. The function is called with an article HEADER. The |
257 | 270 result must be a string excluding `[' and `]'.") |
271 | |
272 (defvar gnus-auto-extend-newsgroup t | |
3591
507f64624555
Apply typo patches from Paul Eggert.
Jim Blandy <jimb@redhat.com>
parents:
3496
diff
changeset
|
273 "*Extend visible articles to forward and backward if non-nil.") |
257 | 274 |
275 (defvar gnus-auto-select-first t | |
276 "*Select the first unread article automagically if non-nil. | |
277 If you want to prevent automatic selection of the first unread article | |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
278 in some newsgroups, set the variable to nil in `gnus-select-group-hook' |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
279 or `gnus-apply-kill-hook'.") |
257 | 280 |
281 (defvar gnus-auto-select-next t | |
282 "*Select the next newsgroup automagically if non-nil. | |
283 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
|
284 Summary mode and go back to Group mode. If the value is neither nil |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
285 nor t, GNUS will select the following unread newsgroup. Especially, if |
257 | 286 the value is the symbol `quietly', the next unread newsgroup will be |
287 selected without any confirmations.") | |
288 | |
289 (defvar gnus-auto-select-same nil | |
290 "*Select the next article with the same subject automagically if non-nil.") | |
291 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
292 (defvar gnus-auto-center-summary t |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
293 "*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
|
294 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
295 (defvar gnus-auto-mail-to-author nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
296 "*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
|
297 Mail is sent using the function specified by the variable |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
298 `gnus-mail-send-method'.") |
257 | 299 |
300 (defvar gnus-break-pages t | |
301 "*Break an article into pages if non-nil. | |
302 Page delimiter is specified by the variable `gnus-page-delimiter'.") | |
303 | |
304 (defvar gnus-page-delimiter "^\^L" | |
305 "*Regexp describing line-beginnings that separate pages of news article.") | |
306 | |
307 (defvar gnus-digest-show-summary t | |
308 "*Show a summary of undigestified messages if non-nil.") | |
309 | |
310 (defvar gnus-digest-separator "^Subject:[ \t]" | |
311 "*Regexp that separates messages in a digest article.") | |
312 | |
313 (defvar gnus-use-full-window t | |
314 "*Non-nil means to take up the entire screen of Emacs.") | |
315 | |
316 (defvar gnus-window-configuration | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
317 '((summary (0 1 0)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
318 (newsgroups (1 0 0)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
319 (article (0 3 10))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
320 "*Specify window configurations for each action. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
321 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
|
322 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
|
323 respectively. ACTION is `summary', `newsgroups', or `article'.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
324 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
325 (defvar gnus-show-mime-method (function metamail-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
326 "*Function to process a MIME message. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
327 The function is expected to process current buffer as a MIME message.") |
257 | 328 |
329 (defvar gnus-mail-reply-method | |
330 (function gnus-mail-reply-using-mail) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
331 "*Function to compose reply mail. |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
332 The function `gnus-mail-reply-using-mail' uses usual sendmail mail |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
333 program. The function `gnus-mail-reply-using-mhe' uses the MH-E mail |
257 | 334 program. You can use yet another program by customizing this variable.") |
335 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
336 (defvar gnus-mail-forward-method |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
337 (function gnus-mail-forward-using-mail) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
338 "*Function to forward current message to another user. |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
339 The function `gnus-mail-reply-using-mail' uses usual sendmail mail |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
340 program. You can use yet another program by customizing this variable.") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
341 |
257 | 342 (defvar gnus-mail-other-window-method |
343 (function gnus-mail-other-window-using-mail) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
344 "*Function to compose mail in other window. |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
345 The function `gnus-mail-other-window-using-mail' uses the usual sendmail |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
346 mail program. The function `gnus-mail-other-window-using-mhe' uses the MH-E |
257 | 347 mail program. You can use yet another program by customizing this variable.") |
348 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
349 (defvar gnus-mail-send-method send-mail-function |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
350 "*Function to mail a message too which is being posted as an article. |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
351 The message must have To: or Cc: field. The default is copied from |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
352 the variable `send-mail-function'.") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
353 |
257 | 354 (defvar gnus-subscribe-newsgroup-method |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
355 (function gnus-subscribe-alphabetically) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
356 "*Function called with a newsgroup name when new newsgroup is found. |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
357 The function `gnus-subscribe-randomly' inserts a new newsgroup a the |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
358 beginning of newsgroups. The function `gnus-subscribe-alphabetically' |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
359 inserts it in strict alphabetic order. The function |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
360 `gnus-subscribe-hierarchically' inserts it in hierarchical newsgroup |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
361 order. The function `gnus-subscribe-interactively' asks for your decision.") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
362 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
363 (defvar gnus-group-mode-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
364 "*A hook for GNUS Group Mode.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
365 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
366 (defvar gnus-summary-mode-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
367 "*A hook for GNUS Summary Mode.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
368 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
369 (defvar gnus-article-mode-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
370 "*A hook for GNUS Article Mode.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
371 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
372 (defvar gnus-kill-file-mode-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
373 "*A hook for GNUS KILL File Mode.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
374 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
375 (defvar gnus-open-server-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
376 "*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
|
377 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
378 (defvar gnus-startup-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
379 "*A hook called at start up time. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
380 This hook is called after GNUS is connected to the NNTP server. So, it |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
381 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
|
382 NNTP server.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
383 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
384 (defvar gnus-group-prepare-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
385 "*A hook called after newsgroup list is created in the Newsgroup buffer. |
257 | 386 If you want to modify the Newsgroup buffer, you can use this hook.") |
387 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
388 (defvar gnus-summary-prepare-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
389 "*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
|
390 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
|
391 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
392 (defvar gnus-article-prepare-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
393 "*A hook called after an article is prepared in the Article buffer. |
257 | 394 If you want to run a special decoding program like nkf, use this hook.") |
395 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
396 (defvar gnus-select-group-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
397 "*A hook called when a newsgroup is selected. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
398 If you want to sort Summary buffer by date and then by subject, you |
257 | 399 can use the following hook: |
400 | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
401 \(add-hook 'gnus-select-group-hook |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
402 (function |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
403 (lambda () |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
404 ;; First of all, sort by date. |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
405 (gnus-keysort-headers |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
406 (function string-lessp) |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
407 (function |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
408 (lambda (a) |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
409 (gnus-sortable-date (gnus-header-date a))))) |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
410 ;; Then sort by subject string ignoring `Re:'. |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
411 ;; If case-fold-search is non-nil, case of letters is ignored. |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
412 (gnus-keysort-headers |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
413 (function string-lessp) |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
414 (function |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
415 (lambda (a) |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
416 (if case-fold-search |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
417 (downcase (gnus-simplify-subject (gnus-header-subject a) t)) |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
418 (gnus-simplify-subject (gnus-header-subject a) t))))) |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
419 ))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
420 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
421 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
|
422 `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
|
423 following hook: |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
424 |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
425 \(add-hook 'gnus-select-group-hook |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
426 (function |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
427 (lambda () |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
428 (mapcar (function |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
429 (lambda (header) |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
430 (nntp-set-header-subject |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
431 header |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
432 (gnus-simplify-subject |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
433 (gnus-header-subject header) 're-only)))) |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
434 gnus-newsgroup-headers)))) |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
435 |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
436 In some newsgroups author name is meaningless. It is possible to |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
437 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
|
438 |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
439 \(add-hook 'gnus-select-group-hook |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
440 (function |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
441 (lambda () |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
442 (cond ((string-equal \"comp.sources.unix\" gnus-newsgroup-name) |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
443 (setq gnus-optional-headers |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
444 (function gnus-optional-lines))) |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
445 (t |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
446 (setq gnus-optional-headers |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
447 (function gnus-optional-lines-and-from)))))))") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
448 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
449 (defvar gnus-select-article-hook |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
450 '(gnus-summary-show-thread) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
451 "*A hook called when an article is selected. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
452 The default hook shows conversation thread subtrees of the selected |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
453 article automatically using `gnus-summary-show-thread'. |
257 | 454 |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
455 If you'd like to run Rmail on a digest article automagically, you can |
257 | 456 use the following hook: |
457 | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
458 \(add-hook 'gnus-select-article-hook |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
459 (function |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
460 (lambda () |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
461 (cond ((string-equal \"comp.sys.sun\" gnus-newsgroup-name) |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
462 (gnus-summary-rmail-digest)) |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
463 ((and (string-equal \"comp.text\" gnus-newsgroup-name) |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
464 (string-match \"^TeXhax Digest\" |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
465 (gnus-header-subject gnus-current-headers))) |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
466 (gnus-summary-rmail-digest) |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
467 )))) |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
468 t)") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
469 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
470 (defvar gnus-select-digest-hook |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
471 (list |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
472 (function |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
473 (lambda () |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
474 ;; Reply-To: is required by `undigestify-rmail-message'. |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
475 (or (mail-position-on-field "Reply-to" t) |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
476 (progn |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
477 (mail-position-on-field "Reply-to") |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
478 (insert (gnus-fetch-field "From"))))))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
479 "*A hook called when reading digest messages using Rmail. |
257 | 480 This hook can be used to modify incomplete digest articles as follows |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
481 \(this is the default): |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
482 |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
483 \(add-hook 'gnus-select-digest-hook |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
484 (function |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
485 (lambda () |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
486 ;; Reply-To: is required by `undigestify-rmail-message'. |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
487 (or (mail-position-on-field \"Reply-to\" t) |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
488 (progn |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
489 (mail-position-on-field \"Reply-to\") |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
490 (insert (gnus-fetch-field \"From\")))))))") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
491 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
492 (defvar gnus-rmail-digest-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
493 "*A hook called when reading digest messages using Rmail. |
257 | 494 This hook is intended to customize Rmail mode for reading digest articles.") |
495 | |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
496 (defvar gnus-apply-kill-hook '(gnus-apply-kill-file) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
497 "*A hook called when a newsgroup is selected and summary list is prepared. |
257 | 498 This hook is intended to apply a KILL file to the selected newsgroup. |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
499 The function `gnus-apply-kill-file' is called by default. |
257 | 500 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
501 Since a general KILL file is too heavy to use only for a few |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
502 newsgroups, I recommend you to use a lighter hook function. For |
257 | 503 example, if you'd like to apply a KILL file to articles which contains |
504 a string `rmgroup' in subject in newsgroup `control', you can use the | |
505 following hook: | |
506 | |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
507 \(setq gnus-apply-kill-hook |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
508 (list |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
509 (function |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
510 (lambda () |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
511 (cond ((string-match \"control\" gnus-newsgroup-name) |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
512 (gnus-kill \"Subject\" \"rmgroup\") |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
513 (gnus-expunge \"X\")))))))") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
514 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
515 (defvar gnus-mark-article-hook |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
516 (list |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
517 (function |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
518 (lambda () |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
519 (or (memq gnus-current-article gnus-newsgroup-marked) |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
520 (gnus-summary-mark-as-read gnus-current-article)) |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
521 (gnus-summary-set-current-mark "+")))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
522 "*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
|
523 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
|
524 automatically when it is selected. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
525 |
257 | 526 If you'd like to mark as unread (-) instead, use the following hook: |
527 | |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
528 \(setq gnus-mark-article-hook |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
529 (list |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
530 (function |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
531 (lambda () |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
532 (gnus-summary-mark-as-unread gnus-current-article) |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
533 (gnus-summary-set-current-mark \"+\")))))") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
534 |
3474
9eaa2151f7f6
(gnus-summary-isearch-article): Call isearch-forward
Richard M. Stallman <rms@gnu.org>
parents:
3331
diff
changeset
|
535 (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
|
536 "*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
|
537 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
|
538 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
|
539 |
9eaa2151f7f6
(gnus-summary-isearch-article): Call isearch-forward
Richard M. Stallman <rms@gnu.org>
parents:
3331
diff
changeset
|
540 (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
|
541 "*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
|
542 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
|
543 to a file).") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
544 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
545 (defvar gnus-exit-group-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
546 "*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
|
547 If your machine is so slow that exiting from Summary mode takes very |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
548 long time, set the variable `gnus-use-cross-reference' to nil. This |
257 | 549 inhibits marking articles as read using cross-reference information.") |
550 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
551 (defvar gnus-suspend-gnus-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
552 "*A hook called when suspending (not exiting) GNUS.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
553 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
554 (defvar gnus-exit-gnus-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
555 "*A hook called when exiting (not suspending) GNUS.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
556 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
557 (defvar gnus-save-newsrc-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
558 "*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
|
559 This hook is called before saving the `.newsrc' file.") |
257 | 560 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
561 |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
562 ;; Site dependent variables. You have to define these variables in |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
563 ;; site-init.el, default.el or your .emacs. |
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-local-timezone nil |
3496
509112098ff1
(gnus-local-timezone): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
3474
diff
changeset
|
566 "*Local time zone. |
509112098ff1
(gnus-local-timezone): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
3474
diff
changeset
|
567 This value is used only if `current-time-zone' does not work in your Emacs. |
509112098ff1
(gnus-local-timezone): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
3474
diff
changeset
|
568 It specifies the GMT offset, i.e. a decimal integer |
509112098ff1
(gnus-local-timezone): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
3474
diff
changeset
|
569 of the form +-HHMM giving the hours and minutes ahead of (i.e. east of) GMT. |
509112098ff1
(gnus-local-timezone): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
3474
diff
changeset
|
570 For example, +0900 should be used in Japan, since it is 9 hours ahead of GMT. |
509112098ff1
(gnus-local-timezone): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
3474
diff
changeset
|
571 |
509112098ff1
(gnus-local-timezone): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
3474
diff
changeset
|
572 For backwards compatibility, it may also be a string like \"JST\", |
509112098ff1
(gnus-local-timezone): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
3474
diff
changeset
|
573 but strings are obsolescent: you should use numeric offsets instead.") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
574 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
575 (defvar gnus-local-domain nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
576 "*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
|
577 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
|
578 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
|
579 need to define the name.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
580 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
581 (defvar gnus-local-organization nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
582 "*Local organization like: \"Fujitsu Laboratories Ltd., Kawasaki, Japan.\" |
257 | 583 The `ORGANIZATION' environment variable is used instead if defined.") |
584 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
585 (defvar gnus-local-distributions '("local" "world") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
586 "*List of distributions. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
587 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
|
588 file is available, its content is also used.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
589 |
257 | 590 (defvar gnus-use-generic-from nil |
591 "*If nil, prepend local host name to the defined domain in the From: | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
592 field; if a string, use this; if non-nil, strip of the local host name.") |
257 | 593 |
594 (defvar gnus-use-generic-path nil | |
595 "*If nil, use the NNTP server name in the Path: field; if stringp, | |
596 use this; if non-nil, use no host name (user name only)") | |
597 | |
598 ;; Internal variables. | |
599 | |
4173
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
600 (defconst gnus-version "GNUS 4.1" |
257 | 601 "Version numbers of this version of GNUS.") |
602 | |
4173
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
603 (defconst gnus-emacs-version |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
604 (progn |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
605 (string-match "[0-9]*" emacs-version) |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
606 (string-to-int (substring emacs-version |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
607 (match-beginning 0) (match-end 0)))) |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
608 "Major version number of this emacs.") |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
609 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
610 (defvar gnus-info-nodes |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
611 '((gnus-group-mode "(gnus)Newsgroup Commands") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
612 (gnus-summary-mode "(gnus)Summary Commands") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
613 (gnus-article-mode "(gnus)Article Commands") |
4118
4248276b1113
(gnus-info-nodes): Update node names.
Richard M. Stallman <rms@gnu.org>
parents:
3922
diff
changeset
|
614 (gnus-kill-file-mode "(gnus)Kill File") |
4248276b1113
(gnus-info-nodes): Update node names.
Richard M. Stallman <rms@gnu.org>
parents:
3922
diff
changeset
|
615 (gnus-browse-killed-mode "(gnus)Maintaining Subscriptions")) |
257 | 616 "Assoc list of major modes and related Info nodes.") |
617 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
618 ;; Alist syntax is different from that of 3.14.3. |
257 | 619 (defvar gnus-access-methods |
620 '((nntp | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
621 (gnus-retrieve-headers nntp-retrieve-headers) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
622 (gnus-open-server nntp-open-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
623 (gnus-close-server nntp-close-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
624 (gnus-server-opened nntp-server-opened) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
625 (gnus-status-message nntp-status-message) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
626 (gnus-request-article nntp-request-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
627 (gnus-request-group nntp-request-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
628 (gnus-request-list nntp-request-list) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
629 (gnus-request-list-newsgroups nntp-request-list-newsgroups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
630 (gnus-request-list-distributions nntp-request-list-distributions) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
631 (gnus-request-post nntp-request-post)) |
257 | 632 (nnspool |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
633 (gnus-retrieve-headers nnspool-retrieve-headers) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
634 (gnus-open-server nnspool-open-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
635 (gnus-close-server nnspool-close-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
636 (gnus-server-opened nnspool-server-opened) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
637 (gnus-status-message nnspool-status-message) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
638 (gnus-request-article nnspool-request-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
639 (gnus-request-group nnspool-request-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
640 (gnus-request-list nnspool-request-list) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
641 (gnus-request-list-newsgroups nnspool-request-list-newsgroups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
642 (gnus-request-list-distributions nnspool-request-list-distributions) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
643 (gnus-request-post nnspool-request-post)) |
257 | 644 (mhspool |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
645 (gnus-retrieve-headers mhspool-retrieve-headers) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
646 (gnus-open-server mhspool-open-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
647 (gnus-close-server mhspool-close-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
648 (gnus-server-opened mhspool-server-opened) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
649 (gnus-status-message mhspool-status-message) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
650 (gnus-request-article mhspool-request-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
651 (gnus-request-group mhspool-request-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
652 (gnus-request-list mhspool-request-list) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
653 (gnus-request-list-newsgroups mhspool-request-list-newsgroups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
654 (gnus-request-list-distributions mhspool-request-list-distributions) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
655 (gnus-request-post mhspool-request-post))) |
257 | 656 "Access method for NNTP, nnspool, and mhspool.") |
657 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
658 (defvar gnus-group-buffer "*Newsgroup*") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
659 (defvar gnus-summary-buffer "*Summary*") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
660 (defvar gnus-article-buffer "*Article*") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
661 (defvar gnus-digest-buffer "GNUS Digest") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
662 (defvar gnus-digest-summary-buffer "GNUS Digest-summary") |
257 | 663 |
664 (defvar gnus-buffer-list | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
665 (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
|
666 gnus-digest-buffer gnus-digest-summary-buffer) |
257 | 667 "GNUS buffer names which should be killed when exiting.") |
668 | |
669 (defvar gnus-variable-list | |
670 '(gnus-newsrc-options | |
671 gnus-newsrc-options-n-yes gnus-newsrc-options-n-no | |
672 gnus-newsrc-assoc gnus-killed-assoc gnus-marked-assoc) | |
673 "GNUS variables saved in the quick startup file.") | |
674 | |
675 (defvar gnus-overload-functions | |
676 '((news-inews gnus-inews-news "rnewspost") | |
677 (caesar-region gnus-caesar-region "rnews")) | |
678 "Functions overloaded by gnus. | |
679 It is a list of `(original overload &optional file)'.") | |
680 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
681 (defvar gnus-distribution-list nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
682 |
257 | 683 (defvar gnus-newsrc-options nil |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
684 "Options line in the `.newsrc' file.") |
257 | 685 |
686 (defvar gnus-newsrc-options-n-yes nil | |
687 "Regexp representing subscribed newsgroups.") | |
688 | |
689 (defvar gnus-newsrc-options-n-no nil | |
690 "Regexp representing unsubscribed newsgroups.") | |
691 | |
692 (defvar gnus-newsrc-assoc nil | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
693 "Assoc list of read articles. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
694 `gnus-newsrc-hashtb' should be kept so that both hold the same information.") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
695 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
696 (defvar gnus-newsrc-hashtb nil |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
697 "Hashtable of `gnus-newsrc-assoc'.") |
257 | 698 |
699 (defvar gnus-killed-assoc nil | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
700 "Assoc list of newsgroups removed from `gnus-newsrc-assoc'. |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
701 `gnus-killed-hashtb' should be kept so that both hold the same information.") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
702 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
703 (defvar gnus-killed-hashtb nil |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
704 "Hashtable of `gnus-killed-assoc'.") |
257 | 705 |
706 (defvar gnus-marked-assoc nil | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
707 "Assoc list of articles marked as unread. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
708 `gnus-marked-hashtb' should be kept so that both hold the same information.") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
709 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
710 (defvar gnus-marked-hashtb nil |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
711 "Hashtable of `gnus-marked-assoc'.") |
257 | 712 |
713 (defvar gnus-unread-hashtb nil | |
714 "Hashtable of unread articles.") | |
715 | |
716 (defvar gnus-active-hashtb nil | |
717 "Hashtable of active articles.") | |
718 | |
719 (defvar gnus-octive-hashtb nil | |
720 "Hashtable of OLD active articles.") | |
721 | |
722 (defvar gnus-current-startup-file nil | |
723 "Startup file for the current host.") | |
724 | |
725 (defvar gnus-last-search-regexp nil | |
726 "Default regexp for article search command.") | |
727 | |
728 (defvar gnus-last-shell-command nil | |
729 "Default shell command on article.") | |
730 | |
731 (defvar gnus-have-all-newsgroups nil) | |
732 | |
733 (defvar gnus-newsgroup-name nil) | |
734 (defvar gnus-newsgroup-begin nil) | |
735 (defvar gnus-newsgroup-end nil) | |
736 (defvar gnus-newsgroup-last-rmail nil) | |
737 (defvar gnus-newsgroup-last-mail nil) | |
738 (defvar gnus-newsgroup-last-folder nil) | |
739 (defvar gnus-newsgroup-last-file nil) | |
740 | |
741 (defvar gnus-newsgroup-unreads nil | |
742 "List of unread articles in the current newsgroup.") | |
743 | |
744 (defvar gnus-newsgroup-unselected nil | |
745 "List of unselected unread articles in the current newsgroup.") | |
746 | |
747 (defvar gnus-newsgroup-marked nil | |
748 "List of marked articles in the current newsgroup (a subset of unread art).") | |
749 | |
750 (defvar gnus-newsgroup-headers nil | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
751 "List of article headers in the current newsgroup. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
752 If you modify the variable, you must call the function |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
753 `gnus-clear-hashtables-for-newsgroup-headers' to clear the hash tables.") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
754 (defvar gnus-newsgroup-headers-hashtb-by-id nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
755 (defvar gnus-newsgroup-headers-hashtb-by-number nil) |
257 | 756 |
757 (defvar gnus-current-article nil) | |
758 (defvar gnus-current-headers nil) | |
759 (defvar gnus-current-history nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
760 (defvar gnus-have-all-headers nil "Must be either T or NIL.") |
257 | 761 (defvar gnus-last-article nil) |
762 (defvar gnus-current-kill-article nil) | |
763 | |
764 ;; Save window configuration. | |
765 (defvar gnus-winconf-kill-file nil) | |
766 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
767 (defvar gnus-group-mode-map nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
768 (defvar gnus-summary-mode-map nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
769 (defvar gnus-article-mode-map nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
770 (defvar gnus-kill-file-mode-map nil) |
257 | 771 |
7560
e63efa2d587c
rmail-default-file renamed from rmail-last-file,
Richard M. Stallman <rms@gnu.org>
parents:
7524
diff
changeset
|
772 (defvar rmail-default-file (expand-file-name "~/XMBOX")) |
e63efa2d587c
rmail-default-file renamed from rmail-last-file,
Richard M. Stallman <rms@gnu.org>
parents:
7524
diff
changeset
|
773 (defvar rmail-default-rmail-file (expand-file-name "~/XNEWS")) |
257 | 774 |
775 ;; Define GNUS Subsystems. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
776 (autoload 'gnus-group-post-news "gnuspost" |
257 | 777 "Post an article." t) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
778 (autoload 'gnus-summary-post-news "gnuspost" |
257 | 779 "Post an article." t) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
780 (autoload 'gnus-summary-followup "gnuspost" |
257 | 781 "Post a reply article." t) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
782 (autoload 'gnus-summary-followup-with-original "gnuspost" |
257 | 783 "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
|
784 (autoload 'gnus-summary-cancel-article "gnuspost" |
257 | 785 "Cancel an article you posted." t) |
786 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
787 (autoload 'gnus-summary-reply "gnusmail" |
257 | 788 "Reply mail to news author." t) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
789 (autoload 'gnus-summary-reply-with-original "gnusmail" |
257 | 790 "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
|
791 (autoload 'gnus-summary-mail-forward "gnusmail" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
792 "Forward the current message to another user." t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
793 (autoload 'gnus-summary-mail-other-window "gnusmail" |
257 | 794 "Compose mail in other window." t) |
795 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
796 (autoload 'gnus-group-kill-group "gnusmisc" |
257 | 797 "Kill newsgroup on current line." t) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
798 (autoload 'gnus-group-yank-group "gnusmisc" |
257 | 799 "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
|
800 (autoload 'gnus-group-kill-region "gnusmisc" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
801 "Kill newsgroups in current region." t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
802 (autoload 'gnus-group-transpose-groups "gnusmisc" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
803 "Exchange current newsgroup and previous newsgroup." t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
804 (autoload 'gnus-list-killed-groups "gnusmisc" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
805 "List the killed newsgroups." t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
806 (autoload 'gnus-gmt-to-local "gnusmisc" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
807 "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
|
808 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
809 (autoload 'metamail-buffer "metamail" |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
810 "Process current buffer through `metamail'." t) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
811 |
257 | 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 |
7216
6ecee038c1c9
(gnus-summary-mode-map): Bind C-c C-v to gnus-uu-ctl-map.
Richard M. Stallman <rms@gnu.org>
parents:
6309
diff
changeset
|
822 (autoload 'gnus-uu-ctl-map "gnus-uu" nil nil 'keymap) |
7228
14df71736eae
(gnus-summary-mode-map): Bind # to gnus-uu-mark-article.
Richard M. Stallman <rms@gnu.org>
parents:
7216
diff
changeset
|
823 (autoload 'gnus-uu-mark-article "gnus-uu" nil t) |
257 | 824 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
825 ;;(put 'gnus-eval-in-buffer-window 'lisp-indent-hook 1) |
257 | 826 |
827 (defmacro gnus-eval-in-buffer-window (buffer &rest forms) | |
828 "Pop to BUFFER, evaluate FORMS, and then returns to original window." | |
829 (` (let ((GNUSStartBufferWindow (selected-window))) | |
830 (unwind-protect | |
831 (progn | |
832 (pop-to-buffer (, buffer)) | |
833 (,@ forms)) | |
834 (select-window GNUSStartBufferWindow))))) | |
835 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
836 (defmacro gnus-make-hashtable (&optional hashsize) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
837 "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
|
838 Optional argument HASHSIZE specifies the table size." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
839 (` (make-vector (, (if hashsize (` (max (, hashsize) 200)) 200)) 0))) |
257 | 840 |
841 (defmacro gnus-gethash (string hashtable) | |
842 "Get hash value of STRING in HASHTABLE." | |
843 ;;(` (symbol-value (abbrev-symbol (, string) (, hashtable)))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
844 ;;(` (abbrev-expansion (, string) (, hashtable))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
845 (` (symbol-value (intern-soft (, string) (, hashtable))))) |
257 | 846 |
847 (defmacro gnus-sethash (string value hashtable) | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
848 "Set hash value. Arguments are STRING, VALUE, and HASHTABLE." |
257 | 849 ;; We cannot use define-abbrev since it only accepts string as value. |
850 (` (set (intern (, string) (, hashtable)) (, value)))) | |
851 | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
852 ;; Note: Macros defined here are also defined in nntp.el. I don't like |
257 | 853 ;; to put them here, but many users got troubled with the old |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
854 ;; definitions in nntp.elc. These codes are NNTP 3.10 version. |
257 | 855 |
856 (defmacro nntp-header-number (header) | |
857 "Return article number in HEADER." | |
858 (` (aref (, header) 0))) | |
859 | |
860 (defmacro nntp-set-header-number (header number) | |
861 "Set article number of HEADER to NUMBER." | |
862 (` (aset (, header) 0 (, number)))) | |
863 | |
864 (defmacro nntp-header-subject (header) | |
865 "Return subject string in HEADER." | |
866 (` (aref (, header) 1))) | |
867 | |
868 (defmacro nntp-set-header-subject (header subject) | |
869 "Set article subject of HEADER to SUBJECT." | |
870 (` (aset (, header) 1 (, subject)))) | |
871 | |
872 (defmacro nntp-header-from (header) | |
873 "Return author string in HEADER." | |
874 (` (aref (, header) 2))) | |
875 | |
876 (defmacro nntp-set-header-from (header from) | |
877 "Set article author of HEADER to FROM." | |
878 (` (aset (, header) 2 (, from)))) | |
879 | |
880 (defmacro nntp-header-xref (header) | |
881 "Return xref string in HEADER." | |
882 (` (aref (, header) 3))) | |
883 | |
884 (defmacro nntp-set-header-xref (header xref) | |
885 "Set article xref of HEADER to xref." | |
886 (` (aset (, header) 3 (, xref)))) | |
887 | |
888 (defmacro nntp-header-lines (header) | |
889 "Return lines in HEADER." | |
890 (` (aref (, header) 4))) | |
891 | |
892 (defmacro nntp-set-header-lines (header lines) | |
893 "Set article lines of HEADER to LINES." | |
894 (` (aset (, header) 4 (, lines)))) | |
895 | |
896 (defmacro nntp-header-date (header) | |
897 "Return date in HEADER." | |
898 (` (aref (, header) 5))) | |
899 | |
900 (defmacro nntp-set-header-date (header date) | |
901 "Set article date of HEADER to DATE." | |
902 (` (aset (, header) 5 (, date)))) | |
903 | |
904 (defmacro nntp-header-id (header) | |
905 "Return Id in HEADER." | |
906 (` (aref (, header) 6))) | |
907 | |
908 (defmacro nntp-set-header-id (header id) | |
909 "Set article Id of HEADER to ID." | |
910 (` (aset (, header) 6 (, id)))) | |
911 | |
912 (defmacro nntp-header-references (header) | |
913 "Return references in HEADER." | |
914 (` (aref (, header) 7))) | |
915 | |
916 (defmacro nntp-set-header-references (header ref) | |
917 "Set article references of HEADER to REF." | |
918 (` (aset (, header) 7 (, ref)))) | |
919 | |
920 | |
921 ;;; | |
922 ;;; GNUS Group Mode | |
923 ;;; | |
924 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
925 (if gnus-group-mode-map |
257 | 926 nil |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
927 (setq gnus-group-mode-map (make-keymap)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
928 (suppress-keymap gnus-group-mode-map) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
929 (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
|
930 (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
|
931 (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
|
932 (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
|
933 (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
|
934 (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
|
935 (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
|
936 (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
|
937 (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
|
938 (define-key gnus-group-mode-map "\C-p" 'gnus-group-prev-group) |
7466
b48210278981
(gnus-group-mode-map, gnus-summary-mode-map):
Richard M. Stallman <rms@gnu.org>
parents:
7300
diff
changeset
|
939 (define-key gnus-group-mode-map [down] 'gnus-group-next-group) |
7524
66d8171f3d42
(gnus-group-mode-map): Fix typo in prev change.
Richard M. Stallman <rms@gnu.org>
parents:
7466
diff
changeset
|
940 (define-key gnus-group-mode-map [up] 'gnus-group-prev-group) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
941 (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
|
942 ;;(define-key gnus-group-mode-map "/" 'isearch-forward) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
943 (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
|
944 (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
|
945 (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
|
946 (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
|
947 (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
|
948 (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
|
949 (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
|
950 (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
|
951 (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
|
952 (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
|
953 (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
|
954 (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
|
955 (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
|
956 (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
|
957 (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
|
958 (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
|
959 (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
|
960 (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
|
961 (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
|
962 (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
|
963 (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
|
964 ;;(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
|
965 (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
|
966 (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
|
967 (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
|
968 (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
|
969 (define-key gnus-group-mode-map "?" 'gnus-group-describe-briefly) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
970 (define-key gnus-group-mode-map "\C-c\C-i" 'gnus-info-find-node) |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
971 (define-key gnus-group-mode-map [mouse-2] 'gnus-mouse-pick-group) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
972 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
973 ;; Make a menu bar item. |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
974 (define-key gnus-group-mode-map [menu-bar GNUS] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
975 (cons "GNUS" (make-sparse-keymap "GNUS"))) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
976 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
977 (define-key gnus-group-mode-map [menu-bar GNUS force-update] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
978 '("Force Update" . gnus-group-force-update)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
979 (define-key gnus-group-mode-map [menu-bar GNUS quit] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
980 '("Quit" . gnus-group-quit)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
981 (define-key gnus-group-mode-map [menu-bar GNUS exit] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
982 '("Exit" . gnus-group-exit)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
983 (define-key gnus-group-mode-map [menu-bar GNUS restart] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
984 '("Restart" . gnus-group-restart)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
985 (define-key gnus-group-mode-map [menu-bar GNUS suspend] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
986 '("Suspend" . gnus-group-suspend)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
987 (define-key gnus-group-mode-map [menu-bar GNUS get-new-news] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
988 '("Get New News" . gnus-group-get-new-news)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
989 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
990 ;; Make a menu bar item. |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
991 (define-key gnus-group-mode-map [menu-bar groups] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
992 (cons "Groups" (make-sparse-keymap "Groups"))) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
993 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
994 (define-key gnus-group-mode-map [menu-bar groups catchup] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
995 '("Catchup" . gnus-group-catchup)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
996 (define-key gnus-group-mode-map [menu-bar groups edit-global-kill] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
997 '("Edit Kill File" . gnus-group-edit-global-kill)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
998 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
999 (define-key gnus-group-mode-map [menu-bar groups separator-2] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1000 '("--")) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1001 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1002 (define-key gnus-group-mode-map [menu-bar groups yank-group] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1003 '("Yank Group" . gnus-group-yank-group)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1004 (define-key gnus-group-mode-map [menu-bar groups kill-group] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1005 '("Kill Group" . gnus-group-kill-group)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1006 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1007 (define-key gnus-group-mode-map [menu-bar groups separator-1] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1008 '("--")) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1009 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1010 (define-key gnus-group-mode-map [menu-bar groups jump-to-group] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1011 '("Jump to Group..." . gnus-group-jump-to-group)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1012 (define-key gnus-group-mode-map [menu-bar groups list-all-groups] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1013 '("List All Groups" . gnus-group-list-all-groups)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1014 (define-key gnus-group-mode-map [menu-bar groups list-groups] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1015 '("List Groups" . gnus-group-list-groups)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1016 (define-key gnus-group-mode-map [menu-bar groups unsub-current-group] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1017 '("Unsubscribe Group" . gnus-group-unsubscribe-current-group)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1018 ) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1019 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1020 (defun gnus-group-mode () |
257 | 1021 "Major mode for reading network news. |
1022 All normal editing commands are turned off. | |
1023 Instead, these commands are available: | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1024 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1025 SPC Read articles in this newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1026 = Select this newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1027 j Move to the specified newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1028 n Move to the next unread newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1029 p Move to the previous unread newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1030 C-n Move to the next newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1031 C-p Move to the previous newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1032 < Move point to the beginning of this buffer. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1033 > Move point to the end of this buffer. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1034 u Unsubscribe from (subscribe to) this newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1035 U Unsubscribe from (subscribe to) the specified newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1036 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
|
1037 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
|
1038 l Revert this buffer. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1039 L List all newsgroups. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1040 g Get new news. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1041 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
|
1042 b Check bogus newsgroups. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1043 r Restrict visible newsgroups to the current region. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1044 a Post a new article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1045 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
|
1046 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
|
1047 C-k Kill this newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1048 C-y Yank killed newsgroup here. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1049 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
|
1050 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
|
1051 C-c C-l list killed newsgroups. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1052 s Save .newsrc file. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1053 z Suspend reading news. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1054 q Quit reading news. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1055 Q Quit reading news without saving .newsrc file. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1056 V Show the version number of this GNUS. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1057 ? Describe Group Mode commands briefly. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1058 C-h m Describe Group Mode. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1059 C-c C-i Read Info about Group Mode. |
257 | 1060 |
1061 The name of the host running NNTP server is asked for if no default | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1062 host is specified. It is also possible to choose another NNTP server |
257 | 1063 even when the default server is defined by giving a prefix argument to |
1064 the command `\\[gnus]'. | |
1065 | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1066 If the NNTP server name starts with a colon, as in `:Mail', the user's |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1067 own directory `~/Mail' is used as a news spool. This makes it |
257 | 1068 possible to read mail stored in MH folders or articles saved by GNUS. |
1069 File names of mail or articles must consist of only numeric | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1070 characters. Otherwise, they are ignored. |
257 | 1071 |
1072 If there is a file named `~/.newsrc-SERVER', it is used as the | |
1073 startup file instead of standard one when talking to SERVER. It is | |
1074 possible to talk to many hosts by using different startup files for | |
1075 each. | |
1076 | |
1077 Option `-n' of the options line in the startup file is recognized | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1078 properly the same as the Bnews system. For example, if the options |
257 | 1079 line is `options -n !talk talk.rumors', newsgroups under the `talk' |
1080 hierarchy except for `talk.rumors' are ignored while checking new | |
1081 newsgroups. | |
1082 | |
1083 If there is a file named `~/.signature-DISTRIBUTION', it is used as | |
1084 signature file instead of standard one when posting a news in | |
1085 DISTRIBUTION. | |
1086 | |
1087 If an Info file generated from `gnus.texinfo' is installed, you can | |
1088 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
|
1089 current major mode of GNUS by \\[gnus-info-find-node]. |
257 | 1090 |
1091 The variable `gnus-version', `nntp-version', `nnspool-version', and | |
1092 `mhspool-version' have the version numbers of this version of gnus.el, | |
1093 nntp.el, nnspool.el, and mhspoo.el, respectively. | |
1094 | |
1095 User customizable variables: | |
1096 gnus-nntp-server | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1097 Specifies the name of the host running the NNTP server. If its |
257 | 1098 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
|
1099 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
|
1100 from the NNTPSERVER environment variable. |
257 | 1101 |
1102 gnus-nntp-service | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1103 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
|
1104 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
|
1105 `gnus-nntp-server' is set to the local host name. |
257 | 1106 |
1107 gnus-startup-file | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1108 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
|
1109 `.newsrc-SERVER', it's used instead when talking to SERVER. I |
257 | 1110 recommend you to use the server specific file, if you'd like to |
1111 talk to many servers. Especially if you'd like to read your | |
1112 private directory, the name of the file must be | |
1113 `.newsrc-:DIRECTORY'. | |
1114 | |
1115 gnus-signature-file | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1116 Specifies a signature file (.signature). If there is a file named |
257 | 1117 `.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
|
1118 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
|
1119 appending the file automatically. If you use an NNTP inews which |
257 | 1120 comes with the NNTP package, you may have to set the variable to |
1121 nil. | |
1122 | |
1123 gnus-use-cross-reference | |
1124 Specifies what to do with cross references (Xref: field). If it | |
1125 is nil, cross references are ignored. If it is t, articles in | |
1126 subscribed newsgroups are only marked as read. Otherwise, if it | |
1127 is not nil nor t, articles in all newsgroups are marked as read. | |
1128 | |
1129 gnus-use-followup-to | |
1130 Specifies what to do with followup-to: field. If it is nil, its | |
1131 value is ignored. If it is non-nil, its value is used as followup | |
1132 newsgroups. Especially, if it is t and field value is `poster', | |
1133 your confirmation is required. | |
1134 | |
1135 gnus-author-copy | |
1136 Specifies a file name to save a copy of article you posted using | |
1137 FCC: field. If the first character of the value is `|', the | |
1138 contents of the article is piped out to a program specified by the | |
1139 rest of the value. The variable is initialized from the | |
1140 AUTHORCOPY environment variable. | |
1141 | |
1142 gnus-author-copy-saver | |
1143 Specifies a function to save an author copy. The function is | |
1144 called with a file name. The default function `rmail-output' | |
1145 saves in Unix mail format. | |
1146 | |
1147 gnus-kill-file-name | |
1148 Use specified file name as a KILL file (default to `KILL'). | |
1149 | |
1150 gnus-novice-user | |
1151 Non-nil means that you are a novice to USENET. If non-nil, | |
1152 verbose messages may be displayed or your confirmations may be | |
1153 required. | |
1154 | |
1155 gnus-interactive-post | |
1156 Non-nil means that newsgroup, subject and distribution are asked | |
1157 for interactively when posting a new article. | |
1158 | |
1159 gnus-use-full-window | |
1160 Non-nil means to take up the entire screen of Emacs. | |
1161 | |
1162 gnus-window-configuration | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1163 Specifies the configuration of Group, Summary, and Article |
257 | 1164 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
|
1165 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
|
1166 respectively. ACTION is `summary', `newsgroups', or `article'. |
257 | 1167 |
1168 gnus-subscribe-newsgroup-method | |
1169 Specifies a function called with a newsgroup name when new | |
1170 newsgroup is found. The default definition adds new newsgroup at | |
1171 the beginning of other newsgroups. | |
1172 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1173 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
|
1174 |
257 | 1175 Various hooks for customization: |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1176 gnus-group-mode-hook |
257 | 1177 Entry to this mode calls the value with no arguments, if that |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1178 value is non-nil. This hook is called before GNUS is connected to |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1179 the NNTP server. So, you can change or define the NNTP server in |
257 | 1180 this hook. |
1181 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1182 gnus-startup-hook |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1183 Called with no arguments after the NNTP server is selected. It is |
257 | 1184 possible to change the behavior of GNUS or initialize the |
1185 variables according to the selected NNTP server. | |
1186 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1187 gnus-group-prepare-hook |
257 | 1188 Called with no arguments after a newsgroup list is created in the |
1189 Newsgroup buffer, if that value is non-nil. | |
1190 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1191 gnus-save-newsrc-hook |
257 | 1192 Called with no arguments when saving newsrc file if that value is |
1193 non-nil. | |
1194 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1195 gnus-prepare-article-hook |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1196 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
|
1197 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
|
1198 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
|
1199 inserts a signature file. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1200 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1201 gnus-inews-article-hook |
257 | 1202 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
|
1203 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
|
1204 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
|
1205 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1206 gnus-suspend-gnus-hook |
257 | 1207 Called with no arguments when suspending (not exiting) GNUS, if |
1208 that value is non-nil. | |
1209 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1210 gnus-exit-gnus-hook |
257 | 1211 Called with no arguments when exiting (not suspending) GNUS, if |
1212 that value is non-nil." | |
1213 (interactive) | |
1214 (kill-all-local-variables) | |
1215 ;; Gee. Why don't you upgrade? | |
1216 (cond ((boundp 'mode-line-modified) | |
1217 (setq mode-line-modified "--- ")) | |
1218 ((listp (default-value 'mode-line-format)) | |
1219 (setq mode-line-format | |
1220 (cons "--- " (cdr (default-value 'mode-line-format))))) | |
1221 (t | |
1222 (setq mode-line-format | |
1223 "--- GNUS: List of Newsgroups %[(%m)%]----%3p-%-"))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1224 (setq major-mode 'gnus-group-mode) |
257 | 1225 (setq mode-name "Newsgroup") |
1226 (setq mode-line-buffer-identification "GNUS: List of Newsgroups") | |
1227 (setq mode-line-process nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1228 (use-local-map gnus-group-mode-map) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1229 (buffer-flush-undo (current-buffer)) |
257 | 1230 (setq buffer-read-only t) ;Disable modification |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1231 (run-hooks 'gnus-group-mode-hook)) |
257 | 1232 |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1233 (defun gnus-mouse-pick-group (e) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1234 (interactive "e") |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1235 (mouse-set-point e) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1236 (gnus-group-read-group nil)) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1237 |
257 | 1238 ;;;###autoload |
1239 (defun gnus (&optional confirm) | |
1240 "Read network news. | |
1241 If optional argument CONFIRM is non-nil, ask NNTP server." | |
1242 (interactive "P") | |
1243 (unwind-protect | |
1244 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1245 (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
|
1246 (gnus-group-mode) |
257 | 1247 (gnus-start-news-server confirm)) |
1248 (if (not (gnus-server-opened)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1249 (gnus-group-quit) |
257 | 1250 ;; NNTP server is successfully open. |
1251 (setq mode-line-process (format " {%s}" gnus-nntp-server)) | |
1252 (let ((buffer-read-only nil)) | |
1253 (erase-buffer) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1254 (gnus-group-startup-message) |
257 | 1255 (sit-for 0)) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1256 (run-hooks 'gnus-startup-hook) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1257 (gnus-setup-news) |
257 | 1258 (if gnus-novice-user |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1259 (gnus-group-describe-briefly)) ;Show brief help message. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1260 (gnus-group-list-groups nil) |
257 | 1261 ))) |
1262 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1263 (defun gnus-group-startup-message () |
257 | 1264 "Insert startup message in current buffer." |
1265 ;; Insert the message. | |
4173
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
1266 (insert |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
1267 (format " |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
1268 %s |
257 | 1269 |
1270 NNTP-based News Reader for GNU Emacs | |
1271 | |
1272 | |
1273 If you have any trouble with this software, please let me | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1274 know. I will fix your problems in the next release. |
257 | 1275 |
1276 Comments, suggestions, and bug fixes are welcome. | |
1277 | |
1278 Masanobu UMEDA | |
4173
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
1279 umerin@mse.kyutech.ac.jp" gnus-version)) |
257 | 1280 ;; And then hack it. |
1281 ;; 57 is the longest line. | |
1282 (indent-rigidly (point-min) (point-max) (/ (max (- (window-width) 57) 0) 2)) | |
1283 (goto-char (point-min)) | |
1284 ;; +4 is fuzzy factor. | |
1285 (insert-char ?\n (/ (max (- (window-height) 18) 0) 2))) | |
1286 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1287 (defun gnus-group-list-groups (show-all) |
257 | 1288 "List newsgroups in the Newsgroup buffer. |
1289 If argument SHOW-ALL is non-nil, unsubscribed groups are also listed." | |
1290 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1291 (let ((case-fold-search nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1292 (last-group ;Current newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1293 (gnus-group-group-name)) |
257 | 1294 (next-group ;Next possible newsgroup. |
1295 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1296 (gnus-group-search-forward nil nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1297 (gnus-group-group-name))) |
257 | 1298 (prev-group ;Previous possible newsgroup. |
1299 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1300 (gnus-group-search-forward t nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1301 (gnus-group-group-name)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1302 (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
|
1303 (gnus-group-prepare show-all) |
257 | 1304 (if (zerop (buffer-size)) |
1305 (message "No news is good news") | |
1306 ;; Go to last newsgroup if possible. If cannot, try next and | |
1307 ;; previous. If all fail, go to first unread newsgroup. | |
1308 (goto-char (point-min)) | |
1309 (or (and last-group | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1310 (re-search-forward (gnus-group-make-regexp last-group) nil t)) |
257 | 1311 (and next-group |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1312 (re-search-forward (gnus-group-make-regexp next-group) nil t)) |
257 | 1313 (and prev-group |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1314 (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
|
1315 (gnus-group-search-forward nil nil t)) |
257 | 1316 ;; Adjust cursor point. |
1317 (beginning-of-line) | |
1318 (search-forward ":" nil t) | |
1319 ))) | |
1320 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1321 (defun gnus-group-prepare (&optional all) |
257 | 1322 "Prepare list of newsgroups in current buffer. |
1323 If optional argument ALL is non-nil, unsubscribed groups are also listed." | |
1324 (let ((buffer-read-only nil) | |
1325 (newsrc gnus-newsrc-assoc) | |
1326 (group-info nil) | |
1327 (group-name nil) | |
1328 (unread-count 0) | |
1329 ;; This specifies the format of Group buffer. | |
1330 (cntl "%s%s%5d: %s\n")) | |
1331 (erase-buffer) | |
1332 ;; List newsgroups. | |
1333 (while newsrc | |
1334 (setq group-info (car newsrc)) | |
1335 (setq group-name (car group-info)) | |
1336 (setq unread-count (nth 1 (gnus-gethash group-name gnus-unread-hashtb))) | |
1337 (if (or all | |
1338 (and (nth 1 group-info) ;Subscribed. | |
1339 (> unread-count 0))) ;There are unread articles. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1340 ;; Yes, I can use gnus-group-prepare-line, but this is faster. |
257 | 1341 (insert |
1342 (format cntl | |
1343 ;; Subscribed or not. | |
1344 (if (nth 1 group-info) " " "U") | |
1345 ;; Has new news? | |
1346 (if (and (> unread-count 0) | |
1347 (>= 0 | |
1348 (- unread-count | |
1349 (length | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1350 (cdr (gnus-gethash group-name |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1351 gnus-marked-hashtb)))))) |
257 | 1352 "*" " ") |
1353 ;; Number of unread articles. | |
1354 unread-count | |
1355 ;; Newsgroup name. | |
1356 group-name)) | |
1357 ) | |
1358 (setq newsrc (cdr newsrc)) | |
1359 ) | |
1360 (setq gnus-have-all-newsgroups all) | |
1361 (goto-char (point-min)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1362 (run-hooks 'gnus-group-prepare-hook) |
257 | 1363 )) |
1364 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1365 (defun gnus-group-prepare-line (info) |
257 | 1366 "Return a string for the Newsgroup buffer from INFO. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1367 INFO is an element of `gnus-newsrc-assoc' or `gnus-killed-assoc'." |
257 | 1368 (let* ((group-name (car info)) |
1369 (unread-count | |
1370 (or (nth 1 (gnus-gethash group-name gnus-unread-hashtb)) | |
1371 ;; Not in hash table, so compute it now. | |
1372 (gnus-number-of-articles | |
1373 (gnus-difference-of-range | |
1374 (nth 2 (gnus-gethash group-name gnus-active-hashtb)) | |
1375 (nthcdr 2 info))))) | |
1376 ;; This specifies the format of Group buffer. | |
1377 (cntl "%s%s%5d: %s\n")) | |
1378 (format cntl | |
1379 ;; Subscribed or not. | |
1380 (if (nth 1 info) " " "U") | |
1381 ;; Has new news? | |
1382 (if (and (> unread-count 0) | |
1383 (>= 0 | |
1384 (- unread-count | |
1385 (length | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1386 (cdr (gnus-gethash group-name |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1387 gnus-marked-hashtb)))))) |
257 | 1388 "*" " ") |
1389 ;; Number of unread articles. | |
1390 unread-count | |
1391 ;; Newsgroup name. | |
1392 group-name | |
1393 ))) | |
1394 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1395 (defun gnus-group-update-group (group &optional visible-only) |
257 | 1396 "Update newsgroup info of GROUP. |
1397 If optional argument VISIBLE-ONLY is non-nil, non displayed group is ignored." | |
1398 (let ((buffer-read-only nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1399 (case-fold-search nil) ;appleIIgs vs. appleiigs |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1400 (regexp (gnus-group-make-regexp group)) |
257 | 1401 (visible nil)) |
1402 ;; Buffer may be narrowed. | |
1403 (save-restriction | |
1404 (widen) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1405 ;; 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
|
1406 ;; 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
|
1407 ;; 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
|
1408 ;; 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
|
1409 ;; the beginning. Otherwise, search from the end. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1410 (if (cond ((progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1411 (beginning-of-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1412 (looking-at regexp))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1413 ((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
|
1414 (progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1415 (goto-char (point-min)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1416 (re-search-forward regexp nil t)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1417 ((progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1418 (goto-char (point-max)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1419 (re-search-backward regexp nil t)))) |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1420 ;; GROUP is listed in current buffer. So, delete old line. |
257 | 1421 (progn |
1422 (setq visible t) | |
1423 (beginning-of-line) | |
1424 (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
|
1425 ) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1426 ;; 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
|
1427 (goto-char (point-min))) |
257 | 1428 (if (or visible (not visible-only)) |
1429 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1430 (insert (gnus-group-prepare-line |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1431 (gnus-gethash group gnus-newsrc-hashtb))) |
257 | 1432 (forward-line -1) ;Move point on that line. |
1433 )) | |
1434 ))) | |
1435 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1436 (defun gnus-group-group-name () |
257 | 1437 "Get newsgroup name around point." |
1438 (save-excursion | |
1439 (beginning-of-line) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1440 (if (looking-at "^.+:[ \t]+\\([^ \t\n]+\\)\\([ \t].*\\|$\\)") |
9550
5b91f8657de6
(gnus-group-group-name): Get rid of text properties.
Richard M. Stallman <rms@gnu.org>
parents:
8523
diff
changeset
|
1441 (let ((group-name (buffer-substring (match-beginning 1) (match-end 1)))) |
5b91f8657de6
(gnus-group-group-name): Get rid of text properties.
Richard M. Stallman <rms@gnu.org>
parents:
8523
diff
changeset
|
1442 (set-text-properties 0 (length group-name) nil group-name) |
5b91f8657de6
(gnus-group-group-name): Get rid of text properties.
Richard M. Stallman <rms@gnu.org>
parents:
8523
diff
changeset
|
1443 group-name)))) |
257 | 1444 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1445 (defun gnus-group-make-regexp (newsgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1446 "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
|
1447 (concat "^.+: " (regexp-quote newsgroup) "\\([ \t].*\\|$\\)")) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1448 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1449 (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
|
1450 "Search for the next (or previous) newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1451 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
|
1452 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
|
1453 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
|
1454 (let ((case-fold-search nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1455 (func |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1456 (if backward |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1457 (function re-search-backward) (function re-search-forward))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1458 (regexp |
257 | 1459 (format "^%s[ \t]*\\(%s\\):" |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1460 (if norest ".." " [ \t]") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1461 (if norest "[0-9]+" "[1-9][0-9]*"))) |
257 | 1462 (found nil)) |
1463 (if backward | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1464 (if heretoo |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1465 (end-of-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1466 (beginning-of-line)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1467 (if heretoo |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1468 (beginning-of-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1469 (end-of-line))) |
257 | 1470 (setq found (funcall func regexp nil t)) |
1471 ;; Adjust cursor point. | |
1472 (beginning-of-line) | |
1473 (search-forward ":" nil t) | |
1474 ;; Return T if found. | |
1475 found | |
1476 )) | |
1477 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1478 ;; GNUS Group mode command |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1479 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1480 (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
|
1481 "Read news in this newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1482 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
|
1483 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
|
1484 (interactive "P") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1485 (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
|
1486 (if group |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1487 (gnus-summary-read-group |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1488 group |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1489 (or all |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1490 ;;(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
|
1491 (zerop |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1492 (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
|
1493 no-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1494 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1495 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1496 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1497 (defun gnus-group-select-group (all) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1498 "Select this newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1499 No article is selected automatically. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1500 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
|
1501 (interactive "P") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1502 (gnus-group-read-group all t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1503 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1504 (defun gnus-group-jump-to-group (group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1505 "Jump to newsgroup GROUP." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1506 (interactive |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1507 (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
|
1508 (let ((case-fold-search nil)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1509 (goto-char (point-min)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1510 (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
|
1511 (if (gnus-gethash group gnus-newsrc-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1512 ;; Add GROUP entry, then seach again. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1513 (gnus-group-update-group group))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1514 ;; Adjust cursor point. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1515 (beginning-of-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1516 (search-forward ":" nil t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1517 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1518 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1519 (defun gnus-group-next-group (n) |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1520 "Go to Nth following newsgroup." |
257 | 1521 (interactive "p") |
1522 (while (and (> n 1) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1523 (gnus-group-search-forward nil t)) |
257 | 1524 (setq n (1- n))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1525 (or (gnus-group-search-forward nil t) |
257 | 1526 (message "No more newsgroups"))) |
1527 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1528 (defun gnus-group-next-unread-group (n) |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1529 "Go to Nth following unread newsgroup." |
257 | 1530 (interactive "p") |
1531 (while (and (> n 1) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1532 (gnus-group-search-forward nil nil)) |
257 | 1533 (setq n (1- n))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1534 (or (gnus-group-search-forward nil nil) |
257 | 1535 (message "No more unread newsgroups"))) |
1536 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1537 (defun gnus-group-prev-group (n) |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1538 "Go to Nth previous newsgroup." |
257 | 1539 (interactive "p") |
1540 (while (and (> n 1) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1541 (gnus-group-search-forward t t)) |
257 | 1542 (setq n (1- n))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1543 (or (gnus-group-search-forward t t) |
257 | 1544 (message "No more newsgroups"))) |
1545 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1546 (defun gnus-group-prev-unread-group (n) |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1547 "Go to Nth previous unread newsgroup." |
257 | 1548 (interactive "p") |
1549 (while (and (> n 1) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1550 (gnus-group-search-forward t nil)) |
257 | 1551 (setq n (1- n))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1552 (or (gnus-group-search-forward t nil) |
257 | 1553 (message "No more unread newsgroups"))) |
1554 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1555 (defun gnus-group-catchup (all) |
257 | 1556 "Mark all articles not marked as unread in current newsgroup as read. |
1557 If prefix argument ALL is non-nil, all articles are marked as read. | |
1558 Cross references (Xref: field) of articles are ignored." | |
1559 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1560 (let* ((group (gnus-group-group-name)) |
257 | 1561 (marked (if (not all) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1562 (cdr (gnus-gethash group gnus-marked-hashtb))))) |
257 | 1563 (and group |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1564 (or (not gnus-interactive-catchup) ;Without confirmation? |
257 | 1565 (y-or-n-p |
1566 (if all | |
1567 "Do you really want to mark everything as read? " | |
1568 "Delete all articles not marked as read? "))) | |
1569 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1570 (message "") ;Clear "Yes or No" question. |
257 | 1571 ;; Any marked articles will be preserved. |
1572 (gnus-update-unread-articles group marked marked) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1573 (gnus-group-update-group group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1574 (gnus-group-next-group 1))) |
257 | 1575 )) |
1576 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1577 (defun gnus-group-catchup-all () |
257 | 1578 "Mark all articles in current newsgroup as read. |
1579 Cross references (Xref: field) of articles are ignored." | |
1580 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1581 (gnus-group-catchup t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1582 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1583 (defun gnus-group-unsubscribe-current-group () |
257 | 1584 "Toggle subscribe from/to unsubscribe current group." |
1585 (interactive) | |
7573
059281285df7
(gnus-group-unsubscribe-current-group):
Richard M. Stallman <rms@gnu.org>
parents:
7560
diff
changeset
|
1586 (let ((group (gnus-group-group-name))) |
059281285df7
(gnus-group-unsubscribe-current-group):
Richard M. Stallman <rms@gnu.org>
parents:
7560
diff
changeset
|
1587 (if group |
059281285df7
(gnus-group-unsubscribe-current-group):
Richard M. Stallman <rms@gnu.org>
parents:
7560
diff
changeset
|
1588 (progn |
059281285df7
(gnus-group-unsubscribe-current-group):
Richard M. Stallman <rms@gnu.org>
parents:
7560
diff
changeset
|
1589 (gnus-group-unsubscribe-group group) |
059281285df7
(gnus-group-unsubscribe-current-group):
Richard M. Stallman <rms@gnu.org>
parents:
7560
diff
changeset
|
1590 (gnus-group-next-group 1)) |
059281285df7
(gnus-group-unsubscribe-current-group):
Richard M. Stallman <rms@gnu.org>
parents:
7560
diff
changeset
|
1591 (message "No Newsgroup found to \(un\)subscribe")))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1592 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1593 (defun gnus-group-unsubscribe-group (group) |
257 | 1594 "Toggle subscribe from/to unsubscribe GROUP. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1595 \(If GROUP is new, it is added to `.newsrc' automatically.)" |
257 | 1596 (interactive |
1597 (list (completing-read "Newsgroup: " | |
1598 gnus-active-hashtb nil 'require-match))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1599 (let ((newsrc (gnus-gethash group gnus-newsrc-hashtb))) |
257 | 1600 (cond ((not (null newsrc)) |
1601 ;; Toggle subscription flag. | |
1602 (setcar (nthcdr 1 newsrc) (not (nth 1 newsrc))) | |
1603 (gnus-update-newsrc-buffer group) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1604 (gnus-group-update-group group) |
257 | 1605 ;; Adjust cursor point. |
1606 (beginning-of-line) | |
1607 (search-forward ":" nil t)) | |
1608 ((and (stringp group) | |
1609 (gnus-gethash group gnus-active-hashtb)) | |
1610 ;; Add new newsgroup. | |
1611 (gnus-add-newsgroup group) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1612 (gnus-group-update-group group) |
257 | 1613 ;; Adjust cursor point. |
1614 (beginning-of-line) | |
1615 (search-forward ":" nil t)) | |
1616 (t (error "No such newsgroup: %s" group))) | |
1617 )) | |
1618 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1619 (defun gnus-group-list-all-groups () |
257 | 1620 "List all of newsgroups in the Newsgroup buffer." |
1621 (interactive) | |
5510
d3e04700d190
(gnus-group-list-all-groups): Display a message in the echo area.
Richard M. Stallman <rms@gnu.org>
parents:
5313
diff
changeset
|
1622 (message "Listing all groups...") |
d3e04700d190
(gnus-group-list-all-groups): Display a message in the echo area.
Richard M. Stallman <rms@gnu.org>
parents:
5313
diff
changeset
|
1623 (gnus-group-list-groups t) |
d3e04700d190
(gnus-group-list-all-groups): Display a message in the echo area.
Richard M. Stallman <rms@gnu.org>
parents:
5313
diff
changeset
|
1624 (message "Listing all groups...done")) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1625 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1626 (defun gnus-group-get-new-news () |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1627 "Get newly arrived articles. In fact, read the active file again." |
257 | 1628 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1629 (gnus-setup-news) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1630 (gnus-group-list-groups gnus-have-all-newsgroups)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1631 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1632 (defun gnus-group-restart () |
257 | 1633 "Force GNUS to read the raw startup file." |
1634 (interactive) | |
1635 (gnus-save-newsrc-file) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1636 (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
|
1637 (gnus-group-list-groups gnus-have-all-newsgroups)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1638 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1639 (defun gnus-group-check-bogus-groups () |
257 | 1640 "Check bogus newsgroups." |
1641 (interactive) | |
1642 (gnus-check-bogus-newsgroups t) ;Require confirmation. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1643 (gnus-group-list-groups gnus-have-all-newsgroups)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1644 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1645 (defun gnus-group-restrict-groups (start end) |
257 | 1646 "Restrict visible newsgroups to the current region (START and END). |
1647 Type \\[widen] to remove restriction." | |
1648 (interactive "r") | |
1649 (save-excursion | |
1650 (narrow-to-region (progn | |
1651 (goto-char start) | |
1652 (beginning-of-line) | |
1653 (point)) | |
1654 (progn | |
1655 (goto-char end) | |
1656 (forward-line 1) | |
1657 (point)))) | |
1658 (message (substitute-command-keys "Type \\[widen] to remove restriction"))) | |
1659 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1660 (defun gnus-group-edit-global-kill () |
257 | 1661 "Edit a global KILL file." |
1662 (interactive) | |
1663 (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
|
1664 (gnus-kill-file-edit-file nil) ;Nil stands for global KILL file. |
257 | 1665 (message |
1666 (substitute-command-keys | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1667 "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
|
1668 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1669 (defun gnus-group-edit-local-kill () |
257 | 1670 "Edit a local KILL file." |
1671 (interactive) | |
1672 (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
|
1673 (gnus-kill-file-edit-file (gnus-group-group-name)) |
257 | 1674 (message |
1675 (substitute-command-keys | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1676 "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
|
1677 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1678 (defun gnus-group-force-update () |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1679 "Update `.newsrc' file." |
257 | 1680 (interactive) |
1681 (gnus-save-newsrc-file)) | |
1682 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1683 (defun gnus-group-suspend () |
257 | 1684 "Suspend the current GNUS session. |
1685 In fact, cleanup buffers except for Group Mode buffer. | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1686 The hook `gnus-suspend-gnus-hook' is called before actually suspending." |
257 | 1687 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1688 (run-hooks 'gnus-suspend-gnus-hook) |
257 | 1689 ;; Kill GNUS buffers except for Group Mode buffer. |
8382
425ac5eebc19
(gnus-group-suspend): Be sure to bury the right buffer.
Richard M. Stallman <rms@gnu.org>
parents:
8258
diff
changeset
|
1690 (let ((buffers gnus-buffer-list) |
425ac5eebc19
(gnus-group-suspend): Be sure to bury the right buffer.
Richard M. Stallman <rms@gnu.org>
parents:
8258
diff
changeset
|
1691 (group-buf (get-buffer gnus-group-buffer))) |
257 | 1692 (while buffers |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1693 (and (not (eq (car buffers) gnus-group-buffer)) |
257 | 1694 (get-buffer (car buffers)) |
1695 (kill-buffer (car buffers))) | |
1696 (setq buffers (cdr buffers)) | |
8382
425ac5eebc19
(gnus-group-suspend): Be sure to bury the right buffer.
Richard M. Stallman <rms@gnu.org>
parents:
8258
diff
changeset
|
1697 ) |
425ac5eebc19
(gnus-group-suspend): Be sure to bury the right buffer.
Richard M. Stallman <rms@gnu.org>
parents:
8258
diff
changeset
|
1698 (bury-buffer group-buf) |
425ac5eebc19
(gnus-group-suspend): Be sure to bury the right buffer.
Richard M. Stallman <rms@gnu.org>
parents:
8258
diff
changeset
|
1699 (delete-windows-on group-buf t))) |
257 | 1700 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1701 (defun gnus-group-exit () |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1702 "Quit reading news after updating `.newsrc'. |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1703 The hook `gnus-exit-gnus-hook' is called before actually quitting." |
257 | 1704 (interactive) |
1705 (if (or noninteractive ;For gnus-batch-kill | |
1706 (zerop (buffer-size)) ;No news is good news. | |
1707 (not (gnus-server-opened)) ;NNTP connection closed. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1708 (not gnus-interactive-exit) ;Without confirmation |
257 | 1709 (y-or-n-p "Are you sure you want to quit reading news? ")) |
1710 (progn | |
1711 (message "") ;Erase "Yes or No" question. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1712 (run-hooks 'gnus-exit-gnus-hook) |
257 | 1713 (gnus-save-newsrc-file) |
1714 (gnus-clear-system) | |
1715 (gnus-close-server)) | |
1716 )) | |
1717 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1718 (defun gnus-group-quit () |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1719 "Quit reading news without updating `.newsrc'. |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1720 The hook `gnus-exit-gnus-hook' is called before actually quitting." |
257 | 1721 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1722 (if (or noninteractive ;For gnus-batch-kill |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1723 (zerop (buffer-size)) |
257 | 1724 (not (gnus-server-opened)) |
1725 (yes-or-no-p | |
1726 (format "Quit reading news without saving %s? " | |
1727 (file-name-nondirectory gnus-current-startup-file)))) | |
1728 (progn | |
1729 (message "") ;Erase "Yes or No" question. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1730 (run-hooks 'gnus-exit-gnus-hook) |
257 | 1731 (gnus-clear-system) |
1732 (gnus-close-server)) | |
1733 )) | |
1734 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1735 (defun gnus-group-describe-briefly () |
257 | 1736 "Describe Group mode commands briefly." |
1737 (interactive) | |
1738 (message | |
1739 (concat | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1740 (substitute-command-keys "\\[gnus-group-read-group]:Select ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1741 (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
|
1742 (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
|
1743 (substitute-command-keys "\\[gnus-group-exit]:Exit ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1744 (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
|
1745 (substitute-command-keys "\\[gnus-group-describe-briefly]:This help") |
257 | 1746 ))) |
1747 | |
1748 | |
1749 ;;; | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1750 ;;; GNUS Summary Mode |
257 | 1751 ;;; |
1752 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1753 (if gnus-summary-mode-map |
257 | 1754 nil |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1755 (setq gnus-summary-mode-map (make-keymap)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1756 (suppress-keymap gnus-summary-mode-map) |
7216
6ecee038c1c9
(gnus-summary-mode-map): Bind C-c C-v to gnus-uu-ctl-map.
Richard M. Stallman <rms@gnu.org>
parents:
6309
diff
changeset
|
1757 (define-key gnus-summary-mode-map "\C-c\C-v" 'gnus-uu-ctl-map) |
7228
14df71736eae
(gnus-summary-mode-map): Bind # to gnus-uu-mark-article.
Richard M. Stallman <rms@gnu.org>
parents:
7216
diff
changeset
|
1758 (define-key gnus-summary-mode-map "#" 'gnus-uu-mark-article) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1759 (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
|
1760 (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
|
1761 (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
|
1762 (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
|
1763 (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
|
1764 (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
|
1765 (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
|
1766 (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
|
1767 (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
|
1768 ;;(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
|
1769 ;;(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
|
1770 (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
|
1771 (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
|
1772 (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
|
1773 (define-key gnus-summary-mode-map "\C-p" 'gnus-summary-prev-subject) |
7466
b48210278981
(gnus-group-mode-map, gnus-summary-mode-map):
Richard M. Stallman <rms@gnu.org>
parents:
7300
diff
changeset
|
1774 (define-key gnus-summary-mode-map [down] 'gnus-summary-next-subject) |
b48210278981
(gnus-group-mode-map, gnus-summary-mode-map):
Richard M. Stallman <rms@gnu.org>
parents:
7300
diff
changeset
|
1775 (define-key gnus-summary-mode-map [up] 'gnus-summary-prev-subject) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1776 (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
|
1777 (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
|
1778 ;;(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
|
1779 ;;(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
|
1780 (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
|
1781 ;;(define-key gnus-summary-mode-map "/" 'isearch-forward) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1782 (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
|
1783 (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
|
1784 ;;(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
|
1785 (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
|
1786 (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
|
1787 (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
|
1788 (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
|
1789 ;;(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
|
1790 (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
|
1791 (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
|
1792 ;;(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
|
1793 (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
|
1794 (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
|
1795 (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
|
1796 (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
|
1797 (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
|
1798 (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
|
1799 (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
|
1800 (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
|
1801 (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
|
1802 (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
|
1803 (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
|
1804 (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
|
1805 (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
|
1806 (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
|
1807 (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
|
1808 (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
|
1809 (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
|
1810 (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
|
1811 ;;(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
|
1812 ;;(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
|
1813 (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
|
1814 ;;(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
|
1815 (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
|
1816 (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
|
1817 (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
|
1818 (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
|
1819 (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
|
1820 (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
|
1821 (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
|
1822 (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
|
1823 (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
|
1824 (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
|
1825 (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
|
1826 (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
|
1827 ;;(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
|
1828 (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
|
1829 (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
|
1830 (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
|
1831 (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
|
1832 (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
|
1833 ;;(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
|
1834 (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
|
1835 (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
|
1836 (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
|
1837 (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
|
1838 (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
|
1839 (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
|
1840 (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
|
1841 (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
|
1842 (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
|
1843 (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
|
1844 (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
|
1845 (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
|
1846 (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
|
1847 (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
|
1848 (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
|
1849 (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
|
1850 (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
|
1851 (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
|
1852 (define-key gnus-summary-mode-map "?" 'gnus-summary-describe-briefly) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1853 (define-key gnus-summary-mode-map "\C-c\C-i" 'gnus-info-find-node) |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1854 (define-key gnus-summary-mode-map [mouse-2] 'gnus-mouse-pick-article) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1855 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1856 (define-key gnus-summary-mode-map [menu-bar misc] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1857 (cons "Misc" (make-sparse-keymap "misc"))) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1858 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1859 (define-key gnus-summary-mode-map [menu-bar misc caesar-message] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1860 '("Caesar Message" . gnus-summary-caesar-message)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1861 (define-key gnus-summary-mode-map [menu-bar misc cancel-article] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1862 '("Cancel Article" . gnus-summary-cancel-article)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1863 (define-key gnus-summary-mode-map [menu-bar misc edit-local-kill] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1864 '("Edit Kill File" . gnus-summary-edit-local-kill)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1865 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1866 (define-key gnus-summary-mode-map [menu-bar misc mark-as-unread] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1867 '("Mark as Unread" . gnus-summary-mark-as-unread-forward)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1868 (define-key gnus-summary-mode-map [menu-bar misc mark-as-read] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1869 '("Mark as Read" . gnus-summary-mark-as-read)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1870 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1871 (define-key gnus-summary-mode-map [menu-bar misc quit] |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1872 '("Quit Group" . gnus-summary-quit)) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1873 (define-key gnus-summary-mode-map [menu-bar misc exit] |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1874 '("Exit Group" . gnus-summary-exit)) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1875 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1876 (define-key gnus-summary-mode-map [menu-bar sort] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1877 (cons "Sort" (make-sparse-keymap "sort"))) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1878 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1879 (define-key gnus-summary-mode-map [menu-bar sort sort-by-author] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1880 '("Sort by Author" . gnus-summary-sort-by-author)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1881 (define-key gnus-summary-mode-map [menu-bar sort sort-by-date] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1882 '("Sort by Date" . gnus-summary-sort-by-date)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1883 (define-key gnus-summary-mode-map [menu-bar sort sort-by-number] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1884 '("Sort by Number" . gnus-summary-sort-by-number)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1885 (define-key gnus-summary-mode-map [menu-bar sort sort-by-subject] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1886 '("Sort by Subject" . gnus-summary-sort-by-subject)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1887 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1888 (define-key gnus-summary-mode-map [menu-bar show/hide] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1889 (cons "Show/Hide" (make-sparse-keymap "show/hide"))) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1890 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1891 (define-key gnus-summary-mode-map [menu-bar show/hide hide-all-threads] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1892 '("Hide All Threads" . gnus-summary-hide-all-threads)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1893 (define-key gnus-summary-mode-map [menu-bar show/hide hide-thread] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1894 '("Hide Thread" . gnus-summary-hide-thread)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1895 (define-key gnus-summary-mode-map [menu-bar show/hide show-all-threads] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1896 '("Show All Threads" . gnus-summary-show-all-threads)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1897 (define-key gnus-summary-mode-map [menu-bar show/hide show-all-headers] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1898 '("Show All Headers" . gnus-summary-show-all-headers)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1899 (define-key gnus-summary-mode-map [menu-bar show/hide show-thread] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1900 '("Show Thread" . gnus-summary-show-thread)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1901 (define-key gnus-summary-mode-map [menu-bar show/hide show-article] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1902 '("Show Article" . gnus-summary-show-article)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1903 (define-key gnus-summary-mode-map [menu-bar show/hide toggle-truncation] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1904 '("Toggle Truncation" . gnus-summary-toggle-truncation)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1905 (define-key gnus-summary-mode-map [menu-bar show/hide toggle-mime] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1906 '("Toggle Mime" . gnus-summary-toggle-mime)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1907 (define-key gnus-summary-mode-map [menu-bar show/hide toggle-header] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1908 '("Toggle Header" . gnus-summary-toggle-header)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1909 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1910 (define-key gnus-summary-mode-map [menu-bar action] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1911 (cons "Action" (make-sparse-keymap "action"))) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1912 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1913 (define-key gnus-summary-mode-map [menu-bar action kill-same-subject] |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1914 '("Kill Same Subject" . gnus-summary-kill-same-subject)) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1915 (define-key gnus-summary-mode-map [menu-bar action kill-thread] |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1916 '("Kill Thread" . gnus-summary-kill-thread)) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1917 (define-key gnus-summary-mode-map [menu-bar action delete-marked-with] |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1918 '("Delete Marked With" . gnus-summary-delete-marked-with)) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1919 (define-key gnus-summary-mode-map [menu-bar action delete-marked-as-read] |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1920 '("Delete Marked As Read" . gnus-summary-delete-marked-as-read)) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1921 (define-key gnus-summary-mode-map [menu-bar action catchup-and-exit] |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1922 '("Catchup And Exit" . gnus-summary-catchup-and-exit)) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1923 (define-key gnus-summary-mode-map [menu-bar action catchup-to-here] |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1924 '("Catchup to Here" . gnus-summary-catchup-to-here)) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1925 |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1926 (define-key gnus-summary-mode-map [menu-bar action ignore] |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1927 '("---")) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1928 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1929 (define-key gnus-summary-mode-map [menu-bar action save-in-file] |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1930 '("Save in File" . gnus-summary-save-in-file)) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1931 (define-key gnus-summary-mode-map [menu-bar action save-article] |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1932 '("Save Article" . gnus-summary-save-article)) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1933 |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1934 (define-key gnus-summary-mode-map [menu-bar action lambda] |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1935 '("---")) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1936 |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1937 (define-key gnus-summary-mode-map [menu-bar action forward] |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1938 '("Forward" . gnus-summary-mail-forward)) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1939 (define-key gnus-summary-mode-map [menu-bar action followup-with-original] |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1940 '("Followup with Original" . gnus-summary-followup-with-original)) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1941 (define-key gnus-summary-mode-map [menu-bar action followup] |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1942 '("Followup" . gnus-summary-followup)) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1943 (define-key gnus-summary-mode-map [menu-bar action reply-with-original] |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1944 '("Reply with Original" . gnus-summary-reply-with-original)) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1945 (define-key gnus-summary-mode-map [menu-bar action reply] |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1946 '("Reply" . gnus-summary-reply)) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1947 (define-key gnus-summary-mode-map [menu-bar action post] |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1948 '("Post News" . gnus-summary-post-news)) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1949 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1950 (define-key gnus-summary-mode-map [menu-bar move] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1951 (cons "Move" (make-sparse-keymap "move"))) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1952 |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1953 (define-key gnus-summary-mode-map [menu-bar move isearch-article] |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1954 '("Search in Article" . gnus-summary-isearch-article)) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1955 (define-key gnus-summary-mode-map [menu-bar move search-through-articles] |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1956 '("Search through Articles" . gnus-summary-search-article-forward)) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1957 (define-key gnus-summary-mode-map [menu-bar move down-thread] |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1958 '("Down Thread" . gnus-summary-down-thread)) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1959 (define-key gnus-summary-mode-map [menu-bar move prev-same-subject] |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1960 '("Prev Same Subject" . gnus-summary-prev-same-subject)) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1961 (define-key gnus-summary-mode-map [menu-bar move prev-group] |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1962 '("Prev Group" . gnus-summary-prev-group)) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1963 (define-key gnus-summary-mode-map [menu-bar move next-unread-same-subject] |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1964 '("Next Unread Same Subject" . gnus-summary-next-unread-same-subject)) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1965 (define-key gnus-summary-mode-map [menu-bar move next-unread-article] |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1966 '("Next Unread Article" . gnus-summary-next-unread-article)) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1967 (define-key gnus-summary-mode-map [menu-bar move next-thread] |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1968 '("Next Thread" . gnus-summary-next-thread)) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1969 (define-key gnus-summary-mode-map [menu-bar move next-group] |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1970 '("Next Group" . gnus-summary-next-group)) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1971 (define-key gnus-summary-mode-map [menu-bar move first-unread-article] |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1972 '("First Unread Article" . gnus-summary-first-unread-article)) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1973 ) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1974 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1975 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1976 (defun gnus-summary-mode () |
257 | 1977 "Major mode for reading articles in this newsgroup. |
1978 All normal editing commands are turned off. | |
1979 Instead, these commands are available: | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1980 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1981 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
|
1982 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
|
1983 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
|
1984 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
|
1985 n Move to the next unread article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1986 p Move to the previous unread article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1987 N Move to the next article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1988 P Move to the previous article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1989 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
|
1990 current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1991 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
|
1992 current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1993 \\[gnus-summary-next-unread-same-subject] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1994 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
|
1995 current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1996 \\[gnus-summary-prev-unread-same-subject] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1997 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
|
1998 the current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1999 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
|
2000 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
|
2001 C-n Move to the next subject. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2002 C-p Move to the previous subject. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2003 ESC n Move to the next unread subject. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2004 ESC p Move to the previous unread subject. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2005 \\[gnus-summary-next-group] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2006 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
|
2007 \\[gnus-summary-prev-group] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2008 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
|
2009 . 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
|
2010 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
|
2011 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
|
2012 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
|
2013 < 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
|
2014 > 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
|
2015 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
|
2016 l Jump to the article you read last. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2017 ^ Refer to parent of the current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2018 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
|
2019 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
|
2020 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
|
2021 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
|
2022 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
|
2023 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
|
2024 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
|
2025 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
|
2026 read, and then select the next unread article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2027 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
|
2028 read. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2029 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
|
2030 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
|
2031 ESC C-t Toggle showing conversation threads. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2032 ESC C-s Show thread subtrees. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2033 ESC C-h Hide thread subtrees. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2034 \\[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
|
2035 \\[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
|
2036 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
|
2037 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
|
2038 ESC C-d Go downward current thread. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2039 ESC C-u Go upward current thread. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2040 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
|
2041 & Execute a command for each article conditionally. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2042 \\[gnus-summary-catchup] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2043 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
|
2044 articles marked as unread. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2045 \\[gnus-summary-catchup-all] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2046 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
|
2047 \\[gnus-summary-catchup-and-exit] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2048 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
|
2049 current newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2050 \\[gnus-summary-catchup-all-and-exit] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2051 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
|
2052 C-t Toggle truncations of subject lines. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2053 x Delete subject lines marked as read. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2054 X Delete subject lines with the specific marks. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2055 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
|
2056 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
|
2057 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
|
2058 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
|
2059 = Expand Summary window to show headers full window. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2060 C-x C-s Reselect the current newsgroup. Prefix argument means to select all. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2061 w Stop page breaking by linefeed. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2062 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
|
2063 g Force to show the current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2064 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
|
2065 vice versa. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2066 ESC-t Toggle MIME processing. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2067 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
|
2068 a Post a new article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2069 f Post a reply article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2070 F Post a reply article with original article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2071 C Cancel the current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2072 r Mail a message to the author. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2073 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
|
2074 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
|
2075 m Mail a message in other window. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2076 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
|
2077 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
|
2078 | 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
|
2079 q Quit reading news in the current newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2080 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
|
2081 V Show the version number of this GNUS. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2082 ? Describe Summary mode commands briefly. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2083 C-h m Describe Summary mode. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2084 C-c C-i Read Info about Summary mode. |
257 | 2085 |
2086 User customizable variables: | |
2087 gnus-large-newsgroup | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2088 The number of articles which indicates a large newsgroup. If the |
257 | 2089 number of articles in a newsgroup is greater than the value, the |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2090 number of articles to be selected is asked for. If the given value |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2091 N is positive, the last N articles is selected. If N is negative, |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2092 the first N articles are selected. An empty string means to select |
257 | 2093 all articles. |
2094 | |
2095 gnus-use-long-file-name | |
2096 Non-nil means that a newsgroup name is used as a default file name | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2097 to save articles to. If it's nil, the directory form of a |
257 | 2098 newsgroup is used instead. |
2099 | |
2100 gnus-default-article-saver | |
2101 Specifies your favorite article saver which is interactively | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2102 funcallable. Following functions are available: |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2103 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2104 gnus-summary-save-in-rmail (in Rmail format) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2105 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
|
2106 gnus-summary-save-in-folder (in MH folder) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2107 gnus-summary-save-in-file (in article format). |
257 | 2108 |
2109 gnus-rmail-save-name | |
2110 gnus-mail-save-name | |
2111 gnus-folder-save-name | |
2112 gnus-file-save-name | |
2113 Specifies a function generating a file name to save articles in | |
2114 specified format. The function is called with NEWSGROUP, HEADERS, | |
2115 and optional LAST-FILE. Access macros to the headers are defined | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2116 as `nntp-header-FIELD', and functions are defined as |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2117 `gnus-header-FIELD'. |
257 | 2118 |
2119 gnus-article-save-directory | |
2120 Specifies a directory name to save articles to using the commands | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2121 `gnus-summary-save-in-rmail', `gnus-summary-save-in-mail' and |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2122 `gnus-summary-save-in-file'. The variable is initialized from the |
257 | 2123 SAVEDIR environment variable. |
2124 | |
8444 | 2125 gnus-kill-files-directory |
2126 Specifies a directory name to save KILL files to using the commands | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2127 `gnus-edit-global-kill', and `gnus-edit-local-kill'. The variable is |
8444 | 2128 initialized from the SAVEDIR environment variable. |
2129 | |
257 | 2130 gnus-show-all-headers |
2131 Non-nil means that all headers of an article are shown. | |
2132 | |
2133 gnus-save-all-headers | |
2134 Non-nil means that all headers of an article are saved in a file. | |
2135 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2136 gnus-show-mime |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2137 Non-nil means that show a MIME message. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2138 |
257 | 2139 gnus-show-threads |
2140 Non-nil means that conversation threads are shown in tree structure. | |
2141 | |
2142 gnus-thread-hide-subject | |
2143 Non-nil means that subjects for thread subtrees are hidden. | |
2144 | |
2145 gnus-thread-hide-subtree | |
2146 Non-nil means that thread subtrees are hidden initially. | |
2147 | |
2148 gnus-thread-hide-killed | |
2149 Non-nil means that killed thread subtrees are hidden automatically. | |
2150 | |
2151 gnus-thread-ignore-subject | |
2152 Non-nil means that subject differences are ignored in constructing | |
2153 thread trees. | |
2154 | |
2155 gnus-thread-indent-level | |
2156 Indentation of thread subtrees. | |
2157 | |
2158 gnus-optional-headers | |
2159 Specifies a function which generates an optional string displayed | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2160 in the Summary buffer. The function is called with an article |
257 | 2161 HEADERS. The result must be a string excluding `[' and `]'. The |
2162 default function returns a string like NNN:AUTHOR, where NNN is | |
2163 the number of lines in an article and AUTHOR is the name of the | |
2164 author. | |
2165 | |
2166 gnus-auto-extend-newsgroup | |
2167 Non-nil means visible articles are extended to forward and | |
2168 backward automatically if possible. | |
2169 | |
2170 gnus-auto-select-first | |
2171 Non-nil means the first unread article is selected automagically | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2172 when a newsgroup is selected normally (by `gnus-group-read-group'). |
257 | 2173 If you'd like to prevent automatic selection of the first unread |
2174 article in some newsgroups, set the variable to nil in | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2175 `gnus-select-group-hook' or `gnus-apply-kill-hook'. |
257 | 2176 |
2177 gnus-auto-select-next | |
2178 Non-nil means the next newsgroup is selected automagically at the | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2179 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
|
2180 empty (no unread articles), GNUS will exit Summary mode and go |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2181 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
|
2182 exit Summary mode but select the following unread newsgroup. |
257 | 2183 Especially, if the value is the symbol `quietly', the next unread |
2184 newsgroup will be selected without any confirmations. | |
2185 | |
2186 gnus-auto-select-same | |
2187 Non-nil means an article with the same subject as the current | |
2188 article is selected automagically like `rn -S'. | |
2189 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2190 gnus-auto-center-summary |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2191 Non-nil means the point of Summary Mode window is always kept |
257 | 2192 centered. |
2193 | |
2194 gnus-break-pages | |
2195 Non-nil means an article is broken into pages at page delimiters. | |
2196 This may not work with some versions of GNU Emacs earlier than | |
2197 version 18.50. | |
2198 | |
2199 gnus-page-delimiter | |
2200 Specifies a regexp describing line-beginnings that separate pages | |
2201 of news article. | |
2202 | |
2203 gnus-digest-show-summary | |
2204 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
|
2205 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
|
2206 command. |
257 | 2207 |
2208 gnus-digest-separator | |
2209 Specifies a regexp separating messages in a digest article. | |
2210 | |
2211 gnus-mail-reply-method | |
2212 gnus-mail-other-window-method | |
2213 Specifies a function to begin composing mail message using | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2214 commands `gnus-summary-reply' and `gnus-summary-mail-other-window'. |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2215 Functions `gnus-mail-reply-using-mail' and `gnus-mail-reply-using-mhe' |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2216 are available for the value of `gnus-mail-reply-method'. And |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2217 functions `gnus-mail-other-window-using-mail' and |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2218 `gnus-mail-other-window-using-mhe' are available for the value of |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2219 `gnus-mail-other-window-method'. |
257 | 2220 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2221 gnus-mail-send-method |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2222 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
|
2223 as an article. The message must have To: or Cc: field. The value |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2224 of the variable `send-mail-function' is the default function, which |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2225 uses sendmail mail program. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2226 |
257 | 2227 Various hooks for customization: |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2228 gnus-summary-mode-hook |
257 | 2229 Entry to this mode calls the value with no arguments, if that |
2230 value is non-nil. | |
2231 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2232 gnus-select-group-hook |
257 | 2233 Called with no arguments when newsgroup is selected, if that value |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2234 is non-nil. It is possible to sort subjects in this hook. See the |
257 | 2235 documentation of this variable for more information. |
2236 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2237 gnus-summary-prepare-hook |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2238 Called with no arguments after a summary list is created in the |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2239 Summary buffer, if that value is non-nil. If you'd like to modify |
257 | 2240 the buffer, you can use this hook. |
2241 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2242 gnus-select-article-hook |
257 | 2243 Called with no arguments when an article is selected, if that |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2244 value is non-nil. See the documentation of this variable for more |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2245 information. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2246 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2247 gnus-select-digest-hook |
257 | 2248 Called with no arguments when reading digest messages using Rmail, |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2249 if that value is non-nil. This hook can be used to modify an |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2250 article so that Rmail can work with it. See the documentation of |
257 | 2251 the variable for more information. |
2252 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2253 gnus-rmail-digest-hook |
257 | 2254 Called with no arguments when reading digest messages using Rmail, |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2255 if that value is non-nil. This hook is intended to customize Rmail |
257 | 2256 mode. |
2257 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2258 gnus-apply-kill-hook |
257 | 2259 Called with no arguments when a newsgroup is selected and the |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2260 Summary buffer is prepared. This hook is intended to apply a KILL |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2261 file to the selected newsgroup. The format of KILL file is |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2262 completely different from that of version 3.8. You have to rewrite |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2263 them in the new format. See the documentation of Kill file mode |
257 | 2264 for more information. |
2265 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2266 gnus-mark-article-hook |
257 | 2267 Called with no arguments when an article is selected at the first |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2268 time. The hook is intended to mark an article as read (or unread) |
257 | 2269 automatically when it is selected. See the documentation of the |
2270 variable for more information. | |
2271 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2272 gnus-exit-group-hook |
257 | 2273 Called with no arguments when exiting the current newsgroup, if |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2274 that value is non-nil. If your machine is so slow that exiting |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2275 from Summary mode takes very long time, inhibit marking articles |
257 | 2276 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
|
2277 gnus-use-cross-reference to nil in this hook." |
257 | 2278 (interactive) |
2279 (kill-all-local-variables) | |
2280 ;; Gee. Why don't you upgrade? | |
2281 (cond ((boundp 'mode-line-modified) | |
2282 (setq mode-line-modified "--- ")) | |
2283 ((listp (default-value 'mode-line-format)) | |
2284 (setq mode-line-format | |
2285 (cons "--- " (cdr (default-value 'mode-line-format)))))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2286 ;; To disable display-time facility. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2287 ;;(make-local-variable 'global-mode-string) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2288 ;;(setq global-mode-string nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2289 (setq major-mode 'gnus-summary-mode) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2290 (setq mode-name "Summary") |
257 | 2291 ;;(setq mode-line-process '(" " gnus-newsgroup-name)) |
2292 (make-local-variable 'minor-mode-alist) | |
2293 (or (assq 'gnus-show-threads minor-mode-alist) | |
2294 (setq minor-mode-alist | |
2295 (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
|
2296 (gnus-summary-set-mode-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2297 (use-local-map gnus-summary-mode-map) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2298 (buffer-flush-undo (current-buffer)) |
257 | 2299 (setq buffer-read-only t) ;Disable modification |
2300 (setq truncate-lines t) ;Stop line folding | |
2301 (setq selective-display t) | |
2302 (setq selective-display-ellipses t) ;Display `...' | |
2303 ;;(setq case-fold-search t) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2304 (run-hooks 'gnus-summary-mode-hook)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2305 |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
2306 (defun gnus-mouse-pick-article (e) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
2307 (interactive "e") |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
2308 (mouse-set-point e) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
2309 (gnus-summary-next-page nil)) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
2310 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2311 (defun gnus-summary-setup-buffer () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2312 "Initialize Summary buffer." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2313 (if (get-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2314 (set-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2315 (set-buffer (get-buffer-create gnus-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2316 (gnus-summary-mode) |
257 | 2317 )) |
2318 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2319 (defun gnus-summary-read-group (group &optional show-all no-article) |
257 | 2320 "Start reading news in newsgroup GROUP. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2321 If optional 1st argument SHOW-ALL is non-nil, already read articles are |
257 | 2322 also listed. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2323 If optional 2nd argument NO-ARTICLE is non-nil, no article is selected |
257 | 2324 initially." |
2325 (message "Retrieving newsgroup: %s..." group) | |
2326 (if (gnus-select-newsgroup group show-all) | |
2327 (progn | |
2328 ;; Don't switch-to-buffer to prevent displaying old contents | |
2329 ;; of the buffer until new subjects list is created. | |
2330 ;; Suggested by Juha Heinanen <jh@tut.fi> | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2331 (gnus-summary-setup-buffer) |
257 | 2332 ;; 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
|
2333 (run-hooks 'gnus-select-group-hook) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2334 (gnus-summary-prepare) |
257 | 2335 ;; 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
|
2336 (run-hooks 'gnus-apply-kill-hook) |
257 | 2337 (if (zerop (buffer-size)) |
2338 ;; This newsgroup is empty. | |
2339 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2340 (gnus-summary-catchup-and-exit nil t) ;Without confirmations. |
257 | 2341 (message "No unread news")) |
2342 ;; 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
|
2343 ;; gnus-summary-prepare-hook since kill processing may not |
257 | 2344 ;; work with hidden articles. |
2345 (and gnus-show-threads | |
2346 gnus-thread-hide-subtree | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2347 (gnus-summary-hide-all-threads)) |
257 | 2348 ;; Show first unread article if requested. |
2349 (goto-char (point-min)) | |
2350 (if (and (not no-article) | |
2351 gnus-auto-select-first | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2352 (gnus-summary-first-unread-article)) |
257 | 2353 ;; Window is configured automatically. |
2354 ;; 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
|
2355 ;; evaluation, especially by gnus-summary-rmail-digest |
257 | 2356 ;; 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
|
2357 (if (eq (current-buffer) (get-buffer gnus-summary-buffer)) |
257 | 2358 (progn |
2359 ;; Adjust cursor point. | |
2360 (beginning-of-line) | |
2361 (search-forward ":" nil t))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2362 (gnus-configure-windows 'summary) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2363 (pop-to-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2364 (gnus-summary-set-mode-line) |
257 | 2365 ;; 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
|
2366 (if (get-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2367 (if (get-buffer-window gnus-article-buffer) |
257 | 2368 (save-excursion |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2369 (set-buffer gnus-article-buffer) |
257 | 2370 (let ((buffer-read-only nil)) |
2371 (erase-buffer))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2372 (kill-buffer gnus-article-buffer))) |
257 | 2373 ;; Adjust cursor point. |
2374 (beginning-of-line) | |
2375 (search-forward ":" nil t)) | |
2376 )) | |
2377 ;; Cannot select newsgroup GROUP. | |
2378 (if (gnus-gethash group gnus-active-hashtb) | |
2379 (progn | |
2380 ;; If NNTP is used, nntp_access file may not be installed | |
2381 ;; properly. Otherwise, may be active file problem. | |
2382 (ding) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2383 (message |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2384 (gnus-nntp-message |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2385 (format "Cannot select %s. May be security or active file problem." group))) |
257 | 2386 (sit-for 0)) |
2387 ;; Check bogus newsgroups. | |
2388 ;; We must be in Group Mode buffer. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2389 (gnus-group-check-bogus-groups)) |
257 | 2390 )) |
2391 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2392 (defun gnus-summary-prepare () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2393 "Prepare summary list of current newsgroup in Summary buffer." |
257 | 2394 (let ((buffer-read-only nil)) |
2395 ;; 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
|
2396 ;; want it can define them in gnus-select-group-hook. |
257 | 2397 ;; Print verbose messages if too many articles are selected. |
2398 ;; (and (numberp gnus-large-newsgroup) | |
2399 ;; (> (length gnus-newsgroup-headers) gnus-large-newsgroup) | |
2400 ;; (message "Preparing headers...")) | |
2401 (erase-buffer) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2402 (gnus-summary-prepare-threads |
257 | 2403 (if gnus-show-threads |
2404 (gnus-make-threads gnus-newsgroup-headers) | |
2405 gnus-newsgroup-headers) 0) | |
2406 ;; Erase header retrieval message. | |
2407 (message "") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2408 ;; Call hooks for modifying Summary buffer. |
257 | 2409 ;; Suggested by sven@tde.LTH.Se (Sven Mattisson). |
2410 (goto-char (point-min)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2411 (run-hooks 'gnus-summary-prepare-hook) |
257 | 2412 )) |
2413 | |
2414 ;; 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
|
2415 ;; 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
|
2416 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2417 (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
|
2418 "Prepare Summary buffer from THREADS and indentation LEVEL. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2419 THREADS is a list of `(PARENT [(CHILD1 [(GRANDCHILD ...]...) ...]).' |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2420 Optional PARENT-SUBJECT specifies the subject of the parent." |
257 | 2421 (let ((thread nil) |
2422 (header nil) | |
2423 (number nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2424 (subject nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2425 (child-subject nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2426 (parent-subject (or parent-subject "")) |
257 | 2427 ;; `M Indent NUM: [OPT] SUBJECT' |
2428 (cntl (format "%%s %%s%%%dd: [%%s] %%s\n" | |
2429 (length (prin1-to-string gnus-newsgroup-end))))) | |
2430 (while threads | |
2431 (setq thread (car threads)) | |
2432 (setq threads (cdr threads)) | |
2433 ;; If thread is a cons, hierarchical threads is given. | |
2434 ;; Otherwise, thread itself is header. | |
2435 (if (consp thread) | |
2436 (setq header (car thread)) | |
2437 (setq header thread)) | |
2438 ;; Print valid header only. | |
2439 (if (vectorp header) ;Depends on nntp.el. | |
2440 (progn | |
2441 (setq number (nntp-header-number header)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2442 (setq subject (nntp-header-subject header)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2443 (setq child-subject (gnus-simplify-subject subject 're-only)) |
257 | 2444 (insert |
2445 (format cntl | |
2446 ;; Read or not. | |
2447 (cond ((memq number gnus-newsgroup-marked) "-") | |
2448 ((memq number gnus-newsgroup-unreads) " ") | |
2449 (t "D")) | |
2450 ;; Thread level. | |
2451 (make-string (* level gnus-thread-indent-level) ? ) | |
2452 ;; Article number. | |
2453 number | |
2454 ;; Optional headers. | |
2455 (or (and gnus-optional-headers | |
2456 (funcall gnus-optional-headers header)) "") | |
2457 ;; Its subject string. | |
2458 (concat (if (or (zerop level) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2459 (not gnus-thread-hide-subject) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2460 ;; Subject is different from the parent. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2461 (not (string-equal |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2462 parent-subject child-subject))) |
257 | 2463 nil |
2464 (make-string (window-width) ? )) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2465 subject) |
257 | 2466 )) |
2467 )) | |
2468 ;; Print subthreads. | |
2469 (and (consp thread) | |
2470 (cdr thread) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2471 (gnus-summary-prepare-threads |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2472 (cdr thread) (1+ level) child-subject)) |
257 | 2473 ))) |
2474 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2475 ;;(defun gnus-summary-set-mode-line () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2476 ;; "Set Summary mode line string." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2477 ;; ;; 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
|
2478 ;; (let ((subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2479 ;; (if gnus-current-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2480 ;; (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
|
2481 ;; (setq mode-line-buffer-identification |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2482 ;; (concat "GNUS: " |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2483 ;; subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2484 ;; ;; Enough spaces to pad subject to 17 positions. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2485 ;; (make-string (max 0 (- 17 (length subject))) ? )))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2486 ;; (set-buffer-modified-p t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2487 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2488 ;; New implementation in gnus 3.14.3 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2489 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2490 (defun gnus-summary-set-mode-line () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2491 "Set Summary mode line string. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2492 If you don't like it, define your own `gnus-summary-set-mode-line'." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2493 (let ((unmarked |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2494 (- (length gnus-newsgroup-unreads) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2495 (length (gnus-intersection |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2496 gnus-newsgroup-unreads gnus-newsgroup-marked)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2497 (unselected |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2498 (- (length gnus-newsgroup-unselected) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2499 (length (gnus-intersection |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2500 gnus-newsgroup-unselected gnus-newsgroup-marked))))) |
257 | 2501 (setq mode-line-buffer-identification |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2502 (list 17 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2503 (format "GNUS: %s%s %s" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2504 gnus-newsgroup-name |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2505 (if gnus-current-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2506 (format "/%d" gnus-current-article) "") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2507 ;; Basic ideas by tale@pawl.rpi.edu. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2508 (cond ((and (zerop unmarked) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2509 (zerop unselected)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2510 "") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2511 ((zerop unselected) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2512 (format "{%d more}" unmarked)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2513 (t |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2514 (format "{%d(+%d) more}" unmarked unselected))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2515 )))) |
257 | 2516 (set-buffer-modified-p t)) |
2517 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2518 ;; GNUS Summary mode command. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2519 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2520 (defun gnus-summary-search-group (&optional backward) |
257 | 2521 "Search for next unread newsgroup. |
2522 If optional argument BACKWARD is non-nil, search backward instead." | |
2523 (save-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2524 (set-buffer gnus-group-buffer) |
257 | 2525 (save-excursion |
2526 ;; 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
|
2527 (if (gnus-group-search-forward backward nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2528 (gnus-group-group-name)) |
257 | 2529 ))) |
2530 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2531 (defun gnus-summary-search-subject (backward unread subject) |
257 | 2532 "Search for article forward. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2533 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
|
2534 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
|
2535 If 3rd argument SUBJECT is non-nil, the article which has |
257 | 2536 the same subject will be searched for." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2537 (let ((func |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2538 (if backward |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2539 (function re-search-backward) (function re-search-forward))) |
257 | 2540 (article nil) |
2541 ;; We have to take care of hidden lines. | |
2542 (regexp | |
2543 (format "^%s[ \t]+\\([0-9]+\\):.\\[[^]\r\n]*\\][ \t]+%s" | |
2544 ;;(if unread " " ".") | |
6309
9217f29851c2
Don't use triple-hyphen in a character class.
Karl Heuer <kwzh@gnu.org>
parents:
5911
diff
changeset
|
2545 (cond ((eq unread t) " ") (unread "[- ]") (t ".")) |
257 | 2546 (if subject |
2547 (concat "\\([Rr][Ee]:[ \t]+\\)*" | |
2548 (regexp-quote (gnus-simplify-subject subject)) | |
2549 ;; Ignore words in parentheses. | |
2550 "\\([ \t]*([^\r\n]*)\\)*[ \t]*\\(\r\\|$\\)") | |
2551 "") | |
2552 ))) | |
2553 (if backward | |
2554 (beginning-of-line) | |
2555 (end-of-line)) | |
2556 (if (funcall func regexp nil t) | |
2557 (setq article | |
2558 (string-to-int | |
2559 (buffer-substring (match-beginning 1) (match-end 1))))) | |
2560 ;; Adjust cursor point. | |
2561 (beginning-of-line) | |
2562 (search-forward ":" nil t) | |
2563 ;; This is the result. | |
2564 article | |
2565 )) | |
2566 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2567 (defun gnus-summary-search-forward (&optional unread subject) |
257 | 2568 "Search for article forward. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2569 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
|
2570 If 2nd optional argument SUBJECT is non-nil, the article which has |
257 | 2571 the same subject will be searched for." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2572 (gnus-summary-search-subject nil unread subject)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2573 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2574 (defun gnus-summary-search-backward (&optional unread subject) |
257 | 2575 "Search for article backward. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2576 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
|
2577 If 2nd optional argument SUBJECT is non-nil, the article which has |
257 | 2578 the same subject will be searched for." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2579 (gnus-summary-search-subject t unread subject)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2580 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2581 (defun gnus-summary-article-number () |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2582 "Return the Article number around point. |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2583 If none, return current article number." |
257 | 2584 (save-excursion |
2585 (beginning-of-line) | |
2586 (if (looking-at ".[ \t]+\\([0-9]+\\):") | |
2587 (string-to-int | |
2588 (buffer-substring (match-beginning 1) (match-end 1))) | |
2589 ;; If search fail, return current article number. | |
2590 gnus-current-article | |
2591 ))) | |
2592 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2593 (defun gnus-summary-subject-string () |
257 | 2594 "Return current subject string or nil if nothing." |
2595 (save-excursion | |
2596 ;; 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
|
2597 ;; `gnus-summary-article-number' and `gnus-newsgroup-headers'. |
257 | 2598 (beginning-of-line) |
2599 ;; We have to take care of hidden lines. | |
2600 (if (looking-at ".[ \t]+[0-9]+:.\\[[^]\r\n]*\\][ \t]+\\([^\r\n]*\\)[\r\n]") | |
2601 (buffer-substring (match-beginning 1) (match-end 1))) | |
2602 )) | |
2603 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2604 (defun gnus-summary-goto-subject (article) |
257 | 2605 "Move point to ARTICLE's subject." |
2606 (interactive | |
2607 (list | |
2608 (string-to-int | |
2609 (completing-read "Article number: " | |
2610 (mapcar | |
2611 (function | |
2612 (lambda (headers) | |
2613 (list | |
2614 (int-to-string (nntp-header-number headers))))) | |
2615 gnus-newsgroup-headers) | |
2616 nil 'require-match)))) | |
2617 (let ((current (point))) | |
2618 (goto-char (point-min)) | |
2619 (or (and article (re-search-forward (format "^.[ \t]+%d:" article) nil t)) | |
2620 (progn (goto-char current) nil)) | |
2621 )) | |
2622 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2623 (defun gnus-summary-recenter () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2624 "Center point in Summary window." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2625 ;; Scroll window so as to cursor comes center of Summary window |
257 | 2626 ;; only when article is displayed. |
2627 ;; Suggested by earle@mahendo.JPL.NASA.GOV (Greg Earle). | |
2628 ;; Recenter only when requested. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2629 ;; Subbested by popovich@park.cs.columbia.edu |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2630 (and gnus-auto-center-summary |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2631 (get-buffer-window gnus-article-buffer) |
257 | 2632 (< (/ (- (window-height) 1) 2) |
2633 (count-lines (point) (point-max))) | |
2634 (recenter (/ (- (window-height) 2) 2)))) | |
2635 | |
2636 ;; Walking around Group mode buffer. | |
2637 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2638 (defun gnus-summary-jump-to-group (newsgroup) |
257 | 2639 "Move point to NEWSGROUP in Group mode buffer." |
2640 ;; Keep update point of Group mode buffer if visible. | |
2641 (if (eq (current-buffer) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2642 (get-buffer gnus-group-buffer)) |
257 | 2643 (save-window-excursion |
2644 ;; Take care of tree window mode. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2645 (if (get-buffer-window gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2646 (pop-to-buffer gnus-group-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2647 (gnus-group-jump-to-group newsgroup)) |
257 | 2648 (save-excursion |
2649 ;; Take care of tree window mode. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2650 (if (get-buffer-window gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2651 (pop-to-buffer gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2652 (set-buffer gnus-group-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2653 (gnus-group-jump-to-group newsgroup)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2654 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2655 (defun gnus-summary-next-group (no-article) |
257 | 2656 "Exit current newsgroup and then select next unread newsgroup. |
2657 If prefix argument NO-ARTICLE is non-nil, no article is selected initially." | |
2658 (interactive "P") | |
2659 ;; 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
|
2660 (gnus-summary-jump-to-group gnus-newsgroup-name) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2661 (let ((group (gnus-summary-search-group))) |
257 | 2662 (if (null group) |
2663 (progn | |
2664 (message "Exiting %s..." gnus-newsgroup-name) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2665 (gnus-summary-exit) |
257 | 2666 (message "")) |
2667 (message "Selecting %s..." group) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2668 (gnus-summary-exit t) ;Exit Summary mode temporary. |
257 | 2669 ;; We are now in Group mode buffer. |
2670 ;; 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
|
2671 (gnus-summary-jump-to-group group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2672 (gnus-summary-read-group group nil no-article) |
257 | 2673 (or (eq (current-buffer) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2674 (get-buffer gnus-summary-buffer)) |
257 | 2675 (eq gnus-auto-select-next t) |
2676 ;; Expected newsgroup has nothing to read since the articles | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2677 ;; are marked as read by cross-referencing. So, try next |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2678 ;; newsgroup. (Make sure we are in Group mode buffer now.) |
257 | 2679 (and (eq (current-buffer) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2680 (get-buffer gnus-group-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2681 (gnus-group-group-name) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2682 (gnus-summary-read-group |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2683 (gnus-group-group-name) nil no-article)) |
257 | 2684 ) |
2685 ))) | |
2686 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2687 (defun gnus-summary-prev-group (no-article) |
257 | 2688 "Exit current newsgroup and then select previous unread newsgroup. |
2689 If prefix argument NO-ARTICLE is non-nil, no article is selected initially." | |
2690 (interactive "P") | |
2691 ;; 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
|
2692 (gnus-summary-jump-to-group gnus-newsgroup-name) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2693 (let ((group (gnus-summary-search-group t))) |
257 | 2694 (if (null group) |
2695 (progn | |
2696 (message "Exiting %s..." gnus-newsgroup-name) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2697 (gnus-summary-exit) |
257 | 2698 (message "")) |
2699 (message "Selecting %s..." group) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2700 (gnus-summary-exit t) ;Exit Summary mode temporary. |
257 | 2701 ;; We are now in Group mode buffer. |
2702 ;; We have to adjust point of Group mode buffer because current | |
2703 ;; 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
|
2704 (gnus-summary-jump-to-group group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2705 (gnus-summary-read-group group nil no-article) |
257 | 2706 (or (eq (current-buffer) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2707 (get-buffer gnus-summary-buffer)) |
257 | 2708 (eq gnus-auto-select-next t) |
2709 ;; Expected newsgroup has nothing to read since the articles | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2710 ;; are marked as read by cross-referencing. So, try next |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2711 ;; newsgroup. (Make sure we are in Group mode buffer now.) |
257 | 2712 (and (eq (current-buffer) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2713 (get-buffer gnus-group-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2714 (gnus-summary-search-group t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2715 (gnus-summary-read-group |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2716 (gnus-summary-search-group t) nil no-article)) |
257 | 2717 ) |
2718 ))) | |
2719 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2720 ;; Walking around summary lines. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2721 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2722 (defun gnus-summary-next-subject (n &optional unread) |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2723 "Go to Nth following summary line. |
257 | 2724 If optional argument UNREAD is non-nil, only unread article is selected." |
2725 (interactive "p") | |
2726 (while (and (> n 1) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2727 (gnus-summary-search-forward unread)) |
257 | 2728 (setq n (1- n))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2729 (cond ((gnus-summary-search-forward unread) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2730 (gnus-summary-recenter)) |
257 | 2731 (unread |
2732 (message "No more unread articles")) | |
2733 (t | |
2734 (message "No more articles")) | |
2735 )) | |
2736 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2737 (defun gnus-summary-next-unread-subject (n) |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2738 "Go to Nth following unread summary line." |
257 | 2739 (interactive "p") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2740 (gnus-summary-next-subject n t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2741 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2742 (defun gnus-summary-prev-subject (n &optional unread) |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2743 "Go to Nth previous summary line. |
257 | 2744 If optional argument UNREAD is non-nil, only unread article is selected." |
2745 (interactive "p") | |
2746 (while (and (> n 1) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2747 (gnus-summary-search-backward unread)) |
257 | 2748 (setq n (1- n))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2749 (cond ((gnus-summary-search-backward unread) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2750 (gnus-summary-recenter)) |
257 | 2751 (unread |
2752 (message "No more unread articles")) | |
2753 (t | |
2754 (message "No more articles")) | |
2755 )) | |
2756 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2757 (defun gnus-summary-prev-unread-subject (n) |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2758 "Go to Nth previous unread summary line." |
257 | 2759 (interactive "p") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2760 (gnus-summary-prev-subject n t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2761 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2762 ;; Walking around summary lines with displaying articles. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2763 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2764 (defun gnus-summary-expand-window () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2765 "Expand Summary window to show headers full window." |
257 | 2766 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2767 (gnus-configure-windows 'summary) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2768 (pop-to-buffer gnus-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2769 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2770 (defun gnus-summary-display-article (article &optional all-header) |
257 | 2771 "Display ARTICLE in Article buffer." |
2772 (if (null article) | |
2773 nil | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2774 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2775 (pop-to-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2776 (gnus-article-prepare article all-header) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2777 (gnus-summary-recenter) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2778 (gnus-summary-set-mode-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2779 (run-hooks 'gnus-select-article-hook) |
257 | 2780 ;; Successfully display article. |
2781 t | |
2782 )) | |
2783 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2784 (defun gnus-summary-select-article (&optional all-headers force) |
257 | 2785 "Select the current article. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2786 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
|
2787 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
|
2788 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
|
2789 (let ((article (gnus-summary-article-number)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2790 (all-headers (not (not all-headers)))) ;Must be T or NIL. |
257 | 2791 (if (or (null gnus-current-article) |
2792 (/= article gnus-current-article) | |
2793 (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
|
2794 ;; 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
|
2795 (gnus-summary-display-article article all-headers) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2796 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2797 (pop-to-buffer gnus-summary-buffer)) |
257 | 2798 )) |
2799 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2800 (defun gnus-summary-set-current-mark (&optional current-mark) |
257 | 2801 "Put `+' at the current article. |
2802 Optional argument specifies CURRENT-MARK instead of `+'." | |
2803 (save-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2804 (set-buffer gnus-summary-buffer) |
257 | 2805 (let ((buffer-read-only nil)) |
2806 (goto-char (point-min)) | |
2807 ;; First of all clear mark at last article. | |
2808 (if (re-search-forward "^.[ \t]+[0-9]+:[^ \t]" nil t) | |
2809 (progn | |
2810 (delete-char -1) | |
2811 (insert " ") | |
2812 (goto-char (point-min)))) | |
2813 (if (re-search-forward (format "^.[ \t]+%d:" gnus-current-article) nil t) | |
2814 (progn | |
2815 (delete-char 1) | |
2816 (insert (or current-mark "+")))) | |
2817 ))) | |
2818 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2819 ;;(defun gnus-summary-next-article (unread &optional subject) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2820 ;; "Select article after current one. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2821 ;;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
|
2822 ;; (interactive "P") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2823 ;; (cond ((gnus-summary-display-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2824 ;; (gnus-summary-search-forward unread subject))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2825 ;; (unread |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2826 ;; (message "No more unread articles")) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2827 ;; (t |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2828 ;; (message "No more articles")) |
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 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2831 (defun gnus-summary-next-article (unread &optional subject) |
257 | 2832 "Select article after current one. |
2833 If argument UNREAD is non-nil, only unread article is selected." | |
2834 (interactive "P") | |
2835 (let ((header nil)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2836 (cond ((gnus-summary-display-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2837 (gnus-summary-search-forward unread subject))) |
257 | 2838 ((and subject |
2839 gnus-auto-select-same | |
2840 (gnus-set-difference gnus-newsgroup-unreads | |
2841 gnus-newsgroup-marked) | |
2842 (memq this-command | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2843 '(gnus-summary-next-unread-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2844 gnus-summary-next-page |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2845 gnus-summary-kill-same-subject-and-select |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2846 ;;gnus-summary-next-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2847 ;;gnus-summary-next-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2848 ;;gnus-summary-next-unread-same-subject |
257 | 2849 ))) |
2850 ;; 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
|
2851 ;; Hook function, such as gnus-summary-rmail-digest, may |
257 | 2852 ;; change current buffer, so need check. |
2853 (let ((buffer (current-buffer)) | |
2854 (last-point (point))) | |
2855 ;; No more articles with same subject, so jump to the first | |
2856 ;; unread article. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2857 (gnus-summary-first-unread-article) |
257 | 2858 ;;(and (eq buffer (current-buffer)) |
2859 ;; (= (point) last-point) | |
2860 ;; ;; Ignore given SUBJECT, and try again. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2861 ;; (gnus-summary-next-article unread nil)) |
257 | 2862 (and (eq buffer (current-buffer)) |
2863 (< (point) last-point) | |
2864 (message "Wrapped")) | |
2865 )) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2866 ((and gnus-auto-extend-newsgroup |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2867 (not unread) ;Not unread only |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2868 (not subject) ;Only if subject is not specified. |
257 | 2869 (setq header (gnus-more-header-forward))) |
2870 ;; Extend to next article if possible. | |
2871 ;; Basic ideas by himacdonald@watdragon.waterloo.edu | |
2872 (gnus-extend-newsgroup header nil) | |
2873 ;; Threads feature must be turned off. | |
2874 (let ((buffer-read-only nil)) | |
2875 (goto-char (point-max)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2876 (gnus-summary-prepare-threads (list header) 0)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2877 (gnus-summary-goto-article gnus-newsgroup-end)) |
257 | 2878 (t |
2879 ;; Select next newsgroup automatically if requested. | |
7974
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2880 (let ((cmd (aref (this-command-keys) 0)) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2881 (group (gnus-summary-search-group)) |
257 | 2882 (auto-select |
2883 (and gnus-auto-select-next | |
2884 ;;(null (gnus-set-difference gnus-newsgroup-unreads | |
2885 ;; gnus-newsgroup-marked)) | |
2886 (memq this-command | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2887 '(gnus-summary-next-unread-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2888 gnus-summary-next-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2889 gnus-summary-next-page |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2890 gnus-summary-next-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2891 gnus-summary-next-unread-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2892 gnus-summary-kill-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2893 gnus-summary-kill-same-subject-and-select |
257 | 2894 )) |
2895 ;; Ignore characters typed ahead. | |
2896 (not (input-pending-p)) | |
2897 ))) | |
7974
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2898 ;; Keep just the event type of CMD. |
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2899 (if (listp cmd) |
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2900 (setq cmd (car cmd))) |
257 | 2901 (message "No more%s articles%s" |
2902 (if unread " unread" "") | |
2903 (if (and auto-select | |
2904 (not (eq gnus-auto-select-next 'quietly))) | |
2905 (if group | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2906 (format " (Type %s for %s [%d])" |
7974
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2907 (single-key-description cmd) |
257 | 2908 group |
2909 (nth 1 (gnus-gethash group | |
2910 gnus-unread-hashtb))) | |
2911 (format " (Type %s to exit %s)" | |
7974
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2912 (single-key-description cmd) |
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2913 gnus-newsgroup-name)) |
257 | 2914 "")) |
2915 ;; Select next unread newsgroup automagically. | |
2916 (cond ((and auto-select | |
2917 (eq gnus-auto-select-next 'quietly)) | |
2918 ;; Select quietly. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2919 (gnus-summary-next-group nil)) |
257 | 2920 (auto-select |
2921 ;; Confirm auto selection. | |
7974
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2922 (let* ((event (read-event)) |
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2923 (type |
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2924 (if (listp event) |
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2925 (car event) |
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2926 event))) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
2927 (if (and (eq event type) (eq event cmd)) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2928 (gnus-summary-next-group nil) |
7974
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2929 (setq unread-command-events (list event))))) |
257 | 2930 ) |
2931 )) | |
2932 ))) | |
2933 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2934 (defun gnus-summary-next-unread-article () |
257 | 2935 "Select unread article after current one." |
2936 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2937 (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
|
2938 (gnus-summary-subject-string)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2939 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2940 (defun gnus-summary-prev-article (unread &optional subject) |
257 | 2941 "Select article before current one. |
2942 If argument UNREAD is non-nil, only unread article is selected." | |
2943 (interactive "P") | |
2944 (let ((header nil)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2945 (cond ((gnus-summary-display-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2946 (gnus-summary-search-backward unread subject))) |
257 | 2947 ((and subject |
2948 gnus-auto-select-same | |
2949 (gnus-set-difference gnus-newsgroup-unreads | |
2950 gnus-newsgroup-marked) | |
2951 (memq this-command | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2952 '(gnus-summary-prev-unread-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2953 ;;gnus-summary-prev-page |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2954 ;;gnus-summary-prev-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2955 ;;gnus-summary-prev-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2956 ;;gnus-summary-prev-unread-same-subject |
257 | 2957 ))) |
2958 ;; Ignore given SUBJECT, and try again. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2959 (gnus-summary-prev-article unread nil)) |
257 | 2960 (unread |
2961 (message "No more unread articles")) | |
2962 ((and gnus-auto-extend-newsgroup | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2963 (not subject) ;Only if subject is not specified. |
257 | 2964 (setq header (gnus-more-header-backward))) |
2965 ;; Extend to previous article if possible. | |
2966 ;; Basic ideas by himacdonald@watdragon.waterloo.edu | |
2967 (gnus-extend-newsgroup header t) | |
2968 (let ((buffer-read-only nil)) | |
2969 (goto-char (point-min)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2970 (gnus-summary-prepare-threads (list header) 0)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2971 (gnus-summary-goto-article gnus-newsgroup-begin)) |
257 | 2972 (t |
2973 (message "No more articles")) | |
2974 ))) | |
2975 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2976 (defun gnus-summary-prev-unread-article () |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2977 "Select unread article before current one." |
257 | 2978 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2979 (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
|
2980 (gnus-summary-subject-string)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2981 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2982 (defun gnus-summary-next-page (lines) |
257 | 2983 "Show next page of selected article. |
3591
507f64624555
Apply typo patches from Paul Eggert.
Jim Blandy <jimb@redhat.com>
parents:
3496
diff
changeset
|
2984 If end of article, select next article. |
257 | 2985 Argument LINES specifies lines to be scrolled up." |
2986 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2987 (let ((article (gnus-summary-article-number)) |
257 | 2988 (endp nil)) |
2989 (if (or (null gnus-current-article) | |
2990 (/= article gnus-current-article)) | |
2991 ;; 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
|
2992 (gnus-summary-display-article article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2993 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2994 (pop-to-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2995 (gnus-eval-in-buffer-window gnus-article-buffer |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2996 (setq endp (gnus-article-next-page lines))) |
257 | 2997 (cond ((and endp lines) |
2998 (message "End of message")) | |
2999 ((and endp (null lines)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3000 (gnus-summary-next-unread-article))) |
257 | 3001 ))) |
3002 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3003 (defun gnus-summary-prev-page (lines) |
257 | 3004 "Show previous page of selected article. |
3005 Argument LINES specifies lines to be scrolled down." | |
3006 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3007 (let ((article (gnus-summary-article-number))) |
257 | 3008 (if (or (null gnus-current-article) |
3009 (/= article gnus-current-article)) | |
3010 ;; 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
|
3011 (gnus-summary-display-article article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3012 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3013 (pop-to-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3014 (gnus-eval-in-buffer-window gnus-article-buffer |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3015 (gnus-article-prev-page lines)) |
257 | 3016 ))) |
3017 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3018 (defun gnus-summary-scroll-up (lines) |
257 | 3019 "Scroll up (or down) one line current article. |
3020 Argument LINES specifies lines to be scrolled up (or down if negative)." | |
3021 (interactive "p") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3022 (gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3023 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3024 (cond ((> lines 0) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3025 (if (gnus-article-next-page lines) |
257 | 3026 (message "End of message"))) |
3027 ((< lines 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3028 (gnus-article-prev-page (- 0 lines)))) |
257 | 3029 )) |
3030 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3031 (defun gnus-summary-next-same-subject () |
257 | 3032 "Select next article which has the same subject as current one." |
3033 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3034 (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
|
3035 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3036 (defun gnus-summary-prev-same-subject () |
257 | 3037 "Select previous article which has the same subject as current one." |
3038 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3039 (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
|
3040 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3041 (defun gnus-summary-next-unread-same-subject () |
257 | 3042 "Select next unread article which has the same subject as current one." |
3043 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3044 (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
|
3045 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3046 (defun gnus-summary-prev-unread-same-subject () |
257 | 3047 "Select previous unread article which has the same subject as current one." |
3048 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3049 (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
|
3050 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3051 (defun gnus-summary-refer-parent-article (child) |
257 | 3052 "Refer parent article of current article. |
3053 If a prefix argument CHILD is non-nil, go back to the child article | |
3054 using internally maintained articles history. | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3055 NOTE: This command may not work with `nnspool.el'." |
257 | 3056 (interactive "P") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3057 (gnus-summary-select-article t t) ;Request all headers. |
257 | 3058 (let ((referenced-id nil)) ;Message-id of parent or child article. |
3059 (if child | |
3060 ;; Go back to child article using history. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3061 (gnus-summary-refer-article nil) |
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 ;; Look for parent Message-ID. |
3064 ;; We cannot use gnus-current-headers to get references | |
3591
507f64624555
Apply typo patches from Paul Eggert.
Jim Blandy <jimb@redhat.com>
parents:
3496
diff
changeset
|
3065 ;; because we may be looking at parent or referred article. |
257 | 3066 (let ((references (gnus-fetch-field "References"))) |
3067 ;; Get the last message-id in the references. | |
3068 (and references | |
3069 (string-match "\\(<[^<>]+>\\)[^>]*\\'" references) | |
3070 (setq referenced-id | |
3071 (substring references | |
3072 (match-beginning 1) (match-end 1)))) | |
3073 )) | |
3074 (if (stringp referenced-id) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3075 (gnus-summary-refer-article referenced-id) |
257 | 3076 (error "No more parents")) |
3077 ))) | |
3078 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3079 (defun gnus-summary-refer-article (message-id) |
257 | 3080 "Refer article specified by MESSAGE-ID. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3081 If the MESSAGE-ID is nil or an empty string, Message-ID is poped from |
257 | 3082 internally maintained articles history. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3083 NOTE: This command may not work with `nnspool.el' nor `mhspool.el'." |
257 | 3084 (interactive "sMessage-ID: ") |
3085 ;; Make sure that this command depends on the fact that article | |
3086 ;; related information is not updated when an article is retrieved | |
3087 ;; by Message-ID. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3088 (gnus-summary-select-article t t) ;Request all headers. |
257 | 3089 (if (and (stringp message-id) |
3090 (> (length message-id) 0)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3091 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3092 ;; Construct the correct Message-ID if necessary. |
3093 ;; Suggested by tale@pawl.rpi.edu. | |
3094 (or (string-match "^<" message-id) | |
3095 (setq message-id (concat "<" message-id))) | |
3096 (or (string-match ">$" message-id) | |
3097 (setq message-id (concat message-id ">"))) | |
3098 ;; Push current message-id on history. | |
3099 ;; We cannot use gnus-current-headers to get current | |
3591
507f64624555
Apply typo patches from Paul Eggert.
Jim Blandy <jimb@redhat.com>
parents:
3496
diff
changeset
|
3100 ;; message-id because we may be looking at parent or referred |
257 | 3101 ;; article. |
3102 (let ((current (gnus-fetch-field "Message-ID"))) | |
3103 (or (equal current message-id) ;Nothing to do. | |
3104 (equal current (car gnus-current-history)) | |
3105 (setq gnus-current-history | |
3106 (cons current gnus-current-history))) | |
3107 )) | |
3108 ;; Pop message-id from history. | |
3109 (setq message-id (car gnus-current-history)) | |
3110 (setq gnus-current-history (cdr gnus-current-history))) | |
3111 (if (stringp message-id) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3112 ;; 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
|
3113 ;; nnspool nor mhspool. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3114 (gnus-article-prepare message-id t) |
257 | 3115 (error "No such references")) |
3116 ) | |
3117 | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3118 (defun gnus-summary-next-digest (n) |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3119 "Move to head of Nth next digested message." |
257 | 3120 (interactive "p") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3121 (gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3122 (gnus-eval-in-buffer-window gnus-article-buffer |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3123 (gnus-article-next-digest (or n 1)) |
257 | 3124 )) |
3125 | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3126 (defun gnus-summary-prev-digest (n) |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3127 "Move to head of Nth previous digested message." |
257 | 3128 (interactive "p") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3129 (gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3130 (gnus-eval-in-buffer-window gnus-article-buffer |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3131 (gnus-article-prev-digest (or n 1)))) |
257 | 3132 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3133 (defun gnus-summary-first-unread-article () |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3134 "Select first unread article. Return non-nil if successfully selected." |
257 | 3135 (interactive) |
3136 (let ((begin (point))) | |
3137 (goto-char (point-min)) | |
3138 (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
|
3139 (gnus-summary-display-article (gnus-summary-article-number)) |
257 | 3140 ;; If there is no unread articles, stay there. |
3141 (goto-char begin) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3142 ;;(gnus-summary-display-article (gnus-summary-article-number)) |
257 | 3143 (message "No more unread articles") |
3144 nil | |
3145 ) | |
3146 )) | |
3147 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3148 (defun gnus-summary-isearch-article () |
257 | 3149 "Do incremental search forward on current article." |
3150 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3151 (gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3152 (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
|
3153 (isearch-forward))) |
257 | 3154 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3155 (defun gnus-summary-search-article-forward (regexp) |
257 | 3156 "Search for an article containing REGEXP forward. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3157 `gnus-select-article-hook' is not called for articles examined |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3158 by searching search." |
257 | 3159 (interactive |
3160 (list (read-string | |
3161 (concat "Search forward (regexp): " | |
3162 (if gnus-last-search-regexp | |
3163 (concat "(default " gnus-last-search-regexp ") ")))))) | |
3164 (if (string-equal regexp "") | |
3165 (setq regexp (or gnus-last-search-regexp "")) | |
3166 (setq gnus-last-search-regexp regexp)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3167 (if (gnus-summary-search-article regexp nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3168 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3169 (recenter 0) |
3170 ;;(sit-for 1) | |
3171 ) | |
3172 (error "Search failed: \"%s\"" regexp) | |
3173 )) | |
3174 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3175 (defun gnus-summary-search-article-backward (regexp) |
257 | 3176 "Search for an article containing REGEXP backward. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3177 `gnus-select-article-hook' is not called for articles examined |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3178 by searching search." |
257 | 3179 (interactive |
3180 (list (read-string | |
3181 (concat "Search backward (regexp): " | |
3182 (if gnus-last-search-regexp | |
3183 (concat "(default " gnus-last-search-regexp ") ")))))) | |
3184 (if (string-equal regexp "") | |
3185 (setq regexp (or gnus-last-search-regexp "")) | |
3186 (setq gnus-last-search-regexp regexp)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3187 (if (gnus-summary-search-article regexp t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3188 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3189 (recenter 0) |
3190 ;;(sit-for 1) | |
3191 ) | |
3192 (error "Search failed: \"%s\"" regexp) | |
3193 )) | |
3194 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3195 (defun gnus-summary-search-article (regexp &optional backward) |
257 | 3196 "Search for an article containing REGEXP. |
3197 Optional argument BACKWARD means do search for backward. | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3198 `gnus-select-article-hook' is not called for articles examined |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3199 by searching search." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3200 (let ((gnus-select-article-hook nil) ;Disable hook. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3201 (gnus-mark-article-hook nil) ;Inhibit marking as read. |
257 | 3202 (re-search |
3203 (if backward | |
3204 (function re-search-backward) (function re-search-forward))) | |
3205 (found nil) | |
3206 (last nil)) | |
3207 ;; 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
|
3208 (gnus-summary-show-all-threads) |
257 | 3209 ;; First of all, search current article. |
3210 ;; We don't want to read article again from NNTP server nor reset | |
3211 ;; current point. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3212 (gnus-summary-select-article) |
257 | 3213 (message "Searching article: %d..." gnus-current-article) |
3214 (setq last gnus-current-article) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3215 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3216 (save-restriction |
3217 (widen) | |
3218 ;; Begin search from current point. | |
3219 (setq found (funcall re-search regexp nil t)))) | |
3220 ;; Then search next articles. | |
3221 (while (and (not found) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3222 (gnus-summary-display-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3223 (gnus-summary-search-subject backward nil nil))) |
257 | 3224 (message "Searching article: %d..." gnus-current-article) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3225 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3226 (save-restriction |
3227 (widen) | |
3228 (goto-char (if backward (point-max) (point-min))) | |
3229 (setq found (funcall re-search regexp nil t))) | |
3230 )) | |
3231 (message "") | |
3232 ;; Adjust article pointer. | |
3233 (or (eq last gnus-current-article) | |
3234 (setq gnus-last-article last)) | |
3235 ;; Return T if found such article. | |
3236 found | |
3237 )) | |
3238 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3239 (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
|
3240 "If FIELD of article header matches REGEXP, execute a COMMAND string. |
257 | 3241 If FIELD is an empty string (or nil), entire article body is searched for. |
3242 If optional (prefix) argument BACKWARD is non-nil, do backward instead." | |
3243 (interactive | |
3244 (list (let ((completion-ignore-case t)) | |
3245 (completing-read "Field name: " | |
3246 '(("Number")("Subject")("From") | |
3247 ("Lines")("Date")("Id") | |
3248 ("Xref")("References")) | |
3249 nil 'require-match)) | |
3250 (read-string "Regexp: ") | |
3251 (read-key-sequence "Command: ") | |
3252 current-prefix-arg)) | |
3253 ;; 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
|
3254 (gnus-summary-show-all-threads) |
257 | 3255 ;; We don't want to change current point nor window configuration. |
3256 (save-excursion | |
3257 (save-window-excursion | |
3258 (message "Executing %s..." (key-description command)) | |
3259 ;; We'd like to execute COMMAND interactively so as to give arguments. | |
3260 (gnus-execute field regexp | |
3261 (` (lambda () | |
3262 (call-interactively '(, (key-binding command))))) | |
3263 backward) | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3264 (message "Executing %s...done" (key-description command))))) |
257 | 3265 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3266 (defun gnus-summary-beginning-of-article () |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3267 "Go to beginning of article body." |
257 | 3268 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3269 (gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3270 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3271 (widen) |
3272 (beginning-of-buffer) | |
3273 (if gnus-break-pages | |
3274 (gnus-narrow-to-page)) | |
3275 )) | |
3276 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3277 (defun gnus-summary-end-of-article () |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3278 "Go to end of article body." |
257 | 3279 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3280 (gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3281 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3282 (widen) |
3283 (end-of-buffer) | |
3284 (if gnus-break-pages | |
3285 (gnus-narrow-to-page)) | |
3286 )) | |
3287 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3288 (defun gnus-summary-goto-article (article &optional all-headers) |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3289 "Read article number ARTICLE if it exists. |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3290 Optional argument ALL-HEADERS means show the full header." |
257 | 3291 (interactive |
3292 (list | |
3293 (string-to-int | |
3294 (completing-read "Article number: " | |
3295 (mapcar | |
3296 (function | |
3297 (lambda (headers) | |
3298 (list | |
3299 (int-to-string (nntp-header-number headers))))) | |
3300 gnus-newsgroup-headers) | |
3301 nil 'require-match)))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3302 (if (gnus-summary-goto-subject article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3303 (gnus-summary-display-article article all-headers))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3304 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3305 (defun gnus-summary-goto-last-article () |
257 | 3306 "Go to last subject line." |
3307 (interactive) | |
3308 (if gnus-last-article | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3309 (gnus-summary-goto-article gnus-last-article))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3310 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3311 (defun gnus-summary-show-article () |
257 | 3312 "Force to show current article." |
3313 (interactive) | |
3314 ;; The following is a trick to force to read the current article again. | |
3315 (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
|
3316 (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
|
3317 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3318 (defun gnus-summary-toggle-header (arg) |
257 | 3319 "Show original header if pruned header currently shown, or vice versa. |
3320 With arg, show original header iff arg is positive." | |
3321 (interactive "P") | |
3322 ;; Variable gnus-show-all-headers must be NIL to toggle really. | |
3323 (let ((gnus-show-all-headers nil) | |
3324 (all-headers | |
3325 (if (null arg) (not gnus-have-all-headers) | |
3326 (> (prefix-numeric-value arg) 0)))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3327 (gnus-summary-select-article all-headers t))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3328 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3329 (defun gnus-summary-show-all-headers () |
257 | 3330 "Show original article header." |
3331 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3332 (gnus-summary-select-article t t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3333 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3334 (defun gnus-summary-toggle-mime (arg) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3335 "Toggle MIME processing. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3336 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
|
3337 (interactive "P") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3338 (setq gnus-show-mime |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3339 (if (null arg) (not gnus-show-mime) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3340 (> (prefix-numeric-value arg) 0))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3341 ;; 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
|
3342 (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
|
3343 (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
|
3344 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3345 (defun gnus-summary-stop-page-breaking () |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3346 "Stop page breaking by linefeed temporary (widen article buffer)." |
257 | 3347 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3348 (gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3349 (gnus-eval-in-buffer-window gnus-article-buffer |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3350 (widen) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3351 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3352 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3353 (defun gnus-summary-kill-same-subject-and-select (unmark) |
257 | 3354 "Mark articles which has the same subject as read, and then select next. |
3355 If argument UNMARK is positive, remove any kinds of marks. | |
3356 If argument UNMARK is negative, mark articles as unread instead." | |
3357 (interactive "P") | |
3358 (if unmark | |
3359 (setq unmark (prefix-numeric-value unmark))) | |
3360 (let ((count | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3361 (gnus-summary-mark-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3362 (gnus-summary-subject-string) unmark))) |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3363 ;; Select next unread article. If auto-select-same mode, should |
257 | 3364 ;; select the first unread article. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3365 (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
|
3366 (gnus-summary-subject-string))) |
257 | 3367 (message "%d articles are marked as %s" |
3368 count (if unmark "unread" "read")) | |
3369 )) | |
3370 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3371 (defun gnus-summary-kill-same-subject (unmark) |
257 | 3372 "Mark articles which has the same subject as read. |
3373 If argument UNMARK is positive, remove any kinds of marks. | |
3374 If argument UNMARK is negative, mark articles as unread instead." | |
3375 (interactive "P") | |
3376 (if unmark | |
3377 (setq unmark (prefix-numeric-value unmark))) | |
3378 (let ((count | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3379 (gnus-summary-mark-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3380 (gnus-summary-subject-string) unmark))) |
257 | 3381 ;; If marked as read, go to next unread subject. |
3382 (if (null unmark) | |
3383 ;; Go to next unread subject. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3384 (gnus-summary-next-subject 1 t)) |
257 | 3385 (message "%d articles are marked as %s" |
3386 count (if unmark "unread" "read")) | |
3387 )) | |
3388 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3389 (defun gnus-summary-mark-same-subject (subject &optional unmark) |
257 | 3390 "Mark articles with same SUBJECT as read, and return marked number. |
3391 If optional argument UNMARK is positive, remove any kinds of marks. | |
3392 If optional argument UNMARK is negative, mark articles as unread instead." | |
3393 (let ((count 1)) | |
3394 (save-excursion | |
3395 (cond ((null unmark) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3396 (gnus-summary-mark-as-read nil "K")) |
257 | 3397 ((> unmark 0) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3398 (gnus-summary-mark-as-unread nil t)) |
257 | 3399 (t |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3400 (gnus-summary-mark-as-unread))) |
257 | 3401 (while (and subject |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3402 (gnus-summary-search-forward nil subject)) |
257 | 3403 (cond ((null unmark) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3404 (gnus-summary-mark-as-read nil "K")) |
257 | 3405 ((> unmark 0) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3406 (gnus-summary-mark-as-unread nil t)) |
257 | 3407 (t |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3408 (gnus-summary-mark-as-unread))) |
257 | 3409 (setq count (1+ count)) |
3410 )) | |
3411 ;; Hide killed thread subtrees. Does not work properly always. | |
3412 ;;(and (null unmark) | |
3413 ;; gnus-thread-hide-killed | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3414 ;; (gnus-summary-hide-thread)) |
257 | 3415 ;; Return number of articles marked as read. |
3416 count | |
3417 )) | |
3418 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3419 (defun gnus-summary-mark-as-unread-forward (count) |
257 | 3420 "Mark current article as unread, and then go forward. |
3421 Argument COUNT specifies number of articles marked as unread." | |
3422 (interactive "p") | |
3423 (while (> count 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3424 (gnus-summary-mark-as-unread nil nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3425 (gnus-summary-next-subject 1 nil) |
257 | 3426 (setq count (1- count)))) |
3427 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3428 (defun gnus-summary-mark-as-unread-backward (count) |
257 | 3429 "Mark current article as unread, and then go backward. |
3430 Argument COUNT specifies number of articles marked as unread." | |
3431 (interactive "p") | |
3432 (while (> count 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3433 (gnus-summary-mark-as-unread nil nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3434 (gnus-summary-prev-subject 1 nil) |
257 | 3435 (setq count (1- count)))) |
3436 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3437 (defun gnus-summary-mark-as-unread (&optional article clear-mark) |
257 | 3438 "Mark current article as unread. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3439 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
|
3440 Optional 2nd argument CLEAR-MARK remove any kinds of mark." |
257 | 3441 (save-excursion |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3442 (set-buffer gnus-summary-buffer) |
257 | 3443 ;; First of all, show hidden thread subtrees. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3444 (gnus-summary-show-thread) |
257 | 3445 (let* ((buffer-read-only nil) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3446 (current (gnus-summary-article-number)) |
257 | 3447 (article (or article current))) |
3448 (gnus-mark-article-as-unread article clear-mark) | |
3449 (if (or (eq article current) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3450 (gnus-summary-goto-subject article)) |
257 | 3451 (progn |
3452 (beginning-of-line) | |
3453 (delete-char 1) | |
3454 (insert (if clear-mark " " "-")))) | |
3455 ))) | |
3456 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3457 (defun gnus-summary-mark-as-read-forward (count) |
257 | 3458 "Mark current article as read, and then go forward. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3459 Argument COUNT specifies number of articles marked as read." |
257 | 3460 (interactive "p") |
3461 (while (> count 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3462 (gnus-summary-mark-as-read) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3463 (gnus-summary-next-subject 1 'unread-only) |
257 | 3464 (setq count (1- count)))) |
3465 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3466 (defun gnus-summary-mark-as-read-backward (count) |
257 | 3467 "Mark current article as read, and then go backward. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3468 Argument COUNT specifies number of articles marked as read." |
257 | 3469 (interactive "p") |
3470 (while (> count 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3471 (gnus-summary-mark-as-read) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3472 (gnus-summary-prev-subject 1 'unread-only) |
257 | 3473 (setq count (1- count)))) |
3474 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3475 (defun gnus-summary-mark-as-read (&optional article mark) |
257 | 3476 "Mark current article as read. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3477 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
|
3478 Optional 2nd argument MARK specifies a string inserted at beginning of line. |
257 | 3479 Any kind of string (length 1) except for a space and `-' is ok." |
3480 (save-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3481 (set-buffer gnus-summary-buffer) |
257 | 3482 ;; First of all, show hidden thread subtrees. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3483 (gnus-summary-show-thread) |
257 | 3484 (let* ((buffer-read-only nil) |
3485 (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
|
3486 (current (gnus-summary-article-number)) |
257 | 3487 (article (or article current))) |
3488 (gnus-mark-article-as-read article) | |
3489 (if (or (eq article current) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3490 (gnus-summary-goto-subject article)) |
257 | 3491 (progn |
3492 (beginning-of-line) | |
3493 (delete-char 1) | |
3494 (insert mark))) | |
3495 ))) | |
3496 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3497 (defun gnus-summary-clear-mark-forward (count) |
257 | 3498 "Remove current article's mark, and go forward. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3499 Argument COUNT specifies number of articles unmarked." |
257 | 3500 (interactive "p") |
3501 (while (> count 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3502 (gnus-summary-mark-as-unread nil t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3503 (gnus-summary-next-subject 1 nil) |
257 | 3504 (setq count (1- count)))) |
3505 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3506 (defun gnus-summary-clear-mark-backward (count) |
257 | 3507 "Remove current article's mark, and go backward. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3508 Argument COUNT specifies number of articles unmarked." |
257 | 3509 (interactive "p") |
3510 (while (> count 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3511 (gnus-summary-mark-as-unread nil t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3512 (gnus-summary-prev-subject 1 nil) |
257 | 3513 (setq count (1- count)))) |
3514 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3515 (defun gnus-summary-delete-marked-as-read () |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3516 "Delete summary lines for articles that are marked as read." |
257 | 3517 (interactive) |
3518 (if gnus-newsgroup-unreads | |
3519 (let ((buffer-read-only nil)) | |
3520 (save-excursion | |
3521 (goto-char (point-min)) | |
6309
9217f29851c2
Don't use triple-hyphen in a character class.
Karl Heuer <kwzh@gnu.org>
parents:
5911
diff
changeset
|
3522 (delete-non-matching-lines "^[- ]")) |
257 | 3523 ;; Adjust point. |
3524 (if (eobp) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3525 (gnus-summary-prev-subject 1) |
257 | 3526 (beginning-of-line) |
3527 (search-forward ":" nil t))) | |
3528 ;; It is not so good idea to make the buffer empty. | |
3529 (message "All articles are marked as read") | |
3530 )) | |
3531 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3532 (defun gnus-summary-delete-marked-with (marks) |
257 | 3533 "Delete lines which are marked with MARKS (e.g. \"DK\")." |
3534 (interactive "sMarks: ") | |
3535 (let ((buffer-read-only nil)) | |
3536 (save-excursion | |
3537 (goto-char (point-min)) | |
3538 (delete-matching-lines (concat "^[" marks "]"))) | |
3539 ;; Adjust point. | |
3540 (or (zerop (buffer-size)) | |
3541 (if (eobp) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3542 (gnus-summary-prev-subject 1) |
257 | 3543 (beginning-of-line) |
3544 (search-forward ":" nil t))) | |
3545 )) | |
3546 | |
3547 ;; Thread-based commands. | |
3548 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3549 (defun gnus-summary-toggle-threads (arg) |
257 | 3550 "Toggle showing conversation threads. |
3551 With arg, turn showing conversation threads on iff arg is positive." | |
3552 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3553 (let ((current (gnus-summary-article-number))) |
257 | 3554 (setq gnus-show-threads |
3555 (if (null arg) (not gnus-show-threads) | |
3556 (> (prefix-numeric-value arg) 0))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3557 (gnus-summary-prepare) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3558 (gnus-summary-goto-subject current) |
257 | 3559 )) |
3560 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3561 (defun gnus-summary-show-all-threads () |
257 | 3562 "Show all thread subtrees." |
3563 (interactive) | |
3564 (if gnus-show-threads | |
3565 (save-excursion | |
3566 (let ((buffer-read-only nil)) | |
3567 (subst-char-in-region (point-min) (point-max) ?\^M ?\n t) | |
3568 )))) | |
3569 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3570 (defun gnus-summary-show-thread () |
257 | 3571 "Show thread subtrees." |
3572 (interactive) | |
3573 (if gnus-show-threads | |
3574 (save-excursion | |
3575 (let ((buffer-read-only nil)) | |
3576 (subst-char-in-region (progn | |
3577 (beginning-of-line) (point)) | |
3578 (progn | |
3579 (end-of-line) (point)) | |
3580 ?\^M ?\n t) | |
3581 )))) | |
3582 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3583 (defun gnus-summary-hide-all-threads () |
257 | 3584 "Hide all thread subtrees." |
3585 (interactive) | |
3586 (if gnus-show-threads | |
3587 (save-excursion | |
3588 ;; Adjust cursor point. | |
3589 (goto-char (point-min)) | |
3590 (search-forward ":" nil t) | |
3591 (let ((level (current-column))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3592 (gnus-summary-hide-thread) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3593 (while (gnus-summary-search-forward) |
257 | 3594 (and (>= level (current-column)) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3595 (gnus-summary-hide-thread))) |
257 | 3596 )))) |
3597 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3598 (defun gnus-summary-hide-thread () |
257 | 3599 "Hide thread subtrees." |
3600 (interactive) | |
3601 (if gnus-show-threads | |
3602 (save-excursion | |
3603 ;; Adjust cursor point. | |
3604 (beginning-of-line) | |
3605 (search-forward ":" nil t) | |
3606 (let ((buffer-read-only nil) | |
3607 (init (point)) | |
3608 (last (point)) | |
3609 (level (current-column))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3610 (while (and (gnus-summary-search-forward) |
257 | 3611 (< level (current-column))) |
3612 ;; Interested in lower levels. | |
3613 (if (< level (current-column)) | |
3614 (progn | |
3615 (setq last (point)) | |
3616 )) | |
3617 ) | |
3618 (subst-char-in-region init last ?\n ?\^M t) | |
3619 )))) | |
3620 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3621 (defun gnus-summary-next-thread (n) |
257 | 3622 "Go to the same level next thread. |
3623 Argument N specifies the number of threads." | |
3624 (interactive "p") | |
3625 ;; Adjust cursor point. | |
3626 (beginning-of-line) | |
3627 (search-forward ":" nil t) | |
3628 (let ((init (point)) | |
3629 (last (point)) | |
3630 (level (current-column))) | |
3631 (while (and (> n 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3632 (gnus-summary-search-forward) |
257 | 3633 (<= level (current-column))) |
3634 ;; We have to skip lower levels. | |
3635 (if (= level (current-column)) | |
3636 (progn | |
3637 (setq last (point)) | |
3638 (setq n (1- n)) | |
3639 )) | |
3640 ) | |
3641 ;; Return non-nil if successfully move to the next. | |
3642 (prog1 (not (= init last)) | |
3643 (goto-char last)) | |
3644 )) | |
3645 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3646 (defun gnus-summary-prev-thread (n) |
257 | 3647 "Go to the same level previous thread. |
3648 Argument N specifies the number of threads." | |
3649 (interactive "p") | |
3650 ;; Adjust cursor point. | |
3651 (beginning-of-line) | |
3652 (search-forward ":" nil t) | |
3653 (let ((init (point)) | |
3654 (last (point)) | |
3655 (level (current-column))) | |
3656 (while (and (> n 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3657 (gnus-summary-search-backward) |
257 | 3658 (<= level (current-column))) |
3659 ;; We have to skip lower levels. | |
3660 (if (= level (current-column)) | |
3661 (progn | |
3662 (setq last (point)) | |
3663 (setq n (1- n)) | |
3664 )) | |
3665 ) | |
3666 ;; Return non-nil if successfully move to the previous. | |
3667 (prog1 (not (= init last)) | |
3668 (goto-char last)) | |
3669 )) | |
3670 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3671 (defun gnus-summary-down-thread (d) |
257 | 3672 "Go downward current thread. |
3673 Argument D specifies the depth goes down." | |
3674 (interactive "p") | |
3675 ;; Adjust cursor point. | |
3676 (beginning-of-line) | |
3677 (search-forward ":" nil t) | |
3678 (let ((last (point)) | |
3679 (level (current-column))) | |
3680 (while (and (> d 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3681 (gnus-summary-search-forward) |
257 | 3682 (<= level (current-column))) ;<= can be <. Which do you like? |
3683 ;; We have to skip the same levels. | |
3684 (if (< level (current-column)) | |
3685 (progn | |
3686 (setq last (point)) | |
3687 (setq level (current-column)) | |
3688 (setq d (1- d)) | |
3689 )) | |
3690 ) | |
3691 (goto-char last) | |
3692 )) | |
3693 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3694 (defun gnus-summary-up-thread (d) |
257 | 3695 "Go upward current thread. |
3696 Argument D specifies the depth goes up." | |
3697 (interactive "p") | |
3698 ;; Adjust cursor point. | |
3699 (beginning-of-line) | |
3700 (search-forward ":" nil t) | |
3701 (let ((last (point)) | |
3702 (level (current-column))) | |
3703 (while (and (> d 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3704 (gnus-summary-search-backward)) |
257 | 3705 ;; We have to skip the same levels. |
3706 (if (> level (current-column)) | |
3707 (progn | |
3708 (setq last (point)) | |
3709 (setq level (current-column)) | |
3710 (setq d (1- d)) | |
3711 )) | |
3712 ) | |
3713 (goto-char last) | |
3714 )) | |
3715 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3716 (defun gnus-summary-kill-thread (unmark) |
257 | 3717 "Mark articles under current thread as read. |
3718 If argument UNMARK is positive, remove any kinds of marks. | |
3719 If argument UNMARK is negative, mark articles as unread instead." | |
3720 (interactive "P") | |
3721 (if unmark | |
3722 (setq unmark (prefix-numeric-value unmark))) | |
3723 ;; Adjust cursor point. | |
3724 (beginning-of-line) | |
3725 (search-forward ":" nil t) | |
3726 (save-excursion | |
3727 (let ((level (current-column))) | |
3728 ;; Mark current article. | |
3729 (cond ((null unmark) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3730 (gnus-summary-mark-as-read nil "K")) |
257 | 3731 ((> unmark 0) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3732 (gnus-summary-mark-as-unread nil t)) |
257 | 3733 (t |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3734 (gnus-summary-mark-as-unread)) |
257 | 3735 ) |
3736 ;; Mark following articles. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3737 (while (and (gnus-summary-search-forward) |
257 | 3738 (< level (current-column))) |
3739 (cond ((null unmark) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3740 (gnus-summary-mark-as-read nil "K")) |
257 | 3741 ((> unmark 0) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3742 (gnus-summary-mark-as-unread nil t)) |
257 | 3743 (t |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3744 (gnus-summary-mark-as-unread)) |
257 | 3745 )) |
3746 )) | |
3747 ;; Hide killed subtrees. | |
3748 (and (null unmark) | |
3749 gnus-thread-hide-killed | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3750 (gnus-summary-hide-thread)) |
257 | 3751 ;; If marked as read, go to next unread subject. |
3752 (if (null unmark) | |
3753 ;; Go to next unread subject. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3754 (gnus-summary-next-subject 1 t)) |
257 | 3755 ) |
3756 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3757 (defun gnus-summary-toggle-truncation (arg) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3758 "Toggle truncation of summary lines. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3759 With arg, turn line truncation on iff arg is positive." |
257 | 3760 (interactive "P") |
3761 (setq truncate-lines | |
3762 (if (null arg) (not truncate-lines) | |
3763 (> (prefix-numeric-value arg) 0))) | |
3764 (redraw-display)) | |
3765 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3766 (defun gnus-summary-sort-by-number (reverse) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3767 "Sort Summary buffer by article number. |
257 | 3768 Argument REVERSE means reverse order." |
3769 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3770 (gnus-summary-keysort-summary |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3771 (function <) |
257 | 3772 (function |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3773 (lambda (a) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3774 (nntp-header-number a))) |
257 | 3775 reverse |
3776 )) | |
3777 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3778 (defun gnus-summary-sort-by-author (reverse) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3779 "Sort Summary buffer by author name alphabetically. |
257 | 3780 If case-fold-search is non-nil, case of letters is ignored. |
3781 Argument REVERSE means reverse order." | |
3782 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3783 (gnus-summary-keysort-summary |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3784 (function string-lessp) |
257 | 3785 (function |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3786 (lambda (a) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3787 (if case-fold-search |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3788 (downcase (nntp-header-from a)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3789 (nntp-header-from a)))) |
257 | 3790 reverse |
3791 )) | |
3792 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3793 (defun gnus-summary-sort-by-subject (reverse) |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3794 "Sort Summary buffer by subject alphabetically. `Re:'s are ignored. |
257 | 3795 If case-fold-search is non-nil, case of letters is ignored. |
3796 Argument REVERSE means reverse order." | |
3797 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3798 (gnus-summary-keysort-summary |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3799 (function string-lessp) |
257 | 3800 (function |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3801 (lambda (a) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3802 (if case-fold-search |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3803 (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
|
3804 (gnus-simplify-subject (nntp-header-subject a) 're-only)))) |
257 | 3805 reverse |
3806 )) | |
3807 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3808 (defun gnus-summary-sort-by-date (reverse) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3809 "Sort Summary buffer by date. |
257 | 3810 Argument REVERSE means reverse order." |
3811 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3812 (gnus-summary-keysort-summary |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3813 (function string-lessp) |
257 | 3814 (function |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3815 (lambda (a) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3816 (gnus-sortable-date (nntp-header-date a)))) |
257 | 3817 reverse |
3818 )) | |
3819 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3820 (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
|
3821 "Sort Summary buffer by PREDICATE using a value passed by KEY. |
257 | 3822 Optional argument REVERSE means reverse order." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3823 (let ((current (gnus-summary-article-number))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3824 (gnus-keysort-headers predicate key reverse) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3825 (gnus-summary-prepare) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3826 (gnus-summary-goto-subject current) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3827 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3828 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3829 (defun gnus-summary-sort-summary (predicate &optional reverse) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3830 "Sort Summary buffer by PREDICATE. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3831 Optional argument REVERSE means reverse order." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3832 (let ((current (gnus-summary-article-number))) |
257 | 3833 (gnus-sort-headers predicate reverse) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3834 (gnus-summary-prepare) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3835 (gnus-summary-goto-subject current) |
257 | 3836 )) |
3837 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3838 (defun gnus-summary-reselect-current-group (show-all) |
257 | 3839 "Once exit and then reselect the current newsgroup. |
3840 Prefix argument SHOW-ALL means to select all articles." | |
3841 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3842 (let ((current-subject (gnus-summary-article-number))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3843 (gnus-summary-exit t) |
257 | 3844 ;; We have to adjust the point of Group mode buffer because the |
3845 ;; current point was moved to the next unread newsgroup by | |
3846 ;; exiting. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3847 (gnus-summary-jump-to-group gnus-newsgroup-name) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3848 (gnus-group-read-group show-all t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3849 (gnus-summary-goto-subject current-subject) |
257 | 3850 )) |
3851 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3852 (defun gnus-summary-caesar-message (rotnum) |
257 | 3853 "Caesar rotates all letters of current message by 13/47 places. |
3854 With prefix arg, specifies the number of places to rotate each letter forward. | |
3855 Caesar rotates Japanese letters by 47 places in any case." | |
3856 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3857 (gnus-summary-select-article) |
257 | 3858 (gnus-overload-functions) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3859 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3860 (save-restriction |
3861 (widen) | |
3862 ;; We don't want to jump to the beginning of the message. | |
3863 ;; `save-excursion' does not do its job. | |
3864 (move-to-window-line 0) | |
3865 (let ((last (point))) | |
3866 (news-caesar-buffer-body rotnum) | |
3867 (goto-char last) | |
3868 (recenter 0) | |
3869 )) | |
3870 )) | |
3871 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3872 (defun gnus-summary-rmail-digest () |
257 | 3873 "Run RMAIL on current digest article. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3874 `gnus-select-digest-hook' will be called with no arguments, if that |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3875 value is non-nil. It is possible to modify the article so that Rmail |
257 | 3876 can work with it. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3877 `gnus-rmail-digest-hook' will be called with no arguments, if that value |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3878 is non-nil. The hook is intended to customize Rmail mode." |
257 | 3879 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3880 (gnus-summary-select-article) |
257 | 3881 (require 'rmail) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3882 (let ((artbuf gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3883 (digbuf (get-buffer-create gnus-digest-buffer)) |
257 | 3884 (mail-header-separator "")) |
3885 (set-buffer digbuf) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3886 (buffer-flush-undo (current-buffer)) |
257 | 3887 (setq buffer-read-only nil) |
3888 (erase-buffer) | |
3889 (insert-buffer-substring artbuf) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3890 (run-hooks 'gnus-select-digest-hook) |
257 | 3891 (gnus-convert-article-to-rmail) |
3892 (goto-char (point-min)) | |
3893 ;; Rmail initializations. | |
3894 (rmail-insert-rmail-file-header) | |
3895 (rmail-mode) | |
3896 (rmail-set-message-counters) | |
3897 (rmail-show-message) | |
3898 (condition-case () | |
3899 (progn | |
3900 (undigestify-rmail-message) | |
3901 (rmail-expunge) ;Delete original message. | |
3902 ;; File name is meaningless but `save-buffer' requires it. | |
3903 (setq buffer-file-name "GNUS Digest") | |
3904 (setq mode-line-buffer-identification | |
3905 (concat "Digest: " | |
3906 (nntp-header-subject gnus-current-headers))) | |
3907 ;; There is no need to write this buffer to a file. | |
3908 (make-local-variable 'write-file-hooks) | |
3909 (setq write-file-hooks | |
3910 (list (function | |
3911 (lambda () | |
3912 (set-buffer-modified-p nil) | |
3913 (message "(No changes need to be saved)") | |
3914 'no-need-to-write-this-buffer)))) | |
3915 ;; Default file name saving digest messages. | |
7560
e63efa2d587c
rmail-default-file renamed from rmail-last-file,
Richard M. Stallman <rms@gnu.org>
parents:
7524
diff
changeset
|
3916 (setq rmail-default-rmail-file |
257 | 3917 (funcall gnus-rmail-save-name |
3918 gnus-newsgroup-name | |
3919 gnus-current-headers | |
3920 gnus-newsgroup-last-rmail | |
3921 )) | |
7560
e63efa2d587c
rmail-default-file renamed from rmail-last-file,
Richard M. Stallman <rms@gnu.org>
parents:
7524
diff
changeset
|
3922 (setq rmail-default-file |
257 | 3923 (funcall gnus-mail-save-name |
3924 gnus-newsgroup-name | |
3925 gnus-current-headers | |
3926 gnus-newsgroup-last-mail | |
3927 )) | |
3928 ;; Prevent generating new buffer named ***<N> each time. | |
3929 (setq rmail-summary-buffer | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3930 (get-buffer-create gnus-digest-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3931 (run-hooks 'gnus-rmail-digest-hook) |
257 | 3932 ;; Take all windows safely. |
3933 (gnus-configure-windows '(1 0 0)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3934 (pop-to-buffer gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3935 ;; Use Summary Article windows for Digest summary and |
257 | 3936 ;; Digest buffers. |
3937 (if gnus-digest-show-summary | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3938 (let ((gnus-summary-buffer gnus-digest-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3939 (gnus-article-buffer gnus-digest-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3940 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3941 (pop-to-buffer gnus-digest-buffer) |
257 | 3942 (rmail-summary) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3943 (pop-to-buffer gnus-digest-summary-buffer) |
257 | 3944 (message (substitute-command-keys |
3945 "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
|
3946 (let ((gnus-summary-buffer gnus-digest-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3947 (gnus-configure-windows 'summary) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3948 (pop-to-buffer gnus-digest-buffer) |
257 | 3949 (message (substitute-command-keys |
3950 "Type \\[rmail-quit] to return to GNUS"))) | |
3951 ) | |
3952 ;; 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
|
3953 (bury-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3954 (bury-buffer gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3955 (bury-buffer gnus-digest-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3956 (bury-buffer gnus-digest-buffer)) |
257 | 3957 (error (set-buffer-modified-p nil) |
3958 (kill-buffer digbuf) | |
3959 ;; This command should not signal an error because the | |
3960 ;; command is called from hooks. | |
3961 (ding) (message "Article is not a digest"))) | |
3962 )) | |
3963 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3964 (defun gnus-summary-save-article () |
257 | 3965 "Save this article using default saver function. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3966 The variable `gnus-default-article-saver' specifies the saver function." |
257 | 3967 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3968 (gnus-summary-select-article gnus-save-all-headers gnus-save-all-headers) |
257 | 3969 (if gnus-default-article-saver |
3970 (call-interactively gnus-default-article-saver) | |
3971 (error "No default saver is defined."))) | |
3972 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3973 (defun gnus-summary-save-in-rmail (&optional filename) |
257 | 3974 "Append this article to Rmail file. |
3975 Optional argument FILENAME specifies file name. | |
3976 Directory to save to is default to `gnus-article-save-directory' which | |
3977 is initialized from the SAVEDIR environment variable." | |
3978 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3979 (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
|
3980 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3981 (save-excursion |
3982 (save-restriction | |
3983 (widen) | |
3984 (let ((default-name | |
3985 (funcall gnus-rmail-save-name | |
3986 gnus-newsgroup-name | |
3987 gnus-current-headers | |
3988 gnus-newsgroup-last-rmail | |
3989 ))) | |
3990 (or filename | |
3991 (setq filename | |
3992 (read-file-name | |
3993 (concat "Save article in Rmail file: (default " | |
3994 (file-name-nondirectory default-name) | |
3995 ") ") | |
3996 (file-name-directory default-name) | |
3997 default-name))) | |
3998 (gnus-make-directory (file-name-directory filename)) | |
3999 (gnus-output-to-rmail filename) | |
4000 ;; Remember the directory name to save articles. | |
4001 (setq gnus-newsgroup-last-rmail filename) | |
4002 ))) | |
4003 )) | |
4004 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4005 (defun gnus-summary-save-in-mail (&optional filename) |
257 | 4006 "Append this article to Unix mail file. |
4007 Optional argument FILENAME specifies file name. | |
4008 Directory to save to is default to `gnus-article-save-directory' which | |
4009 is initialized from the SAVEDIR environment variable." | |
4010 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4011 (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
|
4012 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 4013 (save-excursion |
4014 (save-restriction | |
4015 (widen) | |
4016 (let ((default-name | |
4017 (funcall gnus-mail-save-name | |
4018 gnus-newsgroup-name | |
4019 gnus-current-headers | |
4020 gnus-newsgroup-last-mail | |
4021 ))) | |
4022 (or filename | |
4023 (setq filename | |
4024 (read-file-name | |
4025 (concat "Save article in Unix mail file: (default " | |
4026 (file-name-nondirectory default-name) | |
4027 ") ") | |
4028 (file-name-directory default-name) | |
4029 default-name))) | |
5052
b605cd28d596
(gnus-summary-save-in-mail): Don't use rmail-output.
Richard M. Stallman <rms@gnu.org>
parents:
5012
diff
changeset
|
4030 (setq filename |
b605cd28d596
(gnus-summary-save-in-mail): Don't use rmail-output.
Richard M. Stallman <rms@gnu.org>
parents:
5012
diff
changeset
|
4031 (expand-file-name filename |
b605cd28d596
(gnus-summary-save-in-mail): Don't use rmail-output.
Richard M. Stallman <rms@gnu.org>
parents:
5012
diff
changeset
|
4032 (and default-name |
b605cd28d596
(gnus-summary-save-in-mail): Don't use rmail-output.
Richard M. Stallman <rms@gnu.org>
parents:
5012
diff
changeset
|
4033 (file-name-directory default-name)))) |
257 | 4034 (gnus-make-directory (file-name-directory filename)) |
5052
b605cd28d596
(gnus-summary-save-in-mail): Don't use rmail-output.
Richard M. Stallman <rms@gnu.org>
parents:
5012
diff
changeset
|
4035 (if (and (file-readable-p filename) (rmail-file-p filename)) |
b605cd28d596
(gnus-summary-save-in-mail): Don't use rmail-output.
Richard M. Stallman <rms@gnu.org>
parents:
5012
diff
changeset
|
4036 (gnus-output-to-rmail filename) |
5057
d15f5b49f3ea
(gnus-summary-save-in-mail): Use rmail-output
Richard M. Stallman <rms@gnu.org>
parents:
5052
diff
changeset
|
4037 (rmail-output filename 1 t t)) |
257 | 4038 ;; Remember the directory name to save articles. |
4039 (setq gnus-newsgroup-last-mail filename) | |
4040 ))) | |
4041 )) | |
4042 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4043 (defun gnus-summary-save-in-file (&optional filename) |
257 | 4044 "Append this article to file. |
4045 Optional argument FILENAME specifies file name. | |
4046 Directory to save to is default to `gnus-article-save-directory' which | |
4047 is initialized from the SAVEDIR environment variable." | |
4048 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4049 (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
|
4050 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 4051 (save-excursion |
4052 (save-restriction | |
4053 (widen) | |
4054 (let ((default-name | |
4055 (funcall gnus-file-save-name | |
4056 gnus-newsgroup-name | |
4057 gnus-current-headers | |
4058 gnus-newsgroup-last-file | |
4059 ))) | |
4060 (or filename | |
4061 (setq filename | |
4062 (read-file-name | |
4063 (concat "Save article in file: (default " | |
4064 (file-name-nondirectory default-name) | |
4065 ") ") | |
4066 (file-name-directory default-name) | |
4067 default-name))) | |
4068 (gnus-make-directory (file-name-directory filename)) | |
4069 (gnus-output-to-file filename) | |
4070 ;; Remember the directory name to save articles. | |
4071 (setq gnus-newsgroup-last-file filename) | |
4072 ))) | |
4073 )) | |
4074 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4075 (defun gnus-summary-save-in-folder (&optional folder) |
257 | 4076 "Save this article to MH folder (using `rcvstore' in MH library). |
4077 Optional argument FOLDER specifies folder name." | |
4078 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4079 (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
|
4080 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 4081 (save-restriction |
4082 (widen) | |
4083 ;; Thanks to yuki@flab.Fujitsu.JUNET and ohm@kaba.junet. | |
4084 (mh-find-path) | |
4085 (let ((folder | |
4086 (or folder | |
4087 (mh-prompt-for-folder "Save article in" | |
4088 (funcall gnus-folder-save-name | |
4089 gnus-newsgroup-name | |
4090 gnus-current-headers | |
4091 gnus-newsgroup-last-folder | |
4092 ) | |
4093 t | |
4094 ))) | |
4095 (errbuf (get-buffer-create " *GNUS rcvstore*"))) | |
4096 (unwind-protect | |
4097 (call-process-region (point-min) (point-max) | |
4098 (expand-file-name "rcvstore" mh-lib) | |
4099 nil errbuf nil folder) | |
4100 (set-buffer errbuf) | |
4101 (if (zerop (buffer-size)) | |
4102 (message "Article saved in folder: %s" folder) | |
4103 (message "%s" (buffer-string))) | |
4104 (kill-buffer errbuf) | |
4105 (setq gnus-newsgroup-last-folder folder)) | |
4106 )) | |
4107 )) | |
4108 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4109 (defun gnus-summary-pipe-output () |
257 | 4110 "Pipe this article to subprocess." |
4111 (interactive) | |
4112 ;; 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
|
4113 ;;(gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4114 ;; Huuum. Is this right? |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4115 (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
|
4116 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 4117 (save-restriction |
4118 (widen) | |
4119 (let ((command (read-string "Shell command on article: " | |
4120 gnus-last-shell-command))) | |
4121 (if (string-equal command "") | |
4122 (setq command gnus-last-shell-command)) | |
4123 (shell-command-on-region (point-min) (point-max) command nil) | |
4124 (setq gnus-last-shell-command command) | |
4125 )) | |
4126 )) | |
4127 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4128 (defun gnus-summary-catchup (all &optional quietly) |
257 | 4129 "Mark all articles not marked as unread in this newsgroup as read. |
4130 If prefix argument ALL is non-nil, all articles are marked as read." | |
4131 (interactive "P") | |
4132 (if (or quietly | |
7705
b10cc49f6c37
(gnus-summary-catchup): Check gnus-interactive-catchup.
Richard M. Stallman <rms@gnu.org>
parents:
7639
diff
changeset
|
4133 (not gnus-interactive-catchup) ;Without confirmation? |
257 | 4134 (y-or-n-p |
4135 (if all | |
4136 "Do you really want to mark everything as read? " | |
4137 "Delete all articles not marked as unread? "))) | |
4138 (let ((unmarked | |
4139 (gnus-set-difference gnus-newsgroup-unreads | |
4140 (if (not all) gnus-newsgroup-marked)))) | |
4141 (message "") ;Erase "Yes or No" question. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4142 ;; Hidden thread subtrees must be searched for ,too. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4143 (gnus-summary-show-all-threads) |
257 | 4144 (while unmarked |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4145 (gnus-summary-mark-as-read (car unmarked) "C") |
257 | 4146 (setq unmarked (cdr unmarked)) |
4147 )) | |
4148 )) | |
4149 | |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
4150 (defun gnus-summary-catchup-to-here () |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
4151 "Mark all articles before the current one in this newsgroup as read." |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
4152 (interactive) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
4153 (beginning-of-line) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
4154 (let ((current (gnus-summary-article-number))) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
4155 (beginning-of-buffer) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
4156 (while (not (= (gnus-summary-article-number) current)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
4157 (gnus-summary-mark-as-read) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
4158 (gnus-summary-next-subject 1)))) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
4159 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4160 (defun gnus-summary-catchup-all (&optional quietly) |
257 | 4161 "Mark all articles in this newsgroup as read." |
4162 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4163 (gnus-summary-catchup t quietly)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4164 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4165 (defun gnus-summary-catchup-and-exit (all &optional quietly) |
257 | 4166 "Mark all articles not marked as unread in this newsgroup as read, then exit. |
4167 If prefix argument ALL is non-nil, all articles are marked as read." | |
4168 (interactive "P") | |
4169 (if (or quietly | |
7705
b10cc49f6c37
(gnus-summary-catchup): Check gnus-interactive-catchup.
Richard M. Stallman <rms@gnu.org>
parents:
7639
diff
changeset
|
4170 (not gnus-interactive-catchup) ;Without confirmation? |
257 | 4171 (y-or-n-p |
4172 (if all | |
4173 "Do you really want to mark everything as read? " | |
4174 "Delete all articles not marked as unread? "))) | |
4175 (let ((unmarked | |
4176 (gnus-set-difference gnus-newsgroup-unreads | |
4177 (if (not all) gnus-newsgroup-marked)))) | |
4178 (message "") ;Erase "Yes or No" question. | |
4179 (while unmarked | |
4180 (gnus-mark-article-as-read (car unmarked)) | |
4181 (setq unmarked (cdr unmarked))) | |
4182 ;; Select next newsgroup or exit. | |
4183 (cond ((eq gnus-auto-select-next 'quietly) | |
4184 ;; Select next newsgroup quietly. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4185 (gnus-summary-next-group nil)) |
257 | 4186 (t |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4187 (gnus-summary-exit))) |
257 | 4188 ))) |
4189 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4190 (defun gnus-summary-catchup-all-and-exit (&optional quietly) |
257 | 4191 "Mark all articles in this newsgroup as read, and then exit." |
4192 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4193 (gnus-summary-catchup-and-exit t quietly)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4194 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4195 (defun gnus-summary-edit-global-kill () |
257 | 4196 "Edit a global KILL file." |
4197 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4198 (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
|
4199 (gnus-kill-file-edit-file nil) ;Nil stands for global KILL file. |
257 | 4200 (message |
4201 (substitute-command-keys | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4202 "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
|
4203 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4204 (defun gnus-summary-edit-local-kill () |
257 | 4205 "Edit a local KILL file applied to the current newsgroup." |
4206 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4207 (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
|
4208 (gnus-kill-file-edit-file gnus-newsgroup-name) |
257 | 4209 (message |
4210 (substitute-command-keys | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4211 "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
|
4212 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4213 (defun gnus-summary-exit (&optional temporary) |
257 | 4214 "Exit reading current newsgroup, and then return to group selection mode. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
4215 `gnus-exit-group-hook' is called with no arguments if that value is non-nil." |
257 | 4216 (interactive) |
4217 (let ((updated nil) | |
4218 (gnus-newsgroup-headers gnus-newsgroup-headers) | |
4219 (gnus-newsgroup-unreads gnus-newsgroup-unreads) | |
4220 (gnus-newsgroup-unselected gnus-newsgroup-unselected) | |
4221 (gnus-newsgroup-marked gnus-newsgroup-marked)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4222 ;; 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
|
4223 ;; Summary buffer even if hook changes them. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4224 (run-hooks 'gnus-exit-group-hook) |
257 | 4225 (gnus-update-unread-articles gnus-newsgroup-name |
4226 (append gnus-newsgroup-unselected | |
4227 gnus-newsgroup-unreads) | |
4228 gnus-newsgroup-marked) | |
4229 ;; T means ignore unsubscribed newsgroups. | |
4230 (if gnus-use-cross-reference | |
4231 (setq updated | |
4232 (gnus-mark-as-read-by-xref gnus-newsgroup-name | |
4233 gnus-newsgroup-headers | |
4234 gnus-newsgroup-unreads | |
4235 (eq gnus-use-cross-reference t) | |
4236 ))) | |
4237 ;; 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
|
4238 (set-buffer gnus-group-buffer) |
257 | 4239 ;; Update cross referenced group info. |
4240 (while updated | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4241 (gnus-group-update-group (car updated) t) ;Ignore invisible group. |
257 | 4242 (setq updated (cdr updated))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4243 (gnus-group-update-group gnus-newsgroup-name)) |
257 | 4244 ;; 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
|
4245 (gnus-group-jump-to-group gnus-newsgroup-name) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4246 (gnus-group-next-unread-group 1) |
257 | 4247 (if temporary |
4248 ;; If exiting temporary, caller should adjust Group mode | |
4249 ;; buffer point by itself. | |
4250 nil ;Nothing to do. | |
4251 ;; Return to Group mode buffer. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4252 (if (get-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4253 (bury-buffer gnus-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4254 (if (get-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4255 (bury-buffer gnus-article-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4256 (gnus-configure-windows 'newsgroups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4257 (pop-to-buffer gnus-group-buffer))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4258 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4259 (defun gnus-summary-quit () |
257 | 4260 "Quit reading current newsgroup without updating read article info." |
4261 (interactive) | |
4262 (if (y-or-n-p "Do you really wanna quit reading this group? ") | |
4263 (progn | |
4264 (message "") ;Erase "Yes or No" question. | |
4265 ;; Return to Group selection mode. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4266 (if (get-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4267 (bury-buffer gnus-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4268 (if (get-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4269 (bury-buffer gnus-article-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4270 (gnus-configure-windows 'newsgroups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4271 (pop-to-buffer gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4272 (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
|
4273 (gnus-group-next-group 1) ;(gnus-group-next-unread-group 1) |
257 | 4274 ))) |
4275 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4276 (defun gnus-summary-describe-briefly () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4277 "Describe Summary mode commands briefly." |
257 | 4278 (interactive) |
4279 (message | |
4280 (concat | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4281 (substitute-command-keys "\\[gnus-summary-next-page]:Select ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4282 (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
|
4283 (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
|
4284 (substitute-command-keys "\\[gnus-summary-exit]:Exit ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4285 (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
|
4286 (substitute-command-keys "\\[gnus-summary-describe-briefly]:This help") |
257 | 4287 ))) |
4288 | |
4289 | |
4290 ;;; | |
4291 ;;; GNUS Article Mode | |
4292 ;;; | |
4293 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4294 (if gnus-article-mode-map |
257 | 4295 nil |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4296 (setq gnus-article-mode-map (make-keymap)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4297 (suppress-keymap gnus-article-mode-map) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4298 (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
|
4299 (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
|
4300 (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
|
4301 (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
|
4302 (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
|
4303 (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
|
4304 (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
|
4305 (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
|
4306 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4307 (defun gnus-article-mode () |
257 | 4308 "Major mode for browsing through an article. |
4309 All normal editing commands are turned off. | |
4310 Instead, these commands are available: | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4311 \\{gnus-article-mode-map} |
257 | 4312 |
4313 Various hooks for customization: | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4314 gnus-article-mode-hook |
257 | 4315 Entry to this mode calls the value with no arguments, if that |
4316 value is non-nil. | |
4317 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4318 gnus-article-prepare-hook |
257 | 4319 Called with no arguments after an article is prepared for reading, |
4320 if that value is non-nil." | |
4321 (interactive) | |
4322 (kill-all-local-variables) | |
4323 ;; Gee. Why don't you upgrade? | |
4324 (cond ((boundp 'mode-line-modified) | |
4325 (setq mode-line-modified "--- ")) | |
4326 ((listp (default-value 'mode-line-format)) | |
4327 (setq mode-line-format | |
4328 (cons "--- " (cdr (default-value 'mode-line-format)))))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4329 ;; To disable display-time facility. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4330 ;;(make-local-variable 'global-mode-string) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4331 ;;(setq global-mode-string nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4332 (setq major-mode 'gnus-article-mode) |
257 | 4333 (setq mode-name "Article") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4334 (make-local-variable 'minor-mode-alist) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4335 (or (assq 'gnus-show-mime minor-mode-alist) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4336 (setq minor-mode-alist |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4337 (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
|
4338 (gnus-article-set-mode-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4339 (use-local-map gnus-article-mode-map) |
257 | 4340 (make-local-variable 'page-delimiter) |
4341 (setq page-delimiter gnus-page-delimiter) | |
4342 (make-local-variable 'mail-header-separator) | |
4343 (setq mail-header-separator "") ;For caesar function. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4344 (buffer-flush-undo (current-buffer)) |
257 | 4345 (setq buffer-read-only t) ;Disable modification |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4346 (run-hooks 'gnus-article-mode-hook)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4347 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4348 (defun gnus-article-setup-buffer () |
257 | 4349 "Initialize Article mode buffer." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4350 (or (get-buffer gnus-article-buffer) |
257 | 4351 (save-excursion |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4352 (set-buffer (get-buffer-create gnus-article-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4353 (gnus-article-mode)) |
257 | 4354 )) |
4355 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4356 (defun gnus-article-prepare (article &optional all-headers) |
257 | 4357 "Prepare ARTICLE in Article mode buffer. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4358 ARTICLE can be either a article number or Message-ID. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
4359 If optional argument ALL-HEADERS is non-nil, |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
4360 include the article's whole original header." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4361 ;; 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
|
4362 (if (not (gnus-server-opened)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4363 (progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4364 (gnus-start-news-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4365 (gnus-request-group gnus-newsgroup-name))) |
257 | 4366 (save-excursion |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4367 (set-buffer gnus-article-buffer) |
257 | 4368 (let ((buffer-read-only nil)) |
4369 (erase-buffer) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4370 ;; 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
|
4371 ;; 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
|
4372 ;; nnspool too. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4373 ;; 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
|
4374 ;; 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
|
4375 ;; in the following. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4376 (if (let* ((header |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4377 (and (stringp article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4378 (gnus-get-header-by-id article))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4379 (article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4380 (if header |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4381 (nntp-header-number header) article))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4382 (gnus-request-article article)) |
257 | 4383 (progn |
4384 ;; Prepare article buffer | |
4385 (insert-buffer-substring nntp-server-buffer) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4386 ;; 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
|
4387 (setq gnus-have-all-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4388 (not (not (or all-headers gnus-show-all-headers)))) |
257 | 4389 (if (and (numberp article) |
4390 (not (eq article gnus-current-article))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4391 ;; Seems me that a new article has been selected. |
257 | 4392 (progn |
4393 ;; gnus-current-article must be an article number. | |
4394 (setq gnus-last-article gnus-current-article) | |
4395 (setq gnus-current-article article) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4396 ;; (setq gnus-current-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4397 ;; (gnus-find-header-by-number gnus-newsgroup-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4398 ;; gnus-current-article)) |
257 | 4399 (setq gnus-current-headers |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4400 (gnus-get-header-by-number gnus-current-article)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4401 (run-hooks 'gnus-mark-article-hook) |
257 | 4402 )) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4403 ;; Clear article history only when the article is |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4404 ;; retrieved by the article number. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4405 (if (numberp article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4406 (setq gnus-current-history nil)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4407 ;; Hooks for modifying contents of the article. This hook |
257 | 4408 ;; must be called before being narrowed. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4409 (run-hooks 'gnus-article-prepare-hook) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4410 ;; Decode MIME message. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4411 (if (and gnus-show-mime |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4412 (gnus-fetch-field "Mime-Version")) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4413 (funcall gnus-show-mime-method)) |
257 | 4414 ;; Delete unnecessary headers. |
4415 (or gnus-have-all-headers | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4416 (gnus-article-delete-headers)) |
257 | 4417 ;; Do page break. |
4418 (goto-char (point-min)) | |
4419 (if gnus-break-pages | |
4420 (gnus-narrow-to-page)) | |
4421 ;; Next function must be called after setting | |
4422 ;; `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
|
4423 (gnus-article-set-mode-line) |
257 | 4424 ) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4425 ;; There is no such article. |
257 | 4426 (if (numberp article) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4427 (gnus-summary-mark-as-read article)) |
257 | 4428 (ding) (message "No such article (may be canceled)")) |
4429 ))) | |
4430 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4431 (defun gnus-article-show-all-headers () |
257 | 4432 "Show all article headers in Article mode buffer." |
4433 (or gnus-have-all-headers | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4434 (gnus-article-prepare gnus-current-article t))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4435 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4436 ;;(defun gnus-article-set-mode-line () |
257 | 4437 ;; "Set Article mode line string." |
4438 ;; (setq mode-line-buffer-identification | |
4439 ;; (list 17 | |
4440 ;; (format "GNUS: %s {%d-%d} %d" | |
4441 ;; gnus-newsgroup-name | |
4442 ;; gnus-newsgroup-begin | |
4443 ;; gnus-newsgroup-end | |
4444 ;; gnus-current-article | |
4445 ;; ))) | |
4446 ;; (set-buffer-modified-p t)) | |
4447 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4448 ;;(defun gnus-article-set-mode-line () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4449 ;; "Set Article mode line string." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4450 ;; (let ((unmarked |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4451 ;; (- (length gnus-newsgroup-unreads) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4452 ;; (length (gnus-intersection |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4453 ;; gnus-newsgroup-unreads gnus-newsgroup-marked)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4454 ;; (unselected |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4455 ;; (- (length gnus-newsgroup-unselected) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4456 ;; (length (gnus-intersection |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4457 ;; gnus-newsgroup-unselected gnus-newsgroup-marked))))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4458 ;; (setq mode-line-buffer-identification |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4459 ;; (list 17 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4460 ;; (format "GNUS: %s{%d} %s" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4461 ;; gnus-newsgroup-name |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4462 ;; gnus-current-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4463 ;; ;; This is proposed by tale@pawl.rpi.edu. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4464 ;; (cond ((and (zerop unmarked) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4465 ;; (zerop unselected)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4466 ;; " ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4467 ;; ((zerop unselected) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4468 ;; (format "%d more" unmarked)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4469 ;; (t |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4470 ;; (format "%d(+%d) more" unmarked unselected))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4471 ;; )))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4472 ;; (set-buffer-modified-p t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4473 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4474 ;; New implementation in gnus 3.14.3 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4475 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4476 (defun gnus-article-set-mode-line () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4477 "Set Article mode line string. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
4478 If you don't like it, define your own `gnus-article-set-mode-line'." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4479 (let ((maxlen 15) ;Maximum subject length |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4480 (subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4481 (if gnus-current-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4482 (nntp-header-subject gnus-current-headers) ""))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4483 ;; The value must be a string to escape %-constructs because of subject. |
257 | 4484 (setq mode-line-buffer-identification |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4485 (format "GNUS: %s%s %s%s%s" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4486 gnus-newsgroup-name |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4487 (if gnus-current-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4488 (format "/%d" gnus-current-article) "") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4489 (substring subject 0 (min (length subject) maxlen)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4490 (if (> (length subject) maxlen) "..." "") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4491 (make-string (max 0 (- 17 (length subject))) ? ) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4492 ))) |
257 | 4493 (set-buffer-modified-p t)) |
4494 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4495 (defun gnus-article-delete-headers () |
257 | 4496 "Delete unnecessary headers." |
4497 (save-excursion | |
4498 (save-restriction | |
4499 (goto-char (point-min)) | |
4500 (narrow-to-region (point-min) | |
4501 (progn (search-forward "\n\n" nil 'move) (point))) | |
4502 (goto-char (point-min)) | |
4503 (and (stringp gnus-ignored-headers) | |
4504 (while (re-search-forward gnus-ignored-headers nil t) | |
4505 (beginning-of-line) | |
4506 (delete-region (point) | |
4507 (progn (re-search-forward "\n[^ \t]") | |
4508 (forward-char -1) | |
4509 (point))))) | |
4510 ))) | |
4511 | |
4512 ;; Working on article's buffer | |
4513 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4514 (defun gnus-article-next-page (lines) |
257 | 4515 "Show next page of current article. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
4516 If end of article, return non-nil. Otherwise return nil. |
257 | 4517 Argument LINES specifies lines to be scrolled up." |
4518 (interactive "P") | |
4519 (move-to-window-line -1) | |
4520 ;; Fixed by enami@ptgd.sony.co.jp (enami tsugutomo) | |
4521 (if (save-excursion | |
4522 (end-of-line) | |
4523 (and (pos-visible-in-window-p) ;Not continuation line. | |
4524 (eobp))) | |
4525 ;; Nothing in this page. | |
4526 (if (or (not gnus-break-pages) | |
4527 (save-excursion | |
4528 (save-restriction | |
4529 (widen) (forward-line 1) (eobp)))) ;Real end-of-buffer? | |
4530 t ;Nothing more. | |
4531 (gnus-narrow-to-page 1) ;Go to next page. | |
4532 nil | |
4533 ) | |
4534 ;; More in this page. | |
4535 (condition-case () | |
4536 (scroll-up lines) | |
4537 (end-of-buffer | |
4538 ;; Long lines may cause an end-of-buffer error. | |
4539 (goto-char (point-max)))) | |
4540 nil | |
4541 )) | |
4542 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4543 (defun gnus-article-prev-page (lines) |
257 | 4544 "Show previous page of current article. |
4545 Argument LINES specifies lines to be scrolled down." | |
4546 (interactive "P") | |
4547 (move-to-window-line 0) | |
4548 (if (and gnus-break-pages | |
4549 (bobp) | |
4550 (not (save-restriction (widen) (bobp)))) ;Real beginning-of-buffer? | |
4551 (progn | |
4552 (gnus-narrow-to-page -1) ;Go to previous page. | |
4553 (goto-char (point-max)) | |
4554 (recenter -1)) | |
4555 (scroll-down lines))) | |
4556 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4557 (defun gnus-article-next-digest (nth) |
257 | 4558 "Move to head of NTH next digested message. |
4559 Set mark at end of digested message." | |
4560 ;; Stop page breaking in digest mode. | |
4561 (widen) | |
4562 (end-of-line) | |
4563 ;; Skip NTH - 1 digest. | |
4564 ;; Suggested by Khalid Sattar <admin@cs.exeter.ac.uk>. | |
4565 ;; Digest separator is customizable. | |
4566 ;; Suggested by Skip Montanaro <montanaro@sprite.crd.ge.com>. | |
4567 (while (and (> nth 1) | |
4568 (re-search-forward gnus-digest-separator nil 'move)) | |
4569 (setq nth (1- nth))) | |
4570 (if (re-search-forward gnus-digest-separator nil t) | |
4571 (let ((begin (point))) | |
4572 ;; Search for end of this message. | |
4573 (end-of-line) | |
4574 (if (re-search-forward gnus-digest-separator nil t) | |
4575 (progn | |
4576 (search-backward "\n\n") ;This may be incorrect. | |
4577 (forward-line 1)) | |
4578 (goto-char (point-max))) | |
4579 (push-mark) ;Set mark at end of digested message. | |
4580 (goto-char begin) | |
4581 (beginning-of-line) | |
4582 ;; Show From: and Subject: fields. | |
4583 (recenter 1)) | |
4584 (message "End of message") | |
4585 )) | |
4586 | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
4587 (defun gnus-article-prev-digest (n) |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
4588 "Move to head of Nth previous digested message." |
257 | 4589 ;; Stop page breaking in digest mode. |
4590 (widen) | |
4591 (beginning-of-line) | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
4592 ;; Skip N - 1 digest. |
257 | 4593 ;; Suggested by Khalid Sattar <admin@cs.exeter.ac.uk>. |
4594 ;; Digest separator is customizable. | |
4595 ;; Suggested by Skip Montanaro <montanaro@sprite.crd.ge.com>. | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
4596 (while (and (> n 1) |
257 | 4597 (re-search-backward gnus-digest-separator nil 'move)) |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
4598 (setq n (1- n))) |
257 | 4599 (if (re-search-backward gnus-digest-separator nil t) |
4600 (let ((begin (point))) | |
4601 ;; Search for end of this message. | |
4602 (end-of-line) | |
4603 (if (re-search-forward gnus-digest-separator nil t) | |
4604 (progn | |
4605 (search-backward "\n\n") ;This may be incorrect. | |
4606 (forward-line 1)) | |
4607 (goto-char (point-max))) | |
4608 (push-mark) ;Set mark at end of digested message. | |
4609 (goto-char begin) | |
4610 ;; Show From: and Subject: fields. | |
4611 (recenter 1)) | |
4612 (goto-char (point-min)) | |
4613 (message "Top of message") | |
4614 )) | |
4615 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4616 (defun gnus-article-refer-article () |
257 | 4617 "Read article specified by message-id around point." |
4618 (interactive) | |
4619 (save-window-excursion | |
4620 (save-excursion | |
4621 (re-search-forward ">" nil t) ;Move point to end of "<....>". | |
4622 (if (re-search-backward "\\(<[^<> \t\n]+>\\)" nil t) | |
4623 (let ((message-id | |
4624 (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
|
4625 (set-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4626 (gnus-summary-refer-article message-id)) |
257 | 4627 (error "No references around point")) |
4628 ))) | |
4629 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4630 (defun gnus-article-pop-article () |
257 | 4631 "Pop up article history." |
4632 (interactive) | |
4633 (save-window-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4634 (set-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4635 (gnus-summary-refer-article nil))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4636 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4637 (defun gnus-article-show-summary () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4638 "Reconfigure windows to show Summary buffer." |
257 | 4639 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4640 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4641 (pop-to-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4642 (gnus-summary-goto-subject gnus-current-article)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4643 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4644 (defun gnus-article-describe-briefly () |
257 | 4645 "Describe Article mode commands briefly." |
4646 (interactive) | |
4647 (message | |
4648 (concat | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4649 (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
|
4650 (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
|
4651 (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
|
4652 (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
|
4653 (substitute-command-keys "\\[gnus-article-describe-briefly]:This help") |
257 | 4654 ))) |
4655 | |
4656 | |
4657 ;;; | |
4658 ;;; GNUS KILL-File Mode | |
4659 ;;; | |
4660 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4661 (if gnus-kill-file-mode-map |
257 | 4662 nil |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4663 (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
|
4664 (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
|
4665 (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
|
4666 (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
|
4667 (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
|
4668 (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
|
4669 (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
|
4670 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4671 (defun gnus-kill-file-mode () |
257 | 4672 "Major mode for editing KILL file. |
4673 | |
4674 In addition to Emacs-Lisp Mode, the following commands are available: | |
4675 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4676 \\[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
|
4677 \\[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
|
4678 \\[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
|
4679 \\[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
|
4680 \\[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
|
4681 \\[gnus-info-find-node] Read Info about KILL file. |
257 | 4682 |
8444 | 4683 A KILL file contains Lisp expressions to be applied to a selected |
4684 newsgroup. The purpose is to mark articles as read on the basis of | |
4685 some set of regexps. A global KILL file is applied to every newsgroup, | |
4686 and a local KILL file is applied to a specified newsgroup. Since a | |
257 | 4687 global KILL file is applied to every newsgroup, for better performance |
4688 use a local one. | |
4689 | |
8444 | 4690 A KILL file can contain any kind of Emacs Lisp expressions expected |
4691 to be evaluated in the Summary buffer. Writing Lisp programs for this | |
257 | 4692 purpose is not so easy because the internal working of GNUS must be |
8444 | 4693 well-known. For this reason, GNUS provides a general function which |
257 | 4694 does this easily for non-Lisp programmers. |
4695 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4696 The `gnus-kill' function executes commands available in Summary Mode |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
4697 by their key sequences. `gnus-kill' should be called with FIELD, |
8444 | 4698 REGEXP and optional COMMAND and ALL. FIELD is a string representing |
4699 the header field or an empty string. If FIELD is an empty string, the | |
4700 entire article body is searched for. REGEXP is a string which is | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
4701 compared with FIELD value. COMMAND is a string representing a valid |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
4702 key sequence in Summary mode or Lisp expression. COMMAND defaults to |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
4703 \(gnus-summary-mark-as-read nil \"X\"). Make sure that COMMAND is |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4704 executed in the Summary buffer. If the second optional argument ALL |
257 | 4705 is non-nil, the COMMAND is applied to articles which are already |
4706 marked as read or unread. Articles which are marked are skipped over | |
4707 by default. | |
4708 | |
4709 For example, if you want to mark articles of which subjects contain | |
4710 the string `AI' as read, a possible KILL file may look like: | |
4711 | |
4712 (gnus-kill \"Subject\" \"AI\") | |
4713 | |
4714 If you want to mark articles with `D' instead of `X', you can use | |
4715 the following expression: | |
4716 | |
4717 (gnus-kill \"Subject\" \"AI\" \"d\") | |
4718 | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
4719 \(Here we assume the command `gnus-summary-mark-as-read-forward' is |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
4720 assigned to `d' in Summary Mode.) |
257 | 4721 |
4722 It is possible to delete unnecessary headers which are marked with | |
4723 `X' in a KILL file as follows: | |
4724 | |
4725 (gnus-expunge \"X\") | |
4726 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4727 If the Summary buffer is empty after applying KILL files, GNUS will |
257 | 4728 exit the selected newsgroup normally. If headers which are marked |
4729 with `D' are deleted in a KILL file, it is impossible to read articles | |
4730 which are marked as read in the previous GNUS sessions. Marks other | |
4731 than `D' should be used for articles which should really be deleted. | |
4732 | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
4733 Entry to this mode calls `emacs-lisp-mode-hook' and |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
4734 `gnus-kill-file-mode-hook' with no arguments, if that value is non-nil." |
257 | 4735 (interactive) |
4736 (kill-all-local-variables) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4737 (use-local-map gnus-kill-file-mode-map) |
257 | 4738 (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
|
4739 (setq major-mode 'gnus-kill-file-mode) |
257 | 4740 (setq mode-name "KILL-File") |
4741 (lisp-mode-variables nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4742 (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
|
4743 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4744 (defun gnus-kill-file-edit-file (newsgroup) |
257 | 4745 "Begin editing a KILL file of NEWSGROUP. |
4746 If NEWSGROUP is nil, the global KILL file is selected." | |
4747 (interactive "sNewsgroup: ") | |
4748 (let ((file (gnus-newsgroup-kill-file newsgroup))) | |
4749 (gnus-make-directory (file-name-directory file)) | |
4750 ;; Save current window configuration if this is first invocation. | |
4751 (or (and (get-file-buffer file) | |
4752 (get-buffer-window (get-file-buffer file))) | |
4753 (setq gnus-winconf-kill-file (current-window-configuration))) | |
4754 ;; Hack windows. | |
4755 (let ((buffer (find-file-noselect file))) | |
4756 (cond ((get-buffer-window buffer) | |
4757 (pop-to-buffer buffer)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4758 ((eq major-mode 'gnus-group-mode) |
257 | 4759 (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
|
4760 (pop-to-buffer gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4761 (let ((gnus-summary-buffer buffer)) |
257 | 4762 (gnus-configure-windows '(1 1 0)) ;Split into two. |
4763 (pop-to-buffer buffer))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4764 ((eq major-mode 'gnus-summary-mode) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4765 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4766 (pop-to-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4767 (bury-buffer gnus-article-buffer) |
257 | 4768 (switch-to-buffer buffer)) |
4769 (t ;No good rules. | |
4770 (find-file-other-window file)) | |
4771 )) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4772 (gnus-kill-file-mode) |
257 | 4773 )) |
4774 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4775 (defun gnus-kill-file-kill-by-subject () |
257 | 4776 "Insert KILL command for current subject." |
4777 (interactive) | |
4778 (insert | |
4779 (format "(gnus-kill \"Subject\" %s)\n" | |
4780 (prin1-to-string | |
4781 (if gnus-current-kill-article | |
4782 (regexp-quote | |
4783 (nntp-header-subject | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4784 ;; No need to speed up this command. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4785 ;;(gnus-get-header-by-number gnus-current-kill-article) |
257 | 4786 (gnus-find-header-by-number gnus-newsgroup-headers |
4787 gnus-current-kill-article))) | |
4788 ""))))) | |
4789 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4790 (defun gnus-kill-file-kill-by-author () |
257 | 4791 "Insert KILL command for current author." |
4792 (interactive) | |
4793 (insert | |
4794 (format "(gnus-kill \"From\" %s)\n" | |
4795 (prin1-to-string | |
4796 (if gnus-current-kill-article | |
4797 (regexp-quote | |
4798 (nntp-header-from | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4799 ;; No need to speed up this command. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4800 ;;(gnus-get-header-by-number gnus-current-kill-article) |
257 | 4801 (gnus-find-header-by-number gnus-newsgroup-headers |
4802 gnus-current-kill-article))) | |
4803 ""))))) | |
4804 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4805 (defun gnus-kill-file-apply-buffer () |
257 | 4806 "Apply current buffer to current newsgroup." |
4807 (interactive) | |
4808 (if (and gnus-current-kill-article | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4809 (get-buffer gnus-summary-buffer)) |
257 | 4810 ;; Assume newsgroup is selected. |
4811 (let ((string (concat "(progn \n" (buffer-string) "\n)" ))) | |
4812 (save-excursion | |
4813 (save-window-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4814 (pop-to-buffer gnus-summary-buffer) |
257 | 4815 (eval (car (read-from-string string)))))) |
4816 (ding) (message "No newsgroup is selected."))) | |
4817 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4818 (defun gnus-kill-file-apply-last-sexp () |
257 | 4819 "Apply sexp before point in current buffer to current newsgroup." |
4820 (interactive) | |
4821 (if (and gnus-current-kill-article | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4822 (get-buffer gnus-summary-buffer)) |
257 | 4823 ;; Assume newsgroup is selected. |
4824 (let ((string | |
4825 (buffer-substring | |
4826 (save-excursion (forward-sexp -1) (point)) (point)))) | |
4827 (save-excursion | |
4828 (save-window-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4829 (pop-to-buffer gnus-summary-buffer) |
257 | 4830 (eval (car (read-from-string string)))))) |
4831 (ding) (message "No newsgroup is selected."))) | |
4832 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4833 (defun gnus-kill-file-exit () |
257 | 4834 "Save a KILL file, then return to the previous buffer." |
4835 (interactive) | |
4836 (save-buffer) | |
4837 (let ((killbuf (current-buffer))) | |
4838 ;; 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
|
4839 (and (get-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4840 (bury-buffer (get-buffer gnus-article-buffer))) |
257 | 4841 ;; Delete the KILL file windows. |
4842 (delete-windows-on killbuf) | |
4843 ;; Restore last window configuration if available. | |
4844 (and gnus-winconf-kill-file | |
4845 (set-window-configuration gnus-winconf-kill-file)) | |
4846 (setq gnus-winconf-kill-file nil) | |
4847 ;; Kill the KILL file buffer. Suggested by tale@pawl.rpi.edu. | |
4848 (kill-buffer killbuf))) | |
4849 | |
4850 | |
4851 ;;; | |
4852 ;;; Utility functions | |
4853 ;;; | |
4854 | |
4855 ;; Basic ideas by emv@math.lsa.umich.edu (Edward Vielmetti) | |
4856 | |
4857 (defun gnus-batch-kill () | |
4858 "Run batched KILL. | |
4859 Usage: emacs -batch -l gnus -f gnus-batch-kill NEWSGROUP ..." | |
4860 (if (not noninteractive) | |
4861 (error "gnus-batch-kill is to be used only with -batch")) | |
4862 (let* ((group nil) | |
4863 (subscribed nil) | |
4864 (newsrc nil) | |
4865 (yes-and-no | |
4866 (gnus-parse-n-options | |
4867 (apply (function concat) | |
4868 (mapcar (function (lambda (g) (concat g " "))) | |
4869 command-line-args-left)))) | |
4870 (yes (car yes-and-no)) | |
4871 (no (cdr yes-and-no)) | |
4872 ;; Disable verbose message. | |
4873 (gnus-novice-user nil) | |
4874 (gnus-large-newsgroup nil) | |
4875 (nntp-large-newsgroup nil)) | |
4876 ;; Eat all arguments. | |
4877 (setq command-line-args-left nil) | |
4878 ;; Startup GNUS. | |
4879 (gnus) | |
4880 ;; Apply kills to specified newsgroups in command line arguments. | |
4881 (setq newsrc (copy-sequence gnus-newsrc-assoc)) | |
4882 (while newsrc | |
4883 (setq group (car (car newsrc))) | |
4884 (setq subscribed (nth 1 (car newsrc))) | |
4885 (setq newsrc (cdr newsrc)) | |
4886 (if (and subscribed | |
4887 (not (zerop (nth 1 (gnus-gethash group gnus-unread-hashtb)))) | |
4888 (if yes | |
4889 (string-match yes group) t) | |
4890 (or (null no) | |
4891 (not (string-match no group)))) | |
4892 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4893 (gnus-summary-read-group group nil t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4894 (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
|
4895 (gnus-summary-exit t)) |
257 | 4896 )) |
4897 ) | |
4898 ;; Finally, exit Emacs. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4899 (set-buffer gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4900 (gnus-group-exit) |
257 | 4901 )) |
4902 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4903 ;; For saving articles |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4904 |
257 | 4905 (defun gnus-Numeric-save-name (newsgroup headers &optional last-file) |
4906 "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. | |
4907 If variable `gnus-use-long-file-name' is nil, it is ~/News/News.group/num. | |
4908 Otherwise, it is like ~/News/news/group/num." | |
4909 (let ((default | |
4910 (expand-file-name | |
4911 (concat (if gnus-use-long-file-name | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4912 (gnus-capitalize-newsgroup newsgroup) |
257 | 4913 (gnus-newsgroup-directory-form newsgroup)) |
4914 "/" (int-to-string (nntp-header-number headers))) | |
4915 (or gnus-article-save-directory "~/News")))) | |
4916 (if (and last-file | |
4917 (string-equal (file-name-directory default) | |
4918 (file-name-directory last-file)) | |
4919 (string-match "^[0-9]+$" (file-name-nondirectory last-file))) | |
4920 default | |
4921 (or last-file default)))) | |
4922 | |
4923 (defun gnus-numeric-save-name (newsgroup headers &optional last-file) | |
4924 "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. | |
4925 If variable `gnus-use-long-file-name' is nil, it is ~/News/news.group/num. | |
4926 Otherwise, it is like ~/News/news/group/num." | |
4927 (let ((default | |
4928 (expand-file-name | |
4929 (concat (if gnus-use-long-file-name | |
4930 newsgroup | |
4931 (gnus-newsgroup-directory-form newsgroup)) | |
4932 "/" (int-to-string (nntp-header-number headers))) | |
4933 (or gnus-article-save-directory "~/News")))) | |
4934 (if (and last-file | |
4935 (string-equal (file-name-directory default) | |
4936 (file-name-directory last-file)) | |
4937 (string-match "^[0-9]+$" (file-name-nondirectory last-file))) | |
4938 default | |
4939 (or last-file default)))) | |
4940 | |
4941 (defun gnus-Plain-save-name (newsgroup headers &optional last-file) | |
4942 "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. | |
4943 If variable `gnus-use-long-file-name' is nil, it is ~/News/News.group. | |
4944 Otherwise, it is like ~/News/news/group/news." | |
4945 (or last-file | |
4946 (expand-file-name | |
4947 (if gnus-use-long-file-name | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4948 (gnus-capitalize-newsgroup newsgroup) |
257 | 4949 (concat (gnus-newsgroup-directory-form newsgroup) "/news")) |
4950 (or gnus-article-save-directory "~/News")))) | |
4951 | |
4952 (defun gnus-plain-save-name (newsgroup headers &optional last-file) | |
4953 "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. | |
4954 If variable `gnus-use-long-file-name' is nil, it is ~/News/news.group. | |
4955 Otherwise, it is like ~/News/news/group/news." | |
4956 (or last-file | |
4957 (expand-file-name | |
4958 (if gnus-use-long-file-name | |
4959 newsgroup | |
4960 (concat (gnus-newsgroup-directory-form newsgroup) "/news")) | |
4961 (or gnus-article-save-directory "~/News")))) | |
4962 | |
4963 (defun gnus-Folder-save-name (newsgroup headers &optional last-folder) | |
4964 "Generate folder name from NEWSGROUP, HEADERS, and optional LAST-FOLDER. | |
4965 If variable `gnus-use-long-file-name' is nil, it is +News.group. | |
4966 Otherwise, it is like +news/group." | |
4967 (or last-folder | |
4968 (concat "+" | |
4969 (if gnus-use-long-file-name | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4970 (gnus-capitalize-newsgroup newsgroup) |
257 | 4971 (gnus-newsgroup-directory-form newsgroup))))) |
4972 | |
4973 (defun gnus-folder-save-name (newsgroup headers &optional last-folder) | |
4974 "Generate folder name from NEWSGROUP, HEADERS, and optional LAST-FOLDER. | |
4975 If variable `gnus-use-long-file-name' is nil, it is +news.group. | |
4976 Otherwise, it is like +news/group." | |
4977 (or last-folder | |
4978 (concat "+" | |
4979 (if gnus-use-long-file-name | |
4980 newsgroup | |
4981 (gnus-newsgroup-directory-form newsgroup))))) | |
4982 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4983 ;; For KILL files |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4984 |
257 | 4985 (defun gnus-apply-kill-file () |
4986 "Apply KILL file to the current newsgroup." | |
4987 ;; Apply the global KILL file. | |
4988 (load (gnus-newsgroup-kill-file nil) t nil t) | |
4989 ;; And then apply the local KILL file. | |
4990 (load (gnus-newsgroup-kill-file gnus-newsgroup-name) t nil t)) | |
4991 | |
4992 (defun gnus-Newsgroup-kill-file (newsgroup) | |
4993 "Return the name of a KILL file of NEWSGROUP. | |
4994 If NEWSGROUP is nil, return the global KILL file instead." | |
4995 (cond ((or (null newsgroup) | |
4996 (string-equal newsgroup "")) | |
4997 ;; The global KILL file is placed at top of the directory. | |
4998 (expand-file-name gnus-kill-file-name | |
8439
e3040f870f4f
(gnus-kill-files-directory): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
8413
diff
changeset
|
4999 (or gnus-kill-files-directory "~/News"))) |
257 | 5000 (gnus-use-long-file-name |
5001 ;; Append ".KILL" to capitalized newsgroup name. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5002 (expand-file-name (concat (gnus-capitalize-newsgroup newsgroup) |
257 | 5003 "." gnus-kill-file-name) |
8439
e3040f870f4f
(gnus-kill-files-directory): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
8413
diff
changeset
|
5004 (or gnus-kill-files-directory "~/News"))) |
257 | 5005 (t |
5006 ;; Place "KILL" under the hierarchical directory. | |
5007 (expand-file-name (concat (gnus-newsgroup-directory-form newsgroup) | |
5008 "/" gnus-kill-file-name) | |
8439
e3040f870f4f
(gnus-kill-files-directory): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
8413
diff
changeset
|
5009 (or gnus-kill-files-directory "~/News"))) |
257 | 5010 )) |
5011 | |
5012 (defun gnus-newsgroup-kill-file (newsgroup) | |
5013 "Return the name of a KILL file of NEWSGROUP. | |
5014 If NEWSGROUP is nil, return the global KILL file instead." | |
5015 (cond ((or (null newsgroup) | |
5016 (string-equal newsgroup "")) | |
5017 ;; The global KILL file is placed at top of the directory. | |
5018 (expand-file-name gnus-kill-file-name | |
8439
e3040f870f4f
(gnus-kill-files-directory): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
8413
diff
changeset
|
5019 (or gnus-kill-files-directory "~/News"))) |
257 | 5020 (gnus-use-long-file-name |
5021 ;; Append ".KILL" to newsgroup name. | |
5022 (expand-file-name (concat newsgroup "." gnus-kill-file-name) | |
8439
e3040f870f4f
(gnus-kill-files-directory): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
8413
diff
changeset
|
5023 (or gnus-kill-files-directory "~/News"))) |
257 | 5024 (t |
5025 ;; Place "KILL" under the hierarchical directory. | |
5026 (expand-file-name (concat (gnus-newsgroup-directory-form newsgroup) | |
5027 "/" gnus-kill-file-name) | |
8439
e3040f870f4f
(gnus-kill-files-directory): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
8413
diff
changeset
|
5028 (or gnus-kill-files-directory "~/News"))) |
257 | 5029 )) |
5030 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5031 ;; For subscribing new newsgroup |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5032 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5033 (defun gnus-subscribe-randomly (newsgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5034 "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
|
5035 (gnus-subscribe-newsgroup newsgroup |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5036 (car (car gnus-newsrc-assoc)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5037 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5038 (defun gnus-subscribe-alphabetically (newgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5039 "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
|
5040 ;; 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
|
5041 (let ((groups gnus-newsrc-assoc) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5042 (before nil)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5043 (while (and (not before) groups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5044 (if (string< newgroup (car (car groups))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5045 (setq before (car (car groups))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5046 (setq groups (cdr groups)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5047 (gnus-subscribe-newsgroup newgroup before) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5048 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5049 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5050 (defun gnus-subscribe-hierarchically (newgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5051 "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
|
5052 ;; 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
|
5053 (save-excursion |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5054 (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
|
5055 (let ((groupkey newgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5056 (before nil)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5057 (while (and (not before) groupkey) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5058 (goto-char (point-min)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5059 (let ((groupkey-re |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5060 (concat "^\\(" (regexp-quote groupkey) ".*\\)[!:]"))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5061 (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
|
5062 (progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5063 (setq before (buffer-substring |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5064 (match-beginning 1) (match-end 1))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5065 (string< before newgroup))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5066 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5067 ;; 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
|
5068 (setq groupkey |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5069 (if (string-match "^\\(.*\\)\\.[^.]+$" groupkey) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5070 (substring groupkey (match-beginning 1) (match-end 1))))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5071 (gnus-subscribe-newsgroup newgroup before) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5072 ))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5073 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5074 (defun gnus-subscribe-interactively (newsgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5075 "Subscribe new NEWSGROUP interactively. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5076 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
|
5077 Unless, it is killed." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5078 (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
|
5079 (gnus-subscribe-hierarchically newsgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5080 ;; Save in kill-ring |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5081 (gnus-subscribe-newsgroup newsgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5082 (gnus-kill-newsgroup newsgroup))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5083 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5084 (defun gnus-subscribe-newsgroup (newsgroup &optional next) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5085 "Subscribe new NEWSGROUP. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5086 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
|
5087 (gnus-insert-newsgroup (list newsgroup t) next) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5088 (message "Subscribe newsgroup: %s" newsgroup)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5089 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5090 ;; For directories |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5091 |
257 | 5092 (defun gnus-newsgroup-directory-form (newsgroup) |
5093 "Make hierarchical directory name from NEWSGROUP name." | |
5094 (let ((newsgroup (substring newsgroup 0)) ;Copy string. | |
5095 (len (length newsgroup)) | |
5096 (idx 0)) | |
3591
507f64624555
Apply typo patches from Paul Eggert.
Jim Blandy <jimb@redhat.com>
parents:
3496
diff
changeset
|
5097 ;; Replace all occurrences of `.' with `/'. |
257 | 5098 (while (< idx len) |
5099 (if (= (aref newsgroup idx) ?.) | |
5100 (aset newsgroup idx ?/)) | |
5101 (setq idx (1+ idx))) | |
5102 newsgroup | |
5103 )) | |
5104 | |
5105 (defun gnus-make-directory (directory) | |
5106 "Make DIRECTORY recursively." | |
5107 (let ((directory (expand-file-name directory default-directory))) | |
5108 (or (file-exists-p directory) | |
5109 (gnus-make-directory-1 "" directory)) | |
5110 )) | |
5111 | |
5112 (defun gnus-make-directory-1 (head tail) | |
5113 (cond ((string-match "^/\\([^/]+\\)" tail) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5114 ;; ange-ftp interferes with calling match-* after |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5115 ;; calling file-name-as-directory. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5116 (let ((beg (match-beginning 1)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5117 (end (match-end 1))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5118 (setq head (concat (file-name-as-directory head) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5119 (substring tail beg end))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5120 (or (file-exists-p head) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5121 (call-process "mkdir" nil nil nil head)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5122 (gnus-make-directory-1 head (substring tail end)))) |
257 | 5123 ((string-equal tail "") t) |
5124 )) | |
5125 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5126 (defun gnus-capitalize-newsgroup (newsgroup) |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
5127 "Capitalize NEWSGROUP name with treating `.' and `-' as part of words." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5128 ;; Suggested by "Jonathan I. Kamens" <jik@pit-manager.MIT.EDU>. |
5313
3189e46001fd
(gnus-capitalize-newsgroup): Modify a new temporary
Richard M. Stallman <rms@gnu.org>
parents:
5057
diff
changeset
|
5129 (let ((current-syntax-table (syntax-table))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5130 (unwind-protect |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5131 (progn |
5313
3189e46001fd
(gnus-capitalize-newsgroup): Modify a new temporary
Richard M. Stallman <rms@gnu.org>
parents:
5057
diff
changeset
|
5132 (set-syntax-table (copy-syntax-table current-syntax-table)) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5133 (modify-syntax-entry ?- "w") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5134 (modify-syntax-entry ?. "w") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5135 (capitalize newsgroup)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5136 (set-syntax-table current-syntax-table)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5137 |
257 | 5138 (defun gnus-simplify-subject (subject &optional re-only) |
5139 "Remove `Re:' and words in parentheses. | |
5140 If optional argument RE-ONLY is non-nil, strip `Re:' only." | |
5141 (let ((case-fold-search t)) ;Ignore case. | |
5142 ;; Remove `Re:' and `Re^N:'. | |
5143 (if (string-match "\\`\\(re\\(\\^[0-9]+\\)?:[ \t]+\\)+" subject) | |
5144 (setq subject (substring subject (match-end 0)))) | |
5145 ;; Remove words in parentheses from end. | |
5146 (or re-only | |
5147 (while (string-match "[ \t\n]*([^()]*)[ \t\n]*\\'" subject) | |
5148 (setq subject (substring subject 0 (match-beginning 0))))) | |
5149 ;; Return subject string. | |
5150 subject | |
5151 )) | |
5152 | |
5153 (defun gnus-optional-lines-and-from (header) | |
5154 "Return a string like `NNN:AUTHOR' from HEADER." | |
5155 (let ((name-length (length "umerin@photon"))) | |
5156 (substring (format "%3d:%s" | |
5157 ;; Lines of the article. | |
5158 ;; Suggested by dana@bellcore.com. | |
5159 (nntp-header-lines header) | |
5160 ;; Its author. | |
5161 (concat (mail-strip-quoted-names | |
5162 (nntp-header-from header)) | |
5163 (make-string name-length ? ))) | |
5164 ;; 4 stands for length of `NNN:'. | |
5165 0 (+ 4 name-length)))) | |
5166 | |
5167 (defun gnus-optional-lines (header) | |
5168 "Return a string like `NNN' from HEADER." | |
5169 (format "%4d" (nntp-header-lines header))) | |
5170 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5171 ;; 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
|
5172 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5173 (defun gnus-keysort-headers (predicate key &optional reverse) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5174 "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
|
5175 *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
|
5176 Optional argument REVERSE means reverse order." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5177 (let ((inhibit-quit t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5178 (setq gnus-newsgroup-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5179 (if reverse |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5180 (nreverse |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5181 (gnus-keysort (nreverse gnus-newsgroup-headers) predicate key)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5182 (gnus-keysort gnus-newsgroup-headers predicate key))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5183 ;; Make sure we don't have to call |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5184 ;; 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
|
5185 ;; 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
|
5186 ;; 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
|
5187 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5188 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5189 (defun gnus-keysort (list predicate key) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5190 "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
|
5191 (mapcar (function cdr) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5192 (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
|
5193 (function (lambda (a b) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5194 (funcall predicate (car a) (car b))))))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5195 |
257 | 5196 (defun gnus-sort-headers (predicate &optional reverse) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5197 "Sort current headers by PREDICATE safely. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5198 *Safely* means C-g quitting is disabled during sort. |
257 | 5199 Optional argument REVERSE means reverse order." |
5200 (let ((inhibit-quit t)) | |
5201 (setq gnus-newsgroup-headers | |
5202 (if reverse | |
5203 (nreverse (sort (nreverse gnus-newsgroup-headers) predicate)) | |
5204 (sort gnus-newsgroup-headers predicate))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5205 ;; Make sure we don't have to call |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5206 ;; 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
|
5207 ;; 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
|
5208 ;; entry is added to nor deleted from the variable. |
257 | 5209 )) |
5210 | |
5211 (defun gnus-string-lessp (a b) | |
5212 "Return T if first arg string is less than second in lexicographic order. | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
5213 If `case-fold-search' is non-nil, case of letters is ignored." |
257 | 5214 (if case-fold-search |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5215 (string-lessp (downcase a) (downcase b)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5216 (string-lessp a b))) |
257 | 5217 |
5218 (defun gnus-date-lessp (date1 date2) | |
5219 "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
|
5220 (string-lessp (gnus-sortable-date date1) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5221 (gnus-sortable-date date2))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5222 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5223 (defun gnus-sortable-date (date) |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
5224 "Convert DATE into a string that can be sorted with `string-lessp'. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5225 Timezone package is used." |
8413
aa772e9e5f86
(gnus-sortable-date): Use timezone-make-time-string.
Richard M. Stallman <rms@gnu.org>
parents:
8382
diff
changeset
|
5226 (let* ((date (timezone-fix-time date nil nil)) ;[Y M D H M S] |
aa772e9e5f86
(gnus-sortable-date): Use timezone-make-time-string.
Richard M. Stallman <rms@gnu.org>
parents:
8382
diff
changeset
|
5227 (year (aref date 0)) |
aa772e9e5f86
(gnus-sortable-date): Use timezone-make-time-string.
Richard M. Stallman <rms@gnu.org>
parents:
8382
diff
changeset
|
5228 (month (aref date 1)) |
aa772e9e5f86
(gnus-sortable-date): Use timezone-make-time-string.
Richard M. Stallman <rms@gnu.org>
parents:
8382
diff
changeset
|
5229 (day (aref date 2))) |
aa772e9e5f86
(gnus-sortable-date): Use timezone-make-time-string.
Richard M. Stallman <rms@gnu.org>
parents:
8382
diff
changeset
|
5230 (timezone-make-sortable-date year month day |
aa772e9e5f86
(gnus-sortable-date): Use timezone-make-time-string.
Richard M. Stallman <rms@gnu.org>
parents:
8382
diff
changeset
|
5231 (timezone-make-time-string |
aa772e9e5f86
(gnus-sortable-date): Use timezone-make-time-string.
Richard M. Stallman <rms@gnu.org>
parents:
8382
diff
changeset
|
5232 (aref date 3) (aref date 4) (aref date 5))) |
257 | 5233 )) |
5234 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5235 ;;(defun gnus-sortable-date (date) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5236 ;; "Make sortable string by string-lessp from DATE." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5237 ;; (let ((month '(("JAN" . " 1")("FEB" . " 2")("MAR" . " 3") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5238 ;; ("APR" . " 4")("MAY" . " 5")("JUN" . " 6") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5239 ;; ("JUL" . " 7")("AUG" . " 8")("SEP" . " 9") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5240 ;; ("OCT" . "10")("NOV" . "11")("DEC" . "12"))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5241 ;; (date (or date ""))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5242 ;; ;; Can understand the following styles: |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5243 ;; ;; (1) 14 Apr 89 03:20:12 GMT |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5244 ;; ;; (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
|
5245 ;; (if (string-match |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5246 ;; "\\([0-9]+\\) \\([^ ,]+\\) \\([0-9]+\\) \\([0-9:]+\\)" date) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5247 ;; (concat |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5248 ;; ;; Year |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5249 ;; (substring date (match-beginning 3) (match-end 3)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5250 ;; ;; Month |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5251 ;; (cdr |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5252 ;; (assoc |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5253 ;; (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
|
5254 ;; ;; Day |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5255 ;; (format "%2d" (string-to-int |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5256 ;; (substring date |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5257 ;; (match-beginning 1) (match-end 1)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5258 ;; ;; Time |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5259 ;; (substring date (match-beginning 4) (match-end 4))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5260 ;; ;; Cannot understand DATE string. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5261 ;; date |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5262 ;; ) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5263 ;; )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5264 |
257 | 5265 (defun gnus-fetch-field (field) |
5266 "Return the value of the header FIELD of current article." | |
5267 (save-excursion | |
5268 (save-restriction | |
5269 (widen) | |
5270 (goto-char (point-min)) | |
5271 (narrow-to-region (point-min) | |
5272 (progn (search-forward "\n\n" nil 'move) (point))) | |
5273 (mail-fetch-field field)))) | |
5274 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5275 (fset 'gnus-expunge 'gnus-summary-delete-marked-with) |
257 | 5276 |
5277 (defun gnus-kill (field regexp &optional command all) | |
5278 "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
|
5279 Optional 1st argument COMMAND is default to |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5280 (gnus-summary-mark-as-read nil \"X\"). |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5281 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
|
5282 If FIELD is an empty string (or nil), entire article body is searched for. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
5283 COMMAND must be a Lisp expression or a string representing a key sequence." |
257 | 5284 ;; We don't want to change current point nor window configuration. |
5285 (save-excursion | |
5286 (save-window-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5287 ;; Selected window must be Summary buffer to execute keyboard |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
5288 ;; macros correctly. See command_loop_1. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5289 (switch-to-buffer gnus-summary-buffer 'norecord) |
257 | 5290 (goto-char (point-min)) ;From the beginning. |
5291 (if (null command) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5292 (setq command '(gnus-summary-mark-as-read nil "X"))) |
257 | 5293 (gnus-execute field regexp command nil (not all)) |
5294 ))) | |
5295 | |
5296 (defun gnus-execute (field regexp form &optional backward ignore-marked) | |
5297 "If FIELD of article header matches REGEXP, execute lisp FORM (or a string). | |
5298 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
|
5299 If optional 1st argument BACKWARD is non-nil, do backward instead. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
5300 If optional 2nd argument IGNORE-MARKED is non-nil, ignore articles |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
5301 marked as read or unread." |
257 | 5302 (let ((function nil) |
5303 (header nil) | |
5304 (article nil)) | |
5305 (if (string-equal field "") | |
5306 (setq field nil)) | |
5307 (if (null field) | |
5308 nil | |
5309 (or (stringp field) | |
5310 (setq field (symbol-name field))) | |
5311 ;; Get access function of header filed. | |
5312 (setq function (intern-soft (concat "gnus-header-" (downcase field)))) | |
5313 (if (and function (fboundp function)) | |
5314 (setq function (symbol-function function)) | |
5315 (error "Unknown header field: \"%s\"" field))) | |
5316 ;; Make FORM funcallable. | |
5317 (if (and (listp form) (not (eq (car form) 'lambda))) | |
5318 (setq form (list 'lambda nil form))) | |
5319 ;; Starting from the current article. | |
5320 (or (and ignore-marked | |
5321 ;; 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
|
5322 (setq article (gnus-summary-article-number)) |
257 | 5323 (or (not (memq article gnus-newsgroup-unreads)) ;Marked as read. |
5324 (memq article gnus-newsgroup-marked) ;Marked as unread. | |
5325 )) | |
5326 (gnus-execute-1 function regexp form)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5327 (while (gnus-summary-search-subject backward ignore-marked nil) |
257 | 5328 (gnus-execute-1 function regexp form)) |
5329 )) | |
5330 | |
5331 (defun gnus-execute-1 (function regexp form) | |
5332 (save-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5333 ;; 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
|
5334 (let ((article (gnus-summary-article-number))) |
257 | 5335 (if (null article) |
5336 nil ;Nothing to do. | |
5337 (if function | |
5338 ;; Compare with header field. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5339 (let (;;(header (gnus-find-header-by-number |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5340 ;; gnus-newsgroup-headers article)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5341 (header (gnus-get-header-by-number article)) |
257 | 5342 (value nil)) |
5343 (and header | |
5344 (progn | |
5345 (setq value (funcall function header)) | |
5346 ;; Number (Lines:) or symbol must be converted to string. | |
5347 (or (stringp value) | |
5348 (setq value (prin1-to-string value))) | |
5349 (string-match regexp value)) | |
5350 (if (stringp form) ;Keyboard macro. | |
5351 (execute-kbd-macro form) | |
5352 (funcall form)))) | |
5353 ;; Search article body. | |
5354 (let ((gnus-current-article nil) ;Save article pointer. | |
5355 (gnus-last-article nil) | |
5356 (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
|
5357 (gnus-mark-article-hook nil)) ;Inhibit marking as read. |
257 | 5358 (message "Searching for article: %d..." article) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5359 (gnus-article-setup-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5360 (gnus-article-prepare article t) |
257 | 5361 (if (save-excursion |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5362 (set-buffer gnus-article-buffer) |
257 | 5363 (goto-char (point-min)) |
5364 (re-search-forward regexp nil t)) | |
5365 (if (stringp form) ;Keyboard macro. | |
5366 (execute-kbd-macro form) | |
5367 (funcall form)))) | |
5368 )) | |
5369 ))) | |
5370 | |
5371 ;;; caesar-region written by phr@prep.ai.mit.edu Nov 86 | |
5372 ;;; modified by tower@prep Nov 86 | |
5373 ;;; Modified by umerin@flab.flab.Fujitsu.JUNET for ROT47. | |
5374 | |
5375 (defun gnus-caesar-region (&optional n) | |
5376 "Caesar rotation of region by N, default 13, for decrypting netnews. | |
5377 ROT47 will be performed for Japanese text in any case." | |
5378 (interactive (if current-prefix-arg ; Was there a prefix arg? | |
5379 (list (prefix-numeric-value current-prefix-arg)) | |
5380 (list nil))) | |
5381 (cond ((not (numberp n)) (setq n 13)) | |
4522
8fbd7ec97c6d
(gnus-caesar-region): Replace `%' by `mod' and simplify.
Paul Eggert <eggert@twinsun.com>
parents:
4321
diff
changeset
|
5382 (t (setq n (mod n 26)))) ;canonicalize N |
257 | 5383 (if (not (zerop n)) ; no action needed for a rot of 0 |
5384 (progn | |
5385 (if (or (not (boundp 'caesar-translate-table)) | |
5386 (/= (aref caesar-translate-table ?a) (+ ?a n))) | |
5387 (let ((i 0) (lower "abcdefghijklmnopqrstuvwxyz") upper) | |
5388 (message "Building caesar-translate-table...") | |
5389 (setq caesar-translate-table (make-vector 256 0)) | |
5390 (while (< i 256) | |
5391 (aset caesar-translate-table i i) | |
5392 (setq i (1+ i))) | |
5393 (setq lower (concat lower lower) upper (upcase lower) i 0) | |
5394 (while (< i 26) | |
5395 (aset caesar-translate-table (+ ?a i) (aref lower (+ i n))) | |
5396 (aset caesar-translate-table (+ ?A i) (aref upper (+ i n))) | |
5397 (setq i (1+ i))) | |
5398 ;; ROT47 for Japanese text. | |
5399 ;; Thanks to ichikawa@flab.fujitsu.junet. | |
5400 (setq i 161) | |
5401 (let ((t1 (logior ?O 128)) | |
5402 (t2 (logior ?! 128)) | |
5403 (t3 (logior ?~ 128))) | |
5404 (while (< i 256) | |
5405 (aset caesar-translate-table i | |
5406 (let ((v (aref caesar-translate-table i))) | |
5407 (if (<= v t1) (if (< v t2) v (+ v 47)) | |
5408 (if (<= v t3) (- v 47) v)))) | |
5409 (setq i (1+ i)))) | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
5410 (message "Building caesar-translate-table...done"))) |
257 | 5411 (let ((from (region-beginning)) |
5412 (to (region-end)) | |
5413 (i 0) str len) | |
5414 (setq str (buffer-substring from to)) | |
5415 (setq len (length str)) | |
5416 (while (< i len) | |
5417 (aset str i (aref caesar-translate-table (aref str i))) | |
5418 (setq i (1+ i))) | |
5419 (goto-char from) | |
5420 (delete-region from to) | |
5421 (insert str))))) | |
5422 | |
5423 ;; Functions accessing headers. | |
5424 ;; Functions are more convenient than macros in some case. | |
5425 | |
5426 (defun gnus-header-number (header) | |
5427 "Return article number in HEADER." | |
5428 (nntp-header-number header)) | |
5429 | |
5430 (defun gnus-header-subject (header) | |
5431 "Return subject string in HEADER." | |
5432 (nntp-header-subject header)) | |
5433 | |
5434 (defun gnus-header-from (header) | |
5435 "Return author string in HEADER." | |
5436 (nntp-header-from header)) | |
5437 | |
5438 (defun gnus-header-xref (header) | |
5439 "Return xref string in HEADER." | |
5440 (nntp-header-xref header)) | |
5441 | |
5442 (defun gnus-header-lines (header) | |
5443 "Return lines in HEADER." | |
5444 (nntp-header-lines header)) | |
5445 | |
5446 (defun gnus-header-date (header) | |
5447 "Return date in HEADER." | |
5448 (nntp-header-date header)) | |
5449 | |
5450 (defun gnus-header-id (header) | |
5451 "Return Id in HEADER." | |
5452 (nntp-header-id header)) | |
5453 | |
5454 (defun gnus-header-references (header) | |
5455 "Return references in HEADER." | |
5456 (nntp-header-references header)) | |
5457 | |
5458 | |
5459 ;;; | |
5460 ;;; Article savers. | |
5461 ;;; | |
5462 | |
5463 (defun gnus-output-to-rmail (file-name) | |
5464 "Append the current article to an Rmail file named FILE-NAME." | |
5465 (require 'rmail) | |
5466 ;; Most of these codes are borrowed from rmailout.el. | |
5467 (setq file-name (expand-file-name file-name)) | |
7560
e63efa2d587c
rmail-default-file renamed from rmail-last-file,
Richard M. Stallman <rms@gnu.org>
parents:
7524
diff
changeset
|
5468 (setq rmail-default-rmail-file file-name) |
257 | 5469 (let ((artbuf (current-buffer)) |
5470 (tmpbuf (get-buffer-create " *GNUS-output*"))) | |
5471 (save-excursion | |
5472 (or (get-file-buffer file-name) | |
5473 (file-exists-p file-name) | |
5474 (if (yes-or-no-p | |
5475 (concat "\"" file-name "\" does not exist, create it? ")) | |
5476 (let ((file-buffer (create-file-buffer file-name))) | |
5477 (save-excursion | |
5478 (set-buffer file-buffer) | |
5479 (rmail-insert-rmail-file-header) | |
5480 (let ((require-final-newline nil)) | |
5481 (write-region (point-min) (point-max) file-name t 1))) | |
5482 (kill-buffer file-buffer)) | |
5483 (error "Output file does not exist"))) | |
5484 (set-buffer tmpbuf) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5485 (buffer-flush-undo (current-buffer)) |
257 | 5486 (erase-buffer) |
5487 (insert-buffer-substring artbuf) | |
5488 (gnus-convert-article-to-rmail) | |
5489 ;; Decide whether to append to a file or to an Emacs buffer. | |
5490 (let ((outbuf (get-file-buffer file-name))) | |
5491 (if (not outbuf) | |
5492 (append-to-file (point-min) (point-max) file-name) | |
5493 ;; File has been visited, in buffer OUTBUF. | |
5494 (set-buffer outbuf) | |
5495 (let ((buffer-read-only nil) | |
5496 (msg (and (boundp 'rmail-current-message) | |
5497 rmail-current-message))) | |
5498 ;; If MSG is non-nil, buffer is in RMAIL mode. | |
5499 (if msg | |
5500 (progn (widen) | |
5501 (narrow-to-region (point-max) (point-max)))) | |
5502 (insert-buffer-substring tmpbuf) | |
5503 (if msg | |
5504 (progn | |
5505 (goto-char (point-min)) | |
5506 (widen) | |
5507 (search-backward "\^_") | |
5508 (narrow-to-region (point) (point-max)) | |
5509 (goto-char (1+ (point-min))) | |
5510 (rmail-count-new-messages t) | |
5511 (rmail-show-message msg)))))) | |
5512 ) | |
5513 (kill-buffer tmpbuf) | |
5514 )) | |
5515 | |
5516 (defun gnus-output-to-file (file-name) | |
5517 "Append the current article to a file named FILE-NAME." | |
5518 (setq file-name (expand-file-name file-name)) | |
5519 (let ((artbuf (current-buffer)) | |
5520 (tmpbuf (get-buffer-create " *GNUS-output*"))) | |
5521 (save-excursion | |
5522 (set-buffer tmpbuf) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5523 (buffer-flush-undo (current-buffer)) |
257 | 5524 (erase-buffer) |
5525 (insert-buffer-substring artbuf) | |
5526 ;; Append newline at end of the buffer as separator, and then | |
5527 ;; save it to file. | |
5528 (goto-char (point-max)) | |
5529 (insert "\n") | |
5530 (append-to-file (point-min) (point-max) file-name)) | |
5531 (kill-buffer tmpbuf) | |
5532 )) | |
5533 | |
5534 (defun gnus-convert-article-to-rmail () | |
5535 "Convert article in current buffer to Rmail message format." | |
5536 (let ((buffer-read-only nil)) | |
5537 ;; Convert article directly into Babyl format. | |
5538 ;; Suggested by Rob Austein <sra@lcs.mit.edu> | |
5539 (goto-char (point-min)) | |
5540 (insert "\^L\n0, unseen,,\n*** EOOH ***\n") | |
5541 (while (search-forward "\n\^_" nil t) ;single char | |
5542 (replace-match "\n^_")) ;2 chars: "^" and "_" | |
5543 (goto-char (point-max)) | |
5544 (insert "\^_"))) | |
5545 | |
5546 ;;(defun gnus-convert-article-to-rmail () | |
5547 ;; "Convert article in current buffer to Rmail message format." | |
5548 ;; (let ((buffer-read-only nil)) | |
5549 ;; ;; Insert special header of Unix mail. | |
5550 ;; (goto-char (point-min)) | |
5551 ;; (insert "From " | |
5552 ;; (or (mail-strip-quoted-names (mail-fetch-field "from")) | |
5553 ;; "unknown") | |
5554 ;; " " (current-time-string) "\n") | |
5555 ;; ;; Stop quoting `From' since this seems unnecessary in most cases. | |
5556 ;; ;; ``Quote'' "\nFrom " as "\n>From " | |
5557 ;; ;;(while (search-forward "\nFrom " nil t) | |
5558 ;; ;; (forward-char -5) | |
5559 ;; ;; (insert ?>)) | |
5560 ;; ;; Convert article to babyl format. | |
5561 ;; (rmail-convert-to-babyl-format) | |
5562 ;; )) | |
5563 | |
5564 | |
5565 ;;; | |
5566 ;;; Internal functions. | |
5567 ;;; | |
5568 | |
5569 (defun gnus-start-news-server (&optional confirm) | |
5570 "Open network stream to remote NNTP server. | |
5571 If optional argument CONFIRM is non-nil, ask you host that NNTP server | |
5572 is running even if it is defined. | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
5573 Run `gnus-open-server-hook' just before opening news server." |
257 | 5574 (if (gnus-server-opened) |
5575 ;; Stream is already opened. | |
5576 nil | |
5577 ;; Open NNTP server. | |
5578 (if (or confirm | |
5579 (null gnus-nntp-server)) | |
3612
d701e7af5ba5
* gnus.el (gnus-start-news-server): If no server has been
Jim Blandy <jimb@redhat.com>
parents:
3610
diff
changeset
|
5580 ;; If someone has set the service to nil, then this should always |
d701e7af5ba5
* gnus.el (gnus-start-news-server): If no server has been
Jim Blandy <jimb@redhat.com>
parents:
3610
diff
changeset
|
5581 ;; be the local host. |
d701e7af5ba5
* gnus.el (gnus-start-news-server): If no server has been
Jim Blandy <jimb@redhat.com>
parents:
3610
diff
changeset
|
5582 (if gnus-nntp-service |
d701e7af5ba5
* gnus.el (gnus-start-news-server): If no server has been
Jim Blandy <jimb@redhat.com>
parents:
3610
diff
changeset
|
5583 (if (and (boundp 'gnus-secondary-servers) gnus-secondary-servers) |
d701e7af5ba5
* gnus.el (gnus-start-news-server): If no server has been
Jim Blandy <jimb@redhat.com>
parents:
3610
diff
changeset
|
5584 ;; Read server name with completion. |
d701e7af5ba5
* gnus.el (gnus-start-news-server): If no server has been
Jim Blandy <jimb@redhat.com>
parents:
3610
diff
changeset
|
5585 (setq gnus-nntp-server |
d701e7af5ba5
* gnus.el (gnus-start-news-server): If no server has been
Jim Blandy <jimb@redhat.com>
parents:
3610
diff
changeset
|
5586 (completing-read "NNTP server: " |
d701e7af5ba5
* gnus.el (gnus-start-news-server): If no server has been
Jim Blandy <jimb@redhat.com>
parents:
3610
diff
changeset
|
5587 (cons (list gnus-nntp-server) |
d701e7af5ba5
* gnus.el (gnus-start-news-server): If no server has been
Jim Blandy <jimb@redhat.com>
parents:
3610
diff
changeset
|
5588 gnus-secondary-servers) |
d701e7af5ba5
* gnus.el (gnus-start-news-server): If no server has been
Jim Blandy <jimb@redhat.com>
parents:
3610
diff
changeset
|
5589 nil nil gnus-nntp-server)) |
d701e7af5ba5
* gnus.el (gnus-start-news-server): If no server has been
Jim Blandy <jimb@redhat.com>
parents:
3610
diff
changeset
|
5590 (setq gnus-nntp-server |
d701e7af5ba5
* gnus.el (gnus-start-news-server): If no server has been
Jim Blandy <jimb@redhat.com>
parents:
3610
diff
changeset
|
5591 (read-string "NNTP server: " gnus-nntp-server))) |
d701e7af5ba5
* gnus.el (gnus-start-news-server): If no server has been
Jim Blandy <jimb@redhat.com>
parents:
3610
diff
changeset
|
5592 (setq gnus-nntp-server ""))) |
257 | 5593 ;; 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
|
5594 (if (or (string-equal gnus-nntp-server "") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5595 (string-equal gnus-nntp-server "::")) ;RMS preference. |
257 | 5596 (setq gnus-nntp-server (system-name))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5597 ;; 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
|
5598 ;; 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
|
5599 ;; gnus-nntp-server. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5600 (cond ((and (null gnus-nntp-service) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5601 (string-equal gnus-nntp-server (system-name))) |
716
f11e7af7c0d9
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
711
diff
changeset
|
5602 (require 'nnspool) |
f11e7af7c0d9
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
711
diff
changeset
|
5603 (gnus-define-access-method 'nnspool) |
f11e7af7c0d9
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
711
diff
changeset
|
5604 (message "Looking up local news spool...")) |
f11e7af7c0d9
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
711
diff
changeset
|
5605 ((string-match ":" gnus-nntp-server) |
257 | 5606 ;; :DIRECTORY |
5607 (require 'mhspool) | |
5608 (gnus-define-access-method 'mhspool) | |
5609 (message "Looking up private directory...")) | |
5610 (t | |
5611 (gnus-define-access-method 'nntp) | |
5612 (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
|
5613 (run-hooks 'gnus-open-server-hook) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5614 (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
|
5615 (message "")) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5616 ((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
|
5617 (message "")) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5618 (t |
8481
b4c5b7658550
(gnus-start-news-server): Fix the call to `error'.
Richard M. Stallman <rms@gnu.org>
parents:
8470
diff
changeset
|
5619 (error "%s" |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5620 (gnus-nntp-message |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5621 (format "Cannot open NNTP server on %s" gnus-nntp-server))))) |
257 | 5622 )) |
5623 | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
5624 ;; Dummy functions used only once. Should return nil. |
257 | 5625 (defun gnus-server-opened () nil) |
5626 (defun gnus-close-server () nil) | |
5627 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5628 (defun gnus-nntp-message (&optional message) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5629 "Return a message returned from NNTP server. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5630 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
|
5631 (let ((status (gnus-status-message)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5632 (message (or message ""))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5633 (if (and (stringp status) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5634 (> (length status) 0)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5635 status message))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5636 |
257 | 5637 (defun gnus-define-access-method (method &optional access-methods) |
5638 "Define access functions for the access METHOD. | |
3591
507f64624555
Apply typo patches from Paul Eggert.
Jim Blandy <jimb@redhat.com>
parents:
3496
diff
changeset
|
5639 Methods definition is taken from optional argument ACCESS-METHODS or |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
5640 the variable `gnus-access-methods'." |
257 | 5641 (let ((bindings |
5642 (cdr (assoc method (or access-methods gnus-access-methods))))) | |
5643 (if (null bindings) | |
5644 (error "Unknown access method: %s" method) | |
5645 ;; Should not use symbol-function here since overload does not work. | |
5646 (while bindings | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5647 ;; 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
|
5648 (fset (car (car bindings)) (car (cdr (car bindings)))) |
257 | 5649 (setq bindings (cdr bindings))) |
5650 ))) | |
5651 | |
5652 (defun gnus-select-newsgroup (group &optional show-all) | |
5653 "Select newsgroup GROUP. | |
5654 If optional argument SHOW-ALL is non-nil, all of articles in the group | |
5655 are selected." | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5656 ;; 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
|
5657 (gnus-start-news-server) |
257 | 5658 (if (gnus-request-group group) |
5659 (let ((articles nil)) | |
5660 (setq gnus-newsgroup-name group) | |
5661 (setq gnus-newsgroup-unreads | |
5662 (gnus-uncompress-sequence | |
5663 (nthcdr 2 (gnus-gethash group gnus-unread-hashtb)))) | |
5664 (cond (show-all | |
5665 ;; Select all active articles. | |
5666 (setq articles | |
5667 (gnus-uncompress-sequence | |
5668 (nthcdr 2 (gnus-gethash group gnus-active-hashtb))))) | |
5669 (t | |
5670 ;; Select unread articles only. | |
5671 (setq articles gnus-newsgroup-unreads))) | |
5672 ;; Require confirmation if selecting large newsgroup. | |
5673 (setq gnus-newsgroup-unselected nil) | |
5674 (if (not (numberp gnus-large-newsgroup)) | |
5675 nil | |
5676 (let ((selected nil) | |
5677 (number (length articles))) | |
5678 (if (> number gnus-large-newsgroup) | |
5679 (progn | |
5680 (condition-case () | |
5681 (let ((input | |
5682 (read-string | |
5683 (format | |
5684 "How many articles from %s (default %d): " | |
5685 gnus-newsgroup-name number)))) | |
5686 (setq selected | |
5687 (if (string-equal input "") | |
5688 number (string-to-int input)))) | |
5689 (quit | |
5690 (setq selected 0))) | |
5691 (cond ((and (> selected 0) | |
5692 (< selected number)) | |
5693 ;; Select last N articles. | |
5694 (setq articles (nthcdr (- number selected) articles))) | |
5695 ((and (< selected 0) | |
5696 (< (- 0 selected) number)) | |
5697 ;; Select first N articles. | |
5698 (setq selected (- 0 selected)) | |
5699 (setq articles (copy-sequence articles)) | |
5700 (setcdr (nthcdr (1- selected) articles) nil)) | |
5701 ((zerop selected) | |
5702 (setq articles nil)) | |
5703 ;; Otherwise select all. | |
5704 ) | |
5705 ;; Get unselected unread articles. | |
5706 (setq gnus-newsgroup-unselected | |
5707 (gnus-set-difference gnus-newsgroup-unreads articles)) | |
5708 )) | |
5709 )) | |
5710 ;; Get headers list. | |
5711 (setq gnus-newsgroup-headers (gnus-retrieve-headers articles)) | |
5712 ;; UNREADS may contain expired articles, so we have to remove | |
5713 ;; them from the list. | |
5714 (setq gnus-newsgroup-unreads | |
5715 (gnus-intersection gnus-newsgroup-unreads | |
5716 (mapcar | |
5717 (function | |
5718 (lambda (header) | |
5719 (nntp-header-number header))) | |
5720 gnus-newsgroup-headers))) | |
5721 ;; Marked article must be a subset of unread articles. | |
5722 (setq gnus-newsgroup-marked | |
5723 (gnus-intersection (append gnus-newsgroup-unselected | |
5724 gnus-newsgroup-unreads) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5725 (cdr |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5726 (gnus-gethash group gnus-marked-hashtb)))) |
257 | 5727 ;; First and last article in this newsgroup. |
5728 (setq gnus-newsgroup-begin | |
5729 (if gnus-newsgroup-headers | |
5730 (nntp-header-number (car gnus-newsgroup-headers)) | |
5731 0 | |
5732 )) | |
5733 (setq gnus-newsgroup-end | |
5734 (if gnus-newsgroup-headers | |
5735 (nntp-header-number | |
5736 (gnus-last-element gnus-newsgroup-headers)) | |
5737 0 | |
5738 )) | |
5739 ;; File name that an article was saved last. | |
5740 (setq gnus-newsgroup-last-rmail nil) | |
5741 (setq gnus-newsgroup-last-mail nil) | |
5742 (setq gnus-newsgroup-last-folder nil) | |
5743 (setq gnus-newsgroup-last-file nil) | |
5744 ;; Reset article pointer etc. | |
5745 (setq gnus-current-article nil) | |
5746 (setq gnus-current-headers nil) | |
5747 (setq gnus-current-history nil) | |
5748 (setq gnus-have-all-headers nil) | |
5749 (setq gnus-last-article nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5750 ;; 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
|
5751 (gnus-clear-hashtables-for-newsgroup-headers) |
257 | 5752 ;; GROUP is successfully selected. |
5753 t | |
5754 ) | |
5755 )) | |
5756 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5757 ;; Hacking for making header search much faster. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5758 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5759 (defun gnus-get-header-by-number (number) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5760 "Return a header specified by a NUMBER. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
5761 If you update the variable `gnus-newsgroup-headers', you must set the |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
5762 hash table `gnus-newsgroup-headers-hashtb-by-number' to nil to indicate |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5763 rehash is necessary." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5764 (or gnus-newsgroup-headers-hashtb-by-number |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5765 (gnus-make-headers-hashtable-by-number)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5766 (gnus-gethash (int-to-string number) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5767 gnus-newsgroup-headers-hashtb-by-number)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5768 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5769 (defun gnus-get-header-by-id (id) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5770 "Return a header specified by an ID. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
5771 If you update the variable `gnus-newsgroup-headers', you must set the |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
5772 hash table `gnus-newsgroup-headers-hashtb-by-id' to nil to indicate |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5773 rehash is necessary." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5774 (or gnus-newsgroup-headers-hashtb-by-id |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5775 (gnus-make-headers-hashtable-by-id)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5776 (and (stringp id) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5777 (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
|
5778 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5779 (defun gnus-make-headers-hashtable-by-number () |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
5780 "Make hashtable for the variable `gnus-newsgroup-headers' by number." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5781 (let ((header nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5782 (headers gnus-newsgroup-headers)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5783 (setq gnus-newsgroup-headers-hashtb-by-number |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5784 (gnus-make-hashtable (length headers))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5785 (while headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5786 (setq header (car headers)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5787 (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
|
5788 header gnus-newsgroup-headers-hashtb-by-number) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5789 (setq headers (cdr headers)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5790 ))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5791 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5792 (defun gnus-make-headers-hashtable-by-id () |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
5793 "Make hashtable for the variable `gnus-newsgroup-headers' by id." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5794 (let ((header nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5795 (headers gnus-newsgroup-headers)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5796 (setq gnus-newsgroup-headers-hashtb-by-id |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5797 (gnus-make-hashtable (length headers))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5798 (while headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5799 (setq header (car headers)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5800 (gnus-sethash (nntp-header-id header) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5801 header gnus-newsgroup-headers-hashtb-by-id) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5802 (setq headers (cdr headers)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5803 ))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5804 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5805 (defun gnus-clear-hashtables-for-newsgroup-headers () |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
5806 "Clear hash tables created for the variable `gnus-newsgroup-headers'." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5807 (setq gnus-newsgroup-headers-hashtb-by-id nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5808 (setq gnus-newsgroup-headers-hashtb-by-number nil)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5809 |
257 | 5810 (defun gnus-more-header-backward () |
5811 "Find new header backward." | |
5812 (let ((first | |
5813 (car (nth 2 (gnus-gethash gnus-newsgroup-name gnus-active-hashtb)))) | |
5814 (artnum gnus-newsgroup-begin) | |
5815 (header nil)) | |
5816 (while (and (not header) | |
5817 (> artnum first)) | |
5818 (setq artnum (1- artnum)) | |
5819 (setq header (car (gnus-retrieve-headers (list artnum))))) | |
5820 header | |
5821 )) | |
5822 | |
5823 (defun gnus-more-header-forward () | |
5824 "Find new header forward." | |
5825 (let ((last | |
5826 (cdr (nth 2 (gnus-gethash gnus-newsgroup-name gnus-active-hashtb)))) | |
5827 (artnum gnus-newsgroup-end) | |
5828 (header nil)) | |
5829 (while (and (not header) | |
5830 (< artnum last)) | |
5831 (setq artnum (1+ artnum)) | |
5832 (setq header (car (gnus-retrieve-headers (list artnum))))) | |
5833 header | |
5834 )) | |
5835 | |
5836 (defun gnus-extend-newsgroup (header &optional backward) | |
5837 "Extend newsgroup selection with HEADER. | |
5838 Optional argument BACKWARD means extend toward backward." | |
5839 (if header | |
5840 (let ((artnum (nntp-header-number header))) | |
5841 (setq gnus-newsgroup-headers | |
5842 (if backward | |
5843 (cons header gnus-newsgroup-headers) | |
5844 (append gnus-newsgroup-headers (list header)))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5845 ;; 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
|
5846 (gnus-clear-hashtables-for-newsgroup-headers) |
257 | 5847 ;; We have to update unreads and unselected, but don't have to |
5848 ;; care about gnus-newsgroup-marked. | |
5849 (if (memq artnum gnus-newsgroup-unselected) | |
5850 (setq gnus-newsgroup-unreads | |
5851 (cons artnum gnus-newsgroup-unreads))) | |
5852 (setq gnus-newsgroup-unselected | |
5853 (delq artnum gnus-newsgroup-unselected)) | |
5854 (setq gnus-newsgroup-begin (min gnus-newsgroup-begin artnum)) | |
5855 (setq gnus-newsgroup-end (max gnus-newsgroup-end artnum)) | |
5856 ))) | |
5857 | |
5858 (defun gnus-mark-article-as-read (article) | |
5859 "Remember that ARTICLE is marked as read." | |
5860 ;; Remove from unread and marked list. | |
5861 (setq gnus-newsgroup-unreads | |
5862 (delq article gnus-newsgroup-unreads)) | |
5863 (setq gnus-newsgroup-marked | |
5864 (delq article gnus-newsgroup-marked))) | |
5865 | |
5866 (defun gnus-mark-article-as-unread (article &optional clear-mark) | |
5867 "Remember that ARTICLE is marked as unread. | |
5868 Optional argument CLEAR-MARK means ARTICLE should not be remembered | |
5869 that it was marked as read once." | |
5870 ;; Add to unread list. | |
5871 (or (memq article gnus-newsgroup-unreads) | |
5872 (setq gnus-newsgroup-unreads | |
5873 (cons article gnus-newsgroup-unreads))) | |
5874 ;; If CLEAR-MARK is non-nil, the article must be removed from marked | |
5875 ;; list. Otherwise, it must be added to the list. | |
5876 (if clear-mark | |
5877 (setq gnus-newsgroup-marked | |
5878 (delq article gnus-newsgroup-marked)) | |
5879 (or (memq article gnus-newsgroup-marked) | |
5880 (setq gnus-newsgroup-marked | |
5881 (cons article gnus-newsgroup-marked))))) | |
5882 | |
5883 (defun gnus-clear-system () | |
5884 "Clear all variables and buffer." | |
5885 ;; Clear GNUS variables. | |
5886 (let ((variables gnus-variable-list)) | |
5887 (while variables | |
5888 (set (car variables) nil) | |
5889 (setq variables (cdr variables)))) | |
5890 ;; Clear other internal variables. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5891 (setq gnus-newsrc-hashtb nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5892 (setq gnus-marked-hashtb nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5893 (setq gnus-killed-hashtb nil) |
257 | 5894 (setq gnus-active-hashtb nil) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5895 (setq gnus-octive-hashtb nil) |
257 | 5896 (setq gnus-unread-hashtb nil) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5897 (setq gnus-newsgroup-headers nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5898 (setq gnus-newsgroup-headers-hashtb-by-id nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5899 (setq gnus-newsgroup-headers-hashtb-by-number nil) |
257 | 5900 ;; Kill the startup file. |
5901 (and gnus-current-startup-file | |
5902 (get-file-buffer gnus-current-startup-file) | |
5903 (kill-buffer (get-file-buffer gnus-current-startup-file))) | |
5904 (setq gnus-current-startup-file nil) | |
5905 ;; Kill GNUS buffers. | |
5906 (let ((buffers gnus-buffer-list)) | |
5907 (while buffers | |
5908 (if (get-buffer (car buffers)) | |
5909 (kill-buffer (car buffers))) | |
5910 (setq buffers (cdr buffers)) | |
5911 ))) | |
5912 | |
5913 (defun gnus-configure-windows (action) | |
5914 "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
|
5915 The ACTION is either a symbol, such as `summary', or a |
257 | 5916 configuration list such as `(1 1 2)'. If ACTION is not a list, |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
5917 configuration list is got from the variable `gnus-window-configuration'." |
257 | 5918 (let* ((windows |
5919 (if (listp action) | |
5920 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
|
5921 (grpwin (get-buffer-window gnus-group-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5922 (subwin (get-buffer-window gnus-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5923 (artwin (get-buffer-window gnus-article-buffer)) |
257 | 5924 (winsum nil) |
5925 (height nil) | |
5926 (grpheight 0) | |
5927 (subheight 0) | |
9824
1a60406f3d3e
(gnus-configure-windows): Make split-window-keep-point locally t so that focus
Karl Heuer <kwzh@gnu.org>
parents:
9550
diff
changeset
|
5928 (artheight 0) |
1a60406f3d3e
(gnus-configure-windows): Make split-window-keep-point locally t so that focus
Karl Heuer <kwzh@gnu.org>
parents:
9550
diff
changeset
|
5929 ;; Make split-window-vertically leave focus in upper window. |
1a60406f3d3e
(gnus-configure-windows): Make split-window-keep-point locally t so that focus
Karl Heuer <kwzh@gnu.org>
parents:
9550
diff
changeset
|
5930 (split-window-keep-point t)) |
257 | 5931 (if (or (null windows) ;No configuration is specified. |
5932 (and (eq (null grpwin) | |
5933 (zerop (nth 0 windows))) | |
5934 (eq (null subwin) | |
5935 (zerop (nth 1 windows))) | |
5936 (eq (null artwin) | |
5937 (zerop (nth 2 windows))))) | |
5938 ;; No need to change window configuration. | |
5939 nil | |
5940 (select-window (or grpwin subwin artwin (selected-window))) | |
5941 ;; First of all, compute the height of each window. | |
5942 (cond (gnus-use-full-window | |
5943 ;; Take up the entire screen. | |
5944 (delete-other-windows) | |
5945 (setq height (window-height (selected-window)))) | |
5946 (t | |
5947 (setq height (+ (if grpwin (window-height grpwin) 0) | |
5948 (if subwin (window-height subwin) 0) | |
5949 (if artwin (window-height artwin) 0))))) | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
5950 ;; The Newsgroup buffer exits always. So, use it to extend the |
257 | 5951 ;; 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
|
5952 (switch-to-buffer gnus-group-buffer 'norecord) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5953 (and (get-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5954 (delete-windows-on gnus-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5955 (and (get-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5956 (delete-windows-on gnus-article-buffer)) |
257 | 5957 ;; Compute expected window height. |
5958 (setq winsum (apply (function +) windows)) | |
5959 (if (not (zerop (nth 0 windows))) | |
5960 (setq grpheight (max window-min-height | |
5961 (/ (* height (nth 0 windows)) winsum)))) | |
5962 (if (not (zerop (nth 1 windows))) | |
5963 (setq subheight (max window-min-height | |
5964 (/ (* height (nth 1 windows)) winsum)))) | |
5965 (if (not (zerop (nth 2 windows))) | |
5966 (setq artheight (max window-min-height | |
5967 (/ (* height (nth 2 windows)) winsum)))) | |
5968 (setq height (+ grpheight subheight artheight)) | |
5969 (enlarge-window (max 0 (- height (window-height (selected-window))))) | |
5970 ;; Then split the window. | |
5971 (and (not (zerop artheight)) | |
5972 (or (not (zerop grpheight)) | |
5973 (not (zerop subheight))) | |
5974 (split-window-vertically (+ grpheight subheight))) | |
5975 (and (not (zerop grpheight)) | |
5976 (not (zerop subheight)) | |
5977 (split-window-vertically grpheight)) | |
5978 ;; Then select buffers in each window. | |
5979 (and (not (zerop grpheight)) | |
5980 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5981 (switch-to-buffer gnus-group-buffer 'norecord) |
257 | 5982 (other-window 1))) |
5983 (and (not (zerop subheight)) | |
5984 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5985 (switch-to-buffer gnus-summary-buffer 'norecord) |
257 | 5986 (other-window 1))) |
5987 (and (not (zerop artheight)) | |
5988 (progn | |
5989 ;; If Article buffer does not exist, it will be created | |
5990 ;; and initialized. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5991 (gnus-article-setup-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5992 (switch-to-buffer gnus-article-buffer 'norecord))) |
257 | 5993 ) |
5994 )) | |
5995 | |
5996 (defun gnus-find-header-by-number (headers number) | |
5997 "Return a header which is a element of HEADERS and has NUMBER." | |
5998 (let ((found nil)) | |
5999 (while (and headers (not found)) | |
6000 ;; We cannot use `=' to accept non-numeric NUMBER. | |
6001 (if (eq number (nntp-header-number (car headers))) | |
6002 (setq found (car headers))) | |
6003 (setq headers (cdr headers))) | |
6004 found | |
6005 )) | |
6006 | |
6007 (defun gnus-find-header-by-id (headers id) | |
6008 "Return a header which is a element of HEADERS and has Message-ID." | |
6009 (let ((found nil)) | |
6010 (while (and headers (not found)) | |
6011 (if (string-equal id (nntp-header-id (car headers))) | |
6012 (setq found (car headers))) | |
6013 (setq headers (cdr headers))) | |
6014 found | |
6015 )) | |
6016 | |
6017 (defun gnus-version () | |
6018 "Version numbers of this version of GNUS." | |
6019 (interactive) | |
6020 (cond ((and (boundp 'mhspool-version) (boundp 'nnspool-version)) | |
6021 (message "%s; %s; %s; %s" | |
6022 gnus-version nntp-version nnspool-version mhspool-version)) | |
6023 ((boundp 'mhspool-version) | |
6024 (message "%s; %s; %s" | |
6025 gnus-version nntp-version mhspool-version)) | |
6026 ((boundp 'nnspool-version) | |
6027 (message "%s; %s; %s" | |
6028 gnus-version nntp-version nnspool-version)) | |
6029 (t | |
6030 (message "%s; %s" gnus-version nntp-version)))) | |
6031 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6032 (defun gnus-info-find-node () |
257 | 6033 "Find Info documentation of GNUS." |
6034 (interactive) | |
6035 (require 'info) | |
6036 ;; Enlarge info window if needed. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6037 (cond ((eq major-mode 'gnus-group-mode) |
257 | 6038 (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
|
6039 (pop-to-buffer gnus-group-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6040 ((eq major-mode 'gnus-summary-mode) |
257 | 6041 (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
|
6042 (pop-to-buffer gnus-summary-buffer))) |
2845
7a48e4a67e8c
(gnus-info-directory): Variable removed.
Roland McGrath <roland@gnu.org>
parents:
2843
diff
changeset
|
6043 (Info-goto-node (car (cdr (assq major-mode gnus-info-nodes))))) |
257 | 6044 |
6045 (defun gnus-overload-functions (&optional overloads) | |
6046 "Overload functions specified by optional argument OVERLOADS. | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
6047 If nothing is specified, use the variable `gnus-overload-functions'." |
257 | 6048 (let ((defs nil) |
6049 (overloads (or overloads gnus-overload-functions))) | |
6050 (while overloads | |
6051 (setq defs (car overloads)) | |
6052 (setq overloads (cdr overloads)) | |
6053 ;; Load file before overloading function if necessary. Make | |
3591
507f64624555
Apply typo patches from Paul Eggert.
Jim Blandy <jimb@redhat.com>
parents:
3496
diff
changeset
|
6054 ;; sure we cannot use `require' always. |
257 | 6055 (and (not (fboundp (car defs))) |
6056 (car (cdr (cdr defs))) | |
6057 (load (car (cdr (cdr defs))) nil 'nomessage)) | |
6058 (fset (car defs) (car (cdr defs))) | |
6059 ))) | |
6060 | |
6061 (defun gnus-make-threads (newsgroup-headers) | |
6062 "Make conversation threads tree from NEWSGROUP-HEADERS." | |
6063 (let ((headers newsgroup-headers) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6064 (refer nil) |
257 | 6065 (h nil) |
6066 (d nil) | |
6067 (roots nil) | |
6068 (dependencies nil)) | |
6069 ;; Make message dependency alist. | |
6070 (while headers | |
6071 (setq h (car headers)) | |
6072 (setq headers (cdr headers)) | |
6073 ;; Ignore invalid headers. | |
6074 (if (vectorp h) ;Depends on nntp.el. | |
6075 (progn | |
6076 ;; 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
|
6077 (setq refer (nntp-header-references h)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6078 (setq d (and refer |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6079 (string-match "\\(<[^<>]+>\\)[^>]*$" refer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6080 ;; (gnus-find-header-by-id |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6081 ;; newsgroup-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6082 ;; (substring refer (match-beginning 1) (match-end 1))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6083 ;; In fact if the variable newsgroup-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6084 ;; is not 'equal' to the variable |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6085 ;; gnus-newsgroup-headers, the following |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6086 ;; function call may return bogus value. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6087 (gnus-get-header-by-id |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6088 (substring refer (match-beginning 1) (match-end 1))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6089 )) |
257 | 6090 ;; Check subject equality. |
6091 (or gnus-thread-ignore-subject | |
6092 (null d) | |
6093 (string-equal (gnus-simplify-subject | |
6094 (nntp-header-subject h) 're) | |
6095 (gnus-simplify-subject | |
6096 (nntp-header-subject d) 're)) | |
6097 ;; H should be a thread root. | |
6098 (setq d nil)) | |
6099 ;; H depends on D. | |
6100 (setq dependencies | |
6101 (cons (cons h d) dependencies)) | |
6102 ;; H is a thread root. | |
6103 (if (null d) | |
6104 (setq roots (cons h roots))) | |
6105 )) | |
6106 ) | |
6107 ;; Make complete threads from the roots. | |
6108 ;; Note: dependencies are in reverse order, but | |
6109 ;; gnus-make-threads-1 processes it in reverse order again. So, | |
6110 ;; we don't have to worry about it. | |
6111 (mapcar | |
6112 (function | |
6113 (lambda (root) | |
6114 (gnus-make-threads-1 root dependencies))) (nreverse roots)) | |
6115 )) | |
6116 | |
6117 (defun gnus-make-threads-1 (parent dependencies) | |
6118 (let ((children nil) | |
6119 (d nil) | |
6120 (depends dependencies)) | |
6121 ;; Find children. | |
6122 (while depends | |
6123 (setq d (car depends)) | |
6124 (setq depends (cdr depends)) | |
6125 (and (cdr d) | |
6126 (eq (nntp-header-id parent) (nntp-header-id (cdr d))) | |
6127 (setq children (cons (car d) children)))) | |
6128 ;; Go down. | |
6129 (cons parent | |
6130 (mapcar | |
6131 (function | |
6132 (lambda (child) | |
6133 (gnus-make-threads-1 child dependencies))) children)) | |
6134 )) | |
6135 | |
6136 (defun gnus-narrow-to-page (&optional arg) | |
6137 "Make text outside current page invisible except for page delimiter. | |
6138 A numeric arg specifies to move forward or backward by that many pages, | |
6139 thus showing a page other than the one point was originally in." | |
6140 (interactive "P") | |
6141 (setq arg (if arg (prefix-numeric-value arg) 0)) | |
6142 (save-excursion | |
6143 (forward-page -1) ;Beginning of current page. | |
6144 (widen) | |
6145 (if (> arg 0) | |
6146 (forward-page arg) | |
6147 (if (< arg 0) | |
6148 (forward-page (1- arg)))) | |
6149 ;; Find the end of the page. | |
6150 (forward-page) | |
6151 ;; If we stopped due to end of buffer, stay there. | |
6152 ;; If we stopped after a page delimiter, put end of restriction | |
6153 ;; at the beginning of that line. | |
6154 ;; These are commented out. | |
6155 ;; (if (save-excursion (beginning-of-line) | |
6156 ;; (looking-at page-delimiter)) | |
6157 ;; (beginning-of-line)) | |
6158 (narrow-to-region (point) | |
6159 (progn | |
6160 ;; Find the top of the page. | |
6161 (forward-page -1) | |
6162 ;; If we found beginning of buffer, stay there. | |
6163 ;; If extra text follows page delimiter on same line, | |
6164 ;; include it. | |
6165 ;; Otherwise, show text starting with following line. | |
6166 (if (and (eolp) (not (bobp))) | |
6167 (forward-line 1)) | |
6168 (point))) | |
6169 )) | |
6170 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6171 ;; 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
|
6172 ;; gnus-killed-assoc, and gnus-marked-assoc. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6173 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6174 (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
|
6175 "Return hash table for ALIST. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6176 Optional argument HASHSIZE specifies the hashtable size. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6177 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
|
6178 (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
|
6179 (while alist |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6180 (gnus-sethash (car (car alist)) ;Newsgroup name |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6181 (car alist) ;Alist element |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6182 hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6183 (setq alist (cdr alist))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6184 hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6185 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6186 |
257 | 6187 (defun gnus-last-element (list) |
6188 "Return last element of LIST." | |
6189 (let ((last nil)) | |
6190 (while list | |
6191 (if (null (cdr list)) | |
6192 (setq last (car list))) | |
6193 (setq list (cdr list))) | |
6194 last | |
6195 )) | |
6196 | |
6197 (defun gnus-set-difference (list1 list2) | |
6198 "Return a list of elements of LIST1 that do not appear in LIST2." | |
6199 (let ((list1 (copy-sequence list1))) | |
6200 (while list2 | |
6201 (setq list1 (delq (car list2) list1)) | |
6202 (setq list2 (cdr list2))) | |
6203 list1 | |
6204 )) | |
6205 | |
6206 (defun gnus-intersection (list1 list2) | |
6207 "Return a list of elements that appear in both LIST1 and LIST2." | |
6208 (let ((result nil)) | |
6209 (while list2 | |
6210 (if (memq (car list2) list1) | |
6211 (setq result (cons (car list2) result))) | |
6212 (setq list2 (cdr list2))) | |
6213 result | |
6214 )) | |
6215 | |
6216 | |
6217 ;;; | |
6218 ;;; Get information about active articles, already read articles, and | |
6219 ;;; still unread articles. | |
6220 ;;; | |
6221 | |
6222 ;; GNUS internal format of gnus-newsrc-assoc and gnus-killed-assoc: | |
6223 ;; (("general" t (1 . 1)) | |
6224 ;; ("misc" t (1 . 10) (12 . 15)) | |
6225 ;; ("test" nil (1 . 99)) ...) | |
6226 ;; GNUS internal format of gnus-marked-assoc: | |
6227 ;; (("general" 1 2 3) | |
6228 ;; ("misc" 2) ...) | |
6229 ;; GNUS internal format of gnus-active-hashtb: | |
6230 ;; (("general" t (1 . 1)) | |
6231 ;; ("misc" t (1 . 10)) | |
6232 ;; ("test" nil (1 . 99)) ...) | |
6233 ;; GNUS internal format of gnus-unread-hashtb: | |
6234 ;; (("general" 1 (1 . 1)) | |
6235 ;; ("misc" 14 (1 . 10) (12 . 15)) | |
6236 ;; ("test" 99 (1 . 99)) ...) | |
6237 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6238 (defun gnus-setup-news (&optional rawfile) |
257 | 6239 "Setup news information. |
6240 If optional argument RAWFILE is non-nil, force to read raw startup file." | |
6241 (let ((init (not (and gnus-newsrc-assoc | |
6242 gnus-active-hashtb | |
6243 gnus-unread-hashtb | |
6244 (not rawfile) | |
6245 )))) | |
6246 ;; We have to clear some variables to re-initialize news info. | |
6247 (if init | |
6248 (setq gnus-newsrc-assoc nil | |
6249 gnus-active-hashtb nil | |
6250 gnus-unread-hashtb nil)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6251 (gnus-read-active-file) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6252 ;; Initialize only once. |
257 | 6253 (if init |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6254 (progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6255 ;; Get distributions only once. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6256 (gnus-read-distributions-file) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6257 ;; 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
|
6258 ;; 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
|
6259 (gnus-read-newsrc-file rawfile) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6260 )) |
257 | 6261 (gnus-expire-marked-articles) |
6262 (gnus-get-unread-articles) | |
6263 ;; Check new newsgroups and subscribe them. | |
6264 (if init | |
6265 (let ((new-newsgroups (gnus-find-new-newsgroups))) | |
6266 (while new-newsgroups | |
6267 (funcall gnus-subscribe-newsgroup-method (car new-newsgroups)) | |
6268 (setq new-newsgroups (cdr new-newsgroups)) | |
6269 ))) | |
6270 )) | |
6271 | |
6272 (defun gnus-add-newsgroup (newsgroup) | |
6273 "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
|
6274 (and (null (gnus-gethash newsgroup gnus-newsrc-hashtb)) ;Really new? |
257 | 6275 (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
|
6276 (gnus-insert-newsgroup (or (gnus-gethash newsgroup gnus-killed-hashtb) |
257 | 6277 (list newsgroup t)) |
6278 (car (car gnus-newsrc-assoc))))) | |
6279 | |
6280 (defun gnus-find-new-newsgroups () | |
6281 "Looking for new newsgroups and return names. | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
6282 `-n' option of options line in `.newsrc' file is recognized." |
257 | 6283 (let ((group nil) |
6284 (new-newsgroups nil)) | |
6285 (mapatoms | |
6286 (function | |
6287 (lambda (sym) | |
6288 (setq group (symbol-name sym)) | |
6289 ;; Taking account of `-n' option. | |
6290 (and (or (null gnus-newsrc-options-n-no) | |
6291 (not (string-match gnus-newsrc-options-n-no group)) | |
6292 (and gnus-newsrc-options-n-yes | |
6293 (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
|
6294 (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
|
6295 (null (gnus-gethash group gnus-newsrc-hashtb)) ;Really new. |
257 | 6296 ;; Find new newsgroup. |
6297 (setq new-newsgroups | |
6298 (cons group new-newsgroups))) | |
6299 )) | |
6300 gnus-active-hashtb) | |
6301 ;; Return new newsgroups. | |
6302 new-newsgroups | |
6303 )) | |
6304 | |
6305 (defun gnus-kill-newsgroup (group) | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
6306 "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
|
6307 (let ((info (gnus-gethash group gnus-newsrc-hashtb))) |
257 | 6308 (if (null info) |
6309 nil | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6310 ;; Delete from gnus-newsrc-assoc and gnus-newsrc-hashtb. |
257 | 6311 (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
|
6312 (gnus-sethash group nil gnus-newsrc-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6313 ;; Add to gnus-killed-assoc and gnus-killed-hashtb. |
257 | 6314 (setq gnus-killed-assoc |
6315 (cons info | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6316 (delq (gnus-gethash group gnus-killed-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6317 gnus-killed-assoc))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6318 (gnus-sethash group info gnus-killed-hashtb) |
257 | 6319 ;; Clear unread hashtable. |
6320 ;; Thanks cwitty@csli.Stanford.EDU (Carl Witty). | |
6321 (gnus-sethash group nil gnus-unread-hashtb) | |
6322 ;; Then delete from .newsrc | |
6323 (gnus-update-newsrc-buffer group 'delete) | |
6324 ;; Return the deleted newsrc entry. | |
6325 info | |
6326 ))) | |
6327 | |
6328 (defun gnus-insert-newsgroup (info &optional next) | |
6329 "Insert newsrc INFO entry before NEXT. | |
6330 If optional argument NEXT is nil, appended to the last." | |
6331 (if (null info) | |
6332 (error "Invalid argument: %s" info)) | |
6333 (let* ((group (car info)) ;Newsgroup name. | |
6334 (range | |
6335 (gnus-difference-of-range | |
6336 (nth 2 (gnus-gethash group gnus-active-hashtb)) (nthcdr 2 info)))) | |
6337 ;; Check duplication. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6338 (if (gnus-gethash group gnus-newsrc-hashtb) |
257 | 6339 (error "Duplicated: %s" group)) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6340 ;; Insert to gnus-newsrc-assoc and gnus-newsrc-hashtb. |
257 | 6341 (if (string-equal next (car (car gnus-newsrc-assoc))) |
6342 (setq gnus-newsrc-assoc | |
6343 (cons info gnus-newsrc-assoc)) | |
6344 (let ((found nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6345 (rest (cdr gnus-newsrc-assoc)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6346 (tail gnus-newsrc-assoc)) |
257 | 6347 ;; Seach insertion point. |
6348 (while (and (not found) rest) | |
6349 (if (string-equal next (car (car rest))) | |
6350 (setq found t) | |
6351 (setq rest (cdr rest)) | |
6352 (setq tail (cdr tail)) | |
6353 )) | |
6354 ;; Find it. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6355 (if (consp tail) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6356 (setcdr tail (cons info rest)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6357 ;; gnus-newsrc-assoc must be nil. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6358 (setq gnus-newsrc-assoc |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6359 (append gnus-newsrc-assoc (cons info rest)))) |
257 | 6360 )) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6361 (gnus-sethash group info gnus-newsrc-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6362 ;; Delete from gnus-killed-assoc and gnus-killed-hashtb. |
257 | 6363 (setq gnus-killed-assoc |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6364 (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
|
6365 (gnus-sethash group nil gnus-killed-hashtb) |
257 | 6366 ;; Then insert to .newsrc. |
6367 (gnus-update-newsrc-buffer group nil next) | |
6368 ;; Add to gnus-unread-hashtb. | |
6369 (gnus-sethash group | |
6370 (cons group ;Newsgroup name. | |
6371 (cons (gnus-number-of-articles range) range)) | |
6372 gnus-unread-hashtb) | |
6373 )) | |
6374 | |
6375 (defun gnus-check-killed-newsgroups () | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
6376 "Update `gnus-killed-assoc' based on `gnus-newsrc-assoc'. |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
6377 Update `gnus-killed-hashtb' also." |
257 | 6378 (let ((group nil) |
6379 (new-killed nil) | |
6380 (old-killed gnus-killed-assoc)) | |
6381 (while old-killed | |
6382 (setq group (car (car old-killed))) | |
6383 (and (or (null gnus-newsrc-options-n-no) | |
6384 (not (string-match gnus-newsrc-options-n-no group)) | |
6385 (and gnus-newsrc-options-n-yes | |
6386 (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
|
6387 (null (gnus-gethash group gnus-newsrc-hashtb)) ;No duplication. |
257 | 6388 ;; Subscribed in options line and not in gnus-newsrc-assoc. |
6389 (setq new-killed | |
6390 (cons (car old-killed) new-killed))) | |
6391 (setq old-killed (cdr old-killed)) | |
6392 ) | |
6393 (setq gnus-killed-assoc (nreverse new-killed)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6394 (setq gnus-killed-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6395 (gnus-make-hashtable-from-alist gnus-killed-assoc)) |
257 | 6396 )) |
6397 | |
6398 (defun gnus-check-bogus-newsgroups (&optional confirm) | |
6399 "Delete bogus newsgroups. | |
6400 If optional argument CONFIRM is non-nil, confirm deletion of newsgroups." | |
6401 (let ((group nil) ;Newsgroup name temporary used. | |
6402 (old-newsrc gnus-newsrc-assoc) | |
6403 (new-newsrc nil) | |
6404 (bogus nil) ;List of bogus newsgroups. | |
6405 (old-killed gnus-killed-assoc) | |
6406 (new-killed nil) | |
6407 (old-marked gnus-marked-assoc) | |
6408 (new-marked nil)) | |
6409 (message "Checking bogus newsgroups...") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6410 ;; Update gnus-newsrc-assoc and gnus-newsrc-hashtb. |
257 | 6411 (while old-newsrc |
6412 (setq group (car (car old-newsrc))) | |
6413 (if (or (gnus-gethash group gnus-active-hashtb) | |
6414 (and confirm | |
6415 (not (y-or-n-p | |
6416 (format "Delete bogus newsgroup: %s " group))))) | |
6417 ;; Active newsgroup. | |
6418 (setq new-newsrc (cons (car old-newsrc) new-newsrc)) | |
6419 ;; Found a bogus newsgroup. | |
6420 (setq bogus (cons group bogus))) | |
6421 (setq old-newsrc (cdr old-newsrc)) | |
6422 ) | |
6423 (setq gnus-newsrc-assoc (nreverse new-newsrc)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6424 (setq gnus-newsrc-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6425 (gnus-make-hashtable-from-alist gnus-newsrc-assoc)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6426 ;; Update gnus-killed-assoc and gnus-killed-hashtb. |
257 | 6427 ;; The killed newsgroups are deleted without any confirmations. |
6428 (while old-killed | |
6429 (setq group (car (car old-killed))) | |
6430 (and (gnus-gethash group gnus-active-hashtb) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6431 (null (gnus-gethash group gnus-newsrc-hashtb)) |
257 | 6432 ;; Active and really killed newsgroup. |
6433 (setq new-killed (cons (car old-killed) new-killed))) | |
6434 (setq old-killed (cdr old-killed)) | |
6435 ) | |
6436 (setq gnus-killed-assoc (nreverse new-killed)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6437 (setq gnus-killed-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6438 (gnus-make-hashtable-from-alist gnus-killed-assoc)) |
257 | 6439 ;; Remove BOGUS from .newsrc file. |
6440 (while bogus | |
6441 (gnus-update-newsrc-buffer (car bogus) 'delete) | |
6442 (setq bogus (cdr bogus))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6443 ;; Update gnus-marked-assoc and gnus-marked-hashtb. |
257 | 6444 (while old-marked |
6445 (setq group (car (car old-marked))) | |
6446 (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
|
6447 (gnus-gethash group gnus-newsrc-hashtb)) ;Not bogus? |
257 | 6448 (setq new-marked (cons (car old-marked) new-marked))) |
6449 (setq old-marked (cdr old-marked))) | |
6450 (setq gnus-marked-assoc new-marked) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6451 (setq gnus-marked-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6452 (gnus-make-hashtable-from-alist gnus-marked-assoc)) |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
6453 (message "Checking bogus newsgroups...done") |
257 | 6454 )) |
6455 | |
6456 (defun gnus-get-unread-articles () | |
6457 "Compute diffs between active and read articles." | |
6458 (let ((read gnus-newsrc-assoc) | |
6459 (group-info nil) | |
6460 (group-name nil) | |
6461 (active nil) | |
6462 (range nil)) | |
6463 (message "Checking new news...") | |
6464 (or gnus-unread-hashtb | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6465 (setq gnus-unread-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6466 (gnus-make-hashtable (length gnus-active-hashtb)))) |
257 | 6467 (while read |
6468 (setq group-info (car read)) ;About one newsgroup | |
6469 (setq group-name (car group-info)) | |
6470 (setq active (nth 2 (gnus-gethash group-name gnus-active-hashtb))) | |
6471 (if (and gnus-octive-hashtb | |
6472 ;; Is nothing changed? | |
6473 (equal active | |
6474 (nth 2 (gnus-gethash group-name gnus-octive-hashtb))) | |
6475 ;; Is this newsgroup in the unread hash table? | |
6476 (gnus-gethash group-name gnus-unread-hashtb) | |
6477 ) | |
6478 nil ;Nothing to do. | |
6479 (setq range (gnus-difference-of-range active (nthcdr 2 group-info))) | |
6480 (gnus-sethash group-name | |
6481 (cons group-name ;Group name | |
6482 (cons (gnus-number-of-articles range) | |
6483 range)) ;Range of unread articles | |
6484 gnus-unread-hashtb) | |
6485 ) | |
6486 (setq read (cdr read)) | |
6487 ) | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
6488 (message "Checking new news...done") |
257 | 6489 )) |
6490 | |
6491 (defun gnus-expire-marked-articles () | |
6492 "Check expired article which is marked as unread." | |
6493 (let ((marked-assoc gnus-marked-assoc) | |
6494 (updated-assoc nil) | |
6495 (marked nil) ;Current marked info. | |
6496 (articles nil) ;List of marked articles. | |
6497 (updated nil) ;List of real marked. | |
6498 (begin nil)) | |
6499 (while marked-assoc | |
6500 (setq marked (car marked-assoc)) | |
6501 (setq articles (cdr marked)) | |
6502 (setq updated nil) | |
6503 (setq begin | |
6504 (car (nth 2 (gnus-gethash (car marked) gnus-active-hashtb)))) | |
6505 (while (and begin articles) | |
6506 (if (>= (car articles) begin) | |
6507 ;; This article is still active. | |
6508 (setq updated (cons (car articles) updated))) | |
6509 (setq articles (cdr articles))) | |
6510 (if updated | |
6511 (setq updated-assoc | |
6512 (cons (cons (car marked) updated) updated-assoc))) | |
6513 (setq marked-assoc (cdr marked-assoc))) | |
6514 (setq gnus-marked-assoc updated-assoc) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6515 (setq gnus-marked-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6516 (gnus-make-hashtable-from-alist gnus-marked-assoc)) |
257 | 6517 )) |
6518 | |
6519 (defun gnus-mark-as-read-by-xref | |
6520 (group headers unreads &optional subscribed-only) | |
6521 "Mark articles as read using cross references and return updated newsgroups. | |
6522 Arguments are GROUP, HEADERS, UNREADS, and optional SUBSCRIBED-ONLY." | |
6523 (let ((xref-list nil) | |
6524 (header nil) | |
6525 (xrefs nil) ;One Xref: field info. | |
6526 (xref nil) ;(NEWSGROUP . ARTICLE) | |
6527 (gname nil) ;Newsgroup name | |
6528 (article nil)) ;Article number | |
6529 (while headers | |
6530 (setq header (car headers)) | |
6531 (if (memq (nntp-header-number header) unreads) | |
6532 ;; This article is not yet marked as read. | |
6533 nil | |
6534 (setq xrefs (gnus-parse-xref-field (nntp-header-xref header))) | |
6535 ;; For each cross reference info. in one Xref: field. | |
6536 (while xrefs | |
6537 (setq xref (car xrefs)) | |
6538 (setq gname (car xref)) ;Newsgroup name | |
6539 (setq article (cdr xref)) ;Article number | |
6540 (or (string-equal group gname) ;Ignore current newsgroup. | |
6541 ;; Ignore unsubscribed newsgroup if requested. | |
6542 (and subscribed-only | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6543 (not (nth 1 (gnus-gethash gname gnus-newsrc-hashtb)))) |
257 | 6544 ;; Ignore article marked as unread. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6545 (memq article (cdr (gnus-gethash gname gnus-marked-hashtb))) |
257 | 6546 (let ((group-xref (assoc gname xref-list))) |
6547 (if group-xref | |
6548 (if (memq article (cdr group-xref)) | |
6549 nil ;Alread marked. | |
6550 (setcdr group-xref (cons article (cdr group-xref)))) | |
6551 ;; Create new assoc entry for GROUP. | |
6552 (setq xref-list (cons (list gname article) xref-list))) | |
6553 )) | |
6554 (setq xrefs (cdr xrefs)) | |
6555 )) | |
6556 (setq headers (cdr headers))) | |
6557 ;; Mark cross referenced articles as read. | |
6558 (gnus-mark-xrefed-as-read xref-list) | |
6559 ;;(message "%s %s" (prin1-to-string unreads) (prin1-to-string xref-list)) | |
6560 ;; Return list of updated group name. | |
6561 (mapcar (function car) xref-list) | |
6562 )) | |
6563 | |
6564 (defun gnus-parse-xref-field (xref-value) | |
6565 "Parse Xref: field value, and return list of `(group . article-id)'." | |
6566 (let ((xref-list nil) | |
6567 (xref-value (or xref-value ""))) | |
6568 ;; Remove server host name. | |
6569 (if (string-match "^[ \t]*[^ \t,]+[ \t,]+\\(.*\\)$" xref-value) | |
6570 (setq xref-value (substring xref-value (match-beginning 1))) | |
6571 (setq xref-value nil)) | |
6572 ;; Process each xref info. | |
6573 (while xref-value | |
6574 (if (string-match | |
6575 "^[ \t,]*\\([^ \t,]+\\):\\([0-9]+\\)[^0-9]*" xref-value) | |
6576 (progn | |
6577 (setq xref-list | |
6578 (cons | |
6579 (cons | |
6580 ;; Group name | |
6581 (substring xref-value (match-beginning 1) (match-end 1)) | |
6582 ;; Article-ID | |
6583 (string-to-int | |
6584 (substring xref-value (match-beginning 2) (match-end 2)))) | |
6585 xref-list)) | |
6586 (setq xref-value (substring xref-value (match-end 2)))) | |
6587 (setq xref-value nil))) | |
6588 ;; Return alist. | |
6589 xref-list | |
6590 )) | |
6591 | |
6592 (defun gnus-mark-xrefed-as-read (xrefs) | |
6593 "Update unread article information using XREFS alist." | |
6594 (let ((group nil) | |
6595 (idlist nil) | |
6596 (unread nil)) | |
6597 (while xrefs | |
6598 (setq group (car (car xrefs))) | |
6599 (setq idlist (cdr (car xrefs))) | |
6600 (setq unread (gnus-uncompress-sequence | |
6601 (nthcdr 2 (gnus-gethash group gnus-unread-hashtb)))) | |
6602 (while idlist | |
6603 (setq unread (delq (car idlist) unread)) | |
6604 (setq idlist (cdr idlist))) | |
6605 (gnus-update-unread-articles group unread 'ignore) | |
6606 (setq xrefs (cdr xrefs)) | |
6607 ))) | |
6608 | |
6609 (defun gnus-update-unread-articles (group unread-list marked-list) | |
6610 "Update unread articles of GROUP using UNREAD-LIST and MARKED-LIST." | |
6611 (let ((active (nth 2 (gnus-gethash group gnus-active-hashtb))) | |
6612 (unread (gnus-gethash group gnus-unread-hashtb))) | |
6613 (if (or (null active) (null unread)) | |
6614 ;; Ignore unknown newsgroup. | |
6615 nil | |
6616 ;; Update gnus-unread-hashtb. | |
6617 (if unread-list | |
6618 (setcdr (cdr unread) | |
6619 (gnus-compress-sequence unread-list)) | |
6620 ;; All of the articles are read. | |
6621 (setcdr (cdr unread) '((0 . 0)))) | |
6622 ;; Number of unread articles. | |
6623 (setcar (cdr unread) | |
6624 (gnus-number-of-articles (nthcdr 2 unread))) | |
6625 ;; Update gnus-newsrc-assoc. | |
6626 (if (> (car active) 0) | |
6627 ;; Articles from 1 to N are not active. | |
6628 (setq active (cons 1 (cdr active)))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6629 (setcdr (cdr (gnus-gethash group gnus-newsrc-hashtb)) |
257 | 6630 (gnus-difference-of-range active (nthcdr 2 unread))) |
6631 ;; Update .newsrc buffer. | |
6632 (gnus-update-newsrc-buffer group) | |
6633 ;; Update gnus-marked-assoc. | |
6634 (if (listp marked-list) ;Includes NIL. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6635 (let ((marked (gnus-gethash group gnus-marked-hashtb))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6636 (cond (marked ;There is an entry. |
257 | 6637 (setcdr marked marked-list)) |
6638 (marked-list ;Non-NIL. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6639 (let ((info (cons group marked-list))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6640 ;; hashtb must share the same cons cell. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6641 (setq gnus-marked-assoc |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6642 (cons info gnus-marked-assoc)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6643 (gnus-sethash group info gnus-marked-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6644 )) |
257 | 6645 ))) |
6646 ))) | |
6647 | |
6648 (defun gnus-read-active-file () | |
6649 "Get active file from NNTP server." | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6650 ;; 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
|
6651 (gnus-start-news-server) |
257 | 6652 (message "Reading active file...") |
6653 (if (gnus-request-list) ;Get active file from server | |
6654 (save-excursion | |
6655 (set-buffer nntp-server-buffer) | |
6656 (gnus-active-to-gnus-format) | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
6657 (message "Reading active file...done")) |
257 | 6658 (error "Cannot read active file from NNTP server."))) |
6659 | |
6660 (defun gnus-active-to-gnus-format () | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6661 "Convert active file format to internal format. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
6662 Lines matching `gnus-ignored-newsgroups' are ignored." |
257 | 6663 ;; Delete unnecessary lines. |
6664 (goto-char (point-min)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6665 ;;(delete-matching-lines "^to\\..*$") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6666 (delete-matching-lines gnus-ignored-newsgroups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6667 ;; Save OLD active info. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6668 (setq gnus-octive-hashtb gnus-active-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6669 ;; Make large enough hash table. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6670 (setq gnus-active-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6671 (gnus-make-hashtable (count-lines (point-min) (point-max)))) |
257 | 6672 ;; Store active file in hashtable. |
6673 (goto-char (point-min)) | |
6674 (while | |
6675 (re-search-forward | |
6676 "^\\([^ \t]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\([ymn]\\).*$" | |
6677 nil t) | |
6678 (gnus-sethash | |
6679 (buffer-substring (match-beginning 1) (match-end 1)) | |
6680 (list (buffer-substring (match-beginning 1) (match-end 1)) | |
6681 (string-equal | |
6682 "y" (buffer-substring (match-beginning 4) (match-end 4))) | |
6683 (cons (string-to-int | |
6684 (buffer-substring (match-beginning 3) (match-end 3))) | |
6685 (string-to-int | |
6686 (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
|
6687 gnus-active-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6688 )) |
257 | 6689 |
6690 (defun gnus-read-newsrc-file (&optional rawfile) | |
6691 "Read startup FILE. | |
6692 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
|
6693 (setq gnus-current-startup-file (gnus-make-newsrc-file gnus-startup-file)) |
257 | 6694 ;; Reset variables which may be included in the quick startup file. |
6695 (let ((variables gnus-variable-list)) | |
6696 (while variables | |
6697 (set (car variables) nil) | |
6698 (setq variables (cdr variables)))) | |
6699 (let* ((newsrc-file gnus-current-startup-file) | |
6700 (quick-file (concat newsrc-file ".el")) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6701 (quick-loaded nil)) |
257 | 6702 (save-excursion |
6703 ;; Prepare .newsrc buffer. | |
6704 (set-buffer (find-file-noselect newsrc-file)) | |
6705 ;; 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
|
6706 ;;(buffer-flush-undo (current-buffer)) |
257 | 6707 ;; Load quick .newsrc to restore gnus-marked-assoc and |
6708 ;; gnus-killed-assoc even if gnus-newsrc-assoc is out of date. | |
6709 (condition-case nil | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6710 (progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6711 (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
|
6712 ;; Recreate hashtables. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6713 (setq gnus-killed-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6714 (gnus-make-hashtable-from-alist gnus-killed-assoc)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6715 (setq gnus-marked-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6716 (gnus-make-hashtable-from-alist gnus-marked-assoc)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6717 ) |
257 | 6718 (error nil)) |
6719 (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
|
6720 ;; .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
|
6721 ;; 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
|
6722 ;; (on fast machines/disks). |
9eaa2151f7f6
(gnus-summary-isearch-article): Call isearch-forward
Richard M. Stallman <rms@gnu.org>
parents:
3331
diff
changeset
|
6723 (not (file-newer-than-file-p newsrc-file quick-file)) |
257 | 6724 quick-loaded |
6725 gnus-newsrc-assoc ;Really loaded? | |
6726 ) | |
6727 ;; 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
|
6728 ;; 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
|
6729 ;; So, we have to define the hashtable here. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6730 (setq gnus-newsrc-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6731 (gnus-make-hashtable-from-alist gnus-newsrc-assoc))) |
257 | 6732 (t |
6733 ;; Since .newsrc file is newer than quick file, read it. | |
6734 (message "Reading %s..." newsrc-file) | |
6735 (gnus-newsrc-to-gnus-format) | |
6736 (gnus-check-killed-newsgroups) | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
6737 (message "Reading %s...done" newsrc-file))) |
257 | 6738 ))) |
6739 | |
6740 (defun gnus-make-newsrc-file (file) | |
6741 "Make server dependent file name by catenating FILE and server host name." | |
6742 (let* ((file (expand-file-name file nil)) | |
6743 (real-file (concat file "-" gnus-nntp-server))) | |
6744 (if (file-exists-p real-file) | |
6745 real-file file) | |
6746 )) | |
6747 | |
6748 (defun gnus-newsrc-to-gnus-format () | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
6749 "Parse current buffer as `.newsrc' file." |
257 | 6750 (let ((newsgroup nil) |
6751 (subscribe nil) | |
6752 (ranges nil) | |
6753 (subrange nil) | |
6754 (read-list nil)) | |
6755 ;; We have to re-initialize these variable (except for | |
6756 ;; gnus-marked-assoc and gnus-killed-assoc) because quick startup | |
6757 ;; file may contain bogus values. | |
6758 (setq gnus-newsrc-options nil) | |
6759 (setq gnus-newsrc-options-n-yes nil) | |
6760 (setq gnus-newsrc-options-n-no nil) | |
6761 (setq gnus-newsrc-assoc nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6762 ;; Make large enough hash table. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6763 (setq gnus-newsrc-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6764 (gnus-make-hashtable |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6765 (max (length gnus-active-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6766 (count-lines (point-min) (point-max))))) |
257 | 6767 ;; Save options line to variable. |
6768 ;; Lines beginning with white spaces are treated as continuation | |
6769 ;; line. Refer man page of newsrc(5). | |
6770 (goto-char (point-min)) | |
6771 (if (re-search-forward | |
6772 "^[ \t]*options[ \t]*\\(.*\\(\n[ \t]+.*\\)*\\)[ \t]*$" nil t) | |
6773 (progn | |
6774 ;; Save entire options line. | |
6775 (setq gnus-newsrc-options | |
6776 (buffer-substring (match-beginning 1) (match-end 1))) | |
6777 ;; Compile "-n" option. | |
6778 (if (string-match "\\(^\\|[ \t\n]\\)-n" gnus-newsrc-options) | |
6779 (let ((yes-and-no | |
6780 (gnus-parse-n-options | |
6781 (substring gnus-newsrc-options (match-end 0))))) | |
6782 (setq gnus-newsrc-options-n-yes (car yes-and-no)) | |
6783 (setq gnus-newsrc-options-n-no (cdr yes-and-no)) | |
6784 )) | |
6785 )) | |
6786 ;; Parse body of .newsrc file | |
6787 ;; Options line continuation lines must be also considered here. | |
6788 ;; Before supporting continuation lines, " newsgroup ! 1-5" was | |
6789 ;; okay, but now it is invalid. It should be "newsgroup! 1-5". | |
6790 (goto-char (point-min)) | |
7793
4a683dc76931
(gnus-newsrc-to-gnus-format): In main loop,
Richard M. Stallman <rms@gnu.org>
parents:
7705
diff
changeset
|
6791 ;; We used this regexp, but it caused overflows. |
257 | 6792 ;; "^\\([^:! \t\n]+\\)\\([:!]\\)[ \t]*\\(.*\\)$" |
3610
b0c94b723e6a
* gnus.el (gnus-newsrc-to-gnus-format): Change regexp which
Jim Blandy <jimb@redhat.com>
parents:
3591
diff
changeset
|
6793 ;; Suggested by composer@bucsf.bu.edu (Jeff Kellem) |
b0c94b723e6a
* gnus.el (gnus-newsrc-to-gnus-format): Change regexp which
Jim Blandy <jimb@redhat.com>
parents:
3591
diff
changeset
|
6794 ;; but no longer viable because of extensive backtracking in Emacs 19: |
4173
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
6795 ;; "^\\([^:! \t\n]+\\)\\([:!]\\)[ \t]*\\(\\(...\\)*.*\\)$" |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
6796 ;; but, the following causes trouble on some case: |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
6797 ;; "^\\([^:! \t\n]+\\)\\([:!]\\)[ \t]*\\(\\|[^ \t\n].*\\)$" |
7793
4a683dc76931
(gnus-newsrc-to-gnus-format): In main loop,
Richard M. Stallman <rms@gnu.org>
parents:
7705
diff
changeset
|
6798 ;; So now we don't try to match the tail of the line at all. |
4a683dc76931
(gnus-newsrc-to-gnus-format): In main loop,
Richard M. Stallman <rms@gnu.org>
parents:
7705
diff
changeset
|
6799 ;; It's just as easy to extract it later. |
4a683dc76931
(gnus-newsrc-to-gnus-format): In main loop,
Richard M. Stallman <rms@gnu.org>
parents:
7705
diff
changeset
|
6800 (while (re-search-forward "^\\([^:! \t\n]+\\)\\([:!]\\)" |
4a683dc76931
(gnus-newsrc-to-gnus-format): In main loop,
Richard M. Stallman <rms@gnu.org>
parents:
7705
diff
changeset
|
6801 nil t) |
257 | 6802 (setq newsgroup (buffer-substring (match-beginning 1) (match-end 1))) |
6803 ;; Check duplications of newsgroups. | |
6804 ;; 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
|
6805 (if (gnus-gethash newsgroup gnus-newsrc-hashtb) |
257 | 6806 (message "Ignore duplicated newsgroup: %s" newsgroup) |
6807 (setq subscribe | |
6808 (string-equal | |
6809 ":" (buffer-substring (match-beginning 2) (match-end 2)))) | |
7793
4a683dc76931
(gnus-newsrc-to-gnus-format): In main loop,
Richard M. Stallman <rms@gnu.org>
parents:
7705
diff
changeset
|
6810 (skip-chars-forward " \t") |
4a683dc76931
(gnus-newsrc-to-gnus-format): In main loop,
Richard M. Stallman <rms@gnu.org>
parents:
7705
diff
changeset
|
6811 (setq ranges (buffer-substring (point) (save-excursion |
4a683dc76931
(gnus-newsrc-to-gnus-format): In main loop,
Richard M. Stallman <rms@gnu.org>
parents:
7705
diff
changeset
|
6812 (end-of-line) (point)))) |
257 | 6813 (setq read-list nil) |
6814 (while (string-match "^[, \t]*\\([0-9-]+\\)" ranges) | |
6815 (setq subrange (substring ranges (match-beginning 1) (match-end 1))) | |
6816 (setq ranges (substring ranges (match-end 1))) | |
6817 (cond ((string-match "^\\([0-9]+\\)-\\([0-9]+\\)$" subrange) | |
6818 (setq read-list | |
6819 (cons | |
6820 (cons (string-to-int | |
6821 (substring subrange | |
6822 (match-beginning 1) (match-end 1))) | |
6823 (string-to-int | |
6824 (substring subrange | |
6825 (match-beginning 2) (match-end 2)))) | |
6826 read-list))) | |
6827 ((string-match "^[0-9]+$" subrange) | |
6828 (setq read-list | |
6829 (cons (cons (string-to-int subrange) | |
6830 (string-to-int subrange)) | |
6831 read-list))) | |
6832 (t | |
6833 (ding) (message "Ignoring bogus lines of %s" newsgroup) | |
6834 (sit-for 0)) | |
6835 )) | |
6836 (setq gnus-newsrc-assoc | |
6837 (cons (cons newsgroup (cons subscribe (nreverse read-list))) | |
6838 gnus-newsrc-assoc)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6839 ;; Update gnus-newsrc-hashtb one by one. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6840 (gnus-sethash newsgroup (car gnus-newsrc-assoc) gnus-newsrc-hashtb) |
257 | 6841 )) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6842 (setq gnus-newsrc-assoc (nreverse gnus-newsrc-assoc)) |
257 | 6843 )) |
6844 | |
6845 (defun gnus-parse-n-options (options) | |
6846 "Parse -n NEWSGROUPS options and return a cons of YES and NO regexps." | |
6847 (let ((yes nil) | |
6848 (no nil) | |
6849 (yes-or-no nil) ;`!' or not. | |
6850 (newsgroup nil)) | |
6851 ;; Parse each newsgroup description such as "comp.all". Commas | |
6852 ;; and white spaces can be a newsgroup separator. | |
6853 (while | |
6309
9217f29851c2
Don't use triple-hyphen in a character class.
Karl Heuer <kwzh@gnu.org>
parents:
5911
diff
changeset
|
6854 (string-match "^[ \t\n,]*\\(!?\\)\\([^- \t\n,][^ \t\n,]*\\)" options) |
257 | 6855 (setq yes-or-no |
6856 (substring options (match-beginning 1) (match-end 1))) | |
6857 (setq newsgroup | |
6858 (regexp-quote | |
6859 (substring options | |
6860 (match-beginning 2) (match-end 2)))) | |
6861 (setq options (substring options (match-end 2))) | |
6862 ;; Rewrite "all" to ".+" not ".*". ".+" requires at least one | |
6863 ;; character. | |
6864 (while (string-match "\\(^\\|\\\\[.]\\)all\\(\\\\[.]\\|$\\)" newsgroup) | |
6865 (setq newsgroup | |
6866 (concat (substring newsgroup 0 (match-end 1)) | |
6867 ".+" | |
6868 (substring newsgroup (match-beginning 2))))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6869 ;; It is yes or no. |
257 | 6870 (cond ((string-equal yes-or-no "!") |
6871 (setq no (cons newsgroup no))) | |
6872 ((string-equal newsgroup ".+")) ;Ignore `all'. | |
6873 (t | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6874 (setq yes (cons newsgroup yes)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6875 ) |
257 | 6876 ;; 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
|
6877 ;; 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
|
6878 ;; 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
|
6879 ;; "jp.network". |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6880 ;; Fixes for large regexp problems are from yonezu@nak.math.keio.ac.jp. |
257 | 6881 (cons (if yes |
6882 (concat "^\\(" | |
6883 (apply (function concat) | |
6884 (mapcar | |
6885 (function | |
6886 (lambda (newsgroup) | |
6887 (concat newsgroup "\\|"))) | |
6888 (cdr yes))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6889 (car yes) "\\)\\(\\.\\|$\\)")) |
257 | 6890 (if no |
6891 (concat "^\\(" | |
6892 (apply (function concat) | |
6893 (mapcar | |
6894 (function | |
6895 (lambda (newsgroup) | |
6896 (concat newsgroup "\\|"))) | |
6897 (cdr no))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6898 (car no) "\\)\\(\\.\\|$\\)"))) |
257 | 6899 )) |
6900 | |
6901 (defun gnus-save-newsrc-file () | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
6902 "Save current status in the `.newsrc' file." |
257 | 6903 ;; Note: We cannot save .newsrc file if all newsgroups are removed |
6904 ;; from the variable gnus-newsrc-assoc. | |
6905 (and (or gnus-newsrc-assoc gnus-killed-assoc) | |
6906 gnus-current-startup-file | |
6907 (save-excursion | |
6908 ;; A buffer containing .newsrc file may be deleted. | |
6909 (set-buffer (find-file-noselect gnus-current-startup-file)) | |
6910 (if (not (buffer-modified-p)) | |
6911 (message "(No changes need to be saved)") | |
6912 (message "Saving %s..." gnus-current-startup-file) | |
6913 (let ((make-backup-files t) | |
6914 (version-control nil) | |
6915 (require-final-newline t)) ;Don't ask even if requested. | |
6916 ;; Make backup file of master newsrc. | |
6917 ;; You can stop or change version control of backup file. | |
6918 ;; Suggested by jason@violet.berkeley.edu. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6919 (run-hooks 'gnus-save-newsrc-hook) |
257 | 6920 (save-buffer)) |
6921 ;; Quickly loadable .newsrc. | |
6922 (set-buffer (get-buffer-create " *GNUS-newsrc*")) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6923 (buffer-flush-undo (current-buffer)) |
257 | 6924 (erase-buffer) |
6925 (gnus-gnus-to-quick-newsrc-format) | |
6926 (let ((make-backup-files nil) | |
6927 (version-control nil) | |
6928 (require-final-newline t)) ;Don't ask even if requested. | |
6929 (write-file (concat gnus-current-startup-file ".el"))) | |
6930 (kill-buffer (current-buffer)) | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
6931 (message "Saving %s...done" gnus-current-startup-file) |
257 | 6932 )) |
6933 )) | |
6934 | |
6935 (defun gnus-update-newsrc-buffer (group &optional delete next) | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
6936 "Incrementally update `.newsrc' buffer about GROUP. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6937 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
|
6938 If optional 2nd argument NEXT is non-nil, inserted before it." |
257 | 6939 (save-excursion |
6940 ;; Taking account of the killed startup file. | |
6941 ;; Suggested by tale@pawl.rpi.edu. | |
6942 (set-buffer (or (get-file-buffer gnus-current-startup-file) | |
6943 (find-file-noselect gnus-current-startup-file))) | |
6944 ;; Options line continuation lines must be also considered here. | |
6945 ;; Before supporting continuation lines, " newsgroup ! 1-5" was | |
6946 ;; okay, but now it is invalid. It should be "newsgroup! 1-5". | |
6947 (let ((deleted nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6948 (case-fold-search nil) ;Should NOT ignore case. |
257 | 6949 (buffer-read-only nil)) ;May be not modifiable. |
6950 ;; Delete ALL entries which match for GROUP. | |
6951 (goto-char (point-min)) | |
6952 (while (re-search-forward | |
6953 (concat "^" (regexp-quote group) "[:!]") nil t) | |
6954 (beginning-of-line) | |
6955 (delete-region (point) (progn (forward-line 1) (point))) | |
6956 (setq deleted t) ;Old entry is deleted. | |
6957 ) | |
6958 (if delete | |
6959 nil | |
6960 ;; Insert group entry. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6961 (let ((newsrc (gnus-gethash group gnus-newsrc-hashtb))) |
257 | 6962 (if (null newsrc) |
6963 nil | |
6964 ;; Find insertion point. | |
6965 (cond (deleted nil) ;Insert here. | |
6966 ((and (stringp next) | |
6967 (progn | |
6968 (goto-char (point-min)) | |
6969 (re-search-forward | |
6970 (concat "^" (regexp-quote next) "[:!]") nil t))) | |
6971 (beginning-of-line)) | |
6972 (t | |
6973 (goto-char (point-max)) | |
6974 (or (bolp) | |
6975 (insert "\n")))) | |
6976 ;; Insert after options line. | |
6977 (if (looking-at "^[ \t]*options\\([ \t]\\|$\\)") | |
6978 (progn | |
6979 (forward-line 1) | |
6980 ;; Skip continuation lines. | |
6981 (while (and (not (eobp)) | |
6982 (looking-at "^[ \t]+")) | |
6983 (forward-line 1)))) | |
6984 (insert group ;Group name | |
6985 (if (nth 1 newsrc) ": " "! ")) ;Subscribed? | |
6986 (gnus-ranges-to-newsrc-format (nthcdr 2 newsrc)) ;Read articles | |
6987 (insert "\n") | |
6988 ))) | |
6989 ))) | |
6990 | |
6991 (defun gnus-gnus-to-quick-newsrc-format () | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
6992 "Insert GNUS variables such as `gnus-newsrc-assoc' in Lisp format." |
257 | 6993 (insert ";; GNUS internal format of .newsrc.\n") |
6994 (insert ";; Touch .newsrc instead if you think to remove this file.\n") | |
6995 (let ((variable nil) | |
6996 (variables gnus-variable-list) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6997 ;; Temporary rebind to make changes |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6998 ;; gnus-check-killed-newsgroups in invisible. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6999 (gnus-killed-assoc gnus-killed-assoc) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7000 (gnus-killed-hashtb gnus-killed-hashtb)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7001 ;; Remove duplicated or unsubscribed newsgroups in |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7002 ;; gnus-killed-assoc (and gnus-killed-hashtb). |
257 | 7003 (gnus-check-killed-newsgroups) |
7004 ;; Then, insert lisp expressions. | |
7005 (while variables | |
7006 (setq variable (car variables)) | |
7007 (and (boundp variable) | |
7008 (symbol-value variable) | |
7009 (insert "(setq " (symbol-name variable) " '" | |
7010 (prin1-to-string (symbol-value variable)) | |
7011 ")\n")) | |
7012 (setq variables (cdr variables))) | |
7013 )) | |
7014 | |
7015 (defun gnus-ranges-to-newsrc-format (ranges) | |
7016 "Insert ranges of read articles." | |
7017 (let ((range nil)) ;Range is a pair of BEGIN and END. | |
7018 (while ranges | |
7019 (setq range (car ranges)) | |
7020 (setq ranges (cdr ranges)) | |
7021 (cond ((= (car range) (cdr range)) | |
7022 (if (= (car range) 0) | |
7023 (setq ranges nil) ;No unread articles. | |
7024 (insert (int-to-string (car range))) | |
7025 (if ranges (insert ",")) | |
7026 )) | |
7027 (t | |
7028 (insert (int-to-string (car range)) | |
7029 "-" | |
7030 (int-to-string (cdr range))) | |
7031 (if ranges (insert ",")) | |
7032 )) | |
7033 ))) | |
7034 | |
7035 (defun gnus-compress-sequence (numbers) | |
7036 "Convert list of sorted numbers to ranges." | |
7037 (let* ((numbers (sort (copy-sequence numbers) (function <))) | |
7038 (first (car numbers)) | |
7039 (last (car numbers)) | |
7040 (result nil)) | |
7041 (while numbers | |
7042 (cond ((= last (car numbers)) nil) ;Omit duplicated number | |
7043 ((= (1+ last) (car numbers)) ;Still in sequence | |
7044 (setq last (car numbers))) | |
7045 (t ;End of one sequence | |
7046 (setq result (cons (cons first last) result)) | |
7047 (setq first (car numbers)) | |
7048 (setq last (car numbers))) | |
7049 ) | |
7050 (setq numbers (cdr numbers)) | |
7051 ) | |
7052 (nreverse (cons (cons first last) result)) | |
7053 )) | |
7054 | |
7055 (defun gnus-uncompress-sequence (ranges) | |
7056 "Expand compressed format of sequence." | |
7057 (let ((first nil) | |
7058 (last nil) | |
7059 (result nil)) | |
7060 (while ranges | |
7061 (setq first (car (car ranges))) | |
7062 (setq last (cdr (car ranges))) | |
7063 (while (< first last) | |
7064 (setq result (cons first result)) | |
7065 (setq first (1+ first))) | |
7066 (setq result (cons first result)) | |
7067 (setq ranges (cdr ranges)) | |
7068 ) | |
7069 (nreverse result) | |
7070 )) | |
7071 | |
7072 (defun gnus-number-of-articles (range) | |
7073 "Compute number of articles from RANGE `((beg1 . end1) (beg2 . end2) ...)'." | |
7074 (let ((count 0)) | |
7075 (while range | |
7076 (if (/= (cdr (car range)) 0) | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
7077 ;; If end1 is 0, it must be skipped. Usually no articles in |
257 | 7078 ;; this group. |
7079 (setq count (+ count 1 (- (cdr (car range)) (car (car range)))))) | |
7080 (setq range (cdr range)) | |
7081 ) | |
7082 count ;Result | |
7083 )) | |
7084 | |
7085 (defun gnus-difference-of-range (src obj) | |
7086 "Compute (SRC - OBJ) on range. | |
7087 Range of SRC is expressed as `(beg . end)'. | |
7088 Range of OBJ is expressed as `((beg1 . end1) (beg2 . end2) ...)." | |
7089 (let ((beg (car src)) | |
7090 (end (cdr src)) | |
7091 (range nil)) ;This is result. | |
7092 ;; Src may be nil. | |
7093 (while (and src obj) | |
7094 (let ((beg1 (car (car obj))) | |
7095 (end1 (cdr (car obj)))) | |
7096 (cond ((> beg end) | |
7097 (setq obj nil)) ;Terminate loop | |
7098 ((< beg beg1) | |
7099 (setq range (cons (cons beg (min (1- beg1) end)) range)) | |
7100 (setq beg (1+ end1))) | |
7101 ((>= beg beg1) | |
7102 (setq beg (max beg (1+ end1)))) | |
7103 ) | |
7104 (setq obj (cdr obj)) ;Next OBJ | |
7105 )) | |
7106 ;; Src may be nil. | |
7107 (if (and src (<= beg end)) | |
7108 (setq range (cons (cons beg end) range))) | |
7109 ;; Result | |
7110 (if range | |
7111 (nreverse range) | |
7112 (list (cons 0 0))) | |
7113 )) | |
7114 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7115 (defun gnus-read-distributions-file () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7116 "Get distributions file from NNTP server (NNTP2 functionality)." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7117 ;; 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
|
7118 (gnus-start-news-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7119 (message "Reading distributions file...") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7120 (setq gnus-distribution-list nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7121 (if (gnus-request-list-distributions) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7122 (save-excursion |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7123 (set-buffer nntp-server-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7124 (gnus-distributions-to-gnus-format) |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
7125 (message "Reading distributions file...done")) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7126 ;; It's not a fatal error. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7127 ;;(error "Cannot read distributions file from NNTP server.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7128 ) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7129 ;; Merge with user supplied default distributions. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7130 (let ((defaults (reverse gnus-local-distributions)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7131 (dist nil)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7132 (while defaults |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7133 (setq dist (assoc (car defaults) gnus-distribution-list)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7134 (if dist |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7135 (setq gnus-distribution-list |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7136 (delq dist gnus-distribution-list))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7137 (setq gnus-distribution-list |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7138 (cons (list (car defaults)) gnus-distribution-list)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7139 (setq defaults (cdr defaults)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7140 ))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7141 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7142 (defun gnus-distributions-to-gnus-format () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7143 "Convert distributions file format to internal format." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7144 (setq gnus-distribution-list nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7145 (goto-char (point-min)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7146 (while (re-search-forward "^\\([^ \t\n]+\\).*$" nil t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7147 (setq gnus-distribution-list |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7148 (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
|
7149 gnus-distribution-list))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7150 (setq gnus-distribution-list |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7151 (nreverse gnus-distribution-list))) |
257 | 7152 |
8470
999e5521d05a
Require timezone when loading this file.
Richard M. Stallman <rms@gnu.org>
parents:
8444
diff
changeset
|
7153 (provide 'gnus) |
999e5521d05a
Require timezone when loading this file.
Richard M. Stallman <rms@gnu.org>
parents:
8444
diff
changeset
|
7154 |
257 | 7155 ;;Local variables: |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7156 ;;eval: (put 'gnus-eval-in-buffer-window 'lisp-indent-hook 1) |
257 | 7157 ;;end: |
4173
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
7158 |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
7159 ;;; gnus.el ends here |