Mercurial > emacs
annotate lisp/=gnus.el @ 14553:00521a7aaa75
(xmalloc_widget_value): Define only if USE_X_TOOLKIT.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 12 Feb 1996 10:05:00 +0000 |
parents | 497576f74e1a |
children |
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 |
11234 | 2 ;; Copyright (C) 1987,88,89,90,93,94,95 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: | |
11716
4c77e4a018b5
(gnus-use-generic-from): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
11712
diff
changeset
|
592 field; if a string, use this; if non-nil, strip off 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)") | |
10542
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
597 |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
598 (defvar gnus-newsgroups-regex "^\\([^ \t\n]+\\)[ \t]+\\(.*\\)$" |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
599 "Regex to retrieve the group name and the group description from |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
600 the output of the newsgroups listing. |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
601 |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
602 If you have ^M at the end of lines try \"^\\([^ \t\n]+\\)[ \t]+\\([^\r]+\\)[\r]*$\"") |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
603 |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
604 (defvar gnus-newsgroups-display t |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
605 "*display the newsgroup description in *Newsgroup* buffer if not nil") |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
606 |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
607 (defvar gnus-newsgroups-alist nil |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
608 "alist (groupname . description)") |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
609 |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
610 (defvar gnus-newsgroups-hashtb nil |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
611 "hashtable of gnus-newsgroups-alist") |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
612 |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
613 (defvar gnus-newsgroups-showall nil |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
614 "non nil if we display all the groups") |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
615 |
257 | 616 |
617 ;; Internal variables. | |
618 | |
4173
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
619 (defconst gnus-version "GNUS 4.1" |
257 | 620 "Version numbers of this version of GNUS.") |
621 | |
4173
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
622 (defconst gnus-emacs-version |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
623 (progn |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
624 (string-match "[0-9]*" emacs-version) |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
625 (string-to-int (substring emacs-version |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
626 (match-beginning 0) (match-end 0)))) |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
627 "Major version number of this emacs.") |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
628 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
629 (defvar gnus-info-nodes |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
630 '((gnus-group-mode "(gnus)Newsgroup Commands") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
631 (gnus-summary-mode "(gnus)Summary Commands") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
632 (gnus-article-mode "(gnus)Article Commands") |
4118
4248276b1113
(gnus-info-nodes): Update node names.
Richard M. Stallman <rms@gnu.org>
parents:
3922
diff
changeset
|
633 (gnus-kill-file-mode "(gnus)Kill File") |
4248276b1113
(gnus-info-nodes): Update node names.
Richard M. Stallman <rms@gnu.org>
parents:
3922
diff
changeset
|
634 (gnus-browse-killed-mode "(gnus)Maintaining Subscriptions")) |
257 | 635 "Assoc list of major modes and related Info nodes.") |
636 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
637 ;; Alist syntax is different from that of 3.14.3. |
257 | 638 (defvar gnus-access-methods |
639 '((nntp | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
640 (gnus-retrieve-headers nntp-retrieve-headers) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
641 (gnus-open-server nntp-open-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
642 (gnus-close-server nntp-close-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
643 (gnus-server-opened nntp-server-opened) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
644 (gnus-status-message nntp-status-message) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
645 (gnus-request-article nntp-request-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
646 (gnus-request-group nntp-request-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
647 (gnus-request-list nntp-request-list) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
648 (gnus-request-list-newsgroups nntp-request-list-newsgroups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
649 (gnus-request-list-distributions nntp-request-list-distributions) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
650 (gnus-request-post nntp-request-post)) |
257 | 651 (nnspool |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
652 (gnus-retrieve-headers nnspool-retrieve-headers) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
653 (gnus-open-server nnspool-open-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
654 (gnus-close-server nnspool-close-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
655 (gnus-server-opened nnspool-server-opened) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
656 (gnus-status-message nnspool-status-message) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
657 (gnus-request-article nnspool-request-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
658 (gnus-request-group nnspool-request-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
659 (gnus-request-list nnspool-request-list) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
660 (gnus-request-list-newsgroups nnspool-request-list-newsgroups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
661 (gnus-request-list-distributions nnspool-request-list-distributions) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
662 (gnus-request-post nnspool-request-post)) |
257 | 663 (mhspool |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
664 (gnus-retrieve-headers mhspool-retrieve-headers) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
665 (gnus-open-server mhspool-open-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
666 (gnus-close-server mhspool-close-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
667 (gnus-server-opened mhspool-server-opened) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
668 (gnus-status-message mhspool-status-message) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
669 (gnus-request-article mhspool-request-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
670 (gnus-request-group mhspool-request-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
671 (gnus-request-list mhspool-request-list) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
672 (gnus-request-list-newsgroups mhspool-request-list-newsgroups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
673 (gnus-request-list-distributions mhspool-request-list-distributions) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
674 (gnus-request-post mhspool-request-post))) |
257 | 675 "Access method for NNTP, nnspool, and mhspool.") |
676 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
677 (defvar gnus-group-buffer "*Newsgroup*") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
678 (defvar gnus-summary-buffer "*Summary*") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
679 (defvar gnus-article-buffer "*Article*") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
680 (defvar gnus-digest-buffer "GNUS Digest") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
681 (defvar gnus-digest-summary-buffer "GNUS Digest-summary") |
257 | 682 |
683 (defvar gnus-buffer-list | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
684 (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
|
685 gnus-digest-buffer gnus-digest-summary-buffer) |
257 | 686 "GNUS buffer names which should be killed when exiting.") |
687 | |
688 (defvar gnus-variable-list | |
689 '(gnus-newsrc-options | |
690 gnus-newsrc-options-n-yes gnus-newsrc-options-n-no | |
691 gnus-newsrc-assoc gnus-killed-assoc gnus-marked-assoc) | |
692 "GNUS variables saved in the quick startup file.") | |
693 | |
694 (defvar gnus-overload-functions | |
695 '((news-inews gnus-inews-news "rnewspost") | |
696 (caesar-region gnus-caesar-region "rnews")) | |
697 "Functions overloaded by gnus. | |
698 It is a list of `(original overload &optional file)'.") | |
699 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
700 (defvar gnus-distribution-list nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
701 |
257 | 702 (defvar gnus-newsrc-options nil |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
703 "Options line in the `.newsrc' file.") |
257 | 704 |
705 (defvar gnus-newsrc-options-n-yes nil | |
706 "Regexp representing subscribed newsgroups.") | |
707 | |
708 (defvar gnus-newsrc-options-n-no nil | |
709 "Regexp representing unsubscribed newsgroups.") | |
710 | |
711 (defvar gnus-newsrc-assoc nil | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
712 "Assoc list of read articles. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
713 `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
|
714 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
715 (defvar gnus-newsrc-hashtb nil |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
716 "Hashtable of `gnus-newsrc-assoc'.") |
257 | 717 |
718 (defvar gnus-killed-assoc nil | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
719 "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
|
720 `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
|
721 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
722 (defvar gnus-killed-hashtb nil |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
723 "Hashtable of `gnus-killed-assoc'.") |
257 | 724 |
725 (defvar gnus-marked-assoc nil | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
726 "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
|
727 `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
|
728 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
729 (defvar gnus-marked-hashtb nil |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
730 "Hashtable of `gnus-marked-assoc'.") |
257 | 731 |
732 (defvar gnus-unread-hashtb nil | |
733 "Hashtable of unread articles.") | |
734 | |
735 (defvar gnus-active-hashtb nil | |
736 "Hashtable of active articles.") | |
737 | |
738 (defvar gnus-octive-hashtb nil | |
739 "Hashtable of OLD active articles.") | |
740 | |
741 (defvar gnus-current-startup-file nil | |
742 "Startup file for the current host.") | |
743 | |
744 (defvar gnus-last-search-regexp nil | |
745 "Default regexp for article search command.") | |
746 | |
747 (defvar gnus-last-shell-command nil | |
748 "Default shell command on article.") | |
749 | |
750 (defvar gnus-have-all-newsgroups nil) | |
751 | |
752 (defvar gnus-newsgroup-name nil) | |
753 (defvar gnus-newsgroup-begin nil) | |
754 (defvar gnus-newsgroup-end nil) | |
755 (defvar gnus-newsgroup-last-rmail nil) | |
756 (defvar gnus-newsgroup-last-mail nil) | |
757 (defvar gnus-newsgroup-last-folder nil) | |
758 (defvar gnus-newsgroup-last-file nil) | |
759 | |
760 (defvar gnus-newsgroup-unreads nil | |
761 "List of unread articles in the current newsgroup.") | |
762 | |
763 (defvar gnus-newsgroup-unselected nil | |
764 "List of unselected unread articles in the current newsgroup.") | |
765 | |
766 (defvar gnus-newsgroup-marked nil | |
767 "List of marked articles in the current newsgroup (a subset of unread art).") | |
768 | |
769 (defvar gnus-newsgroup-headers nil | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
770 "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
|
771 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
|
772 `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
|
773 (defvar gnus-newsgroup-headers-hashtb-by-id nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
774 (defvar gnus-newsgroup-headers-hashtb-by-number nil) |
257 | 775 |
776 (defvar gnus-current-article nil) | |
777 (defvar gnus-current-headers nil) | |
778 (defvar gnus-current-history nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
779 (defvar gnus-have-all-headers nil "Must be either T or NIL.") |
257 | 780 (defvar gnus-last-article nil) |
781 (defvar gnus-current-kill-article nil) | |
782 | |
783 ;; Save window configuration. | |
784 (defvar gnus-winconf-kill-file nil) | |
785 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
786 (defvar gnus-group-mode-map nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
787 (defvar gnus-summary-mode-map nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
788 (defvar gnus-article-mode-map nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
789 (defvar gnus-kill-file-mode-map nil) |
257 | 790 |
7560
e63efa2d587c
rmail-default-file renamed from rmail-last-file,
Richard M. Stallman <rms@gnu.org>
parents:
7524
diff
changeset
|
791 (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
|
792 (defvar rmail-default-rmail-file (expand-file-name "~/XNEWS")) |
257 | 793 |
794 ;; Define GNUS Subsystems. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
795 (autoload 'gnus-group-post-news "gnuspost" |
257 | 796 "Post an article." t) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
797 (autoload 'gnus-summary-post-news "gnuspost" |
257 | 798 "Post an article." t) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
799 (autoload 'gnus-summary-followup "gnuspost" |
257 | 800 "Post a reply article." t) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
801 (autoload 'gnus-summary-followup-with-original "gnuspost" |
257 | 802 "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
|
803 (autoload 'gnus-summary-cancel-article "gnuspost" |
257 | 804 "Cancel an article you posted." t) |
805 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
806 (autoload 'gnus-summary-reply "gnusmail" |
257 | 807 "Reply mail to news author." t) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
808 (autoload 'gnus-summary-reply-with-original "gnusmail" |
257 | 809 "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
|
810 (autoload 'gnus-summary-mail-forward "gnusmail" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
811 "Forward the current message to another user." t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
812 (autoload 'gnus-summary-mail-other-window "gnusmail" |
257 | 813 "Compose mail in other window." t) |
814 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
815 (autoload 'gnus-group-kill-group "gnusmisc" |
257 | 816 "Kill newsgroup on current line." t) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
817 (autoload 'gnus-group-yank-group "gnusmisc" |
257 | 818 "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
|
819 (autoload 'gnus-group-kill-region "gnusmisc" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
820 "Kill newsgroups in current region." t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
821 (autoload 'gnus-group-transpose-groups "gnusmisc" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
822 "Exchange current newsgroup and previous newsgroup." t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
823 (autoload 'gnus-list-killed-groups "gnusmisc" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
824 "List the killed newsgroups." t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
825 (autoload 'gnus-gmt-to-local "gnusmisc" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
826 "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
|
827 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
828 (autoload 'metamail-buffer "metamail" |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
829 "Process current buffer through `metamail'." t) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
830 |
257 | 831 (autoload 'rmail-output "rmailout" |
832 "Append this message to Unix mail file named FILE-NAME." t) | |
833 (autoload 'mail-position-on-field "sendmail") | |
834 (autoload 'mh-find-path "mh-e") | |
835 (autoload 'mh-prompt-for-folder "mh-e") | |
836 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
837 (put 'gnus-group-mode 'mode-class 'special) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
838 (put 'gnus-summary-mode 'mode-class 'special) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
839 (put 'gnus-article-mode 'mode-class 'special) |
257 | 840 |
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
|
841 (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
|
842 (autoload 'gnus-uu-mark-article "gnus-uu" nil t) |
257 | 843 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
844 ;;(put 'gnus-eval-in-buffer-window 'lisp-indent-hook 1) |
257 | 845 |
846 (defmacro gnus-eval-in-buffer-window (buffer &rest forms) | |
847 "Pop to BUFFER, evaluate FORMS, and then returns to original window." | |
848 (` (let ((GNUSStartBufferWindow (selected-window))) | |
849 (unwind-protect | |
850 (progn | |
851 (pop-to-buffer (, buffer)) | |
852 (,@ forms)) | |
853 (select-window GNUSStartBufferWindow))))) | |
854 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
855 (defmacro gnus-make-hashtable (&optional hashsize) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
856 "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
|
857 Optional argument HASHSIZE specifies the table size." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
858 (` (make-vector (, (if hashsize (` (max (, hashsize) 200)) 200)) 0))) |
257 | 859 |
860 (defmacro gnus-gethash (string hashtable) | |
861 "Get hash value of STRING in HASHTABLE." | |
862 ;;(` (symbol-value (abbrev-symbol (, string) (, hashtable)))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
863 ;;(` (abbrev-expansion (, string) (, hashtable))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
864 (` (symbol-value (intern-soft (, string) (, hashtable))))) |
257 | 865 |
866 (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
|
867 "Set hash value. Arguments are STRING, VALUE, and HASHTABLE." |
257 | 868 ;; We cannot use define-abbrev since it only accepts string as value. |
869 (` (set (intern (, string) (, hashtable)) (, value)))) | |
870 | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
871 ;; Note: Macros defined here are also defined in nntp.el. I don't like |
257 | 872 ;; 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
|
873 ;; definitions in nntp.elc. These codes are NNTP 3.10 version. |
257 | 874 |
875 (defmacro nntp-header-number (header) | |
876 "Return article number in HEADER." | |
877 (` (aref (, header) 0))) | |
878 | |
879 (defmacro nntp-set-header-number (header number) | |
880 "Set article number of HEADER to NUMBER." | |
881 (` (aset (, header) 0 (, number)))) | |
882 | |
883 (defmacro nntp-header-subject (header) | |
884 "Return subject string in HEADER." | |
885 (` (aref (, header) 1))) | |
886 | |
887 (defmacro nntp-set-header-subject (header subject) | |
888 "Set article subject of HEADER to SUBJECT." | |
889 (` (aset (, header) 1 (, subject)))) | |
890 | |
891 (defmacro nntp-header-from (header) | |
892 "Return author string in HEADER." | |
893 (` (aref (, header) 2))) | |
894 | |
895 (defmacro nntp-set-header-from (header from) | |
896 "Set article author of HEADER to FROM." | |
897 (` (aset (, header) 2 (, from)))) | |
898 | |
899 (defmacro nntp-header-xref (header) | |
900 "Return xref string in HEADER." | |
901 (` (aref (, header) 3))) | |
902 | |
903 (defmacro nntp-set-header-xref (header xref) | |
904 "Set article xref of HEADER to xref." | |
905 (` (aset (, header) 3 (, xref)))) | |
906 | |
907 (defmacro nntp-header-lines (header) | |
908 "Return lines in HEADER." | |
909 (` (aref (, header) 4))) | |
910 | |
911 (defmacro nntp-set-header-lines (header lines) | |
912 "Set article lines of HEADER to LINES." | |
913 (` (aset (, header) 4 (, lines)))) | |
914 | |
915 (defmacro nntp-header-date (header) | |
916 "Return date in HEADER." | |
917 (` (aref (, header) 5))) | |
918 | |
919 (defmacro nntp-set-header-date (header date) | |
920 "Set article date of HEADER to DATE." | |
921 (` (aset (, header) 5 (, date)))) | |
922 | |
923 (defmacro nntp-header-id (header) | |
924 "Return Id in HEADER." | |
925 (` (aref (, header) 6))) | |
926 | |
927 (defmacro nntp-set-header-id (header id) | |
928 "Set article Id of HEADER to ID." | |
929 (` (aset (, header) 6 (, id)))) | |
930 | |
931 (defmacro nntp-header-references (header) | |
932 "Return references in HEADER." | |
933 (` (aref (, header) 7))) | |
934 | |
935 (defmacro nntp-set-header-references (header ref) | |
936 "Set article references of HEADER to REF." | |
937 (` (aset (, header) 7 (, ref)))) | |
938 | |
939 | |
940 ;;; | |
941 ;;; GNUS Group Mode | |
942 ;;; | |
943 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
944 (if gnus-group-mode-map |
257 | 945 nil |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
946 (setq gnus-group-mode-map (make-keymap)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
947 (suppress-keymap gnus-group-mode-map) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
948 (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
|
949 (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
|
950 (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
|
951 (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
|
952 (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
|
953 (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
|
954 (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
|
955 (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
|
956 (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
|
957 (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
|
958 (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
|
959 (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
|
960 (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
|
961 ;;(define-key gnus-group-mode-map "/" 'isearch-forward) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
962 (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
|
963 (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
|
964 (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
|
965 (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
|
966 (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
|
967 (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
|
968 (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
|
969 (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
|
970 (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
|
971 (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
|
972 (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
|
973 (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
|
974 (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
|
975 (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
|
976 (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
|
977 (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
|
978 (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
|
979 (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
|
980 (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
|
981 (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
|
982 (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
|
983 ;;(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
|
984 (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
|
985 (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
|
986 (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
|
987 (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
|
988 (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
|
989 (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
|
990 (define-key gnus-group-mode-map [mouse-2] 'gnus-mouse-pick-group) |
10542
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
991 (define-key gnus-group-mode-map "t" 'gnus-newsgroups-display-toggle) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
992 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
993 ;; Make a menu bar item. |
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 GNUS] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
995 (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
|
996 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
997 (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
|
998 '("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
|
999 (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
|
1000 '("Quit" . gnus-group-quit)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1001 (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
|
1002 '("Exit" . gnus-group-exit)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1003 (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
|
1004 '("Restart" . gnus-group-restart)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1005 (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
|
1006 '("Suspend" . gnus-group-suspend)) |
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 GNUS get-new-news] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1008 '("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
|
1009 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1010 ;; Make a menu bar item. |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1011 (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
|
1012 (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
|
1013 |
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 catchup] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1015 '("Catchup" . gnus-group-catchup)) |
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 edit-global-kill] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1017 '("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
|
1018 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1019 (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
|
1020 '("--")) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1021 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1022 (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
|
1023 '("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
|
1024 (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
|
1025 '("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
|
1026 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1027 (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
|
1028 '("--")) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1029 |
10542
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1030 (define-key gnus-group-mode-map [menu-bar groups newsgroups-update-description] |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1031 '("Update descriptions" . gnus-newsgroups-update-description)) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1032 (define-key gnus-group-mode-map [menu-bar groups newsgroups-display-toggle] |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1033 '("Toggle descriptions" . gnus-newsgroups-display-toggle)) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1034 (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
|
1035 '("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
|
1036 (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
|
1037 '("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
|
1038 (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
|
1039 '("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
|
1040 (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
|
1041 '("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
|
1042 ) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1043 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1044 (defun gnus-group-mode () |
257 | 1045 "Major mode for reading network news. |
1046 All normal editing commands are turned off. | |
1047 Instead, these commands are available: | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1048 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1049 SPC Read articles in this newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1050 = Select this newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1051 j Move to the specified newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1052 n Move to the next unread newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1053 p Move to the previous unread newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1054 C-n Move to the next newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1055 C-p Move to the previous newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1056 < Move point to the beginning of this buffer. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1057 > Move point to the end of this buffer. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1058 u Unsubscribe from (subscribe to) this newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1059 U Unsubscribe from (subscribe to) the specified newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1060 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
|
1061 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
|
1062 l Revert this buffer. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1063 L List all newsgroups. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1064 g Get new news. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1065 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
|
1066 b Check bogus newsgroups. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1067 r Restrict visible newsgroups to the current region. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1068 a Post a new article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1069 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
|
1070 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
|
1071 C-k Kill this newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1072 C-y Yank killed newsgroup here. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1073 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
|
1074 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
|
1075 C-c C-l list killed newsgroups. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1076 s Save .newsrc file. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1077 z Suspend reading news. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1078 q Quit reading news. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1079 Q Quit reading news without saving .newsrc file. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1080 V Show the version number of this GNUS. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1081 ? Describe Group Mode commands briefly. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1082 C-h m Describe Group Mode. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1083 C-c C-i Read Info about Group Mode. |
10542
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1084 t Toggle displaying newsgroup descriptions. |
257 | 1085 |
1086 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
|
1087 host is specified. It is also possible to choose another NNTP server |
257 | 1088 even when the default server is defined by giving a prefix argument to |
1089 the command `\\[gnus]'. | |
1090 | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1091 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
|
1092 own directory `~/Mail' is used as a news spool. This makes it |
257 | 1093 possible to read mail stored in MH folders or articles saved by GNUS. |
1094 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
|
1095 characters. Otherwise, they are ignored. |
257 | 1096 |
1097 If there is a file named `~/.newsrc-SERVER', it is used as the | |
1098 startup file instead of standard one when talking to SERVER. It is | |
1099 possible to talk to many hosts by using different startup files for | |
1100 each. | |
1101 | |
1102 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
|
1103 properly the same as the Bnews system. For example, if the options |
257 | 1104 line is `options -n !talk talk.rumors', newsgroups under the `talk' |
1105 hierarchy except for `talk.rumors' are ignored while checking new | |
1106 newsgroups. | |
1107 | |
1108 If there is a file named `~/.signature-DISTRIBUTION', it is used as | |
1109 signature file instead of standard one when posting a news in | |
1110 DISTRIBUTION. | |
1111 | |
1112 If an Info file generated from `gnus.texinfo' is installed, you can | |
1113 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
|
1114 current major mode of GNUS by \\[gnus-info-find-node]. |
257 | 1115 |
1116 The variable `gnus-version', `nntp-version', `nnspool-version', and | |
1117 `mhspool-version' have the version numbers of this version of gnus.el, | |
1118 nntp.el, nnspool.el, and mhspoo.el, respectively. | |
1119 | |
1120 User customizable variables: | |
1121 gnus-nntp-server | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1122 Specifies the name of the host running the NNTP server. If its |
257 | 1123 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
|
1124 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
|
1125 from the NNTPSERVER environment variable. |
257 | 1126 |
1127 gnus-nntp-service | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1128 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
|
1129 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
|
1130 `gnus-nntp-server' is set to the local host name. |
257 | 1131 |
1132 gnus-startup-file | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1133 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
|
1134 `.newsrc-SERVER', it's used instead when talking to SERVER. I |
257 | 1135 recommend you to use the server specific file, if you'd like to |
1136 talk to many servers. Especially if you'd like to read your | |
1137 private directory, the name of the file must be | |
1138 `.newsrc-:DIRECTORY'. | |
1139 | |
1140 gnus-signature-file | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1141 Specifies a signature file (.signature). If there is a file named |
257 | 1142 `.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
|
1143 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
|
1144 appending the file automatically. If you use an NNTP inews which |
257 | 1145 comes with the NNTP package, you may have to set the variable to |
1146 nil. | |
1147 | |
1148 gnus-use-cross-reference | |
1149 Specifies what to do with cross references (Xref: field). If it | |
1150 is nil, cross references are ignored. If it is t, articles in | |
1151 subscribed newsgroups are only marked as read. Otherwise, if it | |
1152 is not nil nor t, articles in all newsgroups are marked as read. | |
1153 | |
1154 gnus-use-followup-to | |
1155 Specifies what to do with followup-to: field. If it is nil, its | |
1156 value is ignored. If it is non-nil, its value is used as followup | |
1157 newsgroups. Especially, if it is t and field value is `poster', | |
1158 your confirmation is required. | |
1159 | |
1160 gnus-author-copy | |
1161 Specifies a file name to save a copy of article you posted using | |
1162 FCC: field. If the first character of the value is `|', the | |
1163 contents of the article is piped out to a program specified by the | |
1164 rest of the value. The variable is initialized from the | |
1165 AUTHORCOPY environment variable. | |
1166 | |
1167 gnus-author-copy-saver | |
1168 Specifies a function to save an author copy. The function is | |
1169 called with a file name. The default function `rmail-output' | |
1170 saves in Unix mail format. | |
1171 | |
1172 gnus-kill-file-name | |
1173 Use specified file name as a KILL file (default to `KILL'). | |
1174 | |
1175 gnus-novice-user | |
1176 Non-nil means that you are a novice to USENET. If non-nil, | |
1177 verbose messages may be displayed or your confirmations may be | |
1178 required. | |
1179 | |
1180 gnus-interactive-post | |
1181 Non-nil means that newsgroup, subject and distribution are asked | |
1182 for interactively when posting a new article. | |
1183 | |
1184 gnus-use-full-window | |
1185 Non-nil means to take up the entire screen of Emacs. | |
1186 | |
1187 gnus-window-configuration | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1188 Specifies the configuration of Group, Summary, and Article |
257 | 1189 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
|
1190 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
|
1191 respectively. ACTION is `summary', `newsgroups', or `article'. |
257 | 1192 |
1193 gnus-subscribe-newsgroup-method | |
1194 Specifies a function called with a newsgroup name when new | |
1195 newsgroup is found. The default definition adds new newsgroup at | |
1196 the beginning of other newsgroups. | |
1197 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1198 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
|
1199 |
257 | 1200 Various hooks for customization: |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1201 gnus-group-mode-hook |
257 | 1202 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
|
1203 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
|
1204 the NNTP server. So, you can change or define the NNTP server in |
257 | 1205 this hook. |
1206 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1207 gnus-startup-hook |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1208 Called with no arguments after the NNTP server is selected. It is |
257 | 1209 possible to change the behavior of GNUS or initialize the |
1210 variables according to the selected NNTP server. | |
1211 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1212 gnus-group-prepare-hook |
257 | 1213 Called with no arguments after a newsgroup list is created in the |
1214 Newsgroup buffer, if that value is non-nil. | |
1215 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1216 gnus-save-newsrc-hook |
257 | 1217 Called with no arguments when saving newsrc file if that value is |
1218 non-nil. | |
1219 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1220 gnus-prepare-article-hook |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1221 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
|
1222 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
|
1223 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
|
1224 inserts a signature file. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1225 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1226 gnus-inews-article-hook |
257 | 1227 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
|
1228 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
|
1229 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
|
1230 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1231 gnus-suspend-gnus-hook |
257 | 1232 Called with no arguments when suspending (not exiting) GNUS, if |
1233 that value is non-nil. | |
1234 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1235 gnus-exit-gnus-hook |
257 | 1236 Called with no arguments when exiting (not suspending) GNUS, if |
1237 that value is non-nil." | |
1238 (interactive) | |
1239 (kill-all-local-variables) | |
1240 ;; Gee. Why don't you upgrade? | |
1241 (cond ((boundp 'mode-line-modified) | |
1242 (setq mode-line-modified "--- ")) | |
1243 ((listp (default-value 'mode-line-format)) | |
1244 (setq mode-line-format | |
1245 (cons "--- " (cdr (default-value 'mode-line-format))))) | |
1246 (t | |
1247 (setq mode-line-format | |
1248 "--- GNUS: List of Newsgroups %[(%m)%]----%3p-%-"))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1249 (setq major-mode 'gnus-group-mode) |
257 | 1250 (setq mode-name "Newsgroup") |
1251 (setq mode-line-buffer-identification "GNUS: List of Newsgroups") | |
1252 (setq mode-line-process nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1253 (use-local-map gnus-group-mode-map) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1254 (buffer-flush-undo (current-buffer)) |
257 | 1255 (setq buffer-read-only t) ;Disable modification |
11712
e1f527e99a2f
(gnus-group-mode): Set truncate-lines.
Richard M. Stallman <rms@gnu.org>
parents:
11234
diff
changeset
|
1256 (setq truncate-lines t) ;In case descriptions are too long. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1257 (run-hooks 'gnus-group-mode-hook)) |
257 | 1258 |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1259 (defun gnus-mouse-pick-group (e) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1260 (interactive "e") |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1261 (mouse-set-point e) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1262 (gnus-group-read-group nil)) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1263 |
257 | 1264 ;;;###autoload |
1265 (defun gnus (&optional confirm) | |
1266 "Read network news. | |
1267 If optional argument CONFIRM is non-nil, ask NNTP server." | |
1268 (interactive "P") | |
1269 (unwind-protect | |
1270 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1271 (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
|
1272 (gnus-group-mode) |
257 | 1273 (gnus-start-news-server confirm)) |
1274 (if (not (gnus-server-opened)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1275 (gnus-group-quit) |
257 | 1276 ;; NNTP server is successfully open. |
1277 (setq mode-line-process (format " {%s}" gnus-nntp-server)) | |
1278 (let ((buffer-read-only nil)) | |
1279 (erase-buffer) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1280 (gnus-group-startup-message) |
257 | 1281 (sit-for 0)) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1282 (run-hooks 'gnus-startup-hook) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1283 (gnus-setup-news) |
257 | 1284 (if gnus-novice-user |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1285 (gnus-group-describe-briefly)) ;Show brief help message. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1286 (gnus-group-list-groups nil) |
257 | 1287 ))) |
1288 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1289 (defun gnus-group-startup-message () |
257 | 1290 "Insert startup message in current buffer." |
1291 ;; Insert the message. | |
4173
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
1292 (insert |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
1293 (format " |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
1294 %s |
257 | 1295 |
1296 NNTP-based News Reader for GNU Emacs | |
1297 | |
1298 | |
1299 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
|
1300 know. I will fix your problems in the next release. |
257 | 1301 |
1302 Comments, suggestions, and bug fixes are welcome. | |
1303 | |
1304 Masanobu UMEDA | |
4173
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
1305 umerin@mse.kyutech.ac.jp" gnus-version)) |
257 | 1306 ;; And then hack it. |
1307 ;; 57 is the longest line. | |
1308 (indent-rigidly (point-min) (point-max) (/ (max (- (window-width) 57) 0) 2)) | |
1309 (goto-char (point-min)) | |
1310 ;; +4 is fuzzy factor. | |
1311 (insert-char ?\n (/ (max (- (window-height) 18) 0) 2))) | |
1312 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1313 (defun gnus-group-list-groups (show-all) |
257 | 1314 "List newsgroups in the Newsgroup buffer. |
1315 If argument SHOW-ALL is non-nil, unsubscribed groups are also listed." | |
1316 (interactive "P") | |
10542
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1317 (setq gnus-newsgroups-showall show-all) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1318 (let ((case-fold-search nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1319 (last-group ;Current newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1320 (gnus-group-group-name)) |
257 | 1321 (next-group ;Next possible newsgroup. |
1322 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1323 (gnus-group-search-forward nil nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1324 (gnus-group-group-name))) |
257 | 1325 (prev-group ;Previous possible newsgroup. |
1326 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1327 (gnus-group-search-forward t nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1328 (gnus-group-group-name)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1329 (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
|
1330 (gnus-group-prepare show-all) |
257 | 1331 (if (zerop (buffer-size)) |
1332 (message "No news is good news") | |
1333 ;; Go to last newsgroup if possible. If cannot, try next and | |
1334 ;; previous. If all fail, go to first unread newsgroup. | |
1335 (goto-char (point-min)) | |
1336 (or (and last-group | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1337 (re-search-forward (gnus-group-make-regexp last-group) nil t)) |
257 | 1338 (and next-group |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1339 (re-search-forward (gnus-group-make-regexp next-group) nil t)) |
257 | 1340 (and prev-group |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1341 (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
|
1342 (gnus-group-search-forward nil nil t)) |
257 | 1343 ;; Adjust cursor point. |
1344 (beginning-of-line) | |
1345 (search-forward ":" nil t) | |
1346 ))) | |
1347 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1348 (defun gnus-group-prepare (&optional all) |
257 | 1349 "Prepare list of newsgroups in current buffer. |
1350 If optional argument ALL is non-nil, unsubscribed groups are also listed." | |
1351 (let ((buffer-read-only nil) | |
1352 (newsrc gnus-newsrc-assoc) | |
1353 (group-info nil) | |
1354 (group-name nil) | |
10542
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1355 (group-description nil) |
257 | 1356 (unread-count 0) |
10542
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1357 (nb-tab 0) |
257 | 1358 ;; This specifies the format of Group buffer. |
10542
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1359 (cntl "%s%s%5d: %s")) |
257 | 1360 (erase-buffer) |
1361 ;; List newsgroups. | |
1362 (while newsrc | |
1363 (setq group-info (car newsrc)) | |
1364 (setq group-name (car group-info)) | |
10542
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1365 (if gnus-newsgroups-display |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1366 (progn (setq group-description (gnus-gethash group-name gnus-newsgroups-hashtb)) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1367 (setq nb-tab (/ (- 38 (length group-name)) tab-width)))) |
257 | 1368 (setq unread-count (nth 1 (gnus-gethash group-name gnus-unread-hashtb))) |
1369 (if (or all | |
1370 (and (nth 1 group-info) ;Subscribed. | |
1371 (> unread-count 0))) ;There are unread articles. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1372 ;; Yes, I can use gnus-group-prepare-line, but this is faster. |
257 | 1373 (insert |
10542
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1374 (format (concat cntl (make-string (if (> nb-tab 0) nb-tab 1) ?\t) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1375 "%s\n") |
257 | 1376 ;; Subscribed or not. |
1377 (if (nth 1 group-info) " " "U") | |
1378 ;; Has new news? | |
1379 (if (and (> unread-count 0) | |
1380 (>= 0 | |
1381 (- unread-count | |
1382 (length | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1383 (cdr (gnus-gethash group-name |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1384 gnus-marked-hashtb)))))) |
257 | 1385 "*" " ") |
1386 ;; Number of unread articles. | |
1387 unread-count | |
1388 ;; Newsgroup name. | |
10542
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1389 group-name |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1390 ;; Newsgroup description |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1391 (if group-description (cdr group-description) "") |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1392 )) |
257 | 1393 ) |
1394 (setq newsrc (cdr newsrc)) | |
1395 ) | |
1396 (setq gnus-have-all-newsgroups all) | |
1397 (goto-char (point-min)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1398 (run-hooks 'gnus-group-prepare-hook) |
257 | 1399 )) |
1400 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1401 (defun gnus-group-prepare-line (info) |
257 | 1402 "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
|
1403 INFO is an element of `gnus-newsrc-assoc' or `gnus-killed-assoc'." |
257 | 1404 (let* ((group-name (car info)) |
10542
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1405 (group-description nil) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1406 (nb-tab 0) |
257 | 1407 (unread-count |
1408 (or (nth 1 (gnus-gethash group-name gnus-unread-hashtb)) | |
1409 ;; Not in hash table, so compute it now. | |
1410 (gnus-number-of-articles | |
1411 (gnus-difference-of-range | |
1412 (nth 2 (gnus-gethash group-name gnus-active-hashtb)) | |
1413 (nthcdr 2 info))))) | |
1414 ;; This specifies the format of Group buffer. | |
10542
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1415 (cntl "%s%s%5d: %s")) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1416 (if gnus-newsgroups-display |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1417 (progn |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1418 (setq group-description (gnus-gethash group-name gnus-newsgroups-hashtb)) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1419 (setq nb-tab (/ (- 38 (length group-name)) tab-width)))) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1420 (format (concat cntl (make-string (if (> nb-tab 0) nb-tab 1) ?\t) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1421 "%s\n") |
257 | 1422 ;; Subscribed or not. |
1423 (if (nth 1 info) " " "U") | |
1424 ;; Has new news? | |
1425 (if (and (> unread-count 0) | |
1426 (>= 0 | |
1427 (- unread-count | |
1428 (length | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1429 (cdr (gnus-gethash group-name |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1430 gnus-marked-hashtb)))))) |
257 | 1431 "*" " ") |
1432 ;; Number of unread articles. | |
1433 unread-count | |
1434 ;; Newsgroup name. | |
1435 group-name | |
10542
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1436 ;; Newsgroup description |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1437 (if group-description (cdr group-description) "") |
257 | 1438 ))) |
1439 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1440 (defun gnus-group-update-group (group &optional visible-only) |
257 | 1441 "Update newsgroup info of GROUP. |
1442 If optional argument VISIBLE-ONLY is non-nil, non displayed group is ignored." | |
1443 (let ((buffer-read-only nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1444 (case-fold-search nil) ;appleIIgs vs. appleiigs |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1445 (regexp (gnus-group-make-regexp group)) |
257 | 1446 (visible nil)) |
1447 ;; Buffer may be narrowed. | |
1448 (save-restriction | |
1449 (widen) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1450 ;; 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
|
1451 ;; 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
|
1452 ;; 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
|
1453 ;; 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
|
1454 ;; the beginning. Otherwise, search from the end. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1455 (if (cond ((progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1456 (beginning-of-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1457 (looking-at regexp))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1458 ((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
|
1459 (progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1460 (goto-char (point-min)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1461 (re-search-forward regexp nil t)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1462 ((progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1463 (goto-char (point-max)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1464 (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
|
1465 ;; GROUP is listed in current buffer. So, delete old line. |
257 | 1466 (progn |
1467 (setq visible t) | |
1468 (beginning-of-line) | |
1469 (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
|
1470 ) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1471 ;; 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
|
1472 (goto-char (point-min))) |
257 | 1473 (if (or visible (not visible-only)) |
1474 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1475 (insert (gnus-group-prepare-line |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1476 (gnus-gethash group gnus-newsrc-hashtb))) |
257 | 1477 (forward-line -1) ;Move point on that line. |
1478 )) | |
1479 ))) | |
1480 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1481 (defun gnus-group-group-name () |
257 | 1482 "Get newsgroup name around point." |
1483 (save-excursion | |
1484 (beginning-of-line) | |
10542
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
1485 (if (looking-at "^..[0-9 \t]+:[ \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
|
1486 (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
|
1487 (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
|
1488 group-name)))) |
257 | 1489 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1490 (defun gnus-group-make-regexp (newsgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1491 "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
|
1492 (concat "^.+: " (regexp-quote newsgroup) "\\([ \t].*\\|$\\)")) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1493 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1494 (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
|
1495 "Search for the next (or previous) newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1496 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
|
1497 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
|
1498 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
|
1499 (let ((case-fold-search nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1500 (func |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1501 (if backward |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1502 (function re-search-backward) (function re-search-forward))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1503 (regexp |
257 | 1504 (format "^%s[ \t]*\\(%s\\):" |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1505 (if norest ".." " [ \t]") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1506 (if norest "[0-9]+" "[1-9][0-9]*"))) |
257 | 1507 (found nil)) |
1508 (if backward | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1509 (if heretoo |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1510 (end-of-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1511 (beginning-of-line)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1512 (if heretoo |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1513 (beginning-of-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1514 (end-of-line))) |
257 | 1515 (setq found (funcall func regexp nil t)) |
1516 ;; Adjust cursor point. | |
1517 (beginning-of-line) | |
1518 (search-forward ":" nil t) | |
1519 ;; Return T if found. | |
1520 found | |
1521 )) | |
1522 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1523 ;; GNUS Group mode command |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1524 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1525 (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
|
1526 "Read news in this newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1527 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
|
1528 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
|
1529 (interactive "P") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1530 (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
|
1531 (if group |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1532 (gnus-summary-read-group |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1533 group |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1534 (or all |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1535 ;;(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
|
1536 (zerop |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1537 (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
|
1538 no-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1539 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1540 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1541 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1542 (defun gnus-group-select-group (all) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1543 "Select this newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1544 No article is selected automatically. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1545 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
|
1546 (interactive "P") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1547 (gnus-group-read-group all t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1548 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1549 (defun gnus-group-jump-to-group (group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1550 "Jump to newsgroup GROUP." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1551 (interactive |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1552 (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
|
1553 (let ((case-fold-search nil)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1554 (goto-char (point-min)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1555 (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
|
1556 (if (gnus-gethash group gnus-newsrc-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1557 ;; Add GROUP entry, then seach again. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1558 (gnus-group-update-group group))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1559 ;; Adjust cursor point. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1560 (beginning-of-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1561 (search-forward ":" nil t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1562 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1563 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1564 (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
|
1565 "Go to Nth following newsgroup." |
257 | 1566 (interactive "p") |
1567 (while (and (> n 1) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1568 (gnus-group-search-forward nil t)) |
257 | 1569 (setq n (1- n))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1570 (or (gnus-group-search-forward nil t) |
257 | 1571 (message "No more newsgroups"))) |
1572 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1573 (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
|
1574 "Go to Nth following unread newsgroup." |
257 | 1575 (interactive "p") |
1576 (while (and (> n 1) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1577 (gnus-group-search-forward nil nil)) |
257 | 1578 (setq n (1- n))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1579 (or (gnus-group-search-forward nil nil) |
257 | 1580 (message "No more unread newsgroups"))) |
1581 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1582 (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
|
1583 "Go to Nth previous newsgroup." |
257 | 1584 (interactive "p") |
1585 (while (and (> n 1) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1586 (gnus-group-search-forward t t)) |
257 | 1587 (setq n (1- n))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1588 (or (gnus-group-search-forward t t) |
257 | 1589 (message "No more newsgroups"))) |
1590 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1591 (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
|
1592 "Go to Nth previous unread newsgroup." |
257 | 1593 (interactive "p") |
1594 (while (and (> n 1) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1595 (gnus-group-search-forward t nil)) |
257 | 1596 (setq n (1- n))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1597 (or (gnus-group-search-forward t nil) |
257 | 1598 (message "No more unread newsgroups"))) |
1599 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1600 (defun gnus-group-catchup (all) |
257 | 1601 "Mark all articles not marked as unread in current newsgroup as read. |
1602 If prefix argument ALL is non-nil, all articles are marked as read. | |
1603 Cross references (Xref: field) of articles are ignored." | |
1604 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1605 (let* ((group (gnus-group-group-name)) |
257 | 1606 (marked (if (not all) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1607 (cdr (gnus-gethash group gnus-marked-hashtb))))) |
257 | 1608 (and group |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1609 (or (not gnus-interactive-catchup) ;Without confirmation? |
257 | 1610 (y-or-n-p |
1611 (if all | |
1612 "Do you really want to mark everything as read? " | |
1613 "Delete all articles not marked as read? "))) | |
1614 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1615 (message "") ;Clear "Yes or No" question. |
257 | 1616 ;; Any marked articles will be preserved. |
1617 (gnus-update-unread-articles group marked marked) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1618 (gnus-group-update-group group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1619 (gnus-group-next-group 1))) |
257 | 1620 )) |
1621 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1622 (defun gnus-group-catchup-all () |
257 | 1623 "Mark all articles in current newsgroup as read. |
1624 Cross references (Xref: field) of articles are ignored." | |
1625 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1626 (gnus-group-catchup t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1627 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1628 (defun gnus-group-unsubscribe-current-group () |
257 | 1629 "Toggle subscribe from/to unsubscribe current group." |
1630 (interactive) | |
7573
059281285df7
(gnus-group-unsubscribe-current-group):
Richard M. Stallman <rms@gnu.org>
parents:
7560
diff
changeset
|
1631 (let ((group (gnus-group-group-name))) |
059281285df7
(gnus-group-unsubscribe-current-group):
Richard M. Stallman <rms@gnu.org>
parents:
7560
diff
changeset
|
1632 (if group |
059281285df7
(gnus-group-unsubscribe-current-group):
Richard M. Stallman <rms@gnu.org>
parents:
7560
diff
changeset
|
1633 (progn |
059281285df7
(gnus-group-unsubscribe-current-group):
Richard M. Stallman <rms@gnu.org>
parents:
7560
diff
changeset
|
1634 (gnus-group-unsubscribe-group group) |
059281285df7
(gnus-group-unsubscribe-current-group):
Richard M. Stallman <rms@gnu.org>
parents:
7560
diff
changeset
|
1635 (gnus-group-next-group 1)) |
059281285df7
(gnus-group-unsubscribe-current-group):
Richard M. Stallman <rms@gnu.org>
parents:
7560
diff
changeset
|
1636 (message "No Newsgroup found to \(un\)subscribe")))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1637 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1638 (defun gnus-group-unsubscribe-group (group) |
257 | 1639 "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
|
1640 \(If GROUP is new, it is added to `.newsrc' automatically.)" |
257 | 1641 (interactive |
1642 (list (completing-read "Newsgroup: " | |
1643 gnus-active-hashtb nil 'require-match))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1644 (let ((newsrc (gnus-gethash group gnus-newsrc-hashtb))) |
257 | 1645 (cond ((not (null newsrc)) |
1646 ;; Toggle subscription flag. | |
1647 (setcar (nthcdr 1 newsrc) (not (nth 1 newsrc))) | |
1648 (gnus-update-newsrc-buffer group) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1649 (gnus-group-update-group group) |
257 | 1650 ;; Adjust cursor point. |
1651 (beginning-of-line) | |
1652 (search-forward ":" nil t)) | |
1653 ((and (stringp group) | |
1654 (gnus-gethash group gnus-active-hashtb)) | |
1655 ;; Add new newsgroup. | |
1656 (gnus-add-newsgroup group) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1657 (gnus-group-update-group group) |
257 | 1658 ;; Adjust cursor point. |
1659 (beginning-of-line) | |
1660 (search-forward ":" nil t)) | |
1661 (t (error "No such newsgroup: %s" group))) | |
1662 )) | |
1663 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1664 (defun gnus-group-list-all-groups () |
257 | 1665 "List all of newsgroups in the Newsgroup buffer." |
1666 (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
|
1667 (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
|
1668 (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
|
1669 (message "Listing all groups...done")) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1670 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1671 (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
|
1672 "Get newly arrived articles. In fact, read the active file again." |
257 | 1673 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1674 (gnus-setup-news) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1675 (gnus-group-list-groups gnus-have-all-newsgroups)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1676 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1677 (defun gnus-group-restart () |
257 | 1678 "Force GNUS to read the raw startup file." |
1679 (interactive) | |
1680 (gnus-save-newsrc-file) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1681 (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
|
1682 (gnus-group-list-groups gnus-have-all-newsgroups)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1683 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1684 (defun gnus-group-check-bogus-groups () |
257 | 1685 "Check bogus newsgroups." |
1686 (interactive) | |
1687 (gnus-check-bogus-newsgroups t) ;Require confirmation. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1688 (gnus-group-list-groups gnus-have-all-newsgroups)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1689 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1690 (defun gnus-group-restrict-groups (start end) |
257 | 1691 "Restrict visible newsgroups to the current region (START and END). |
1692 Type \\[widen] to remove restriction." | |
1693 (interactive "r") | |
1694 (save-excursion | |
1695 (narrow-to-region (progn | |
1696 (goto-char start) | |
1697 (beginning-of-line) | |
1698 (point)) | |
1699 (progn | |
1700 (goto-char end) | |
1701 (forward-line 1) | |
1702 (point)))) | |
1703 (message (substitute-command-keys "Type \\[widen] to remove restriction"))) | |
1704 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1705 (defun gnus-group-edit-global-kill () |
257 | 1706 "Edit a global KILL file." |
1707 (interactive) | |
1708 (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
|
1709 (gnus-kill-file-edit-file nil) ;Nil stands for global KILL file. |
257 | 1710 (message |
1711 (substitute-command-keys | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1712 "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
|
1713 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1714 (defun gnus-group-edit-local-kill () |
257 | 1715 "Edit a local KILL file." |
1716 (interactive) | |
1717 (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
|
1718 (gnus-kill-file-edit-file (gnus-group-group-name)) |
257 | 1719 (message |
1720 (substitute-command-keys | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1721 "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
|
1722 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1723 (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
|
1724 "Update `.newsrc' file." |
257 | 1725 (interactive) |
1726 (gnus-save-newsrc-file)) | |
1727 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1728 (defun gnus-group-suspend () |
257 | 1729 "Suspend the current GNUS session. |
1730 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
|
1731 The hook `gnus-suspend-gnus-hook' is called before actually suspending." |
257 | 1732 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1733 (run-hooks 'gnus-suspend-gnus-hook) |
257 | 1734 ;; 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
|
1735 (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
|
1736 (group-buf (get-buffer gnus-group-buffer))) |
257 | 1737 (while buffers |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1738 (and (not (eq (car buffers) gnus-group-buffer)) |
257 | 1739 (get-buffer (car buffers)) |
1740 (kill-buffer (car buffers))) | |
1741 (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
|
1742 ) |
425ac5eebc19
(gnus-group-suspend): Be sure to bury the right buffer.
Richard M. Stallman <rms@gnu.org>
parents:
8258
diff
changeset
|
1743 (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
|
1744 (delete-windows-on group-buf t))) |
257 | 1745 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1746 (defun gnus-group-exit () |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1747 "Quit reading news after updating `.newsrc'. |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1748 The hook `gnus-exit-gnus-hook' is called before actually quitting." |
257 | 1749 (interactive) |
1750 (if (or noninteractive ;For gnus-batch-kill | |
1751 (zerop (buffer-size)) ;No news is good news. | |
1752 (not (gnus-server-opened)) ;NNTP connection closed. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1753 (not gnus-interactive-exit) ;Without confirmation |
257 | 1754 (y-or-n-p "Are you sure you want to quit reading news? ")) |
1755 (progn | |
1756 (message "") ;Erase "Yes or No" question. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1757 (run-hooks 'gnus-exit-gnus-hook) |
257 | 1758 (gnus-save-newsrc-file) |
1759 (gnus-clear-system) | |
1760 (gnus-close-server)) | |
1761 )) | |
1762 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1763 (defun gnus-group-quit () |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1764 "Quit reading news without updating `.newsrc'. |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
1765 The hook `gnus-exit-gnus-hook' is called before actually quitting." |
257 | 1766 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1767 (if (or noninteractive ;For gnus-batch-kill |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1768 (zerop (buffer-size)) |
257 | 1769 (not (gnus-server-opened)) |
1770 (yes-or-no-p | |
1771 (format "Quit reading news without saving %s? " | |
1772 (file-name-nondirectory gnus-current-startup-file)))) | |
1773 (progn | |
1774 (message "") ;Erase "Yes or No" question. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1775 (run-hooks 'gnus-exit-gnus-hook) |
257 | 1776 (gnus-clear-system) |
1777 (gnus-close-server)) | |
1778 )) | |
1779 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1780 (defun gnus-group-describe-briefly () |
257 | 1781 "Describe Group mode commands briefly." |
1782 (interactive) | |
1783 (message | |
1784 (concat | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1785 (substitute-command-keys "\\[gnus-group-read-group]:Select ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1786 (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
|
1787 (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
|
1788 (substitute-command-keys "\\[gnus-group-exit]:Exit ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1789 (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
|
1790 (substitute-command-keys "\\[gnus-group-describe-briefly]:This help") |
257 | 1791 ))) |
1792 | |
1793 | |
1794 ;;; | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1795 ;;; GNUS Summary Mode |
257 | 1796 ;;; |
1797 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1798 (if gnus-summary-mode-map |
257 | 1799 nil |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1800 (setq gnus-summary-mode-map (make-keymap)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1801 (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
|
1802 (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
|
1803 (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
|
1804 (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
|
1805 (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
|
1806 (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
|
1807 (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
|
1808 (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
|
1809 (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
|
1810 (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
|
1811 (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
|
1812 (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
|
1813 ;;(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
|
1814 ;;(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
|
1815 (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
|
1816 (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
|
1817 (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
|
1818 (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
|
1819 (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
|
1820 (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
|
1821 (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
|
1822 (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
|
1823 ;;(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
|
1824 ;;(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
|
1825 (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
|
1826 ;;(define-key gnus-summary-mode-map "/" 'isearch-forward) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1827 (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
|
1828 (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
|
1829 ;;(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
|
1830 (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
|
1831 (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
|
1832 (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
|
1833 (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
|
1834 ;;(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
|
1835 (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
|
1836 (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
|
1837 ;;(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
|
1838 (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
|
1839 (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
|
1840 (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
|
1841 (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
|
1842 (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
|
1843 (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
|
1844 (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
|
1845 (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
|
1846 (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
|
1847 (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
|
1848 (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
|
1849 (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
|
1850 (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
|
1851 (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
|
1852 (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
|
1853 (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
|
1854 (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
|
1855 (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
|
1856 ;;(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
|
1857 ;;(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
|
1858 (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
|
1859 ;;(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
|
1860 (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
|
1861 (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
|
1862 (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
|
1863 (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
|
1864 (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
|
1865 (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
|
1866 (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
|
1867 (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
|
1868 (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
|
1869 (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
|
1870 (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
|
1871 (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
|
1872 ;;(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
|
1873 (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
|
1874 (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
|
1875 (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
|
1876 (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
|
1877 (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
|
1878 ;;(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
|
1879 (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
|
1880 (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
|
1881 (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
|
1882 (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
|
1883 (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
|
1884 (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
|
1885 (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
|
1886 (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
|
1887 (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
|
1888 (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
|
1889 (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
|
1890 (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
|
1891 (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
|
1892 (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
|
1893 (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
|
1894 (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
|
1895 (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
|
1896 (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
|
1897 (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
|
1898 (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
|
1899 (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
|
1900 |
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 misc] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1902 (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
|
1903 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1904 (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
|
1905 '("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
|
1906 (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
|
1907 '("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
|
1908 (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
|
1909 '("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
|
1910 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1911 (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
|
1912 '("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
|
1913 (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
|
1914 '("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
|
1915 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1916 (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
|
1917 '("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
|
1918 (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
|
1919 '("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
|
1920 |
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 sort] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1922 (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
|
1923 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1924 (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
|
1925 '("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
|
1926 (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
|
1927 '("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
|
1928 (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
|
1929 '("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
|
1930 (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
|
1931 '("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
|
1932 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1933 (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
|
1934 (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
|
1935 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1936 (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
|
1937 '("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
|
1938 (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
|
1939 '("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
|
1940 (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
|
1941 '("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
|
1942 (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
|
1943 '("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
|
1944 (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
|
1945 '("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
|
1946 (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
|
1947 '("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
|
1948 (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
|
1949 '("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
|
1950 (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
|
1951 '("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
|
1952 (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
|
1953 '("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
|
1954 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1955 (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
|
1956 (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
|
1957 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1958 (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
|
1959 '("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
|
1960 (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
|
1961 '("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
|
1962 (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
|
1963 '("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
|
1964 (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
|
1965 '("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
|
1966 (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
|
1967 '("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
|
1968 (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
|
1969 '("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
|
1970 |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1971 (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
|
1972 '("---")) |
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 (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
|
1975 '("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
|
1976 (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
|
1977 '("Save Article" . gnus-summary-save-article)) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1978 |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1979 (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
|
1980 '("---")) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1981 |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1982 (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
|
1983 '("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
|
1984 (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
|
1985 '("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
|
1986 (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
|
1987 '("Followup" . gnus-summary-followup)) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1988 (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
|
1989 '("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
|
1990 (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
|
1991 '("Reply" . gnus-summary-reply)) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1992 (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
|
1993 '("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
|
1994 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1995 (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
|
1996 (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
|
1997 |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1998 (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
|
1999 '("Search in Article" . gnus-summary-isearch-article)) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
2000 (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
|
2001 '("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
|
2002 (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
|
2003 '("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
|
2004 (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
|
2005 '("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
|
2006 (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
|
2007 '("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
|
2008 (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
|
2009 '("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
|
2010 (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
|
2011 '("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
|
2012 (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
|
2013 '("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
|
2014 (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
|
2015 '("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
|
2016 (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
|
2017 '("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
|
2018 ) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
2019 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2020 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2021 (defun gnus-summary-mode () |
257 | 2022 "Major mode for reading articles in this newsgroup. |
2023 All normal editing commands are turned off. | |
2024 Instead, these commands are available: | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2025 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2026 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
|
2027 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
|
2028 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
|
2029 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
|
2030 n Move to the next unread article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2031 p Move to the previous unread article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2032 N Move to the next article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2033 P Move to the previous article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2034 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
|
2035 current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2036 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
|
2037 current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2038 \\[gnus-summary-next-unread-same-subject] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2039 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
|
2040 current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2041 \\[gnus-summary-prev-unread-same-subject] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2042 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
|
2043 the current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2044 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
|
2045 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
|
2046 C-n Move to the next subject. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2047 C-p Move to the previous subject. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2048 ESC n Move to the next unread subject. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2049 ESC p Move to the previous unread subject. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2050 \\[gnus-summary-next-group] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2051 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
|
2052 \\[gnus-summary-prev-group] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2053 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
|
2054 . 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
|
2055 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
|
2056 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
|
2057 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
|
2058 < 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
|
2059 > 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
|
2060 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
|
2061 l Jump to the article you read last. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2062 ^ Refer to parent of the current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2063 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
|
2064 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
|
2065 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
|
2066 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
|
2067 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
|
2068 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
|
2069 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
|
2070 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
|
2071 read, and then select the next unread article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2072 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
|
2073 read. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2074 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
|
2075 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
|
2076 ESC C-t Toggle showing conversation threads. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2077 ESC C-s Show thread subtrees. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2078 ESC C-h Hide thread subtrees. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2079 \\[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
|
2080 \\[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
|
2081 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
|
2082 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
|
2083 ESC C-d Go downward current thread. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2084 ESC C-u Go upward current thread. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2085 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
|
2086 & Execute a command for each article conditionally. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2087 \\[gnus-summary-catchup] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2088 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
|
2089 articles marked as unread. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2090 \\[gnus-summary-catchup-all] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2091 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
|
2092 \\[gnus-summary-catchup-and-exit] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2093 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
|
2094 current newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2095 \\[gnus-summary-catchup-all-and-exit] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2096 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
|
2097 C-t Toggle truncations of subject lines. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2098 x Delete subject lines marked as read. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2099 X Delete subject lines with the specific marks. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2100 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
|
2101 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
|
2102 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
|
2103 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
|
2104 = 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
|
2105 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
|
2106 w Stop page breaking by linefeed. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2107 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
|
2108 g Force to show the current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2109 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
|
2110 vice versa. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2111 ESC-t Toggle MIME processing. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2112 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
|
2113 a Post a new article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2114 f Post a reply article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2115 F Post a reply article with original article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2116 C Cancel the current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2117 r Mail a message to the author. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2118 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
|
2119 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
|
2120 m Mail a message in other window. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2121 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
|
2122 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
|
2123 | 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
|
2124 q Quit reading news in the current newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2125 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
|
2126 V Show the version number of this GNUS. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2127 ? Describe Summary mode commands briefly. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2128 C-h m Describe Summary mode. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2129 C-c C-i Read Info about Summary mode. |
257 | 2130 |
2131 User customizable variables: | |
2132 gnus-large-newsgroup | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2133 The number of articles which indicates a large newsgroup. If the |
257 | 2134 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
|
2135 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
|
2136 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
|
2137 the first N articles are selected. An empty string means to select |
257 | 2138 all articles. |
2139 | |
2140 gnus-use-long-file-name | |
2141 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
|
2142 to save articles to. If it's nil, the directory form of a |
257 | 2143 newsgroup is used instead. |
2144 | |
2145 gnus-default-article-saver | |
2146 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
|
2147 funcallable. Following functions are available: |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2148 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2149 gnus-summary-save-in-rmail (in Rmail format) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2150 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
|
2151 gnus-summary-save-in-folder (in MH folder) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2152 gnus-summary-save-in-file (in article format). |
257 | 2153 |
2154 gnus-rmail-save-name | |
2155 gnus-mail-save-name | |
2156 gnus-folder-save-name | |
2157 gnus-file-save-name | |
2158 Specifies a function generating a file name to save articles in | |
2159 specified format. The function is called with NEWSGROUP, HEADERS, | |
2160 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
|
2161 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
|
2162 `gnus-header-FIELD'. |
257 | 2163 |
2164 gnus-article-save-directory | |
2165 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
|
2166 `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
|
2167 `gnus-summary-save-in-file'. The variable is initialized from the |
257 | 2168 SAVEDIR environment variable. |
2169 | |
8444 | 2170 gnus-kill-files-directory |
2171 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
|
2172 `gnus-edit-global-kill', and `gnus-edit-local-kill'. The variable is |
8444 | 2173 initialized from the SAVEDIR environment variable. |
2174 | |
257 | 2175 gnus-show-all-headers |
2176 Non-nil means that all headers of an article are shown. | |
2177 | |
2178 gnus-save-all-headers | |
2179 Non-nil means that all headers of an article are saved in a file. | |
2180 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2181 gnus-show-mime |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2182 Non-nil means that show a MIME message. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2183 |
257 | 2184 gnus-show-threads |
2185 Non-nil means that conversation threads are shown in tree structure. | |
2186 | |
2187 gnus-thread-hide-subject | |
2188 Non-nil means that subjects for thread subtrees are hidden. | |
2189 | |
2190 gnus-thread-hide-subtree | |
2191 Non-nil means that thread subtrees are hidden initially. | |
2192 | |
2193 gnus-thread-hide-killed | |
2194 Non-nil means that killed thread subtrees are hidden automatically. | |
2195 | |
2196 gnus-thread-ignore-subject | |
2197 Non-nil means that subject differences are ignored in constructing | |
2198 thread trees. | |
2199 | |
2200 gnus-thread-indent-level | |
2201 Indentation of thread subtrees. | |
2202 | |
2203 gnus-optional-headers | |
2204 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
|
2205 in the Summary buffer. The function is called with an article |
257 | 2206 HEADERS. The result must be a string excluding `[' and `]'. The |
2207 default function returns a string like NNN:AUTHOR, where NNN is | |
2208 the number of lines in an article and AUTHOR is the name of the | |
2209 author. | |
2210 | |
2211 gnus-auto-extend-newsgroup | |
2212 Non-nil means visible articles are extended to forward and | |
2213 backward automatically if possible. | |
2214 | |
2215 gnus-auto-select-first | |
2216 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
|
2217 when a newsgroup is selected normally (by `gnus-group-read-group'). |
257 | 2218 If you'd like to prevent automatic selection of the first unread |
2219 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
|
2220 `gnus-select-group-hook' or `gnus-apply-kill-hook'. |
257 | 2221 |
2222 gnus-auto-select-next | |
2223 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
|
2224 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
|
2225 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
|
2226 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
|
2227 exit Summary mode but select the following unread newsgroup. |
257 | 2228 Especially, if the value is the symbol `quietly', the next unread |
2229 newsgroup will be selected without any confirmations. | |
2230 | |
2231 gnus-auto-select-same | |
2232 Non-nil means an article with the same subject as the current | |
2233 article is selected automagically like `rn -S'. | |
2234 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2235 gnus-auto-center-summary |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2236 Non-nil means the point of Summary Mode window is always kept |
257 | 2237 centered. |
2238 | |
2239 gnus-break-pages | |
2240 Non-nil means an article is broken into pages at page delimiters. | |
2241 This may not work with some versions of GNU Emacs earlier than | |
2242 version 18.50. | |
2243 | |
2244 gnus-page-delimiter | |
2245 Specifies a regexp describing line-beginnings that separate pages | |
2246 of news article. | |
2247 | |
2248 gnus-digest-show-summary | |
2249 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
|
2250 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
|
2251 command. |
257 | 2252 |
2253 gnus-digest-separator | |
2254 Specifies a regexp separating messages in a digest article. | |
2255 | |
2256 gnus-mail-reply-method | |
2257 gnus-mail-other-window-method | |
2258 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
|
2259 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
|
2260 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
|
2261 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
|
2262 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
|
2263 `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
|
2264 `gnus-mail-other-window-method'. |
257 | 2265 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2266 gnus-mail-send-method |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2267 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
|
2268 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
|
2269 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
|
2270 uses sendmail mail program. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2271 |
257 | 2272 Various hooks for customization: |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2273 gnus-summary-mode-hook |
257 | 2274 Entry to this mode calls the value with no arguments, if that |
2275 value is non-nil. | |
2276 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2277 gnus-select-group-hook |
257 | 2278 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
|
2279 is non-nil. It is possible to sort subjects in this hook. See the |
257 | 2280 documentation of this variable for more information. |
2281 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2282 gnus-summary-prepare-hook |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2283 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
|
2284 Summary buffer, if that value is non-nil. If you'd like to modify |
257 | 2285 the buffer, you can use this hook. |
2286 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2287 gnus-select-article-hook |
257 | 2288 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
|
2289 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
|
2290 information. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2291 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2292 gnus-select-digest-hook |
257 | 2293 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
|
2294 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
|
2295 article so that Rmail can work with it. See the documentation of |
257 | 2296 the variable for more information. |
2297 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2298 gnus-rmail-digest-hook |
257 | 2299 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
|
2300 if that value is non-nil. This hook is intended to customize Rmail |
257 | 2301 mode. |
2302 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2303 gnus-apply-kill-hook |
257 | 2304 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
|
2305 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
|
2306 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
|
2307 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
|
2308 them in the new format. See the documentation of Kill file mode |
257 | 2309 for more information. |
2310 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2311 gnus-mark-article-hook |
257 | 2312 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
|
2313 time. The hook is intended to mark an article as read (or unread) |
257 | 2314 automatically when it is selected. See the documentation of the |
2315 variable for more information. | |
2316 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2317 gnus-exit-group-hook |
257 | 2318 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
|
2319 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
|
2320 from Summary mode takes very long time, inhibit marking articles |
257 | 2321 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
|
2322 gnus-use-cross-reference to nil in this hook." |
257 | 2323 (interactive) |
2324 (kill-all-local-variables) | |
2325 ;; Gee. Why don't you upgrade? | |
2326 (cond ((boundp 'mode-line-modified) | |
2327 (setq mode-line-modified "--- ")) | |
2328 ((listp (default-value 'mode-line-format)) | |
2329 (setq mode-line-format | |
2330 (cons "--- " (cdr (default-value 'mode-line-format)))))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2331 ;; To disable display-time facility. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2332 ;;(make-local-variable 'global-mode-string) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2333 ;;(setq global-mode-string nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2334 (setq major-mode 'gnus-summary-mode) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2335 (setq mode-name "Summary") |
257 | 2336 ;;(setq mode-line-process '(" " gnus-newsgroup-name)) |
2337 (make-local-variable 'minor-mode-alist) | |
2338 (or (assq 'gnus-show-threads minor-mode-alist) | |
2339 (setq minor-mode-alist | |
2340 (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
|
2341 (gnus-summary-set-mode-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2342 (use-local-map gnus-summary-mode-map) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2343 (buffer-flush-undo (current-buffer)) |
257 | 2344 (setq buffer-read-only t) ;Disable modification |
2345 (setq truncate-lines t) ;Stop line folding | |
2346 (setq selective-display t) | |
2347 (setq selective-display-ellipses t) ;Display `...' | |
2348 ;;(setq case-fold-search t) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2349 (run-hooks 'gnus-summary-mode-hook)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2350 |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
2351 (defun gnus-mouse-pick-article (e) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
2352 (interactive "e") |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
2353 (mouse-set-point e) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
2354 (gnus-summary-next-page nil)) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
2355 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2356 (defun gnus-summary-setup-buffer () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2357 "Initialize Summary buffer." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2358 (if (get-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2359 (set-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2360 (set-buffer (get-buffer-create gnus-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2361 (gnus-summary-mode) |
257 | 2362 )) |
2363 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2364 (defun gnus-summary-read-group (group &optional show-all no-article) |
257 | 2365 "Start reading news in newsgroup GROUP. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2366 If optional 1st argument SHOW-ALL is non-nil, already read articles are |
257 | 2367 also listed. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2368 If optional 2nd argument NO-ARTICLE is non-nil, no article is selected |
257 | 2369 initially." |
2370 (message "Retrieving newsgroup: %s..." group) | |
2371 (if (gnus-select-newsgroup group show-all) | |
2372 (progn | |
2373 ;; Don't switch-to-buffer to prevent displaying old contents | |
2374 ;; of the buffer until new subjects list is created. | |
2375 ;; Suggested by Juha Heinanen <jh@tut.fi> | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2376 (gnus-summary-setup-buffer) |
257 | 2377 ;; 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
|
2378 (run-hooks 'gnus-select-group-hook) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2379 (gnus-summary-prepare) |
257 | 2380 ;; 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
|
2381 (run-hooks 'gnus-apply-kill-hook) |
257 | 2382 (if (zerop (buffer-size)) |
2383 ;; This newsgroup is empty. | |
2384 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2385 (gnus-summary-catchup-and-exit nil t) ;Without confirmations. |
257 | 2386 (message "No unread news")) |
2387 ;; 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
|
2388 ;; gnus-summary-prepare-hook since kill processing may not |
257 | 2389 ;; work with hidden articles. |
2390 (and gnus-show-threads | |
2391 gnus-thread-hide-subtree | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2392 (gnus-summary-hide-all-threads)) |
257 | 2393 ;; Show first unread article if requested. |
2394 (goto-char (point-min)) | |
2395 (if (and (not no-article) | |
2396 gnus-auto-select-first | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2397 (gnus-summary-first-unread-article)) |
257 | 2398 ;; Window is configured automatically. |
2399 ;; 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
|
2400 ;; evaluation, especially by gnus-summary-rmail-digest |
257 | 2401 ;; 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
|
2402 (if (eq (current-buffer) (get-buffer gnus-summary-buffer)) |
257 | 2403 (progn |
2404 ;; Adjust cursor point. | |
2405 (beginning-of-line) | |
2406 (search-forward ":" nil t))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2407 (gnus-configure-windows 'summary) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2408 (pop-to-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2409 (gnus-summary-set-mode-line) |
257 | 2410 ;; 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
|
2411 (if (get-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2412 (if (get-buffer-window gnus-article-buffer) |
257 | 2413 (save-excursion |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2414 (set-buffer gnus-article-buffer) |
257 | 2415 (let ((buffer-read-only nil)) |
2416 (erase-buffer))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2417 (kill-buffer gnus-article-buffer))) |
257 | 2418 ;; Adjust cursor point. |
2419 (beginning-of-line) | |
2420 (search-forward ":" nil t)) | |
2421 )) | |
2422 ;; Cannot select newsgroup GROUP. | |
2423 (if (gnus-gethash group gnus-active-hashtb) | |
2424 (progn | |
2425 ;; If NNTP is used, nntp_access file may not be installed | |
2426 ;; properly. Otherwise, may be active file problem. | |
2427 (ding) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2428 (message |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2429 (gnus-nntp-message |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2430 (format "Cannot select %s. May be security or active file problem." group))) |
257 | 2431 (sit-for 0)) |
2432 ;; Check bogus newsgroups. | |
2433 ;; We must be in Group Mode buffer. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2434 (gnus-group-check-bogus-groups)) |
257 | 2435 )) |
2436 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2437 (defun gnus-summary-prepare () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2438 "Prepare summary list of current newsgroup in Summary buffer." |
257 | 2439 (let ((buffer-read-only nil)) |
2440 ;; 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
|
2441 ;; want it can define them in gnus-select-group-hook. |
257 | 2442 ;; Print verbose messages if too many articles are selected. |
2443 ;; (and (numberp gnus-large-newsgroup) | |
2444 ;; (> (length gnus-newsgroup-headers) gnus-large-newsgroup) | |
2445 ;; (message "Preparing headers...")) | |
2446 (erase-buffer) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2447 (gnus-summary-prepare-threads |
257 | 2448 (if gnus-show-threads |
2449 (gnus-make-threads gnus-newsgroup-headers) | |
2450 gnus-newsgroup-headers) 0) | |
2451 ;; Erase header retrieval message. | |
2452 (message "") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2453 ;; Call hooks for modifying Summary buffer. |
257 | 2454 ;; Suggested by sven@tde.LTH.Se (Sven Mattisson). |
2455 (goto-char (point-min)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2456 (run-hooks 'gnus-summary-prepare-hook) |
257 | 2457 )) |
2458 | |
2459 ;; 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
|
2460 ;; 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
|
2461 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2462 (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
|
2463 "Prepare Summary buffer from THREADS and indentation LEVEL. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2464 THREADS is a list of `(PARENT [(CHILD1 [(GRANDCHILD ...]...) ...]).' |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2465 Optional PARENT-SUBJECT specifies the subject of the parent." |
257 | 2466 (let ((thread nil) |
2467 (header nil) | |
2468 (number nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2469 (subject nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2470 (child-subject nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2471 (parent-subject (or parent-subject "")) |
257 | 2472 ;; `M Indent NUM: [OPT] SUBJECT' |
2473 (cntl (format "%%s %%s%%%dd: [%%s] %%s\n" | |
2474 (length (prin1-to-string gnus-newsgroup-end))))) | |
2475 (while threads | |
2476 (setq thread (car threads)) | |
2477 (setq threads (cdr threads)) | |
2478 ;; If thread is a cons, hierarchical threads is given. | |
2479 ;; Otherwise, thread itself is header. | |
2480 (if (consp thread) | |
2481 (setq header (car thread)) | |
2482 (setq header thread)) | |
2483 ;; Print valid header only. | |
2484 (if (vectorp header) ;Depends on nntp.el. | |
2485 (progn | |
2486 (setq number (nntp-header-number header)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2487 (setq subject (nntp-header-subject header)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2488 (setq child-subject (gnus-simplify-subject subject 're-only)) |
257 | 2489 (insert |
2490 (format cntl | |
2491 ;; Read or not. | |
2492 (cond ((memq number gnus-newsgroup-marked) "-") | |
2493 ((memq number gnus-newsgroup-unreads) " ") | |
2494 (t "D")) | |
2495 ;; Thread level. | |
2496 (make-string (* level gnus-thread-indent-level) ? ) | |
2497 ;; Article number. | |
2498 number | |
2499 ;; Optional headers. | |
2500 (or (and gnus-optional-headers | |
2501 (funcall gnus-optional-headers header)) "") | |
2502 ;; Its subject string. | |
2503 (concat (if (or (zerop level) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2504 (not gnus-thread-hide-subject) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2505 ;; Subject is different from the parent. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2506 (not (string-equal |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2507 parent-subject child-subject))) |
257 | 2508 nil |
2509 (make-string (window-width) ? )) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2510 subject) |
257 | 2511 )) |
2512 )) | |
2513 ;; Print subthreads. | |
2514 (and (consp thread) | |
2515 (cdr thread) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2516 (gnus-summary-prepare-threads |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2517 (cdr thread) (1+ level) child-subject)) |
257 | 2518 ))) |
2519 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2520 ;;(defun gnus-summary-set-mode-line () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2521 ;; "Set Summary mode line string." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2522 ;; ;; 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
|
2523 ;; (let ((subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2524 ;; (if gnus-current-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2525 ;; (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
|
2526 ;; (setq mode-line-buffer-identification |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2527 ;; (concat "GNUS: " |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2528 ;; subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2529 ;; ;; Enough spaces to pad subject to 17 positions. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2530 ;; (make-string (max 0 (- 17 (length subject))) ? )))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2531 ;; (set-buffer-modified-p t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2532 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2533 ;; New implementation in gnus 3.14.3 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2534 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2535 (defun gnus-summary-set-mode-line () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2536 "Set Summary mode line string. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2537 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
|
2538 (let ((unmarked |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2539 (- (length gnus-newsgroup-unreads) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2540 (length (gnus-intersection |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2541 gnus-newsgroup-unreads gnus-newsgroup-marked)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2542 (unselected |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2543 (- (length gnus-newsgroup-unselected) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2544 (length (gnus-intersection |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2545 gnus-newsgroup-unselected gnus-newsgroup-marked))))) |
257 | 2546 (setq mode-line-buffer-identification |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2547 (list 17 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2548 (format "GNUS: %s%s %s" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2549 gnus-newsgroup-name |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2550 (if gnus-current-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2551 (format "/%d" gnus-current-article) "") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2552 ;; Basic ideas by tale@pawl.rpi.edu. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2553 (cond ((and (zerop unmarked) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2554 (zerop unselected)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2555 "") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2556 ((zerop unselected) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2557 (format "{%d more}" unmarked)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2558 (t |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2559 (format "{%d(+%d) more}" unmarked unselected))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2560 )))) |
257 | 2561 (set-buffer-modified-p t)) |
2562 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2563 ;; GNUS Summary mode command. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2564 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2565 (defun gnus-summary-search-group (&optional backward) |
257 | 2566 "Search for next unread newsgroup. |
2567 If optional argument BACKWARD is non-nil, search backward instead." | |
2568 (save-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2569 (set-buffer gnus-group-buffer) |
257 | 2570 (save-excursion |
2571 ;; 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
|
2572 (if (gnus-group-search-forward backward nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2573 (gnus-group-group-name)) |
257 | 2574 ))) |
2575 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2576 (defun gnus-summary-search-subject (backward unread subject) |
257 | 2577 "Search for article forward. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2578 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
|
2579 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
|
2580 If 3rd argument SUBJECT is non-nil, the article which has |
257 | 2581 the same subject will be searched for." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2582 (let ((func |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2583 (if backward |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2584 (function re-search-backward) (function re-search-forward))) |
257 | 2585 (article nil) |
2586 ;; We have to take care of hidden lines. | |
2587 (regexp | |
2588 (format "^%s[ \t]+\\([0-9]+\\):.\\[[^]\r\n]*\\][ \t]+%s" | |
2589 ;;(if unread " " ".") | |
6309
9217f29851c2
Don't use triple-hyphen in a character class.
Karl Heuer <kwzh@gnu.org>
parents:
5911
diff
changeset
|
2590 (cond ((eq unread t) " ") (unread "[- ]") (t ".")) |
257 | 2591 (if subject |
2592 (concat "\\([Rr][Ee]:[ \t]+\\)*" | |
2593 (regexp-quote (gnus-simplify-subject subject)) | |
2594 ;; Ignore words in parentheses. | |
2595 "\\([ \t]*([^\r\n]*)\\)*[ \t]*\\(\r\\|$\\)") | |
2596 "") | |
2597 ))) | |
2598 (if backward | |
2599 (beginning-of-line) | |
2600 (end-of-line)) | |
2601 (if (funcall func regexp nil t) | |
2602 (setq article | |
2603 (string-to-int | |
2604 (buffer-substring (match-beginning 1) (match-end 1))))) | |
2605 ;; Adjust cursor point. | |
2606 (beginning-of-line) | |
2607 (search-forward ":" nil t) | |
2608 ;; This is the result. | |
2609 article | |
2610 )) | |
2611 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2612 (defun gnus-summary-search-forward (&optional unread subject) |
257 | 2613 "Search for article forward. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2614 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
|
2615 If 2nd optional argument SUBJECT is non-nil, the article which has |
257 | 2616 the same subject will be searched for." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2617 (gnus-summary-search-subject nil unread subject)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2618 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2619 (defun gnus-summary-search-backward (&optional unread subject) |
257 | 2620 "Search for article backward. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2621 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
|
2622 If 2nd optional argument SUBJECT is non-nil, the article which has |
257 | 2623 the same subject will be searched for." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2624 (gnus-summary-search-subject t unread subject)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2625 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2626 (defun gnus-summary-article-number () |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2627 "Return the Article number around point. |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
2628 If none, return current article number." |
257 | 2629 (save-excursion |
2630 (beginning-of-line) | |
2631 (if (looking-at ".[ \t]+\\([0-9]+\\):") | |
2632 (string-to-int | |
2633 (buffer-substring (match-beginning 1) (match-end 1))) | |
2634 ;; If search fail, return current article number. | |
2635 gnus-current-article | |
2636 ))) | |
2637 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2638 (defun gnus-summary-subject-string () |
257 | 2639 "Return current subject string or nil if nothing." |
2640 (save-excursion | |
2641 ;; 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
|
2642 ;; `gnus-summary-article-number' and `gnus-newsgroup-headers'. |
257 | 2643 (beginning-of-line) |
2644 ;; We have to take care of hidden lines. | |
2645 (if (looking-at ".[ \t]+[0-9]+:.\\[[^]\r\n]*\\][ \t]+\\([^\r\n]*\\)[\r\n]") | |
2646 (buffer-substring (match-beginning 1) (match-end 1))) | |
2647 )) | |
2648 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2649 (defun gnus-summary-goto-subject (article) |
257 | 2650 "Move point to ARTICLE's subject." |
2651 (interactive | |
2652 (list | |
2653 (string-to-int | |
2654 (completing-read "Article number: " | |
2655 (mapcar | |
2656 (function | |
2657 (lambda (headers) | |
2658 (list | |
2659 (int-to-string (nntp-header-number headers))))) | |
2660 gnus-newsgroup-headers) | |
2661 nil 'require-match)))) | |
2662 (let ((current (point))) | |
2663 (goto-char (point-min)) | |
2664 (or (and article (re-search-forward (format "^.[ \t]+%d:" article) nil t)) | |
2665 (progn (goto-char current) nil)) | |
2666 )) | |
2667 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2668 (defun gnus-summary-recenter () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2669 "Center point in Summary window." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2670 ;; Scroll window so as to cursor comes center of Summary window |
257 | 2671 ;; only when article is displayed. |
2672 ;; Suggested by earle@mahendo.JPL.NASA.GOV (Greg Earle). | |
2673 ;; Recenter only when requested. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2674 ;; Subbested by popovich@park.cs.columbia.edu |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2675 (and gnus-auto-center-summary |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2676 (get-buffer-window gnus-article-buffer) |
257 | 2677 (< (/ (- (window-height) 1) 2) |
2678 (count-lines (point) (point-max))) | |
2679 (recenter (/ (- (window-height) 2) 2)))) | |
2680 | |
2681 ;; Walking around Group mode buffer. | |
2682 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2683 (defun gnus-summary-jump-to-group (newsgroup) |
257 | 2684 "Move point to NEWSGROUP in Group mode buffer." |
2685 ;; Keep update point of Group mode buffer if visible. | |
2686 (if (eq (current-buffer) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2687 (get-buffer gnus-group-buffer)) |
257 | 2688 (save-window-excursion |
2689 ;; Take care of tree window mode. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2690 (if (get-buffer-window gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2691 (pop-to-buffer gnus-group-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2692 (gnus-group-jump-to-group newsgroup)) |
257 | 2693 (save-excursion |
2694 ;; Take care of tree window mode. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2695 (if (get-buffer-window gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2696 (pop-to-buffer gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2697 (set-buffer gnus-group-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2698 (gnus-group-jump-to-group newsgroup)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2699 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2700 (defun gnus-summary-next-group (no-article) |
257 | 2701 "Exit current newsgroup and then select next unread newsgroup. |
2702 If prefix argument NO-ARTICLE is non-nil, no article is selected initially." | |
2703 (interactive "P") | |
2704 ;; 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
|
2705 (gnus-summary-jump-to-group gnus-newsgroup-name) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2706 (let ((group (gnus-summary-search-group))) |
257 | 2707 (if (null group) |
2708 (progn | |
2709 (message "Exiting %s..." gnus-newsgroup-name) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2710 (gnus-summary-exit) |
257 | 2711 (message "")) |
2712 (message "Selecting %s..." group) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2713 (gnus-summary-exit t) ;Exit Summary mode temporary. |
257 | 2714 ;; We are now in Group mode buffer. |
2715 ;; 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
|
2716 (gnus-summary-jump-to-group group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2717 (gnus-summary-read-group group nil no-article) |
257 | 2718 (or (eq (current-buffer) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2719 (get-buffer gnus-summary-buffer)) |
257 | 2720 (eq gnus-auto-select-next t) |
2721 ;; 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
|
2722 ;; 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
|
2723 ;; newsgroup. (Make sure we are in Group mode buffer now.) |
257 | 2724 (and (eq (current-buffer) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2725 (get-buffer gnus-group-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2726 (gnus-group-group-name) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2727 (gnus-summary-read-group |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2728 (gnus-group-group-name) nil no-article)) |
257 | 2729 ) |
2730 ))) | |
2731 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2732 (defun gnus-summary-prev-group (no-article) |
257 | 2733 "Exit current newsgroup and then select previous unread newsgroup. |
2734 If prefix argument NO-ARTICLE is non-nil, no article is selected initially." | |
2735 (interactive "P") | |
2736 ;; 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
|
2737 (gnus-summary-jump-to-group gnus-newsgroup-name) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2738 (let ((group (gnus-summary-search-group t))) |
257 | 2739 (if (null group) |
2740 (progn | |
2741 (message "Exiting %s..." gnus-newsgroup-name) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2742 (gnus-summary-exit) |
257 | 2743 (message "")) |
2744 (message "Selecting %s..." group) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2745 (gnus-summary-exit t) ;Exit Summary mode temporary. |
257 | 2746 ;; We are now in Group mode buffer. |
2747 ;; We have to adjust point of Group mode buffer because current | |
2748 ;; 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
|
2749 (gnus-summary-jump-to-group group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2750 (gnus-summary-read-group group nil no-article) |
257 | 2751 (or (eq (current-buffer) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2752 (get-buffer gnus-summary-buffer)) |
257 | 2753 (eq gnus-auto-select-next t) |
2754 ;; 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
|
2755 ;; 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
|
2756 ;; newsgroup. (Make sure we are in Group mode buffer now.) |
257 | 2757 (and (eq (current-buffer) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2758 (get-buffer gnus-group-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2759 (gnus-summary-search-group t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2760 (gnus-summary-read-group |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2761 (gnus-summary-search-group t) nil no-article)) |
257 | 2762 ) |
2763 ))) | |
2764 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2765 ;; Walking around summary lines. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2766 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2767 (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
|
2768 "Go to Nth following summary line. |
257 | 2769 If optional argument UNREAD is non-nil, only unread article is selected." |
2770 (interactive "p") | |
2771 (while (and (> n 1) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2772 (gnus-summary-search-forward unread)) |
257 | 2773 (setq n (1- n))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2774 (cond ((gnus-summary-search-forward unread) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2775 (gnus-summary-recenter)) |
257 | 2776 (unread |
2777 (message "No more unread articles")) | |
2778 (t | |
2779 (message "No more articles")) | |
2780 )) | |
2781 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2782 (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
|
2783 "Go to Nth following unread summary line." |
257 | 2784 (interactive "p") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2785 (gnus-summary-next-subject n t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2786 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2787 (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
|
2788 "Go to Nth previous summary line. |
257 | 2789 If optional argument UNREAD is non-nil, only unread article is selected." |
2790 (interactive "p") | |
2791 (while (and (> n 1) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2792 (gnus-summary-search-backward unread)) |
257 | 2793 (setq n (1- n))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2794 (cond ((gnus-summary-search-backward unread) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2795 (gnus-summary-recenter)) |
257 | 2796 (unread |
2797 (message "No more unread articles")) | |
2798 (t | |
2799 (message "No more articles")) | |
2800 )) | |
2801 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2802 (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
|
2803 "Go to Nth previous unread summary line." |
257 | 2804 (interactive "p") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2805 (gnus-summary-prev-subject n t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2806 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2807 ;; Walking around summary lines with displaying articles. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2808 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2809 (defun gnus-summary-expand-window () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2810 "Expand Summary window to show headers full window." |
257 | 2811 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2812 (gnus-configure-windows 'summary) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2813 (pop-to-buffer gnus-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2814 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2815 (defun gnus-summary-display-article (article &optional all-header) |
257 | 2816 "Display ARTICLE in Article buffer." |
2817 (if (null article) | |
2818 nil | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2819 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2820 (pop-to-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2821 (gnus-article-prepare article all-header) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2822 (gnus-summary-recenter) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2823 (gnus-summary-set-mode-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2824 (run-hooks 'gnus-select-article-hook) |
257 | 2825 ;; Successfully display article. |
2826 t | |
2827 )) | |
2828 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2829 (defun gnus-summary-select-article (&optional all-headers force) |
257 | 2830 "Select the current article. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2831 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
|
2832 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
|
2833 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
|
2834 (let ((article (gnus-summary-article-number)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2835 (all-headers (not (not all-headers)))) ;Must be T or NIL. |
257 | 2836 (if (or (null gnus-current-article) |
2837 (/= article gnus-current-article) | |
2838 (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
|
2839 ;; 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
|
2840 (gnus-summary-display-article article all-headers) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2841 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2842 (pop-to-buffer gnus-summary-buffer)) |
257 | 2843 )) |
2844 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2845 (defun gnus-summary-set-current-mark (&optional current-mark) |
257 | 2846 "Put `+' at the current article. |
2847 Optional argument specifies CURRENT-MARK instead of `+'." | |
2848 (save-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2849 (set-buffer gnus-summary-buffer) |
257 | 2850 (let ((buffer-read-only nil)) |
2851 (goto-char (point-min)) | |
2852 ;; First of all clear mark at last article. | |
2853 (if (re-search-forward "^.[ \t]+[0-9]+:[^ \t]" nil t) | |
2854 (progn | |
2855 (delete-char -1) | |
2856 (insert " ") | |
2857 (goto-char (point-min)))) | |
2858 (if (re-search-forward (format "^.[ \t]+%d:" gnus-current-article) nil t) | |
2859 (progn | |
2860 (delete-char 1) | |
2861 (insert (or current-mark "+")))) | |
2862 ))) | |
2863 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2864 ;;(defun gnus-summary-next-article (unread &optional subject) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2865 ;; "Select article after current one. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2866 ;;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
|
2867 ;; (interactive "P") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2868 ;; (cond ((gnus-summary-display-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2869 ;; (gnus-summary-search-forward unread subject))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2870 ;; (unread |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2871 ;; (message "No more unread articles")) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2872 ;; (t |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2873 ;; (message "No more articles")) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2874 ;; )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2875 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2876 (defun gnus-summary-next-article (unread &optional subject) |
257 | 2877 "Select article after current one. |
2878 If argument UNREAD is non-nil, only unread article is selected." | |
2879 (interactive "P") | |
2880 (let ((header nil)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2881 (cond ((gnus-summary-display-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2882 (gnus-summary-search-forward unread subject))) |
257 | 2883 ((and subject |
2884 gnus-auto-select-same | |
2885 (gnus-set-difference gnus-newsgroup-unreads | |
2886 gnus-newsgroup-marked) | |
2887 (memq this-command | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2888 '(gnus-summary-next-unread-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-kill-same-subject-and-select |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2891 ;;gnus-summary-next-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2892 ;;gnus-summary-next-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2893 ;;gnus-summary-next-unread-same-subject |
257 | 2894 ))) |
2895 ;; 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
|
2896 ;; Hook function, such as gnus-summary-rmail-digest, may |
257 | 2897 ;; change current buffer, so need check. |
2898 (let ((buffer (current-buffer)) | |
2899 (last-point (point))) | |
2900 ;; No more articles with same subject, so jump to the first | |
2901 ;; unread article. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2902 (gnus-summary-first-unread-article) |
257 | 2903 ;;(and (eq buffer (current-buffer)) |
2904 ;; (= (point) last-point) | |
2905 ;; ;; Ignore given SUBJECT, and try again. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2906 ;; (gnus-summary-next-article unread nil)) |
257 | 2907 (and (eq buffer (current-buffer)) |
2908 (< (point) last-point) | |
2909 (message "Wrapped")) | |
2910 )) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2911 ((and gnus-auto-extend-newsgroup |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2912 (not unread) ;Not unread only |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2913 (not subject) ;Only if subject is not specified. |
257 | 2914 (setq header (gnus-more-header-forward))) |
2915 ;; Extend to next article if possible. | |
2916 ;; Basic ideas by himacdonald@watdragon.waterloo.edu | |
2917 (gnus-extend-newsgroup header nil) | |
2918 ;; Threads feature must be turned off. | |
2919 (let ((buffer-read-only nil)) | |
2920 (goto-char (point-max)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2921 (gnus-summary-prepare-threads (list header) 0)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2922 (gnus-summary-goto-article gnus-newsgroup-end)) |
257 | 2923 (t |
2924 ;; 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
|
2925 (let ((cmd (aref (this-command-keys) 0)) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2926 (group (gnus-summary-search-group)) |
257 | 2927 (auto-select |
2928 (and gnus-auto-select-next | |
2929 ;;(null (gnus-set-difference gnus-newsgroup-unreads | |
2930 ;; gnus-newsgroup-marked)) | |
2931 (memq this-command | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2932 '(gnus-summary-next-unread-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2933 gnus-summary-next-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2934 gnus-summary-next-page |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2935 gnus-summary-next-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2936 gnus-summary-next-unread-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2937 gnus-summary-kill-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2938 gnus-summary-kill-same-subject-and-select |
257 | 2939 )) |
2940 ;; Ignore characters typed ahead. | |
2941 (not (input-pending-p)) | |
2942 ))) | |
7974
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2943 ;; 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
|
2944 (if (listp cmd) |
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2945 (setq cmd (car cmd))) |
257 | 2946 (message "No more%s articles%s" |
2947 (if unread " unread" "") | |
2948 (if (and auto-select | |
2949 (not (eq gnus-auto-select-next 'quietly))) | |
2950 (if group | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2951 (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
|
2952 (single-key-description cmd) |
257 | 2953 group |
2954 (nth 1 (gnus-gethash group | |
2955 gnus-unread-hashtb))) | |
2956 (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
|
2957 (single-key-description cmd) |
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2958 gnus-newsgroup-name)) |
257 | 2959 "")) |
2960 ;; Select next unread newsgroup automagically. | |
2961 (cond ((and auto-select | |
2962 (eq gnus-auto-select-next 'quietly)) | |
2963 ;; Select quietly. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2964 (gnus-summary-next-group nil)) |
257 | 2965 (auto-select |
2966 ;; Confirm auto selection. | |
7974
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2967 (let* ((event (read-event)) |
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2968 (type |
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2969 (if (listp event) |
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2970 (car event) |
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2971 event))) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
2972 (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
|
2973 (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
|
2974 (setq unread-command-events (list event))))) |
257 | 2975 ) |
2976 )) | |
2977 ))) | |
2978 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2979 (defun gnus-summary-next-unread-article () |
257 | 2980 "Select unread article after current one." |
2981 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2982 (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
|
2983 (gnus-summary-subject-string)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2984 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2985 (defun gnus-summary-prev-article (unread &optional subject) |
257 | 2986 "Select article before current one. |
2987 If argument UNREAD is non-nil, only unread article is selected." | |
2988 (interactive "P") | |
2989 (let ((header nil)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2990 (cond ((gnus-summary-display-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2991 (gnus-summary-search-backward unread subject))) |
257 | 2992 ((and subject |
2993 gnus-auto-select-same | |
2994 (gnus-set-difference gnus-newsgroup-unreads | |
2995 gnus-newsgroup-marked) | |
2996 (memq this-command | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2997 '(gnus-summary-prev-unread-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2998 ;;gnus-summary-prev-page |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2999 ;;gnus-summary-prev-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3000 ;;gnus-summary-prev-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3001 ;;gnus-summary-prev-unread-same-subject |
257 | 3002 ))) |
3003 ;; Ignore given SUBJECT, and try again. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3004 (gnus-summary-prev-article unread nil)) |
257 | 3005 (unread |
3006 (message "No more unread articles")) | |
3007 ((and gnus-auto-extend-newsgroup | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3008 (not subject) ;Only if subject is not specified. |
257 | 3009 (setq header (gnus-more-header-backward))) |
3010 ;; Extend to previous article if possible. | |
3011 ;; Basic ideas by himacdonald@watdragon.waterloo.edu | |
3012 (gnus-extend-newsgroup header t) | |
3013 (let ((buffer-read-only nil)) | |
3014 (goto-char (point-min)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3015 (gnus-summary-prepare-threads (list header) 0)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3016 (gnus-summary-goto-article gnus-newsgroup-begin)) |
257 | 3017 (t |
3018 (message "No more articles")) | |
3019 ))) | |
3020 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3021 (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
|
3022 "Select unread article before current one." |
257 | 3023 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3024 (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
|
3025 (gnus-summary-subject-string)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3026 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3027 (defun gnus-summary-next-page (lines) |
257 | 3028 "Show next page of selected article. |
3591
507f64624555
Apply typo patches from Paul Eggert.
Jim Blandy <jimb@redhat.com>
parents:
3496
diff
changeset
|
3029 If end of article, select next article. |
257 | 3030 Argument LINES specifies lines to be scrolled up." |
3031 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3032 (let ((article (gnus-summary-article-number)) |
257 | 3033 (endp nil)) |
3034 (if (or (null gnus-current-article) | |
3035 (/= article gnus-current-article)) | |
3036 ;; 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
|
3037 (gnus-summary-display-article article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3038 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3039 (pop-to-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3040 (gnus-eval-in-buffer-window gnus-article-buffer |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3041 (setq endp (gnus-article-next-page lines))) |
257 | 3042 (cond ((and endp lines) |
3043 (message "End of message")) | |
3044 ((and endp (null lines)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3045 (gnus-summary-next-unread-article))) |
257 | 3046 ))) |
3047 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3048 (defun gnus-summary-prev-page (lines) |
257 | 3049 "Show previous page of selected article. |
3050 Argument LINES specifies lines to be scrolled down." | |
3051 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3052 (let ((article (gnus-summary-article-number))) |
257 | 3053 (if (or (null gnus-current-article) |
3054 (/= article gnus-current-article)) | |
3055 ;; 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
|
3056 (gnus-summary-display-article article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3057 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3058 (pop-to-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3059 (gnus-eval-in-buffer-window gnus-article-buffer |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3060 (gnus-article-prev-page lines)) |
257 | 3061 ))) |
3062 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3063 (defun gnus-summary-scroll-up (lines) |
257 | 3064 "Scroll up (or down) one line current article. |
3065 Argument LINES specifies lines to be scrolled up (or down if negative)." | |
3066 (interactive "p") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3067 (gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3068 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3069 (cond ((> lines 0) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3070 (if (gnus-article-next-page lines) |
257 | 3071 (message "End of message"))) |
3072 ((< lines 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3073 (gnus-article-prev-page (- 0 lines)))) |
257 | 3074 )) |
3075 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3076 (defun gnus-summary-next-same-subject () |
257 | 3077 "Select next article which has the same subject as current one." |
3078 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3079 (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
|
3080 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3081 (defun gnus-summary-prev-same-subject () |
257 | 3082 "Select previous article which has the same subject as current one." |
3083 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3084 (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
|
3085 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3086 (defun gnus-summary-next-unread-same-subject () |
257 | 3087 "Select next unread article which has the same subject as current one." |
3088 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3089 (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
|
3090 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3091 (defun gnus-summary-prev-unread-same-subject () |
257 | 3092 "Select previous unread article which has the same subject as current one." |
3093 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3094 (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
|
3095 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3096 (defun gnus-summary-refer-parent-article (child) |
257 | 3097 "Refer parent article of current article. |
3098 If a prefix argument CHILD is non-nil, go back to the child article | |
3099 using internally maintained articles history. | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3100 NOTE: This command may not work with `nnspool.el'." |
257 | 3101 (interactive "P") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3102 (gnus-summary-select-article t t) ;Request all headers. |
257 | 3103 (let ((referenced-id nil)) ;Message-id of parent or child article. |
3104 (if child | |
3105 ;; Go back to child article using history. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3106 (gnus-summary-refer-article nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3107 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3108 ;; Look for parent Message-ID. |
3109 ;; 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
|
3110 ;; because we may be looking at parent or referred article. |
257 | 3111 (let ((references (gnus-fetch-field "References"))) |
3112 ;; Get the last message-id in the references. | |
3113 (and references | |
3114 (string-match "\\(<[^<>]+>\\)[^>]*\\'" references) | |
3115 (setq referenced-id | |
3116 (substring references | |
3117 (match-beginning 1) (match-end 1)))) | |
3118 )) | |
3119 (if (stringp referenced-id) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3120 (gnus-summary-refer-article referenced-id) |
257 | 3121 (error "No more parents")) |
3122 ))) | |
3123 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3124 (defun gnus-summary-refer-article (message-id) |
257 | 3125 "Refer article specified by MESSAGE-ID. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3126 If the MESSAGE-ID is nil or an empty string, Message-ID is poped from |
257 | 3127 internally maintained articles history. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3128 NOTE: This command may not work with `nnspool.el' nor `mhspool.el'." |
257 | 3129 (interactive "sMessage-ID: ") |
3130 ;; Make sure that this command depends on the fact that article | |
3131 ;; related information is not updated when an article is retrieved | |
3132 ;; by Message-ID. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3133 (gnus-summary-select-article t t) ;Request all headers. |
257 | 3134 (if (and (stringp message-id) |
3135 (> (length message-id) 0)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3136 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3137 ;; Construct the correct Message-ID if necessary. |
3138 ;; Suggested by tale@pawl.rpi.edu. | |
3139 (or (string-match "^<" message-id) | |
3140 (setq message-id (concat "<" message-id))) | |
3141 (or (string-match ">$" message-id) | |
3142 (setq message-id (concat message-id ">"))) | |
3143 ;; Push current message-id on history. | |
3144 ;; 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
|
3145 ;; message-id because we may be looking at parent or referred |
257 | 3146 ;; article. |
3147 (let ((current (gnus-fetch-field "Message-ID"))) | |
3148 (or (equal current message-id) ;Nothing to do. | |
3149 (equal current (car gnus-current-history)) | |
3150 (setq gnus-current-history | |
3151 (cons current gnus-current-history))) | |
3152 )) | |
3153 ;; Pop message-id from history. | |
3154 (setq message-id (car gnus-current-history)) | |
3155 (setq gnus-current-history (cdr gnus-current-history))) | |
3156 (if (stringp message-id) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3157 ;; 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
|
3158 ;; nnspool nor mhspool. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3159 (gnus-article-prepare message-id t) |
257 | 3160 (error "No such references")) |
3161 ) | |
3162 | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3163 (defun gnus-summary-next-digest (n) |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3164 "Move to head of Nth next digested message." |
257 | 3165 (interactive "p") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3166 (gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3167 (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
|
3168 (gnus-article-next-digest (or n 1)) |
257 | 3169 )) |
3170 | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3171 (defun gnus-summary-prev-digest (n) |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3172 "Move to head of Nth previous digested message." |
257 | 3173 (interactive "p") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3174 (gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3175 (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
|
3176 (gnus-article-prev-digest (or n 1)))) |
257 | 3177 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3178 (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
|
3179 "Select first unread article. Return non-nil if successfully selected." |
257 | 3180 (interactive) |
3181 (let ((begin (point))) | |
3182 (goto-char (point-min)) | |
3183 (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
|
3184 (gnus-summary-display-article (gnus-summary-article-number)) |
257 | 3185 ;; If there is no unread articles, stay there. |
3186 (goto-char begin) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3187 ;;(gnus-summary-display-article (gnus-summary-article-number)) |
257 | 3188 (message "No more unread articles") |
3189 nil | |
3190 ) | |
3191 )) | |
3192 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3193 (defun gnus-summary-isearch-article () |
257 | 3194 "Do incremental search forward on current article." |
3195 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3196 (gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3197 (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
|
3198 (isearch-forward))) |
257 | 3199 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3200 (defun gnus-summary-search-article-forward (regexp) |
257 | 3201 "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
|
3202 `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
|
3203 by searching search." |
257 | 3204 (interactive |
3205 (list (read-string | |
3206 (concat "Search forward (regexp): " | |
3207 (if gnus-last-search-regexp | |
3208 (concat "(default " gnus-last-search-regexp ") ")))))) | |
3209 (if (string-equal regexp "") | |
3210 (setq regexp (or gnus-last-search-regexp "")) | |
3211 (setq gnus-last-search-regexp regexp)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3212 (if (gnus-summary-search-article regexp nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3213 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3214 (recenter 0) |
3215 ;;(sit-for 1) | |
3216 ) | |
3217 (error "Search failed: \"%s\"" regexp) | |
3218 )) | |
3219 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3220 (defun gnus-summary-search-article-backward (regexp) |
257 | 3221 "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
|
3222 `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
|
3223 by searching search." |
257 | 3224 (interactive |
3225 (list (read-string | |
3226 (concat "Search backward (regexp): " | |
3227 (if gnus-last-search-regexp | |
3228 (concat "(default " gnus-last-search-regexp ") ")))))) | |
3229 (if (string-equal regexp "") | |
3230 (setq regexp (or gnus-last-search-regexp "")) | |
3231 (setq gnus-last-search-regexp regexp)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3232 (if (gnus-summary-search-article regexp t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3233 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3234 (recenter 0) |
3235 ;;(sit-for 1) | |
3236 ) | |
3237 (error "Search failed: \"%s\"" regexp) | |
3238 )) | |
3239 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3240 (defun gnus-summary-search-article (regexp &optional backward) |
257 | 3241 "Search for an article containing REGEXP. |
3242 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
|
3243 `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
|
3244 by searching search." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3245 (let ((gnus-select-article-hook nil) ;Disable hook. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3246 (gnus-mark-article-hook nil) ;Inhibit marking as read. |
257 | 3247 (re-search |
3248 (if backward | |
3249 (function re-search-backward) (function re-search-forward))) | |
3250 (found nil) | |
3251 (last nil)) | |
3252 ;; 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
|
3253 (gnus-summary-show-all-threads) |
257 | 3254 ;; First of all, search current article. |
3255 ;; We don't want to read article again from NNTP server nor reset | |
3256 ;; current point. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3257 (gnus-summary-select-article) |
257 | 3258 (message "Searching article: %d..." gnus-current-article) |
3259 (setq last gnus-current-article) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3260 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3261 (save-restriction |
3262 (widen) | |
3263 ;; Begin search from current point. | |
3264 (setq found (funcall re-search regexp nil t)))) | |
3265 ;; Then search next articles. | |
3266 (while (and (not found) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3267 (gnus-summary-display-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3268 (gnus-summary-search-subject backward nil nil))) |
257 | 3269 (message "Searching article: %d..." gnus-current-article) |
2843
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 (save-restriction |
3272 (widen) | |
3273 (goto-char (if backward (point-max) (point-min))) | |
3274 (setq found (funcall re-search regexp nil t))) | |
3275 )) | |
3276 (message "") | |
3277 ;; Adjust article pointer. | |
3278 (or (eq last gnus-current-article) | |
3279 (setq gnus-last-article last)) | |
3280 ;; Return T if found such article. | |
3281 found | |
3282 )) | |
3283 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3284 (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
|
3285 "If FIELD of article header matches REGEXP, execute a COMMAND string. |
257 | 3286 If FIELD is an empty string (or nil), entire article body is searched for. |
3287 If optional (prefix) argument BACKWARD is non-nil, do backward instead." | |
3288 (interactive | |
3289 (list (let ((completion-ignore-case t)) | |
3290 (completing-read "Field name: " | |
3291 '(("Number")("Subject")("From") | |
3292 ("Lines")("Date")("Id") | |
3293 ("Xref")("References")) | |
3294 nil 'require-match)) | |
3295 (read-string "Regexp: ") | |
3296 (read-key-sequence "Command: ") | |
3297 current-prefix-arg)) | |
3298 ;; 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
|
3299 (gnus-summary-show-all-threads) |
257 | 3300 ;; We don't want to change current point nor window configuration. |
3301 (save-excursion | |
3302 (save-window-excursion | |
3303 (message "Executing %s..." (key-description command)) | |
3304 ;; We'd like to execute COMMAND interactively so as to give arguments. | |
3305 (gnus-execute field regexp | |
3306 (` (lambda () | |
3307 (call-interactively '(, (key-binding command))))) | |
3308 backward) | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3309 (message "Executing %s...done" (key-description command))))) |
257 | 3310 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3311 (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
|
3312 "Go to beginning of article body." |
257 | 3313 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3314 (gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3315 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3316 (widen) |
3317 (beginning-of-buffer) | |
3318 (if gnus-break-pages | |
3319 (gnus-narrow-to-page)) | |
3320 )) | |
3321 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3322 (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
|
3323 "Go to end of article body." |
257 | 3324 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3325 (gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3326 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3327 (widen) |
3328 (end-of-buffer) | |
3329 (if gnus-break-pages | |
3330 (gnus-narrow-to-page)) | |
3331 )) | |
3332 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3333 (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
|
3334 "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
|
3335 Optional argument ALL-HEADERS means show the full header." |
257 | 3336 (interactive |
3337 (list | |
3338 (string-to-int | |
3339 (completing-read "Article number: " | |
3340 (mapcar | |
3341 (function | |
3342 (lambda (headers) | |
3343 (list | |
3344 (int-to-string (nntp-header-number headers))))) | |
3345 gnus-newsgroup-headers) | |
3346 nil 'require-match)))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3347 (if (gnus-summary-goto-subject article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3348 (gnus-summary-display-article article all-headers))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3349 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3350 (defun gnus-summary-goto-last-article () |
257 | 3351 "Go to last subject line." |
3352 (interactive) | |
3353 (if gnus-last-article | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3354 (gnus-summary-goto-article gnus-last-article))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3355 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3356 (defun gnus-summary-show-article () |
257 | 3357 "Force to show current article." |
3358 (interactive) | |
3359 ;; The following is a trick to force to read the current article again. | |
3360 (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
|
3361 (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
|
3362 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3363 (defun gnus-summary-toggle-header (arg) |
257 | 3364 "Show original header if pruned header currently shown, or vice versa. |
3365 With arg, show original header iff arg is positive." | |
3366 (interactive "P") | |
3367 ;; Variable gnus-show-all-headers must be NIL to toggle really. | |
3368 (let ((gnus-show-all-headers nil) | |
3369 (all-headers | |
3370 (if (null arg) (not gnus-have-all-headers) | |
3371 (> (prefix-numeric-value arg) 0)))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3372 (gnus-summary-select-article all-headers t))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3373 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3374 (defun gnus-summary-show-all-headers () |
257 | 3375 "Show original article header." |
3376 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3377 (gnus-summary-select-article t t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3378 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3379 (defun gnus-summary-toggle-mime (arg) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3380 "Toggle MIME processing. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3381 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
|
3382 (interactive "P") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3383 (setq gnus-show-mime |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3384 (if (null arg) (not gnus-show-mime) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3385 (> (prefix-numeric-value arg) 0))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3386 ;; 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
|
3387 (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
|
3388 (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
|
3389 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3390 (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
|
3391 "Stop page breaking by linefeed temporary (widen article buffer)." |
257 | 3392 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3393 (gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3394 (gnus-eval-in-buffer-window gnus-article-buffer |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3395 (widen) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3396 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3397 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3398 (defun gnus-summary-kill-same-subject-and-select (unmark) |
257 | 3399 "Mark articles which has the same subject as read, and then select next. |
3400 If argument UNMARK is positive, remove any kinds of marks. | |
3401 If argument UNMARK is negative, mark articles as unread instead." | |
3402 (interactive "P") | |
3403 (if unmark | |
3404 (setq unmark (prefix-numeric-value unmark))) | |
3405 (let ((count | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3406 (gnus-summary-mark-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3407 (gnus-summary-subject-string) unmark))) |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3408 ;; Select next unread article. If auto-select-same mode, should |
257 | 3409 ;; select the first unread article. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3410 (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
|
3411 (gnus-summary-subject-string))) |
257 | 3412 (message "%d articles are marked as %s" |
3413 count (if unmark "unread" "read")) | |
3414 )) | |
3415 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3416 (defun gnus-summary-kill-same-subject (unmark) |
257 | 3417 "Mark articles which has the same subject as read. |
3418 If argument UNMARK is positive, remove any kinds of marks. | |
3419 If argument UNMARK is negative, mark articles as unread instead." | |
3420 (interactive "P") | |
3421 (if unmark | |
3422 (setq unmark (prefix-numeric-value unmark))) | |
3423 (let ((count | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3424 (gnus-summary-mark-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3425 (gnus-summary-subject-string) unmark))) |
257 | 3426 ;; If marked as read, go to next unread subject. |
3427 (if (null unmark) | |
3428 ;; Go to next unread subject. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3429 (gnus-summary-next-subject 1 t)) |
257 | 3430 (message "%d articles are marked as %s" |
3431 count (if unmark "unread" "read")) | |
3432 )) | |
3433 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3434 (defun gnus-summary-mark-same-subject (subject &optional unmark) |
257 | 3435 "Mark articles with same SUBJECT as read, and return marked number. |
3436 If optional argument UNMARK is positive, remove any kinds of marks. | |
3437 If optional argument UNMARK is negative, mark articles as unread instead." | |
3438 (let ((count 1)) | |
3439 (save-excursion | |
3440 (cond ((null unmark) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3441 (gnus-summary-mark-as-read nil "K")) |
257 | 3442 ((> unmark 0) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3443 (gnus-summary-mark-as-unread nil t)) |
257 | 3444 (t |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3445 (gnus-summary-mark-as-unread))) |
257 | 3446 (while (and subject |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3447 (gnus-summary-search-forward nil subject)) |
257 | 3448 (cond ((null unmark) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3449 (gnus-summary-mark-as-read nil "K")) |
257 | 3450 ((> unmark 0) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3451 (gnus-summary-mark-as-unread nil t)) |
257 | 3452 (t |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3453 (gnus-summary-mark-as-unread))) |
257 | 3454 (setq count (1+ count)) |
3455 )) | |
3456 ;; Hide killed thread subtrees. Does not work properly always. | |
3457 ;;(and (null unmark) | |
3458 ;; gnus-thread-hide-killed | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3459 ;; (gnus-summary-hide-thread)) |
257 | 3460 ;; Return number of articles marked as read. |
3461 count | |
3462 )) | |
3463 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3464 (defun gnus-summary-mark-as-unread-forward (count) |
257 | 3465 "Mark current article as unread, and then go forward. |
3466 Argument COUNT specifies number of articles marked as unread." | |
3467 (interactive "p") | |
3468 (while (> count 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3469 (gnus-summary-mark-as-unread nil nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3470 (gnus-summary-next-subject 1 nil) |
257 | 3471 (setq count (1- count)))) |
3472 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3473 (defun gnus-summary-mark-as-unread-backward (count) |
257 | 3474 "Mark current article as unread, and then go backward. |
3475 Argument COUNT specifies number of articles marked as unread." | |
3476 (interactive "p") | |
3477 (while (> count 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3478 (gnus-summary-mark-as-unread nil nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3479 (gnus-summary-prev-subject 1 nil) |
257 | 3480 (setq count (1- count)))) |
3481 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3482 (defun gnus-summary-mark-as-unread (&optional article clear-mark) |
257 | 3483 "Mark current article as unread. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3484 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
|
3485 Optional 2nd argument CLEAR-MARK remove any kinds of mark." |
257 | 3486 (save-excursion |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3487 (set-buffer gnus-summary-buffer) |
257 | 3488 ;; First of all, show hidden thread subtrees. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3489 (gnus-summary-show-thread) |
257 | 3490 (let* ((buffer-read-only nil) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3491 (current (gnus-summary-article-number)) |
257 | 3492 (article (or article current))) |
3493 (gnus-mark-article-as-unread article clear-mark) | |
3494 (if (or (eq article current) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3495 (gnus-summary-goto-subject article)) |
257 | 3496 (progn |
3497 (beginning-of-line) | |
3498 (delete-char 1) | |
3499 (insert (if clear-mark " " "-")))) | |
3500 ))) | |
3501 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3502 (defun gnus-summary-mark-as-read-forward (count) |
257 | 3503 "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
|
3504 Argument COUNT specifies number of articles marked as read." |
257 | 3505 (interactive "p") |
3506 (while (> count 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3507 (gnus-summary-mark-as-read) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3508 (gnus-summary-next-subject 1 'unread-only) |
257 | 3509 (setq count (1- count)))) |
3510 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3511 (defun gnus-summary-mark-as-read-backward (count) |
257 | 3512 "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
|
3513 Argument COUNT specifies number of articles marked as read." |
257 | 3514 (interactive "p") |
3515 (while (> count 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3516 (gnus-summary-mark-as-read) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3517 (gnus-summary-prev-subject 1 'unread-only) |
257 | 3518 (setq count (1- count)))) |
3519 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3520 (defun gnus-summary-mark-as-read (&optional article mark) |
257 | 3521 "Mark current article as read. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3522 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
|
3523 Optional 2nd argument MARK specifies a string inserted at beginning of line. |
257 | 3524 Any kind of string (length 1) except for a space and `-' is ok." |
3525 (save-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3526 (set-buffer gnus-summary-buffer) |
257 | 3527 ;; First of all, show hidden thread subtrees. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3528 (gnus-summary-show-thread) |
257 | 3529 (let* ((buffer-read-only nil) |
3530 (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
|
3531 (current (gnus-summary-article-number)) |
257 | 3532 (article (or article current))) |
3533 (gnus-mark-article-as-read article) | |
3534 (if (or (eq article current) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3535 (gnus-summary-goto-subject article)) |
257 | 3536 (progn |
3537 (beginning-of-line) | |
3538 (delete-char 1) | |
3539 (insert mark))) | |
3540 ))) | |
3541 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3542 (defun gnus-summary-clear-mark-forward (count) |
257 | 3543 "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
|
3544 Argument COUNT specifies number of articles unmarked." |
257 | 3545 (interactive "p") |
3546 (while (> count 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3547 (gnus-summary-mark-as-unread nil t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3548 (gnus-summary-next-subject 1 nil) |
257 | 3549 (setq count (1- count)))) |
3550 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3551 (defun gnus-summary-clear-mark-backward (count) |
257 | 3552 "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
|
3553 Argument COUNT specifies number of articles unmarked." |
257 | 3554 (interactive "p") |
3555 (while (> count 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3556 (gnus-summary-mark-as-unread nil t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3557 (gnus-summary-prev-subject 1 nil) |
257 | 3558 (setq count (1- count)))) |
3559 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3560 (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
|
3561 "Delete summary lines for articles that are marked as read." |
257 | 3562 (interactive) |
3563 (if gnus-newsgroup-unreads | |
3564 (let ((buffer-read-only nil)) | |
3565 (save-excursion | |
3566 (goto-char (point-min)) | |
6309
9217f29851c2
Don't use triple-hyphen in a character class.
Karl Heuer <kwzh@gnu.org>
parents:
5911
diff
changeset
|
3567 (delete-non-matching-lines "^[- ]")) |
257 | 3568 ;; Adjust point. |
3569 (if (eobp) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3570 (gnus-summary-prev-subject 1) |
257 | 3571 (beginning-of-line) |
3572 (search-forward ":" nil t))) | |
3573 ;; It is not so good idea to make the buffer empty. | |
3574 (message "All articles are marked as read") | |
3575 )) | |
3576 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3577 (defun gnus-summary-delete-marked-with (marks) |
257 | 3578 "Delete lines which are marked with MARKS (e.g. \"DK\")." |
3579 (interactive "sMarks: ") | |
3580 (let ((buffer-read-only nil)) | |
3581 (save-excursion | |
3582 (goto-char (point-min)) | |
3583 (delete-matching-lines (concat "^[" marks "]"))) | |
3584 ;; Adjust point. | |
3585 (or (zerop (buffer-size)) | |
3586 (if (eobp) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3587 (gnus-summary-prev-subject 1) |
257 | 3588 (beginning-of-line) |
3589 (search-forward ":" nil t))) | |
3590 )) | |
3591 | |
3592 ;; Thread-based commands. | |
3593 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3594 (defun gnus-summary-toggle-threads (arg) |
257 | 3595 "Toggle showing conversation threads. |
3596 With arg, turn showing conversation threads on iff arg is positive." | |
3597 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3598 (let ((current (gnus-summary-article-number))) |
257 | 3599 (setq gnus-show-threads |
3600 (if (null arg) (not gnus-show-threads) | |
3601 (> (prefix-numeric-value arg) 0))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3602 (gnus-summary-prepare) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3603 (gnus-summary-goto-subject current) |
257 | 3604 )) |
3605 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3606 (defun gnus-summary-show-all-threads () |
257 | 3607 "Show all thread subtrees." |
3608 (interactive) | |
3609 (if gnus-show-threads | |
3610 (save-excursion | |
3611 (let ((buffer-read-only nil)) | |
3612 (subst-char-in-region (point-min) (point-max) ?\^M ?\n t) | |
3613 )))) | |
3614 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3615 (defun gnus-summary-show-thread () |
257 | 3616 "Show thread subtrees." |
3617 (interactive) | |
3618 (if gnus-show-threads | |
3619 (save-excursion | |
3620 (let ((buffer-read-only nil)) | |
3621 (subst-char-in-region (progn | |
3622 (beginning-of-line) (point)) | |
3623 (progn | |
3624 (end-of-line) (point)) | |
3625 ?\^M ?\n t) | |
3626 )))) | |
3627 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3628 (defun gnus-summary-hide-all-threads () |
257 | 3629 "Hide all thread subtrees." |
3630 (interactive) | |
3631 (if gnus-show-threads | |
3632 (save-excursion | |
3633 ;; Adjust cursor point. | |
3634 (goto-char (point-min)) | |
3635 (search-forward ":" nil t) | |
3636 (let ((level (current-column))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3637 (gnus-summary-hide-thread) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3638 (while (gnus-summary-search-forward) |
257 | 3639 (and (>= level (current-column)) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3640 (gnus-summary-hide-thread))) |
257 | 3641 )))) |
3642 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3643 (defun gnus-summary-hide-thread () |
257 | 3644 "Hide thread subtrees." |
3645 (interactive) | |
3646 (if gnus-show-threads | |
3647 (save-excursion | |
3648 ;; Adjust cursor point. | |
3649 (beginning-of-line) | |
3650 (search-forward ":" nil t) | |
3651 (let ((buffer-read-only nil) | |
3652 (init (point)) | |
3653 (last (point)) | |
3654 (level (current-column))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3655 (while (and (gnus-summary-search-forward) |
257 | 3656 (< level (current-column))) |
3657 ;; Interested in lower levels. | |
3658 (if (< level (current-column)) | |
3659 (progn | |
3660 (setq last (point)) | |
3661 )) | |
3662 ) | |
3663 (subst-char-in-region init last ?\n ?\^M t) | |
3664 )))) | |
3665 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3666 (defun gnus-summary-next-thread (n) |
257 | 3667 "Go to the same level next thread. |
3668 Argument N specifies the number of threads." | |
3669 (interactive "p") | |
3670 ;; Adjust cursor point. | |
3671 (beginning-of-line) | |
3672 (search-forward ":" nil t) | |
3673 (let ((init (point)) | |
3674 (last (point)) | |
3675 (level (current-column))) | |
3676 (while (and (> n 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3677 (gnus-summary-search-forward) |
257 | 3678 (<= level (current-column))) |
3679 ;; We have to skip lower levels. | |
3680 (if (= level (current-column)) | |
3681 (progn | |
3682 (setq last (point)) | |
3683 (setq n (1- n)) | |
3684 )) | |
3685 ) | |
3686 ;; Return non-nil if successfully move to the next. | |
3687 (prog1 (not (= init last)) | |
3688 (goto-char last)) | |
3689 )) | |
3690 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3691 (defun gnus-summary-prev-thread (n) |
257 | 3692 "Go to the same level previous thread. |
3693 Argument N specifies the number of threads." | |
3694 (interactive "p") | |
3695 ;; Adjust cursor point. | |
3696 (beginning-of-line) | |
3697 (search-forward ":" nil t) | |
3698 (let ((init (point)) | |
3699 (last (point)) | |
3700 (level (current-column))) | |
3701 (while (and (> n 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3702 (gnus-summary-search-backward) |
257 | 3703 (<= level (current-column))) |
3704 ;; We have to skip lower levels. | |
3705 (if (= level (current-column)) | |
3706 (progn | |
3707 (setq last (point)) | |
3708 (setq n (1- n)) | |
3709 )) | |
3710 ) | |
3711 ;; Return non-nil if successfully move to the previous. | |
3712 (prog1 (not (= init last)) | |
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-down-thread (d) |
257 | 3717 "Go downward current thread. |
3718 Argument D specifies the depth goes down." | |
3719 (interactive "p") | |
3720 ;; Adjust cursor point. | |
3721 (beginning-of-line) | |
3722 (search-forward ":" nil t) | |
3723 (let ((last (point)) | |
3724 (level (current-column))) | |
3725 (while (and (> d 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3726 (gnus-summary-search-forward) |
257 | 3727 (<= level (current-column))) ;<= can be <. Which do you like? |
3728 ;; We have to skip the same levels. | |
3729 (if (< level (current-column)) | |
3730 (progn | |
3731 (setq last (point)) | |
3732 (setq level (current-column)) | |
3733 (setq d (1- d)) | |
3734 )) | |
3735 ) | |
3736 (goto-char last) | |
3737 )) | |
3738 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3739 (defun gnus-summary-up-thread (d) |
257 | 3740 "Go upward current thread. |
3741 Argument D specifies the depth goes up." | |
3742 (interactive "p") | |
3743 ;; Adjust cursor point. | |
3744 (beginning-of-line) | |
3745 (search-forward ":" nil t) | |
3746 (let ((last (point)) | |
3747 (level (current-column))) | |
3748 (while (and (> d 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3749 (gnus-summary-search-backward)) |
257 | 3750 ;; We have to skip the same levels. |
3751 (if (> level (current-column)) | |
3752 (progn | |
3753 (setq last (point)) | |
3754 (setq level (current-column)) | |
3755 (setq d (1- d)) | |
3756 )) | |
3757 ) | |
3758 (goto-char last) | |
3759 )) | |
3760 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3761 (defun gnus-summary-kill-thread (unmark) |
257 | 3762 "Mark articles under current thread as read. |
3763 If argument UNMARK is positive, remove any kinds of marks. | |
3764 If argument UNMARK is negative, mark articles as unread instead." | |
3765 (interactive "P") | |
3766 (if unmark | |
3767 (setq unmark (prefix-numeric-value unmark))) | |
3768 ;; Adjust cursor point. | |
3769 (beginning-of-line) | |
3770 (search-forward ":" nil t) | |
3771 (save-excursion | |
3772 (let ((level (current-column))) | |
3773 ;; Mark current article. | |
3774 (cond ((null unmark) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3775 (gnus-summary-mark-as-read nil "K")) |
257 | 3776 ((> unmark 0) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3777 (gnus-summary-mark-as-unread nil t)) |
257 | 3778 (t |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3779 (gnus-summary-mark-as-unread)) |
257 | 3780 ) |
3781 ;; Mark following articles. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3782 (while (and (gnus-summary-search-forward) |
257 | 3783 (< level (current-column))) |
3784 (cond ((null unmark) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3785 (gnus-summary-mark-as-read nil "K")) |
257 | 3786 ((> unmark 0) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3787 (gnus-summary-mark-as-unread nil t)) |
257 | 3788 (t |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3789 (gnus-summary-mark-as-unread)) |
257 | 3790 )) |
3791 )) | |
3792 ;; Hide killed subtrees. | |
3793 (and (null unmark) | |
3794 gnus-thread-hide-killed | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3795 (gnus-summary-hide-thread)) |
257 | 3796 ;; If marked as read, go to next unread subject. |
3797 (if (null unmark) | |
3798 ;; Go to next unread subject. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3799 (gnus-summary-next-subject 1 t)) |
257 | 3800 ) |
3801 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3802 (defun gnus-summary-toggle-truncation (arg) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3803 "Toggle truncation of summary lines. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3804 With arg, turn line truncation on iff arg is positive." |
257 | 3805 (interactive "P") |
3806 (setq truncate-lines | |
3807 (if (null arg) (not truncate-lines) | |
3808 (> (prefix-numeric-value arg) 0))) | |
3809 (redraw-display)) | |
3810 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3811 (defun gnus-summary-sort-by-number (reverse) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3812 "Sort Summary buffer by article number. |
257 | 3813 Argument REVERSE means reverse order." |
3814 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3815 (gnus-summary-keysort-summary |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3816 (function <) |
257 | 3817 (function |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3818 (lambda (a) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3819 (nntp-header-number a))) |
257 | 3820 reverse |
3821 )) | |
3822 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3823 (defun gnus-summary-sort-by-author (reverse) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3824 "Sort Summary buffer by author name alphabetically. |
257 | 3825 If case-fold-search is non-nil, case of letters is ignored. |
3826 Argument REVERSE means reverse order." | |
3827 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3828 (gnus-summary-keysort-summary |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3829 (function string-lessp) |
257 | 3830 (function |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3831 (lambda (a) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3832 (if case-fold-search |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3833 (downcase (nntp-header-from a)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3834 (nntp-header-from a)))) |
257 | 3835 reverse |
3836 )) | |
3837 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3838 (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
|
3839 "Sort Summary buffer by subject alphabetically. `Re:'s are ignored. |
257 | 3840 If case-fold-search is non-nil, case of letters is ignored. |
3841 Argument REVERSE means reverse order." | |
3842 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3843 (gnus-summary-keysort-summary |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3844 (function string-lessp) |
257 | 3845 (function |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3846 (lambda (a) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3847 (if case-fold-search |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3848 (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
|
3849 (gnus-simplify-subject (nntp-header-subject a) 're-only)))) |
257 | 3850 reverse |
3851 )) | |
3852 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3853 (defun gnus-summary-sort-by-date (reverse) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3854 "Sort Summary buffer by date. |
257 | 3855 Argument REVERSE means reverse order." |
3856 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3857 (gnus-summary-keysort-summary |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3858 (function string-lessp) |
257 | 3859 (function |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3860 (lambda (a) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3861 (gnus-sortable-date (nntp-header-date a)))) |
257 | 3862 reverse |
3863 )) | |
3864 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3865 (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
|
3866 "Sort Summary buffer by PREDICATE using a value passed by KEY. |
257 | 3867 Optional argument REVERSE means reverse order." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3868 (let ((current (gnus-summary-article-number))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3869 (gnus-keysort-headers predicate key reverse) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3870 (gnus-summary-prepare) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3871 (gnus-summary-goto-subject current) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3872 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3873 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3874 (defun gnus-summary-sort-summary (predicate &optional reverse) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3875 "Sort Summary buffer by PREDICATE. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3876 Optional argument REVERSE means reverse order." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3877 (let ((current (gnus-summary-article-number))) |
257 | 3878 (gnus-sort-headers predicate reverse) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3879 (gnus-summary-prepare) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3880 (gnus-summary-goto-subject current) |
257 | 3881 )) |
3882 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3883 (defun gnus-summary-reselect-current-group (show-all) |
257 | 3884 "Once exit and then reselect the current newsgroup. |
3885 Prefix argument SHOW-ALL means to select all articles." | |
3886 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3887 (let ((current-subject (gnus-summary-article-number))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3888 (gnus-summary-exit t) |
257 | 3889 ;; We have to adjust the point of Group mode buffer because the |
3890 ;; current point was moved to the next unread newsgroup by | |
3891 ;; exiting. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3892 (gnus-summary-jump-to-group gnus-newsgroup-name) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3893 (gnus-group-read-group show-all t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3894 (gnus-summary-goto-subject current-subject) |
257 | 3895 )) |
3896 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3897 (defun gnus-summary-caesar-message (rotnum) |
257 | 3898 "Caesar rotates all letters of current message by 13/47 places. |
3899 With prefix arg, specifies the number of places to rotate each letter forward. | |
3900 Caesar rotates Japanese letters by 47 places in any case." | |
3901 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3902 (gnus-summary-select-article) |
257 | 3903 (gnus-overload-functions) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3904 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3905 (save-restriction |
3906 (widen) | |
3907 ;; We don't want to jump to the beginning of the message. | |
3908 ;; `save-excursion' does not do its job. | |
3909 (move-to-window-line 0) | |
3910 (let ((last (point))) | |
3911 (news-caesar-buffer-body rotnum) | |
3912 (goto-char last) | |
3913 (recenter 0) | |
3914 )) | |
3915 )) | |
3916 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3917 (defun gnus-summary-rmail-digest () |
257 | 3918 "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
|
3919 `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
|
3920 value is non-nil. It is possible to modify the article so that Rmail |
257 | 3921 can work with it. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
3922 `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
|
3923 is non-nil. The hook is intended to customize Rmail mode." |
257 | 3924 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3925 (gnus-summary-select-article) |
257 | 3926 (require 'rmail) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3927 (let ((artbuf gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3928 (digbuf (get-buffer-create gnus-digest-buffer)) |
257 | 3929 (mail-header-separator "")) |
3930 (set-buffer digbuf) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3931 (buffer-flush-undo (current-buffer)) |
257 | 3932 (setq buffer-read-only nil) |
3933 (erase-buffer) | |
3934 (insert-buffer-substring artbuf) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3935 (run-hooks 'gnus-select-digest-hook) |
257 | 3936 (gnus-convert-article-to-rmail) |
3937 (goto-char (point-min)) | |
3938 ;; Rmail initializations. | |
3939 (rmail-insert-rmail-file-header) | |
3940 (rmail-mode) | |
3941 (rmail-set-message-counters) | |
3942 (rmail-show-message) | |
3943 (condition-case () | |
3944 (progn | |
3945 (undigestify-rmail-message) | |
3946 (rmail-expunge) ;Delete original message. | |
3947 ;; File name is meaningless but `save-buffer' requires it. | |
3948 (setq buffer-file-name "GNUS Digest") | |
3949 (setq mode-line-buffer-identification | |
3950 (concat "Digest: " | |
3951 (nntp-header-subject gnus-current-headers))) | |
3952 ;; There is no need to write this buffer to a file. | |
3953 (make-local-variable 'write-file-hooks) | |
3954 (setq write-file-hooks | |
3955 (list (function | |
3956 (lambda () | |
3957 (set-buffer-modified-p nil) | |
3958 (message "(No changes need to be saved)") | |
3959 'no-need-to-write-this-buffer)))) | |
3960 ;; 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
|
3961 (setq rmail-default-rmail-file |
257 | 3962 (funcall gnus-rmail-save-name |
3963 gnus-newsgroup-name | |
3964 gnus-current-headers | |
3965 gnus-newsgroup-last-rmail | |
3966 )) | |
7560
e63efa2d587c
rmail-default-file renamed from rmail-last-file,
Richard M. Stallman <rms@gnu.org>
parents:
7524
diff
changeset
|
3967 (setq rmail-default-file |
257 | 3968 (funcall gnus-mail-save-name |
3969 gnus-newsgroup-name | |
3970 gnus-current-headers | |
3971 gnus-newsgroup-last-mail | |
3972 )) | |
3973 ;; Prevent generating new buffer named ***<N> each time. | |
3974 (setq rmail-summary-buffer | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3975 (get-buffer-create gnus-digest-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3976 (run-hooks 'gnus-rmail-digest-hook) |
257 | 3977 ;; Take all windows safely. |
3978 (gnus-configure-windows '(1 0 0)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3979 (pop-to-buffer gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3980 ;; Use Summary Article windows for Digest summary and |
257 | 3981 ;; Digest buffers. |
3982 (if gnus-digest-show-summary | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3983 (let ((gnus-summary-buffer gnus-digest-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3984 (gnus-article-buffer gnus-digest-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3985 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3986 (pop-to-buffer gnus-digest-buffer) |
257 | 3987 (rmail-summary) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3988 (pop-to-buffer gnus-digest-summary-buffer) |
257 | 3989 (message (substitute-command-keys |
3990 "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
|
3991 (let ((gnus-summary-buffer gnus-digest-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3992 (gnus-configure-windows 'summary) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3993 (pop-to-buffer gnus-digest-buffer) |
257 | 3994 (message (substitute-command-keys |
3995 "Type \\[rmail-quit] to return to GNUS"))) | |
3996 ) | |
3997 ;; 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
|
3998 (bury-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3999 (bury-buffer gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4000 (bury-buffer gnus-digest-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4001 (bury-buffer gnus-digest-buffer)) |
257 | 4002 (error (set-buffer-modified-p nil) |
4003 (kill-buffer digbuf) | |
4004 ;; This command should not signal an error because the | |
4005 ;; command is called from hooks. | |
4006 (ding) (message "Article is not a digest"))) | |
4007 )) | |
4008 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4009 (defun gnus-summary-save-article () |
257 | 4010 "Save this article using default saver function. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4011 The variable `gnus-default-article-saver' specifies the saver function." |
257 | 4012 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4013 (gnus-summary-select-article gnus-save-all-headers gnus-save-all-headers) |
257 | 4014 (if gnus-default-article-saver |
4015 (call-interactively gnus-default-article-saver) | |
4016 (error "No default saver is defined."))) | |
4017 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4018 (defun gnus-summary-save-in-rmail (&optional filename) |
257 | 4019 "Append this article to Rmail file. |
4020 Optional argument FILENAME specifies file name. | |
4021 Directory to save to is default to `gnus-article-save-directory' which | |
4022 is initialized from the SAVEDIR environment variable." | |
4023 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4024 (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
|
4025 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 4026 (save-excursion |
4027 (save-restriction | |
4028 (widen) | |
4029 (let ((default-name | |
4030 (funcall gnus-rmail-save-name | |
4031 gnus-newsgroup-name | |
4032 gnus-current-headers | |
4033 gnus-newsgroup-last-rmail | |
4034 ))) | |
4035 (or filename | |
4036 (setq filename | |
4037 (read-file-name | |
4038 (concat "Save article in Rmail file: (default " | |
4039 (file-name-nondirectory default-name) | |
4040 ") ") | |
4041 (file-name-directory default-name) | |
4042 default-name))) | |
4043 (gnus-make-directory (file-name-directory filename)) | |
4044 (gnus-output-to-rmail filename) | |
4045 ;; Remember the directory name to save articles. | |
4046 (setq gnus-newsgroup-last-rmail filename) | |
4047 ))) | |
4048 )) | |
4049 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4050 (defun gnus-summary-save-in-mail (&optional filename) |
257 | 4051 "Append this article to Unix mail file. |
4052 Optional argument FILENAME specifies file name. | |
4053 Directory to save to is default to `gnus-article-save-directory' which | |
4054 is initialized from the SAVEDIR environment variable." | |
4055 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4056 (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
|
4057 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 4058 (save-excursion |
4059 (save-restriction | |
4060 (widen) | |
4061 (let ((default-name | |
4062 (funcall gnus-mail-save-name | |
4063 gnus-newsgroup-name | |
4064 gnus-current-headers | |
4065 gnus-newsgroup-last-mail | |
4066 ))) | |
4067 (or filename | |
4068 (setq filename | |
4069 (read-file-name | |
4070 (concat "Save article in Unix mail file: (default " | |
4071 (file-name-nondirectory default-name) | |
4072 ") ") | |
4073 (file-name-directory default-name) | |
4074 default-name))) | |
5052
b605cd28d596
(gnus-summary-save-in-mail): Don't use rmail-output.
Richard M. Stallman <rms@gnu.org>
parents:
5012
diff
changeset
|
4075 (setq filename |
b605cd28d596
(gnus-summary-save-in-mail): Don't use rmail-output.
Richard M. Stallman <rms@gnu.org>
parents:
5012
diff
changeset
|
4076 (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
|
4077 (and default-name |
b605cd28d596
(gnus-summary-save-in-mail): Don't use rmail-output.
Richard M. Stallman <rms@gnu.org>
parents:
5012
diff
changeset
|
4078 (file-name-directory default-name)))) |
257 | 4079 (gnus-make-directory (file-name-directory filename)) |
13120
497576f74e1a
(gnus-summary-save-in-mail): Use mail-file-babyl-p.
Richard M. Stallman <rms@gnu.org>
parents:
11875
diff
changeset
|
4080 (if (and (file-readable-p filename) (mail-file-babyl-p filename)) |
5052
b605cd28d596
(gnus-summary-save-in-mail): Don't use rmail-output.
Richard M. Stallman <rms@gnu.org>
parents:
5012
diff
changeset
|
4081 (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
|
4082 (rmail-output filename 1 t t)) |
257 | 4083 ;; Remember the directory name to save articles. |
4084 (setq gnus-newsgroup-last-mail filename) | |
4085 ))) | |
4086 )) | |
4087 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4088 (defun gnus-summary-save-in-file (&optional filename) |
257 | 4089 "Append this article to file. |
4090 Optional argument FILENAME specifies file name. | |
4091 Directory to save to is default to `gnus-article-save-directory' which | |
4092 is initialized from the SAVEDIR environment variable." | |
4093 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4094 (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
|
4095 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 4096 (save-excursion |
4097 (save-restriction | |
4098 (widen) | |
4099 (let ((default-name | |
4100 (funcall gnus-file-save-name | |
4101 gnus-newsgroup-name | |
4102 gnus-current-headers | |
4103 gnus-newsgroup-last-file | |
4104 ))) | |
4105 (or filename | |
4106 (setq filename | |
4107 (read-file-name | |
4108 (concat "Save article in file: (default " | |
4109 (file-name-nondirectory default-name) | |
4110 ") ") | |
4111 (file-name-directory default-name) | |
4112 default-name))) | |
4113 (gnus-make-directory (file-name-directory filename)) | |
4114 (gnus-output-to-file filename) | |
4115 ;; Remember the directory name to save articles. | |
4116 (setq gnus-newsgroup-last-file filename) | |
4117 ))) | |
4118 )) | |
4119 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4120 (defun gnus-summary-save-in-folder (&optional folder) |
257 | 4121 "Save this article to MH folder (using `rcvstore' in MH library). |
4122 Optional argument FOLDER specifies folder name." | |
4123 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4124 (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
|
4125 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 4126 (save-restriction |
4127 (widen) | |
4128 ;; Thanks to yuki@flab.Fujitsu.JUNET and ohm@kaba.junet. | |
4129 (mh-find-path) | |
4130 (let ((folder | |
4131 (or folder | |
4132 (mh-prompt-for-folder "Save article in" | |
4133 (funcall gnus-folder-save-name | |
4134 gnus-newsgroup-name | |
4135 gnus-current-headers | |
4136 gnus-newsgroup-last-folder | |
4137 ) | |
4138 t | |
4139 ))) | |
4140 (errbuf (get-buffer-create " *GNUS rcvstore*"))) | |
4141 (unwind-protect | |
4142 (call-process-region (point-min) (point-max) | |
4143 (expand-file-name "rcvstore" mh-lib) | |
4144 nil errbuf nil folder) | |
4145 (set-buffer errbuf) | |
4146 (if (zerop (buffer-size)) | |
4147 (message "Article saved in folder: %s" folder) | |
4148 (message "%s" (buffer-string))) | |
4149 (kill-buffer errbuf) | |
4150 (setq gnus-newsgroup-last-folder folder)) | |
4151 )) | |
4152 )) | |
4153 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4154 (defun gnus-summary-pipe-output () |
257 | 4155 "Pipe this article to subprocess." |
4156 (interactive) | |
4157 ;; 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
|
4158 ;;(gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4159 ;; Huuum. Is this right? |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4160 (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
|
4161 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 4162 (save-restriction |
4163 (widen) | |
4164 (let ((command (read-string "Shell command on article: " | |
4165 gnus-last-shell-command))) | |
4166 (if (string-equal command "") | |
4167 (setq command gnus-last-shell-command)) | |
4168 (shell-command-on-region (point-min) (point-max) command nil) | |
4169 (setq gnus-last-shell-command command) | |
4170 )) | |
4171 )) | |
4172 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4173 (defun gnus-summary-catchup (all &optional quietly) |
257 | 4174 "Mark all articles not marked as unread in this newsgroup as read. |
4175 If prefix argument ALL is non-nil, all articles are marked as read." | |
4176 (interactive "P") | |
4177 (if (or quietly | |
7705
b10cc49f6c37
(gnus-summary-catchup): Check gnus-interactive-catchup.
Richard M. Stallman <rms@gnu.org>
parents:
7639
diff
changeset
|
4178 (not gnus-interactive-catchup) ;Without confirmation? |
257 | 4179 (y-or-n-p |
4180 (if all | |
4181 "Do you really want to mark everything as read? " | |
4182 "Delete all articles not marked as unread? "))) | |
4183 (let ((unmarked | |
4184 (gnus-set-difference gnus-newsgroup-unreads | |
4185 (if (not all) gnus-newsgroup-marked)))) | |
4186 (message "") ;Erase "Yes or No" question. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4187 ;; Hidden thread subtrees must be searched for ,too. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4188 (gnus-summary-show-all-threads) |
257 | 4189 (while unmarked |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4190 (gnus-summary-mark-as-read (car unmarked) "C") |
257 | 4191 (setq unmarked (cdr unmarked)) |
4192 )) | |
4193 )) | |
4194 | |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
4195 (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
|
4196 "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
|
4197 (interactive) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
4198 (beginning-of-line) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
4199 (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
|
4200 (beginning-of-buffer) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
4201 (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
|
4202 (gnus-summary-mark-as-read) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
4203 (gnus-summary-next-subject 1)))) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
4204 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4205 (defun gnus-summary-catchup-all (&optional quietly) |
257 | 4206 "Mark all articles in this newsgroup as read." |
4207 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4208 (gnus-summary-catchup t quietly)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4209 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4210 (defun gnus-summary-catchup-and-exit (all &optional quietly) |
257 | 4211 "Mark all articles not marked as unread in this newsgroup as read, then exit. |
4212 If prefix argument ALL is non-nil, all articles are marked as read." | |
4213 (interactive "P") | |
4214 (if (or quietly | |
7705
b10cc49f6c37
(gnus-summary-catchup): Check gnus-interactive-catchup.
Richard M. Stallman <rms@gnu.org>
parents:
7639
diff
changeset
|
4215 (not gnus-interactive-catchup) ;Without confirmation? |
257 | 4216 (y-or-n-p |
4217 (if all | |
4218 "Do you really want to mark everything as read? " | |
4219 "Delete all articles not marked as unread? "))) | |
4220 (let ((unmarked | |
4221 (gnus-set-difference gnus-newsgroup-unreads | |
4222 (if (not all) gnus-newsgroup-marked)))) | |
4223 (message "") ;Erase "Yes or No" question. | |
4224 (while unmarked | |
4225 (gnus-mark-article-as-read (car unmarked)) | |
4226 (setq unmarked (cdr unmarked))) | |
4227 ;; Select next newsgroup or exit. | |
4228 (cond ((eq gnus-auto-select-next 'quietly) | |
4229 ;; Select next newsgroup quietly. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4230 (gnus-summary-next-group nil)) |
257 | 4231 (t |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4232 (gnus-summary-exit))) |
257 | 4233 ))) |
4234 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4235 (defun gnus-summary-catchup-all-and-exit (&optional quietly) |
257 | 4236 "Mark all articles in this newsgroup as read, and then exit." |
4237 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4238 (gnus-summary-catchup-and-exit t quietly)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4239 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4240 (defun gnus-summary-edit-global-kill () |
257 | 4241 "Edit a global KILL file." |
4242 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4243 (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
|
4244 (gnus-kill-file-edit-file nil) ;Nil stands for global KILL file. |
257 | 4245 (message |
4246 (substitute-command-keys | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4247 "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
|
4248 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4249 (defun gnus-summary-edit-local-kill () |
257 | 4250 "Edit a local KILL file applied to the current newsgroup." |
4251 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4252 (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
|
4253 (gnus-kill-file-edit-file gnus-newsgroup-name) |
257 | 4254 (message |
4255 (substitute-command-keys | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4256 "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
|
4257 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4258 (defun gnus-summary-exit (&optional temporary) |
257 | 4259 "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
|
4260 `gnus-exit-group-hook' is called with no arguments if that value is non-nil." |
257 | 4261 (interactive) |
4262 (let ((updated nil) | |
4263 (gnus-newsgroup-headers gnus-newsgroup-headers) | |
4264 (gnus-newsgroup-unreads gnus-newsgroup-unreads) | |
4265 (gnus-newsgroup-unselected gnus-newsgroup-unselected) | |
4266 (gnus-newsgroup-marked gnus-newsgroup-marked)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4267 ;; 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
|
4268 ;; Summary buffer even if hook changes them. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4269 (run-hooks 'gnus-exit-group-hook) |
257 | 4270 (gnus-update-unread-articles gnus-newsgroup-name |
4271 (append gnus-newsgroup-unselected | |
4272 gnus-newsgroup-unreads) | |
4273 gnus-newsgroup-marked) | |
4274 ;; T means ignore unsubscribed newsgroups. | |
4275 (if gnus-use-cross-reference | |
4276 (setq updated | |
4277 (gnus-mark-as-read-by-xref gnus-newsgroup-name | |
4278 gnus-newsgroup-headers | |
4279 gnus-newsgroup-unreads | |
4280 (eq gnus-use-cross-reference t) | |
4281 ))) | |
4282 ;; 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
|
4283 (set-buffer gnus-group-buffer) |
257 | 4284 ;; Update cross referenced group info. |
4285 (while updated | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4286 (gnus-group-update-group (car updated) t) ;Ignore invisible group. |
257 | 4287 (setq updated (cdr updated))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4288 (gnus-group-update-group gnus-newsgroup-name)) |
257 | 4289 ;; 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
|
4290 (gnus-group-jump-to-group gnus-newsgroup-name) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4291 (gnus-group-next-unread-group 1) |
257 | 4292 (if temporary |
4293 ;; If exiting temporary, caller should adjust Group mode | |
4294 ;; buffer point by itself. | |
4295 nil ;Nothing to do. | |
4296 ;; Return to Group mode buffer. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4297 (if (get-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4298 (bury-buffer gnus-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4299 (if (get-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4300 (bury-buffer gnus-article-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4301 (gnus-configure-windows 'newsgroups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4302 (pop-to-buffer gnus-group-buffer))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4303 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4304 (defun gnus-summary-quit () |
257 | 4305 "Quit reading current newsgroup without updating read article info." |
4306 (interactive) | |
4307 (if (y-or-n-p "Do you really wanna quit reading this group? ") | |
4308 (progn | |
4309 (message "") ;Erase "Yes or No" question. | |
4310 ;; Return to Group selection mode. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4311 (if (get-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4312 (bury-buffer gnus-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4313 (if (get-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4314 (bury-buffer gnus-article-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4315 (gnus-configure-windows 'newsgroups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4316 (pop-to-buffer gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4317 (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
|
4318 (gnus-group-next-group 1) ;(gnus-group-next-unread-group 1) |
257 | 4319 ))) |
4320 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4321 (defun gnus-summary-describe-briefly () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4322 "Describe Summary mode commands briefly." |
257 | 4323 (interactive) |
4324 (message | |
4325 (concat | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4326 (substitute-command-keys "\\[gnus-summary-next-page]:Select ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4327 (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
|
4328 (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
|
4329 (substitute-command-keys "\\[gnus-summary-exit]:Exit ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4330 (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
|
4331 (substitute-command-keys "\\[gnus-summary-describe-briefly]:This help") |
257 | 4332 ))) |
4333 | |
4334 | |
4335 ;;; | |
4336 ;;; GNUS Article Mode | |
4337 ;;; | |
4338 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4339 (if gnus-article-mode-map |
257 | 4340 nil |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4341 (setq gnus-article-mode-map (make-keymap)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4342 (suppress-keymap gnus-article-mode-map) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4343 (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
|
4344 (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
|
4345 (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
|
4346 (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
|
4347 (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
|
4348 (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
|
4349 (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
|
4350 (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
|
4351 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4352 (defun gnus-article-mode () |
257 | 4353 "Major mode for browsing through an article. |
4354 All normal editing commands are turned off. | |
4355 Instead, these commands are available: | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4356 \\{gnus-article-mode-map} |
257 | 4357 |
4358 Various hooks for customization: | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4359 gnus-article-mode-hook |
257 | 4360 Entry to this mode calls the value with no arguments, if that |
4361 value is non-nil. | |
4362 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4363 gnus-article-prepare-hook |
257 | 4364 Called with no arguments after an article is prepared for reading, |
4365 if that value is non-nil." | |
4366 (interactive) | |
4367 (kill-all-local-variables) | |
4368 ;; Gee. Why don't you upgrade? | |
4369 (cond ((boundp 'mode-line-modified) | |
4370 (setq mode-line-modified "--- ")) | |
4371 ((listp (default-value 'mode-line-format)) | |
4372 (setq mode-line-format | |
4373 (cons "--- " (cdr (default-value 'mode-line-format)))))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4374 ;; To disable display-time facility. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4375 ;;(make-local-variable 'global-mode-string) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4376 ;;(setq global-mode-string nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4377 (setq major-mode 'gnus-article-mode) |
257 | 4378 (setq mode-name "Article") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4379 (make-local-variable 'minor-mode-alist) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4380 (or (assq 'gnus-show-mime minor-mode-alist) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4381 (setq minor-mode-alist |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4382 (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
|
4383 (gnus-article-set-mode-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4384 (use-local-map gnus-article-mode-map) |
257 | 4385 (make-local-variable 'page-delimiter) |
4386 (setq page-delimiter gnus-page-delimiter) | |
4387 (make-local-variable 'mail-header-separator) | |
4388 (setq mail-header-separator "") ;For caesar function. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4389 (buffer-flush-undo (current-buffer)) |
257 | 4390 (setq buffer-read-only t) ;Disable modification |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4391 (run-hooks 'gnus-article-mode-hook)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4392 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4393 (defun gnus-article-setup-buffer () |
257 | 4394 "Initialize Article mode buffer." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4395 (or (get-buffer gnus-article-buffer) |
257 | 4396 (save-excursion |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4397 (set-buffer (get-buffer-create gnus-article-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4398 (gnus-article-mode)) |
257 | 4399 )) |
4400 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4401 (defun gnus-article-prepare (article &optional all-headers) |
257 | 4402 "Prepare ARTICLE in Article mode buffer. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4403 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
|
4404 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
|
4405 include the article's whole original header." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4406 ;; 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
|
4407 (if (not (gnus-server-opened)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4408 (progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4409 (gnus-start-news-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4410 (gnus-request-group gnus-newsgroup-name))) |
257 | 4411 (save-excursion |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4412 (set-buffer gnus-article-buffer) |
257 | 4413 (let ((buffer-read-only nil)) |
4414 (erase-buffer) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4415 ;; 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
|
4416 ;; 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
|
4417 ;; nnspool too. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4418 ;; 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
|
4419 ;; 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
|
4420 ;; in the following. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4421 (if (let* ((header |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4422 (and (stringp article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4423 (gnus-get-header-by-id article))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4424 (article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4425 (if header |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4426 (nntp-header-number header) article))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4427 (gnus-request-article article)) |
257 | 4428 (progn |
4429 ;; Prepare article buffer | |
4430 (insert-buffer-substring nntp-server-buffer) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4431 ;; 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
|
4432 (setq gnus-have-all-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4433 (not (not (or all-headers gnus-show-all-headers)))) |
257 | 4434 (if (and (numberp article) |
4435 (not (eq article gnus-current-article))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4436 ;; Seems me that a new article has been selected. |
257 | 4437 (progn |
4438 ;; gnus-current-article must be an article number. | |
4439 (setq gnus-last-article gnus-current-article) | |
4440 (setq gnus-current-article article) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4441 ;; (setq gnus-current-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4442 ;; (gnus-find-header-by-number gnus-newsgroup-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4443 ;; gnus-current-article)) |
257 | 4444 (setq gnus-current-headers |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4445 (gnus-get-header-by-number gnus-current-article)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4446 (run-hooks 'gnus-mark-article-hook) |
257 | 4447 )) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4448 ;; Clear article history only when the article is |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4449 ;; retrieved by the article number. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4450 (if (numberp article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4451 (setq gnus-current-history nil)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4452 ;; Hooks for modifying contents of the article. This hook |
257 | 4453 ;; must be called before being narrowed. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4454 (run-hooks 'gnus-article-prepare-hook) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4455 ;; Decode MIME message. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4456 (if (and gnus-show-mime |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4457 (gnus-fetch-field "Mime-Version")) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4458 (funcall gnus-show-mime-method)) |
257 | 4459 ;; Delete unnecessary headers. |
4460 (or gnus-have-all-headers | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4461 (gnus-article-delete-headers)) |
257 | 4462 ;; Do page break. |
4463 (goto-char (point-min)) | |
4464 (if gnus-break-pages | |
4465 (gnus-narrow-to-page)) | |
4466 ;; Next function must be called after setting | |
4467 ;; `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
|
4468 (gnus-article-set-mode-line) |
257 | 4469 ) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4470 ;; There is no such article. |
257 | 4471 (if (numberp article) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4472 (gnus-summary-mark-as-read article)) |
257 | 4473 (ding) (message "No such article (may be canceled)")) |
4474 ))) | |
4475 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4476 (defun gnus-article-show-all-headers () |
257 | 4477 "Show all article headers in Article mode buffer." |
4478 (or gnus-have-all-headers | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4479 (gnus-article-prepare gnus-current-article t))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4480 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4481 ;;(defun gnus-article-set-mode-line () |
257 | 4482 ;; "Set Article mode line string." |
4483 ;; (setq mode-line-buffer-identification | |
4484 ;; (list 17 | |
4485 ;; (format "GNUS: %s {%d-%d} %d" | |
4486 ;; gnus-newsgroup-name | |
4487 ;; gnus-newsgroup-begin | |
4488 ;; gnus-newsgroup-end | |
4489 ;; gnus-current-article | |
4490 ;; ))) | |
4491 ;; (set-buffer-modified-p t)) | |
4492 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4493 ;;(defun gnus-article-set-mode-line () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4494 ;; "Set Article mode line string." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4495 ;; (let ((unmarked |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4496 ;; (- (length gnus-newsgroup-unreads) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4497 ;; (length (gnus-intersection |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4498 ;; gnus-newsgroup-unreads gnus-newsgroup-marked)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4499 ;; (unselected |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4500 ;; (- (length gnus-newsgroup-unselected) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4501 ;; (length (gnus-intersection |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4502 ;; gnus-newsgroup-unselected gnus-newsgroup-marked))))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4503 ;; (setq mode-line-buffer-identification |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4504 ;; (list 17 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4505 ;; (format "GNUS: %s{%d} %s" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4506 ;; gnus-newsgroup-name |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4507 ;; gnus-current-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4508 ;; ;; This is proposed by tale@pawl.rpi.edu. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4509 ;; (cond ((and (zerop unmarked) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4510 ;; (zerop unselected)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4511 ;; " ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4512 ;; ((zerop unselected) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4513 ;; (format "%d more" unmarked)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4514 ;; (t |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4515 ;; (format "%d(+%d) more" unmarked unselected))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4516 ;; )))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4517 ;; (set-buffer-modified-p t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4518 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4519 ;; New implementation in gnus 3.14.3 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4520 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4521 (defun gnus-article-set-mode-line () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4522 "Set Article mode line string. |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
4523 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
|
4524 (let ((maxlen 15) ;Maximum subject length |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4525 (subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4526 (if gnus-current-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4527 (nntp-header-subject gnus-current-headers) ""))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4528 ;; The value must be a string to escape %-constructs because of subject. |
257 | 4529 (setq mode-line-buffer-identification |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4530 (format "GNUS: %s%s %s%s%s" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4531 gnus-newsgroup-name |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4532 (if gnus-current-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4533 (format "/%d" gnus-current-article) "") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4534 (substring subject 0 (min (length subject) maxlen)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4535 (if (> (length subject) maxlen) "..." "") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4536 (make-string (max 0 (- 17 (length subject))) ? ) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4537 ))) |
257 | 4538 (set-buffer-modified-p t)) |
4539 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4540 (defun gnus-article-delete-headers () |
257 | 4541 "Delete unnecessary headers." |
4542 (save-excursion | |
4543 (save-restriction | |
4544 (goto-char (point-min)) | |
4545 (narrow-to-region (point-min) | |
4546 (progn (search-forward "\n\n" nil 'move) (point))) | |
4547 (goto-char (point-min)) | |
4548 (and (stringp gnus-ignored-headers) | |
4549 (while (re-search-forward gnus-ignored-headers nil t) | |
4550 (beginning-of-line) | |
4551 (delete-region (point) | |
4552 (progn (re-search-forward "\n[^ \t]") | |
4553 (forward-char -1) | |
4554 (point))))) | |
4555 ))) | |
4556 | |
4557 ;; Working on article's buffer | |
4558 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4559 (defun gnus-article-next-page (lines) |
257 | 4560 "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
|
4561 If end of article, return non-nil. Otherwise return nil. |
257 | 4562 Argument LINES specifies lines to be scrolled up." |
4563 (interactive "P") | |
4564 (move-to-window-line -1) | |
4565 ;; Fixed by enami@ptgd.sony.co.jp (enami tsugutomo) | |
4566 (if (save-excursion | |
4567 (end-of-line) | |
4568 (and (pos-visible-in-window-p) ;Not continuation line. | |
4569 (eobp))) | |
4570 ;; Nothing in this page. | |
4571 (if (or (not gnus-break-pages) | |
4572 (save-excursion | |
4573 (save-restriction | |
4574 (widen) (forward-line 1) (eobp)))) ;Real end-of-buffer? | |
4575 t ;Nothing more. | |
4576 (gnus-narrow-to-page 1) ;Go to next page. | |
4577 nil | |
4578 ) | |
4579 ;; More in this page. | |
4580 (condition-case () | |
4581 (scroll-up lines) | |
4582 (end-of-buffer | |
4583 ;; Long lines may cause an end-of-buffer error. | |
4584 (goto-char (point-max)))) | |
4585 nil | |
4586 )) | |
4587 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4588 (defun gnus-article-prev-page (lines) |
257 | 4589 "Show previous page of current article. |
4590 Argument LINES specifies lines to be scrolled down." | |
4591 (interactive "P") | |
4592 (move-to-window-line 0) | |
4593 (if (and gnus-break-pages | |
4594 (bobp) | |
4595 (not (save-restriction (widen) (bobp)))) ;Real beginning-of-buffer? | |
4596 (progn | |
4597 (gnus-narrow-to-page -1) ;Go to previous page. | |
4598 (goto-char (point-max)) | |
4599 (recenter -1)) | |
4600 (scroll-down lines))) | |
4601 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4602 (defun gnus-article-next-digest (nth) |
257 | 4603 "Move to head of NTH next digested message. |
4604 Set mark at end of digested message." | |
4605 ;; Stop page breaking in digest mode. | |
4606 (widen) | |
4607 (end-of-line) | |
4608 ;; Skip NTH - 1 digest. | |
4609 ;; Suggested by Khalid Sattar <admin@cs.exeter.ac.uk>. | |
4610 ;; Digest separator is customizable. | |
4611 ;; Suggested by Skip Montanaro <montanaro@sprite.crd.ge.com>. | |
4612 (while (and (> nth 1) | |
4613 (re-search-forward gnus-digest-separator nil 'move)) | |
4614 (setq nth (1- nth))) | |
4615 (if (re-search-forward gnus-digest-separator nil t) | |
4616 (let ((begin (point))) | |
4617 ;; Search for end of this message. | |
4618 (end-of-line) | |
4619 (if (re-search-forward gnus-digest-separator nil t) | |
4620 (progn | |
4621 (search-backward "\n\n") ;This may be incorrect. | |
4622 (forward-line 1)) | |
4623 (goto-char (point-max))) | |
4624 (push-mark) ;Set mark at end of digested message. | |
4625 (goto-char begin) | |
4626 (beginning-of-line) | |
4627 ;; Show From: and Subject: fields. | |
4628 (recenter 1)) | |
4629 (message "End of message") | |
4630 )) | |
4631 | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
4632 (defun gnus-article-prev-digest (n) |
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
4633 "Move to head of Nth previous digested message." |
257 | 4634 ;; Stop page breaking in digest mode. |
4635 (widen) | |
4636 (beginning-of-line) | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
4637 ;; Skip N - 1 digest. |
257 | 4638 ;; Suggested by Khalid Sattar <admin@cs.exeter.ac.uk>. |
4639 ;; Digest separator is customizable. | |
4640 ;; 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
|
4641 (while (and (> n 1) |
257 | 4642 (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
|
4643 (setq n (1- n))) |
257 | 4644 (if (re-search-backward gnus-digest-separator nil t) |
4645 (let ((begin (point))) | |
4646 ;; Search for end of this message. | |
4647 (end-of-line) | |
4648 (if (re-search-forward gnus-digest-separator nil t) | |
4649 (progn | |
4650 (search-backward "\n\n") ;This may be incorrect. | |
4651 (forward-line 1)) | |
4652 (goto-char (point-max))) | |
4653 (push-mark) ;Set mark at end of digested message. | |
4654 (goto-char begin) | |
4655 ;; Show From: and Subject: fields. | |
4656 (recenter 1)) | |
4657 (goto-char (point-min)) | |
4658 (message "Top of message") | |
4659 )) | |
4660 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4661 (defun gnus-article-refer-article () |
257 | 4662 "Read article specified by message-id around point." |
4663 (interactive) | |
4664 (save-window-excursion | |
4665 (save-excursion | |
4666 (re-search-forward ">" nil t) ;Move point to end of "<....>". | |
4667 (if (re-search-backward "\\(<[^<> \t\n]+>\\)" nil t) | |
4668 (let ((message-id | |
4669 (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
|
4670 (set-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4671 (gnus-summary-refer-article message-id)) |
257 | 4672 (error "No references around point")) |
4673 ))) | |
4674 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4675 (defun gnus-article-pop-article () |
257 | 4676 "Pop up article history." |
4677 (interactive) | |
4678 (save-window-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4679 (set-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4680 (gnus-summary-refer-article nil))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4681 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4682 (defun gnus-article-show-summary () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4683 "Reconfigure windows to show Summary buffer." |
257 | 4684 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4685 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4686 (pop-to-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4687 (gnus-summary-goto-subject gnus-current-article)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4688 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4689 (defun gnus-article-describe-briefly () |
257 | 4690 "Describe Article mode commands briefly." |
4691 (interactive) | |
4692 (message | |
4693 (concat | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4694 (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
|
4695 (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
|
4696 (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
|
4697 (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
|
4698 (substitute-command-keys "\\[gnus-article-describe-briefly]:This help") |
257 | 4699 ))) |
4700 | |
4701 | |
4702 ;;; | |
4703 ;;; GNUS KILL-File Mode | |
4704 ;;; | |
4705 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4706 (if gnus-kill-file-mode-map |
257 | 4707 nil |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4708 (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
|
4709 (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
|
4710 (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
|
4711 (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
|
4712 (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
|
4713 (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
|
4714 (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
|
4715 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4716 (defun gnus-kill-file-mode () |
257 | 4717 "Major mode for editing KILL file. |
4718 | |
4719 In addition to Emacs-Lisp Mode, the following commands are available: | |
4720 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4721 \\[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
|
4722 \\[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
|
4723 \\[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
|
4724 \\[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
|
4725 \\[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
|
4726 \\[gnus-info-find-node] Read Info about KILL file. |
257 | 4727 |
8444 | 4728 A KILL file contains Lisp expressions to be applied to a selected |
4729 newsgroup. The purpose is to mark articles as read on the basis of | |
4730 some set of regexps. A global KILL file is applied to every newsgroup, | |
4731 and a local KILL file is applied to a specified newsgroup. Since a | |
257 | 4732 global KILL file is applied to every newsgroup, for better performance |
4733 use a local one. | |
4734 | |
8444 | 4735 A KILL file can contain any kind of Emacs Lisp expressions expected |
4736 to be evaluated in the Summary buffer. Writing Lisp programs for this | |
257 | 4737 purpose is not so easy because the internal working of GNUS must be |
8444 | 4738 well-known. For this reason, GNUS provides a general function which |
257 | 4739 does this easily for non-Lisp programmers. |
4740 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4741 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
|
4742 by their key sequences. `gnus-kill' should be called with FIELD, |
8444 | 4743 REGEXP and optional COMMAND and ALL. FIELD is a string representing |
4744 the header field or an empty string. If FIELD is an empty string, the | |
4745 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
|
4746 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
|
4747 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
|
4748 \(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
|
4749 executed in the Summary buffer. If the second optional argument ALL |
257 | 4750 is non-nil, the COMMAND is applied to articles which are already |
4751 marked as read or unread. Articles which are marked are skipped over | |
4752 by default. | |
4753 | |
4754 For example, if you want to mark articles of which subjects contain | |
4755 the string `AI' as read, a possible KILL file may look like: | |
4756 | |
4757 (gnus-kill \"Subject\" \"AI\") | |
4758 | |
4759 If you want to mark articles with `D' instead of `X', you can use | |
4760 the following expression: | |
4761 | |
4762 (gnus-kill \"Subject\" \"AI\" \"d\") | |
4763 | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
4764 \(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
|
4765 assigned to `d' in Summary Mode.) |
257 | 4766 |
4767 It is possible to delete unnecessary headers which are marked with | |
4768 `X' in a KILL file as follows: | |
4769 | |
4770 (gnus-expunge \"X\") | |
4771 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4772 If the Summary buffer is empty after applying KILL files, GNUS will |
257 | 4773 exit the selected newsgroup normally. If headers which are marked |
4774 with `D' are deleted in a KILL file, it is impossible to read articles | |
4775 which are marked as read in the previous GNUS sessions. Marks other | |
4776 than `D' should be used for articles which should really be deleted. | |
4777 | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
4778 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
|
4779 `gnus-kill-file-mode-hook' with no arguments, if that value is non-nil." |
257 | 4780 (interactive) |
4781 (kill-all-local-variables) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4782 (use-local-map gnus-kill-file-mode-map) |
257 | 4783 (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
|
4784 (setq major-mode 'gnus-kill-file-mode) |
257 | 4785 (setq mode-name "KILL-File") |
4786 (lisp-mode-variables nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4787 (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
|
4788 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4789 (defun gnus-kill-file-edit-file (newsgroup) |
257 | 4790 "Begin editing a KILL file of NEWSGROUP. |
4791 If NEWSGROUP is nil, the global KILL file is selected." | |
4792 (interactive "sNewsgroup: ") | |
4793 (let ((file (gnus-newsgroup-kill-file newsgroup))) | |
4794 (gnus-make-directory (file-name-directory file)) | |
4795 ;; Save current window configuration if this is first invocation. | |
4796 (or (and (get-file-buffer file) | |
4797 (get-buffer-window (get-file-buffer file))) | |
4798 (setq gnus-winconf-kill-file (current-window-configuration))) | |
4799 ;; Hack windows. | |
4800 (let ((buffer (find-file-noselect file))) | |
4801 (cond ((get-buffer-window buffer) | |
4802 (pop-to-buffer buffer)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4803 ((eq major-mode 'gnus-group-mode) |
257 | 4804 (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
|
4805 (pop-to-buffer gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4806 (let ((gnus-summary-buffer buffer)) |
257 | 4807 (gnus-configure-windows '(1 1 0)) ;Split into two. |
4808 (pop-to-buffer buffer))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4809 ((eq major-mode 'gnus-summary-mode) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4810 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4811 (pop-to-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4812 (bury-buffer gnus-article-buffer) |
257 | 4813 (switch-to-buffer buffer)) |
4814 (t ;No good rules. | |
4815 (find-file-other-window file)) | |
4816 )) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4817 (gnus-kill-file-mode) |
257 | 4818 )) |
4819 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4820 (defun gnus-kill-file-kill-by-subject () |
257 | 4821 "Insert KILL command for current subject." |
4822 (interactive) | |
4823 (insert | |
4824 (format "(gnus-kill \"Subject\" %s)\n" | |
4825 (prin1-to-string | |
4826 (if gnus-current-kill-article | |
4827 (regexp-quote | |
4828 (nntp-header-subject | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4829 ;; No need to speed up this command. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4830 ;;(gnus-get-header-by-number gnus-current-kill-article) |
257 | 4831 (gnus-find-header-by-number gnus-newsgroup-headers |
4832 gnus-current-kill-article))) | |
4833 ""))))) | |
4834 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4835 (defun gnus-kill-file-kill-by-author () |
257 | 4836 "Insert KILL command for current author." |
4837 (interactive) | |
4838 (insert | |
4839 (format "(gnus-kill \"From\" %s)\n" | |
4840 (prin1-to-string | |
4841 (if gnus-current-kill-article | |
4842 (regexp-quote | |
4843 (nntp-header-from | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4844 ;; No need to speed up this command. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4845 ;;(gnus-get-header-by-number gnus-current-kill-article) |
257 | 4846 (gnus-find-header-by-number gnus-newsgroup-headers |
4847 gnus-current-kill-article))) | |
4848 ""))))) | |
4849 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4850 (defun gnus-kill-file-apply-buffer () |
257 | 4851 "Apply current buffer to current newsgroup." |
4852 (interactive) | |
4853 (if (and gnus-current-kill-article | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4854 (get-buffer gnus-summary-buffer)) |
257 | 4855 ;; Assume newsgroup is selected. |
4856 (let ((string (concat "(progn \n" (buffer-string) "\n)" ))) | |
4857 (save-excursion | |
4858 (save-window-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4859 (pop-to-buffer gnus-summary-buffer) |
257 | 4860 (eval (car (read-from-string string)))))) |
4861 (ding) (message "No newsgroup is selected."))) | |
4862 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4863 (defun gnus-kill-file-apply-last-sexp () |
257 | 4864 "Apply sexp before point in current buffer to current newsgroup." |
4865 (interactive) | |
4866 (if (and gnus-current-kill-article | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4867 (get-buffer gnus-summary-buffer)) |
257 | 4868 ;; Assume newsgroup is selected. |
4869 (let ((string | |
4870 (buffer-substring | |
4871 (save-excursion (forward-sexp -1) (point)) (point)))) | |
4872 (save-excursion | |
4873 (save-window-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4874 (pop-to-buffer gnus-summary-buffer) |
257 | 4875 (eval (car (read-from-string string)))))) |
4876 (ding) (message "No newsgroup is selected."))) | |
4877 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4878 (defun gnus-kill-file-exit () |
257 | 4879 "Save a KILL file, then return to the previous buffer." |
4880 (interactive) | |
4881 (save-buffer) | |
4882 (let ((killbuf (current-buffer))) | |
4883 ;; 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
|
4884 (and (get-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4885 (bury-buffer (get-buffer gnus-article-buffer))) |
257 | 4886 ;; Delete the KILL file windows. |
4887 (delete-windows-on killbuf) | |
4888 ;; Restore last window configuration if available. | |
4889 (and gnus-winconf-kill-file | |
4890 (set-window-configuration gnus-winconf-kill-file)) | |
4891 (setq gnus-winconf-kill-file nil) | |
4892 ;; Kill the KILL file buffer. Suggested by tale@pawl.rpi.edu. | |
4893 (kill-buffer killbuf))) | |
4894 | |
4895 | |
4896 ;;; | |
4897 ;;; Utility functions | |
4898 ;;; | |
4899 | |
4900 ;; Basic ideas by emv@math.lsa.umich.edu (Edward Vielmetti) | |
4901 | |
4902 (defun gnus-batch-kill () | |
4903 "Run batched KILL. | |
4904 Usage: emacs -batch -l gnus -f gnus-batch-kill NEWSGROUP ..." | |
4905 (if (not noninteractive) | |
4906 (error "gnus-batch-kill is to be used only with -batch")) | |
4907 (let* ((group nil) | |
4908 (subscribed nil) | |
4909 (newsrc nil) | |
4910 (yes-and-no | |
4911 (gnus-parse-n-options | |
4912 (apply (function concat) | |
4913 (mapcar (function (lambda (g) (concat g " "))) | |
4914 command-line-args-left)))) | |
4915 (yes (car yes-and-no)) | |
4916 (no (cdr yes-and-no)) | |
4917 ;; Disable verbose message. | |
4918 (gnus-novice-user nil) | |
4919 (gnus-large-newsgroup nil) | |
4920 (nntp-large-newsgroup nil)) | |
4921 ;; Eat all arguments. | |
4922 (setq command-line-args-left nil) | |
4923 ;; Startup GNUS. | |
4924 (gnus) | |
4925 ;; Apply kills to specified newsgroups in command line arguments. | |
4926 (setq newsrc (copy-sequence gnus-newsrc-assoc)) | |
4927 (while newsrc | |
4928 (setq group (car (car newsrc))) | |
4929 (setq subscribed (nth 1 (car newsrc))) | |
4930 (setq newsrc (cdr newsrc)) | |
4931 (if (and subscribed | |
4932 (not (zerop (nth 1 (gnus-gethash group gnus-unread-hashtb)))) | |
4933 (if yes | |
4934 (string-match yes group) t) | |
4935 (or (null no) | |
4936 (not (string-match no group)))) | |
4937 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4938 (gnus-summary-read-group group nil t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4939 (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
|
4940 (gnus-summary-exit t)) |
257 | 4941 )) |
4942 ) | |
4943 ;; Finally, exit Emacs. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4944 (set-buffer gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4945 (gnus-group-exit) |
257 | 4946 )) |
4947 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4948 ;; For saving articles |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4949 |
257 | 4950 (defun gnus-Numeric-save-name (newsgroup headers &optional last-file) |
4951 "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. | |
4952 If variable `gnus-use-long-file-name' is nil, it is ~/News/News.group/num. | |
4953 Otherwise, it is like ~/News/news/group/num." | |
4954 (let ((default | |
4955 (expand-file-name | |
4956 (concat (if gnus-use-long-file-name | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4957 (gnus-capitalize-newsgroup newsgroup) |
257 | 4958 (gnus-newsgroup-directory-form newsgroup)) |
4959 "/" (int-to-string (nntp-header-number headers))) | |
4960 (or gnus-article-save-directory "~/News")))) | |
4961 (if (and last-file | |
4962 (string-equal (file-name-directory default) | |
4963 (file-name-directory last-file)) | |
4964 (string-match "^[0-9]+$" (file-name-nondirectory last-file))) | |
4965 default | |
4966 (or last-file default)))) | |
4967 | |
4968 (defun gnus-numeric-save-name (newsgroup headers &optional last-file) | |
4969 "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. | |
4970 If variable `gnus-use-long-file-name' is nil, it is ~/News/news.group/num. | |
4971 Otherwise, it is like ~/News/news/group/num." | |
4972 (let ((default | |
4973 (expand-file-name | |
4974 (concat (if gnus-use-long-file-name | |
4975 newsgroup | |
4976 (gnus-newsgroup-directory-form newsgroup)) | |
4977 "/" (int-to-string (nntp-header-number headers))) | |
4978 (or gnus-article-save-directory "~/News")))) | |
4979 (if (and last-file | |
4980 (string-equal (file-name-directory default) | |
4981 (file-name-directory last-file)) | |
4982 (string-match "^[0-9]+$" (file-name-nondirectory last-file))) | |
4983 default | |
4984 (or last-file default)))) | |
4985 | |
4986 (defun gnus-Plain-save-name (newsgroup headers &optional last-file) | |
4987 "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. | |
4988 If variable `gnus-use-long-file-name' is nil, it is ~/News/News.group. | |
4989 Otherwise, it is like ~/News/news/group/news." | |
4990 (or last-file | |
4991 (expand-file-name | |
4992 (if gnus-use-long-file-name | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4993 (gnus-capitalize-newsgroup newsgroup) |
257 | 4994 (concat (gnus-newsgroup-directory-form newsgroup) "/news")) |
4995 (or gnus-article-save-directory "~/News")))) | |
4996 | |
4997 (defun gnus-plain-save-name (newsgroup headers &optional last-file) | |
4998 "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. | |
4999 If variable `gnus-use-long-file-name' is nil, it is ~/News/news.group. | |
5000 Otherwise, it is like ~/News/news/group/news." | |
5001 (or last-file | |
5002 (expand-file-name | |
5003 (if gnus-use-long-file-name | |
5004 newsgroup | |
5005 (concat (gnus-newsgroup-directory-form newsgroup) "/news")) | |
5006 (or gnus-article-save-directory "~/News")))) | |
5007 | |
5008 (defun gnus-Folder-save-name (newsgroup headers &optional last-folder) | |
5009 "Generate folder name from NEWSGROUP, HEADERS, and optional LAST-FOLDER. | |
5010 If variable `gnus-use-long-file-name' is nil, it is +News.group. | |
5011 Otherwise, it is like +news/group." | |
5012 (or last-folder | |
5013 (concat "+" | |
5014 (if gnus-use-long-file-name | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5015 (gnus-capitalize-newsgroup newsgroup) |
257 | 5016 (gnus-newsgroup-directory-form newsgroup))))) |
5017 | |
5018 (defun gnus-folder-save-name (newsgroup headers &optional last-folder) | |
5019 "Generate folder name from NEWSGROUP, HEADERS, and optional LAST-FOLDER. | |
5020 If variable `gnus-use-long-file-name' is nil, it is +news.group. | |
5021 Otherwise, it is like +news/group." | |
5022 (or last-folder | |
5023 (concat "+" | |
5024 (if gnus-use-long-file-name | |
5025 newsgroup | |
5026 (gnus-newsgroup-directory-form newsgroup))))) | |
5027 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5028 ;; For KILL files |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5029 |
257 | 5030 (defun gnus-apply-kill-file () |
5031 "Apply KILL file to the current newsgroup." | |
5032 ;; Apply the global KILL file. | |
5033 (load (gnus-newsgroup-kill-file nil) t nil t) | |
5034 ;; And then apply the local KILL file. | |
5035 (load (gnus-newsgroup-kill-file gnus-newsgroup-name) t nil t)) | |
5036 | |
5037 (defun gnus-Newsgroup-kill-file (newsgroup) | |
5038 "Return the name of a KILL file of NEWSGROUP. | |
5039 If NEWSGROUP is nil, return the global KILL file instead." | |
5040 (cond ((or (null newsgroup) | |
5041 (string-equal newsgroup "")) | |
5042 ;; The global KILL file is placed at top of the directory. | |
5043 (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
|
5044 (or gnus-kill-files-directory "~/News"))) |
257 | 5045 (gnus-use-long-file-name |
5046 ;; Append ".KILL" to capitalized newsgroup name. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5047 (expand-file-name (concat (gnus-capitalize-newsgroup newsgroup) |
257 | 5048 "." gnus-kill-file-name) |
8439
e3040f870f4f
(gnus-kill-files-directory): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
8413
diff
changeset
|
5049 (or gnus-kill-files-directory "~/News"))) |
257 | 5050 (t |
5051 ;; Place "KILL" under the hierarchical directory. | |
5052 (expand-file-name (concat (gnus-newsgroup-directory-form newsgroup) | |
5053 "/" gnus-kill-file-name) | |
8439
e3040f870f4f
(gnus-kill-files-directory): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
8413
diff
changeset
|
5054 (or gnus-kill-files-directory "~/News"))) |
257 | 5055 )) |
5056 | |
5057 (defun gnus-newsgroup-kill-file (newsgroup) | |
5058 "Return the name of a KILL file of NEWSGROUP. | |
5059 If NEWSGROUP is nil, return the global KILL file instead." | |
5060 (cond ((or (null newsgroup) | |
5061 (string-equal newsgroup "")) | |
5062 ;; The global KILL file is placed at top of the directory. | |
5063 (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
|
5064 (or gnus-kill-files-directory "~/News"))) |
257 | 5065 (gnus-use-long-file-name |
5066 ;; Append ".KILL" to newsgroup name. | |
5067 (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
|
5068 (or gnus-kill-files-directory "~/News"))) |
257 | 5069 (t |
5070 ;; Place "KILL" under the hierarchical directory. | |
5071 (expand-file-name (concat (gnus-newsgroup-directory-form newsgroup) | |
5072 "/" gnus-kill-file-name) | |
8439
e3040f870f4f
(gnus-kill-files-directory): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
8413
diff
changeset
|
5073 (or gnus-kill-files-directory "~/News"))) |
257 | 5074 )) |
5075 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5076 ;; For subscribing new newsgroup |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5077 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5078 (defun gnus-subscribe-randomly (newsgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5079 "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
|
5080 (gnus-subscribe-newsgroup newsgroup |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5081 (car (car gnus-newsrc-assoc)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5082 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5083 (defun gnus-subscribe-alphabetically (newgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5084 "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
|
5085 ;; 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
|
5086 (let ((groups gnus-newsrc-assoc) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5087 (before nil)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5088 (while (and (not before) groups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5089 (if (string< newgroup (car (car groups))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5090 (setq before (car (car groups))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5091 (setq groups (cdr groups)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5092 (gnus-subscribe-newsgroup newgroup before) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5093 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5094 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5095 (defun gnus-subscribe-hierarchically (newgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5096 "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
|
5097 ;; 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
|
5098 (save-excursion |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5099 (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
|
5100 (let ((groupkey newgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5101 (before nil)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5102 (while (and (not before) groupkey) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5103 (goto-char (point-min)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5104 (let ((groupkey-re |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5105 (concat "^\\(" (regexp-quote groupkey) ".*\\)[!:]"))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5106 (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
|
5107 (progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5108 (setq before (buffer-substring |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5109 (match-beginning 1) (match-end 1))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5110 (string< before newgroup))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5111 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5112 ;; 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
|
5113 (setq groupkey |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5114 (if (string-match "^\\(.*\\)\\.[^.]+$" groupkey) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5115 (substring groupkey (match-beginning 1) (match-end 1))))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5116 (gnus-subscribe-newsgroup newgroup before) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5117 ))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5118 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5119 (defun gnus-subscribe-interactively (newsgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5120 "Subscribe new NEWSGROUP interactively. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5121 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
|
5122 Unless, it is killed." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5123 (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
|
5124 (gnus-subscribe-hierarchically newsgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5125 ;; Save in kill-ring |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5126 (gnus-subscribe-newsgroup newsgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5127 (gnus-kill-newsgroup newsgroup))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5128 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5129 (defun gnus-subscribe-newsgroup (newsgroup &optional next) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5130 "Subscribe new NEWSGROUP. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5131 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
|
5132 (gnus-insert-newsgroup (list newsgroup t) next) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5133 (message "Subscribe newsgroup: %s" newsgroup)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5134 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5135 ;; For directories |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5136 |
257 | 5137 (defun gnus-newsgroup-directory-form (newsgroup) |
5138 "Make hierarchical directory name from NEWSGROUP name." | |
5139 (let ((newsgroup (substring newsgroup 0)) ;Copy string. | |
5140 (len (length newsgroup)) | |
5141 (idx 0)) | |
3591
507f64624555
Apply typo patches from Paul Eggert.
Jim Blandy <jimb@redhat.com>
parents:
3496
diff
changeset
|
5142 ;; Replace all occurrences of `.' with `/'. |
257 | 5143 (while (< idx len) |
5144 (if (= (aref newsgroup idx) ?.) | |
5145 (aset newsgroup idx ?/)) | |
5146 (setq idx (1+ idx))) | |
5147 newsgroup | |
5148 )) | |
5149 | |
5150 (defun gnus-make-directory (directory) | |
5151 "Make DIRECTORY recursively." | |
5152 (let ((directory (expand-file-name directory default-directory))) | |
5153 (or (file-exists-p directory) | |
5154 (gnus-make-directory-1 "" directory)) | |
5155 )) | |
5156 | |
5157 (defun gnus-make-directory-1 (head tail) | |
5158 (cond ((string-match "^/\\([^/]+\\)" tail) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5159 ;; ange-ftp interferes with calling match-* after |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5160 ;; calling file-name-as-directory. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5161 (let ((beg (match-beginning 1)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5162 (end (match-end 1))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5163 (setq head (concat (file-name-as-directory head) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5164 (substring tail beg end))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5165 (or (file-exists-p head) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5166 (call-process "mkdir" nil nil nil head)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5167 (gnus-make-directory-1 head (substring tail end)))) |
257 | 5168 ((string-equal tail "") t) |
5169 )) | |
5170 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5171 (defun gnus-capitalize-newsgroup (newsgroup) |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
5172 "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
|
5173 ;; 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
|
5174 (let ((current-syntax-table (syntax-table))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5175 (unwind-protect |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5176 (progn |
5313
3189e46001fd
(gnus-capitalize-newsgroup): Modify a new temporary
Richard M. Stallman <rms@gnu.org>
parents:
5057
diff
changeset
|
5177 (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
|
5178 (modify-syntax-entry ?- "w") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5179 (modify-syntax-entry ?. "w") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5180 (capitalize newsgroup)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5181 (set-syntax-table current-syntax-table)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5182 |
257 | 5183 (defun gnus-simplify-subject (subject &optional re-only) |
5184 "Remove `Re:' and words in parentheses. | |
5185 If optional argument RE-ONLY is non-nil, strip `Re:' only." | |
5186 (let ((case-fold-search t)) ;Ignore case. | |
5187 ;; Remove `Re:' and `Re^N:'. | |
5188 (if (string-match "\\`\\(re\\(\\^[0-9]+\\)?:[ \t]+\\)+" subject) | |
5189 (setq subject (substring subject (match-end 0)))) | |
5190 ;; Remove words in parentheses from end. | |
5191 (or re-only | |
5192 (while (string-match "[ \t\n]*([^()]*)[ \t\n]*\\'" subject) | |
5193 (setq subject (substring subject 0 (match-beginning 0))))) | |
5194 ;; Return subject string. | |
5195 subject | |
5196 )) | |
5197 | |
5198 (defun gnus-optional-lines-and-from (header) | |
5199 "Return a string like `NNN:AUTHOR' from HEADER." | |
5200 (let ((name-length (length "umerin@photon"))) | |
5201 (substring (format "%3d:%s" | |
5202 ;; Lines of the article. | |
5203 ;; Suggested by dana@bellcore.com. | |
5204 (nntp-header-lines header) | |
5205 ;; Its author. | |
5206 (concat (mail-strip-quoted-names | |
5207 (nntp-header-from header)) | |
5208 (make-string name-length ? ))) | |
5209 ;; 4 stands for length of `NNN:'. | |
5210 0 (+ 4 name-length)))) | |
5211 | |
5212 (defun gnus-optional-lines (header) | |
5213 "Return a string like `NNN' from HEADER." | |
5214 (format "%4d" (nntp-header-lines header))) | |
5215 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5216 ;; 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
|
5217 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5218 (defun gnus-keysort-headers (predicate key &optional reverse) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5219 "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
|
5220 *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
|
5221 Optional argument REVERSE means reverse order." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5222 (let ((inhibit-quit t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5223 (setq gnus-newsgroup-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5224 (if reverse |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5225 (nreverse |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5226 (gnus-keysort (nreverse gnus-newsgroup-headers) predicate key)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5227 (gnus-keysort gnus-newsgroup-headers predicate key))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5228 ;; Make sure we don't have to call |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5229 ;; 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
|
5230 ;; 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
|
5231 ;; 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
|
5232 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5233 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5234 (defun gnus-keysort (list predicate key) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5235 "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
|
5236 (mapcar (function cdr) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5237 (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
|
5238 (function (lambda (a b) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5239 (funcall predicate (car a) (car b))))))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5240 |
257 | 5241 (defun gnus-sort-headers (predicate &optional reverse) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5242 "Sort current headers by PREDICATE safely. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5243 *Safely* means C-g quitting is disabled during sort. |
257 | 5244 Optional argument REVERSE means reverse order." |
5245 (let ((inhibit-quit t)) | |
5246 (setq gnus-newsgroup-headers | |
5247 (if reverse | |
5248 (nreverse (sort (nreverse gnus-newsgroup-headers) predicate)) | |
5249 (sort gnus-newsgroup-headers predicate))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5250 ;; Make sure we don't have to call |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5251 ;; 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
|
5252 ;; 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
|
5253 ;; entry is added to nor deleted from the variable. |
257 | 5254 )) |
5255 | |
5256 (defun gnus-string-lessp (a b) | |
5257 "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
|
5258 If `case-fold-search' is non-nil, case of letters is ignored." |
257 | 5259 (if case-fold-search |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5260 (string-lessp (downcase a) (downcase b)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5261 (string-lessp a b))) |
257 | 5262 |
5263 (defun gnus-date-lessp (date1 date2) | |
5264 "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
|
5265 (string-lessp (gnus-sortable-date date1) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5266 (gnus-sortable-date date2))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5267 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5268 (defun gnus-sortable-date (date) |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
5269 "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
|
5270 Timezone package is used." |
8413
aa772e9e5f86
(gnus-sortable-date): Use timezone-make-time-string.
Richard M. Stallman <rms@gnu.org>
parents:
8382
diff
changeset
|
5271 (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
|
5272 (year (aref date 0)) |
aa772e9e5f86
(gnus-sortable-date): Use timezone-make-time-string.
Richard M. Stallman <rms@gnu.org>
parents:
8382
diff
changeset
|
5273 (month (aref date 1)) |
aa772e9e5f86
(gnus-sortable-date): Use timezone-make-time-string.
Richard M. Stallman <rms@gnu.org>
parents:
8382
diff
changeset
|
5274 (day (aref date 2))) |
aa772e9e5f86
(gnus-sortable-date): Use timezone-make-time-string.
Richard M. Stallman <rms@gnu.org>
parents:
8382
diff
changeset
|
5275 (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
|
5276 (timezone-make-time-string |
aa772e9e5f86
(gnus-sortable-date): Use timezone-make-time-string.
Richard M. Stallman <rms@gnu.org>
parents:
8382
diff
changeset
|
5277 (aref date 3) (aref date 4) (aref date 5))) |
257 | 5278 )) |
5279 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5280 ;;(defun gnus-sortable-date (date) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5281 ;; "Make sortable string by string-lessp from DATE." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5282 ;; (let ((month '(("JAN" . " 1")("FEB" . " 2")("MAR" . " 3") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5283 ;; ("APR" . " 4")("MAY" . " 5")("JUN" . " 6") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5284 ;; ("JUL" . " 7")("AUG" . " 8")("SEP" . " 9") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5285 ;; ("OCT" . "10")("NOV" . "11")("DEC" . "12"))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5286 ;; (date (or date ""))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5287 ;; ;; Can understand the following styles: |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5288 ;; ;; (1) 14 Apr 89 03:20:12 GMT |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5289 ;; ;; (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
|
5290 ;; (if (string-match |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5291 ;; "\\([0-9]+\\) \\([^ ,]+\\) \\([0-9]+\\) \\([0-9:]+\\)" date) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5292 ;; (concat |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5293 ;; ;; Year |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5294 ;; (substring date (match-beginning 3) (match-end 3)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5295 ;; ;; Month |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5296 ;; (cdr |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5297 ;; (assoc |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5298 ;; (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
|
5299 ;; ;; Day |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5300 ;; (format "%2d" (string-to-int |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5301 ;; (substring date |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5302 ;; (match-beginning 1) (match-end 1)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5303 ;; ;; Time |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5304 ;; (substring date (match-beginning 4) (match-end 4))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5305 ;; ;; Cannot understand DATE string. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5306 ;; date |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5307 ;; ) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5308 ;; )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5309 |
257 | 5310 (defun gnus-fetch-field (field) |
5311 "Return the value of the header FIELD of current article." | |
5312 (save-excursion | |
5313 (save-restriction | |
5314 (widen) | |
5315 (goto-char (point-min)) | |
5316 (narrow-to-region (point-min) | |
5317 (progn (search-forward "\n\n" nil 'move) (point))) | |
5318 (mail-fetch-field field)))) | |
5319 | |
11837 | 5320 (defalias 'gnus-expunge 'gnus-summary-delete-marked-with) |
257 | 5321 |
5322 (defun gnus-kill (field regexp &optional command all) | |
5323 "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
|
5324 Optional 1st argument COMMAND is default to |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5325 (gnus-summary-mark-as-read nil \"X\"). |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5326 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
|
5327 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
|
5328 COMMAND must be a Lisp expression or a string representing a key sequence." |
257 | 5329 ;; We don't want to change current point nor window configuration. |
5330 (save-excursion | |
5331 (save-window-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5332 ;; 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
|
5333 ;; macros correctly. See command_loop_1. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5334 (switch-to-buffer gnus-summary-buffer 'norecord) |
257 | 5335 (goto-char (point-min)) ;From the beginning. |
5336 (if (null command) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5337 (setq command '(gnus-summary-mark-as-read nil "X"))) |
257 | 5338 (gnus-execute field regexp command nil (not all)) |
5339 ))) | |
5340 | |
5341 (defun gnus-execute (field regexp form &optional backward ignore-marked) | |
5342 "If FIELD of article header matches REGEXP, execute lisp FORM (or a string). | |
5343 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
|
5344 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
|
5345 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
|
5346 marked as read or unread." |
257 | 5347 (let ((function nil) |
5348 (header nil) | |
5349 (article nil)) | |
5350 (if (string-equal field "") | |
5351 (setq field nil)) | |
5352 (if (null field) | |
5353 nil | |
5354 (or (stringp field) | |
5355 (setq field (symbol-name field))) | |
5356 ;; Get access function of header filed. | |
5357 (setq function (intern-soft (concat "gnus-header-" (downcase field)))) | |
5358 (if (and function (fboundp function)) | |
5359 (setq function (symbol-function function)) | |
5360 (error "Unknown header field: \"%s\"" field))) | |
5361 ;; Make FORM funcallable. | |
5362 (if (and (listp form) (not (eq (car form) 'lambda))) | |
5363 (setq form (list 'lambda nil form))) | |
5364 ;; Starting from the current article. | |
5365 (or (and ignore-marked | |
5366 ;; 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
|
5367 (setq article (gnus-summary-article-number)) |
257 | 5368 (or (not (memq article gnus-newsgroup-unreads)) ;Marked as read. |
5369 (memq article gnus-newsgroup-marked) ;Marked as unread. | |
5370 )) | |
5371 (gnus-execute-1 function regexp form)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5372 (while (gnus-summary-search-subject backward ignore-marked nil) |
257 | 5373 (gnus-execute-1 function regexp form)) |
5374 )) | |
5375 | |
5376 (defun gnus-execute-1 (function regexp form) | |
5377 (save-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5378 ;; 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
|
5379 (let ((article (gnus-summary-article-number))) |
257 | 5380 (if (null article) |
5381 nil ;Nothing to do. | |
5382 (if function | |
5383 ;; Compare with header field. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5384 (let (;;(header (gnus-find-header-by-number |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5385 ;; gnus-newsgroup-headers article)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5386 (header (gnus-get-header-by-number article)) |
257 | 5387 (value nil)) |
5388 (and header | |
5389 (progn | |
5390 (setq value (funcall function header)) | |
5391 ;; Number (Lines:) or symbol must be converted to string. | |
5392 (or (stringp value) | |
5393 (setq value (prin1-to-string value))) | |
5394 (string-match regexp value)) | |
5395 (if (stringp form) ;Keyboard macro. | |
5396 (execute-kbd-macro form) | |
5397 (funcall form)))) | |
5398 ;; Search article body. | |
5399 (let ((gnus-current-article nil) ;Save article pointer. | |
5400 (gnus-last-article nil) | |
5401 (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
|
5402 (gnus-mark-article-hook nil)) ;Inhibit marking as read. |
257 | 5403 (message "Searching for article: %d..." article) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5404 (gnus-article-setup-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5405 (gnus-article-prepare article t) |
257 | 5406 (if (save-excursion |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5407 (set-buffer gnus-article-buffer) |
257 | 5408 (goto-char (point-min)) |
5409 (re-search-forward regexp nil t)) | |
5410 (if (stringp form) ;Keyboard macro. | |
5411 (execute-kbd-macro form) | |
5412 (funcall form)))) | |
5413 )) | |
5414 ))) | |
5415 | |
5416 ;;; caesar-region written by phr@prep.ai.mit.edu Nov 86 | |
5417 ;;; modified by tower@prep Nov 86 | |
5418 ;;; Modified by umerin@flab.flab.Fujitsu.JUNET for ROT47. | |
5419 | |
5420 (defun gnus-caesar-region (&optional n) | |
5421 "Caesar rotation of region by N, default 13, for decrypting netnews. | |
5422 ROT47 will be performed for Japanese text in any case." | |
5423 (interactive (if current-prefix-arg ; Was there a prefix arg? | |
5424 (list (prefix-numeric-value current-prefix-arg)) | |
5425 (list nil))) | |
5426 (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
|
5427 (t (setq n (mod n 26)))) ;canonicalize N |
257 | 5428 (if (not (zerop n)) ; no action needed for a rot of 0 |
5429 (progn | |
5430 (if (or (not (boundp 'caesar-translate-table)) | |
5431 (/= (aref caesar-translate-table ?a) (+ ?a n))) | |
5432 (let ((i 0) (lower "abcdefghijklmnopqrstuvwxyz") upper) | |
5433 (message "Building caesar-translate-table...") | |
5434 (setq caesar-translate-table (make-vector 256 0)) | |
5435 (while (< i 256) | |
5436 (aset caesar-translate-table i i) | |
5437 (setq i (1+ i))) | |
5438 (setq lower (concat lower lower) upper (upcase lower) i 0) | |
5439 (while (< i 26) | |
5440 (aset caesar-translate-table (+ ?a i) (aref lower (+ i n))) | |
5441 (aset caesar-translate-table (+ ?A i) (aref upper (+ i n))) | |
5442 (setq i (1+ i))) | |
5443 ;; ROT47 for Japanese text. | |
5444 ;; Thanks to ichikawa@flab.fujitsu.junet. | |
5445 (setq i 161) | |
5446 (let ((t1 (logior ?O 128)) | |
5447 (t2 (logior ?! 128)) | |
5448 (t3 (logior ?~ 128))) | |
5449 (while (< i 256) | |
5450 (aset caesar-translate-table i | |
5451 (let ((v (aref caesar-translate-table i))) | |
5452 (if (<= v t1) (if (< v t2) v (+ v 47)) | |
5453 (if (<= v t3) (- v 47) v)))) | |
5454 (setq i (1+ i)))) | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
5455 (message "Building caesar-translate-table...done"))) |
257 | 5456 (let ((from (region-beginning)) |
5457 (to (region-end)) | |
5458 (i 0) str len) | |
5459 (setq str (buffer-substring from to)) | |
5460 (setq len (length str)) | |
5461 (while (< i len) | |
5462 (aset str i (aref caesar-translate-table (aref str i))) | |
5463 (setq i (1+ i))) | |
5464 (goto-char from) | |
5465 (delete-region from to) | |
5466 (insert str))))) | |
5467 | |
5468 ;; Functions accessing headers. | |
5469 ;; Functions are more convenient than macros in some case. | |
5470 | |
5471 (defun gnus-header-number (header) | |
5472 "Return article number in HEADER." | |
5473 (nntp-header-number header)) | |
5474 | |
5475 (defun gnus-header-subject (header) | |
5476 "Return subject string in HEADER." | |
5477 (nntp-header-subject header)) | |
5478 | |
5479 (defun gnus-header-from (header) | |
5480 "Return author string in HEADER." | |
5481 (nntp-header-from header)) | |
5482 | |
5483 (defun gnus-header-xref (header) | |
5484 "Return xref string in HEADER." | |
5485 (nntp-header-xref header)) | |
5486 | |
5487 (defun gnus-header-lines (header) | |
5488 "Return lines in HEADER." | |
5489 (nntp-header-lines header)) | |
5490 | |
5491 (defun gnus-header-date (header) | |
5492 "Return date in HEADER." | |
5493 (nntp-header-date header)) | |
5494 | |
5495 (defun gnus-header-id (header) | |
5496 "Return Id in HEADER." | |
5497 (nntp-header-id header)) | |
5498 | |
5499 (defun gnus-header-references (header) | |
5500 "Return references in HEADER." | |
5501 (nntp-header-references header)) | |
5502 | |
5503 | |
5504 ;;; | |
5505 ;;; Article savers. | |
5506 ;;; | |
5507 | |
5508 (defun gnus-output-to-rmail (file-name) | |
5509 "Append the current article to an Rmail file named FILE-NAME." | |
5510 (require 'rmail) | |
5511 ;; Most of these codes are borrowed from rmailout.el. | |
5512 (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
|
5513 (setq rmail-default-rmail-file file-name) |
257 | 5514 (let ((artbuf (current-buffer)) |
5515 (tmpbuf (get-buffer-create " *GNUS-output*"))) | |
5516 (save-excursion | |
5517 (or (get-file-buffer file-name) | |
5518 (file-exists-p file-name) | |
5519 (if (yes-or-no-p | |
5520 (concat "\"" file-name "\" does not exist, create it? ")) | |
5521 (let ((file-buffer (create-file-buffer file-name))) | |
5522 (save-excursion | |
5523 (set-buffer file-buffer) | |
5524 (rmail-insert-rmail-file-header) | |
5525 (let ((require-final-newline nil)) | |
5526 (write-region (point-min) (point-max) file-name t 1))) | |
5527 (kill-buffer file-buffer)) | |
5528 (error "Output file does not exist"))) | |
5529 (set-buffer tmpbuf) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5530 (buffer-flush-undo (current-buffer)) |
257 | 5531 (erase-buffer) |
5532 (insert-buffer-substring artbuf) | |
5533 (gnus-convert-article-to-rmail) | |
5534 ;; Decide whether to append to a file or to an Emacs buffer. | |
5535 (let ((outbuf (get-file-buffer file-name))) | |
5536 (if (not outbuf) | |
5537 (append-to-file (point-min) (point-max) file-name) | |
5538 ;; File has been visited, in buffer OUTBUF. | |
5539 (set-buffer outbuf) | |
5540 (let ((buffer-read-only nil) | |
5541 (msg (and (boundp 'rmail-current-message) | |
5542 rmail-current-message))) | |
5543 ;; If MSG is non-nil, buffer is in RMAIL mode. | |
5544 (if msg | |
5545 (progn (widen) | |
5546 (narrow-to-region (point-max) (point-max)))) | |
5547 (insert-buffer-substring tmpbuf) | |
5548 (if msg | |
5549 (progn | |
5550 (goto-char (point-min)) | |
5551 (widen) | |
5552 (search-backward "\^_") | |
5553 (narrow-to-region (point) (point-max)) | |
5554 (goto-char (1+ (point-min))) | |
5555 (rmail-count-new-messages t) | |
5556 (rmail-show-message msg)))))) | |
5557 ) | |
5558 (kill-buffer tmpbuf) | |
5559 )) | |
5560 | |
5561 (defun gnus-output-to-file (file-name) | |
5562 "Append the current article to a file named FILE-NAME." | |
5563 (setq file-name (expand-file-name file-name)) | |
5564 (let ((artbuf (current-buffer)) | |
5565 (tmpbuf (get-buffer-create " *GNUS-output*"))) | |
5566 (save-excursion | |
5567 (set-buffer tmpbuf) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5568 (buffer-flush-undo (current-buffer)) |
257 | 5569 (erase-buffer) |
5570 (insert-buffer-substring artbuf) | |
5571 ;; Append newline at end of the buffer as separator, and then | |
5572 ;; save it to file. | |
5573 (goto-char (point-max)) | |
5574 (insert "\n") | |
5575 (append-to-file (point-min) (point-max) file-name)) | |
5576 (kill-buffer tmpbuf) | |
5577 )) | |
5578 | |
5579 (defun gnus-convert-article-to-rmail () | |
5580 "Convert article in current buffer to Rmail message format." | |
5581 (let ((buffer-read-only nil)) | |
5582 ;; Convert article directly into Babyl format. | |
5583 ;; Suggested by Rob Austein <sra@lcs.mit.edu> | |
5584 (goto-char (point-min)) | |
5585 (insert "\^L\n0, unseen,,\n*** EOOH ***\n") | |
5586 (while (search-forward "\n\^_" nil t) ;single char | |
5587 (replace-match "\n^_")) ;2 chars: "^" and "_" | |
5588 (goto-char (point-max)) | |
5589 (insert "\^_"))) | |
5590 | |
5591 ;;(defun gnus-convert-article-to-rmail () | |
5592 ;; "Convert article in current buffer to Rmail message format." | |
5593 ;; (let ((buffer-read-only nil)) | |
5594 ;; ;; Insert special header of Unix mail. | |
5595 ;; (goto-char (point-min)) | |
5596 ;; (insert "From " | |
5597 ;; (or (mail-strip-quoted-names (mail-fetch-field "from")) | |
5598 ;; "unknown") | |
5599 ;; " " (current-time-string) "\n") | |
5600 ;; ;; Stop quoting `From' since this seems unnecessary in most cases. | |
5601 ;; ;; ``Quote'' "\nFrom " as "\n>From " | |
5602 ;; ;;(while (search-forward "\nFrom " nil t) | |
5603 ;; ;; (forward-char -5) | |
5604 ;; ;; (insert ?>)) | |
5605 ;; ;; Convert article to babyl format. | |
5606 ;; (rmail-convert-to-babyl-format) | |
5607 ;; )) | |
5608 | |
5609 | |
5610 ;;; | |
5611 ;;; Internal functions. | |
5612 ;;; | |
5613 | |
5614 (defun gnus-start-news-server (&optional confirm) | |
5615 "Open network stream to remote NNTP server. | |
5616 If optional argument CONFIRM is non-nil, ask you host that NNTP server | |
5617 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
|
5618 Run `gnus-open-server-hook' just before opening news server." |
257 | 5619 (if (gnus-server-opened) |
5620 ;; Stream is already opened. | |
5621 nil | |
5622 ;; Open NNTP server. | |
5623 (if (or confirm | |
5624 (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
|
5625 ;; 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
|
5626 ;; 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
|
5627 (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
|
5628 (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
|
5629 ;; 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
|
5630 (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
|
5631 (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
|
5632 (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
|
5633 gnus-secondary-servers) |
d701e7af5ba5
* gnus.el (gnus-start-news-server): If no server has been
Jim Blandy <jimb@redhat.com>
parents:
3610
diff
changeset
|
5634 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
|
5635 (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
|
5636 (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
|
5637 (setq gnus-nntp-server ""))) |
257 | 5638 ;; 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
|
5639 (if (or (string-equal gnus-nntp-server "") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5640 (string-equal gnus-nntp-server "::")) ;RMS preference. |
257 | 5641 (setq gnus-nntp-server (system-name))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5642 ;; 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
|
5643 ;; 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
|
5644 ;; gnus-nntp-server. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5645 (cond ((and (null gnus-nntp-service) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5646 (string-equal gnus-nntp-server (system-name))) |
716
f11e7af7c0d9
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
711
diff
changeset
|
5647 (require 'nnspool) |
f11e7af7c0d9
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
711
diff
changeset
|
5648 (gnus-define-access-method 'nnspool) |
f11e7af7c0d9
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
711
diff
changeset
|
5649 (message "Looking up local news spool...")) |
f11e7af7c0d9
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
711
diff
changeset
|
5650 ((string-match ":" gnus-nntp-server) |
257 | 5651 ;; :DIRECTORY |
5652 (require 'mhspool) | |
5653 (gnus-define-access-method 'mhspool) | |
5654 (message "Looking up private directory...")) | |
5655 (t | |
5656 (gnus-define-access-method 'nntp) | |
5657 (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
|
5658 (run-hooks 'gnus-open-server-hook) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5659 (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
|
5660 (message "")) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5661 ((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
|
5662 (message "")) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5663 (t |
8481
b4c5b7658550
(gnus-start-news-server): Fix the call to `error'.
Richard M. Stallman <rms@gnu.org>
parents:
8470
diff
changeset
|
5664 (error "%s" |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5665 (gnus-nntp-message |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5666 (format "Cannot open NNTP server on %s" gnus-nntp-server))))) |
257 | 5667 )) |
5668 | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
5669 ;; Dummy functions used only once. Should return nil. |
257 | 5670 (defun gnus-server-opened () nil) |
5671 (defun gnus-close-server () nil) | |
5672 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5673 (defun gnus-nntp-message (&optional message) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5674 "Return a message returned from NNTP server. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5675 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
|
5676 (let ((status (gnus-status-message)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5677 (message (or message ""))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5678 (if (and (stringp status) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5679 (> (length status) 0)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5680 status message))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5681 |
257 | 5682 (defun gnus-define-access-method (method &optional access-methods) |
5683 "Define access functions for the access METHOD. | |
3591
507f64624555
Apply typo patches from Paul Eggert.
Jim Blandy <jimb@redhat.com>
parents:
3496
diff
changeset
|
5684 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
|
5685 the variable `gnus-access-methods'." |
257 | 5686 (let ((bindings |
5687 (cdr (assoc method (or access-methods gnus-access-methods))))) | |
5688 (if (null bindings) | |
5689 (error "Unknown access method: %s" method) | |
5690 ;; Should not use symbol-function here since overload does not work. | |
5691 (while bindings | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5692 ;; 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
|
5693 (fset (car (car bindings)) (car (cdr (car bindings)))) |
257 | 5694 (setq bindings (cdr bindings))) |
5695 ))) | |
5696 | |
5697 (defun gnus-select-newsgroup (group &optional show-all) | |
5698 "Select newsgroup GROUP. | |
5699 If optional argument SHOW-ALL is non-nil, all of articles in the group | |
5700 are selected." | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5701 ;; 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
|
5702 (gnus-start-news-server) |
257 | 5703 (if (gnus-request-group group) |
5704 (let ((articles nil)) | |
5705 (setq gnus-newsgroup-name group) | |
5706 (setq gnus-newsgroup-unreads | |
5707 (gnus-uncompress-sequence | |
5708 (nthcdr 2 (gnus-gethash group gnus-unread-hashtb)))) | |
5709 (cond (show-all | |
5710 ;; Select all active articles. | |
5711 (setq articles | |
5712 (gnus-uncompress-sequence | |
5713 (nthcdr 2 (gnus-gethash group gnus-active-hashtb))))) | |
5714 (t | |
5715 ;; Select unread articles only. | |
5716 (setq articles gnus-newsgroup-unreads))) | |
5717 ;; Require confirmation if selecting large newsgroup. | |
5718 (setq gnus-newsgroup-unselected nil) | |
5719 (if (not (numberp gnus-large-newsgroup)) | |
5720 nil | |
5721 (let ((selected nil) | |
5722 (number (length articles))) | |
5723 (if (> number gnus-large-newsgroup) | |
5724 (progn | |
5725 (condition-case () | |
5726 (let ((input | |
5727 (read-string | |
5728 (format | |
5729 "How many articles from %s (default %d): " | |
5730 gnus-newsgroup-name number)))) | |
5731 (setq selected | |
5732 (if (string-equal input "") | |
5733 number (string-to-int input)))) | |
5734 (quit | |
5735 (setq selected 0))) | |
5736 (cond ((and (> selected 0) | |
5737 (< selected number)) | |
5738 ;; Select last N articles. | |
5739 (setq articles (nthcdr (- number selected) articles))) | |
5740 ((and (< selected 0) | |
5741 (< (- 0 selected) number)) | |
5742 ;; Select first N articles. | |
5743 (setq selected (- 0 selected)) | |
5744 (setq articles (copy-sequence articles)) | |
5745 (setcdr (nthcdr (1- selected) articles) nil)) | |
5746 ((zerop selected) | |
5747 (setq articles nil)) | |
5748 ;; Otherwise select all. | |
5749 ) | |
5750 ;; Get unselected unread articles. | |
5751 (setq gnus-newsgroup-unselected | |
5752 (gnus-set-difference gnus-newsgroup-unreads articles)) | |
5753 )) | |
5754 )) | |
5755 ;; Get headers list. | |
5756 (setq gnus-newsgroup-headers (gnus-retrieve-headers articles)) | |
5757 ;; UNREADS may contain expired articles, so we have to remove | |
5758 ;; them from the list. | |
5759 (setq gnus-newsgroup-unreads | |
5760 (gnus-intersection gnus-newsgroup-unreads | |
5761 (mapcar | |
5762 (function | |
5763 (lambda (header) | |
5764 (nntp-header-number header))) | |
5765 gnus-newsgroup-headers))) | |
5766 ;; Marked article must be a subset of unread articles. | |
5767 (setq gnus-newsgroup-marked | |
5768 (gnus-intersection (append gnus-newsgroup-unselected | |
5769 gnus-newsgroup-unreads) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5770 (cdr |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5771 (gnus-gethash group gnus-marked-hashtb)))) |
257 | 5772 ;; First and last article in this newsgroup. |
5773 (setq gnus-newsgroup-begin | |
5774 (if gnus-newsgroup-headers | |
5775 (nntp-header-number (car gnus-newsgroup-headers)) | |
5776 0 | |
5777 )) | |
5778 (setq gnus-newsgroup-end | |
5779 (if gnus-newsgroup-headers | |
5780 (nntp-header-number | |
5781 (gnus-last-element gnus-newsgroup-headers)) | |
5782 0 | |
5783 )) | |
5784 ;; File name that an article was saved last. | |
5785 (setq gnus-newsgroup-last-rmail nil) | |
5786 (setq gnus-newsgroup-last-mail nil) | |
5787 (setq gnus-newsgroup-last-folder nil) | |
5788 (setq gnus-newsgroup-last-file nil) | |
5789 ;; Reset article pointer etc. | |
5790 (setq gnus-current-article nil) | |
5791 (setq gnus-current-headers nil) | |
5792 (setq gnus-current-history nil) | |
5793 (setq gnus-have-all-headers nil) | |
5794 (setq gnus-last-article nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5795 ;; 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
|
5796 (gnus-clear-hashtables-for-newsgroup-headers) |
257 | 5797 ;; GROUP is successfully selected. |
5798 t | |
5799 ) | |
5800 )) | |
5801 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5802 ;; Hacking for making header search much faster. |
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 (defun gnus-get-header-by-number (number) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5805 "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
|
5806 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
|
5807 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
|
5808 rehash is necessary." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5809 (or gnus-newsgroup-headers-hashtb-by-number |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5810 (gnus-make-headers-hashtable-by-number)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5811 (gnus-gethash (int-to-string number) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5812 gnus-newsgroup-headers-hashtb-by-number)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5813 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5814 (defun gnus-get-header-by-id (id) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5815 "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
|
5816 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
|
5817 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
|
5818 rehash is necessary." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5819 (or gnus-newsgroup-headers-hashtb-by-id |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5820 (gnus-make-headers-hashtable-by-id)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5821 (and (stringp id) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5822 (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
|
5823 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5824 (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
|
5825 "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
|
5826 (let ((header nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5827 (headers gnus-newsgroup-headers)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5828 (setq gnus-newsgroup-headers-hashtb-by-number |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5829 (gnus-make-hashtable (length headers))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5830 (while headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5831 (setq header (car headers)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5832 (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
|
5833 header gnus-newsgroup-headers-hashtb-by-number) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5834 (setq headers (cdr headers)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5835 ))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5836 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5837 (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
|
5838 "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
|
5839 (let ((header nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5840 (headers gnus-newsgroup-headers)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5841 (setq gnus-newsgroup-headers-hashtb-by-id |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5842 (gnus-make-hashtable (length headers))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5843 (while headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5844 (setq header (car headers)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5845 (gnus-sethash (nntp-header-id header) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5846 header gnus-newsgroup-headers-hashtb-by-id) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5847 (setq headers (cdr headers)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5848 ))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5849 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5850 (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
|
5851 "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
|
5852 (setq gnus-newsgroup-headers-hashtb-by-id nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5853 (setq gnus-newsgroup-headers-hashtb-by-number nil)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5854 |
257 | 5855 (defun gnus-more-header-backward () |
5856 "Find new header backward." | |
5857 (let ((first | |
5858 (car (nth 2 (gnus-gethash gnus-newsgroup-name gnus-active-hashtb)))) | |
5859 (artnum gnus-newsgroup-begin) | |
5860 (header nil)) | |
5861 (while (and (not header) | |
5862 (> artnum first)) | |
5863 (setq artnum (1- artnum)) | |
5864 (setq header (car (gnus-retrieve-headers (list artnum))))) | |
5865 header | |
5866 )) | |
5867 | |
5868 (defun gnus-more-header-forward () | |
5869 "Find new header forward." | |
5870 (let ((last | |
5871 (cdr (nth 2 (gnus-gethash gnus-newsgroup-name gnus-active-hashtb)))) | |
5872 (artnum gnus-newsgroup-end) | |
5873 (header nil)) | |
5874 (while (and (not header) | |
5875 (< artnum last)) | |
5876 (setq artnum (1+ artnum)) | |
5877 (setq header (car (gnus-retrieve-headers (list artnum))))) | |
5878 header | |
5879 )) | |
5880 | |
5881 (defun gnus-extend-newsgroup (header &optional backward) | |
5882 "Extend newsgroup selection with HEADER. | |
5883 Optional argument BACKWARD means extend toward backward." | |
5884 (if header | |
5885 (let ((artnum (nntp-header-number header))) | |
5886 (setq gnus-newsgroup-headers | |
5887 (if backward | |
5888 (cons header gnus-newsgroup-headers) | |
5889 (append gnus-newsgroup-headers (list header)))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5890 ;; 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
|
5891 (gnus-clear-hashtables-for-newsgroup-headers) |
257 | 5892 ;; We have to update unreads and unselected, but don't have to |
5893 ;; care about gnus-newsgroup-marked. | |
5894 (if (memq artnum gnus-newsgroup-unselected) | |
5895 (setq gnus-newsgroup-unreads | |
5896 (cons artnum gnus-newsgroup-unreads))) | |
5897 (setq gnus-newsgroup-unselected | |
5898 (delq artnum gnus-newsgroup-unselected)) | |
5899 (setq gnus-newsgroup-begin (min gnus-newsgroup-begin artnum)) | |
5900 (setq gnus-newsgroup-end (max gnus-newsgroup-end artnum)) | |
5901 ))) | |
5902 | |
5903 (defun gnus-mark-article-as-read (article) | |
5904 "Remember that ARTICLE is marked as read." | |
5905 ;; Remove from unread and marked list. | |
5906 (setq gnus-newsgroup-unreads | |
5907 (delq article gnus-newsgroup-unreads)) | |
5908 (setq gnus-newsgroup-marked | |
5909 (delq article gnus-newsgroup-marked))) | |
5910 | |
5911 (defun gnus-mark-article-as-unread (article &optional clear-mark) | |
5912 "Remember that ARTICLE is marked as unread. | |
5913 Optional argument CLEAR-MARK means ARTICLE should not be remembered | |
5914 that it was marked as read once." | |
5915 ;; Add to unread list. | |
5916 (or (memq article gnus-newsgroup-unreads) | |
5917 (setq gnus-newsgroup-unreads | |
5918 (cons article gnus-newsgroup-unreads))) | |
5919 ;; If CLEAR-MARK is non-nil, the article must be removed from marked | |
5920 ;; list. Otherwise, it must be added to the list. | |
5921 (if clear-mark | |
5922 (setq gnus-newsgroup-marked | |
5923 (delq article gnus-newsgroup-marked)) | |
5924 (or (memq article gnus-newsgroup-marked) | |
5925 (setq gnus-newsgroup-marked | |
5926 (cons article gnus-newsgroup-marked))))) | |
5927 | |
5928 (defun gnus-clear-system () | |
5929 "Clear all variables and buffer." | |
5930 ;; Clear GNUS variables. | |
5931 (let ((variables gnus-variable-list)) | |
5932 (while variables | |
5933 (set (car variables) nil) | |
5934 (setq variables (cdr variables)))) | |
5935 ;; Clear other internal variables. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5936 (setq gnus-newsrc-hashtb nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5937 (setq gnus-marked-hashtb nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5938 (setq gnus-killed-hashtb nil) |
257 | 5939 (setq gnus-active-hashtb nil) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5940 (setq gnus-octive-hashtb nil) |
257 | 5941 (setq gnus-unread-hashtb nil) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5942 (setq gnus-newsgroup-headers nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5943 (setq gnus-newsgroup-headers-hashtb-by-id nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5944 (setq gnus-newsgroup-headers-hashtb-by-number nil) |
257 | 5945 ;; Kill the startup file. |
5946 (and gnus-current-startup-file | |
5947 (get-file-buffer gnus-current-startup-file) | |
5948 (kill-buffer (get-file-buffer gnus-current-startup-file))) | |
5949 (setq gnus-current-startup-file nil) | |
5950 ;; Kill GNUS buffers. | |
5951 (let ((buffers gnus-buffer-list)) | |
5952 (while buffers | |
5953 (if (get-buffer (car buffers)) | |
5954 (kill-buffer (car buffers))) | |
5955 (setq buffers (cdr buffers)) | |
5956 ))) | |
5957 | |
5958 (defun gnus-configure-windows (action) | |
5959 "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
|
5960 The ACTION is either a symbol, such as `summary', or a |
257 | 5961 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
|
5962 configuration list is got from the variable `gnus-window-configuration'." |
257 | 5963 (let* ((windows |
5964 (if (listp action) | |
5965 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
|
5966 (grpwin (get-buffer-window gnus-group-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5967 (subwin (get-buffer-window gnus-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5968 (artwin (get-buffer-window gnus-article-buffer)) |
257 | 5969 (winsum nil) |
5970 (height nil) | |
5971 (grpheight 0) | |
5972 (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
|
5973 (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
|
5974 ;; 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
|
5975 (split-window-keep-point t)) |
257 | 5976 (if (or (null windows) ;No configuration is specified. |
5977 (and (eq (null grpwin) | |
5978 (zerop (nth 0 windows))) | |
5979 (eq (null subwin) | |
5980 (zerop (nth 1 windows))) | |
5981 (eq (null artwin) | |
5982 (zerop (nth 2 windows))))) | |
5983 ;; No need to change window configuration. | |
5984 nil | |
5985 (select-window (or grpwin subwin artwin (selected-window))) | |
5986 ;; First of all, compute the height of each window. | |
5987 (cond (gnus-use-full-window | |
5988 ;; Take up the entire screen. | |
5989 (delete-other-windows) | |
5990 (setq height (window-height (selected-window)))) | |
5991 (t | |
5992 (setq height (+ (if grpwin (window-height grpwin) 0) | |
5993 (if subwin (window-height subwin) 0) | |
5994 (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
|
5995 ;; The Newsgroup buffer exits always. So, use it to extend the |
257 | 5996 ;; 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
|
5997 (switch-to-buffer gnus-group-buffer 'norecord) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5998 (and (get-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5999 (delete-windows-on gnus-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6000 (and (get-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6001 (delete-windows-on gnus-article-buffer)) |
257 | 6002 ;; Compute expected window height. |
6003 (setq winsum (apply (function +) windows)) | |
6004 (if (not (zerop (nth 0 windows))) | |
6005 (setq grpheight (max window-min-height | |
6006 (/ (* height (nth 0 windows)) winsum)))) | |
6007 (if (not (zerop (nth 1 windows))) | |
6008 (setq subheight (max window-min-height | |
6009 (/ (* height (nth 1 windows)) winsum)))) | |
6010 (if (not (zerop (nth 2 windows))) | |
6011 (setq artheight (max window-min-height | |
6012 (/ (* height (nth 2 windows)) winsum)))) | |
6013 (setq height (+ grpheight subheight artheight)) | |
6014 (enlarge-window (max 0 (- height (window-height (selected-window))))) | |
6015 ;; Then split the window. | |
6016 (and (not (zerop artheight)) | |
6017 (or (not (zerop grpheight)) | |
6018 (not (zerop subheight))) | |
6019 (split-window-vertically (+ grpheight subheight))) | |
6020 (and (not (zerop grpheight)) | |
6021 (not (zerop subheight)) | |
6022 (split-window-vertically grpheight)) | |
6023 ;; Then select buffers in each window. | |
6024 (and (not (zerop grpheight)) | |
6025 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6026 (switch-to-buffer gnus-group-buffer 'norecord) |
257 | 6027 (other-window 1))) |
6028 (and (not (zerop subheight)) | |
6029 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6030 (switch-to-buffer gnus-summary-buffer 'norecord) |
257 | 6031 (other-window 1))) |
6032 (and (not (zerop artheight)) | |
6033 (progn | |
6034 ;; If Article buffer does not exist, it will be created | |
6035 ;; and initialized. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6036 (gnus-article-setup-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6037 (switch-to-buffer gnus-article-buffer 'norecord))) |
257 | 6038 ) |
6039 )) | |
6040 | |
6041 (defun gnus-find-header-by-number (headers number) | |
6042 "Return a header which is a element of HEADERS and has NUMBER." | |
6043 (let ((found nil)) | |
6044 (while (and headers (not found)) | |
6045 ;; We cannot use `=' to accept non-numeric NUMBER. | |
6046 (if (eq number (nntp-header-number (car headers))) | |
6047 (setq found (car headers))) | |
6048 (setq headers (cdr headers))) | |
6049 found | |
6050 )) | |
6051 | |
6052 (defun gnus-find-header-by-id (headers id) | |
6053 "Return a header which is a element of HEADERS and has Message-ID." | |
6054 (let ((found nil)) | |
6055 (while (and headers (not found)) | |
6056 (if (string-equal id (nntp-header-id (car headers))) | |
6057 (setq found (car headers))) | |
6058 (setq headers (cdr headers))) | |
6059 found | |
6060 )) | |
6061 | |
6062 (defun gnus-version () | |
6063 "Version numbers of this version of GNUS." | |
6064 (interactive) | |
6065 (cond ((and (boundp 'mhspool-version) (boundp 'nnspool-version)) | |
6066 (message "%s; %s; %s; %s" | |
6067 gnus-version nntp-version nnspool-version mhspool-version)) | |
6068 ((boundp 'mhspool-version) | |
6069 (message "%s; %s; %s" | |
6070 gnus-version nntp-version mhspool-version)) | |
6071 ((boundp 'nnspool-version) | |
6072 (message "%s; %s; %s" | |
6073 gnus-version nntp-version nnspool-version)) | |
6074 (t | |
6075 (message "%s; %s" gnus-version nntp-version)))) | |
6076 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6077 (defun gnus-info-find-node () |
257 | 6078 "Find Info documentation of GNUS." |
6079 (interactive) | |
6080 (require 'info) | |
6081 ;; Enlarge info window if needed. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6082 (cond ((eq major-mode 'gnus-group-mode) |
257 | 6083 (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
|
6084 (pop-to-buffer gnus-group-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6085 ((eq major-mode 'gnus-summary-mode) |
257 | 6086 (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
|
6087 (pop-to-buffer gnus-summary-buffer))) |
2845
7a48e4a67e8c
(gnus-info-directory): Variable removed.
Roland McGrath <roland@gnu.org>
parents:
2843
diff
changeset
|
6088 (Info-goto-node (car (cdr (assq major-mode gnus-info-nodes))))) |
257 | 6089 |
6090 (defun gnus-overload-functions (&optional overloads) | |
6091 "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
|
6092 If nothing is specified, use the variable `gnus-overload-functions'." |
257 | 6093 (let ((defs nil) |
6094 (overloads (or overloads gnus-overload-functions))) | |
6095 (while overloads | |
6096 (setq defs (car overloads)) | |
6097 (setq overloads (cdr overloads)) | |
6098 ;; 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
|
6099 ;; sure we cannot use `require' always. |
257 | 6100 (and (not (fboundp (car defs))) |
6101 (car (cdr (cdr defs))) | |
6102 (load (car (cdr (cdr defs))) nil 'nomessage)) | |
6103 (fset (car defs) (car (cdr defs))) | |
6104 ))) | |
6105 | |
6106 (defun gnus-make-threads (newsgroup-headers) | |
6107 "Make conversation threads tree from NEWSGROUP-HEADERS." | |
6108 (let ((headers newsgroup-headers) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6109 (refer nil) |
257 | 6110 (h nil) |
6111 (d nil) | |
6112 (roots nil) | |
6113 (dependencies nil)) | |
6114 ;; Make message dependency alist. | |
6115 (while headers | |
6116 (setq h (car headers)) | |
6117 (setq headers (cdr headers)) | |
6118 ;; Ignore invalid headers. | |
6119 (if (vectorp h) ;Depends on nntp.el. | |
6120 (progn | |
6121 ;; 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
|
6122 (setq refer (nntp-header-references h)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6123 (setq d (and refer |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6124 (string-match "\\(<[^<>]+>\\)[^>]*$" refer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6125 ;; (gnus-find-header-by-id |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6126 ;; newsgroup-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6127 ;; (substring refer (match-beginning 1) (match-end 1))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6128 ;; In fact if the variable newsgroup-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6129 ;; is not 'equal' to the variable |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6130 ;; gnus-newsgroup-headers, the following |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6131 ;; function call may return bogus value. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6132 (gnus-get-header-by-id |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6133 (substring refer (match-beginning 1) (match-end 1))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6134 )) |
257 | 6135 ;; Check subject equality. |
6136 (or gnus-thread-ignore-subject | |
6137 (null d) | |
6138 (string-equal (gnus-simplify-subject | |
6139 (nntp-header-subject h) 're) | |
6140 (gnus-simplify-subject | |
6141 (nntp-header-subject d) 're)) | |
6142 ;; H should be a thread root. | |
6143 (setq d nil)) | |
6144 ;; H depends on D. | |
6145 (setq dependencies | |
6146 (cons (cons h d) dependencies)) | |
6147 ;; H is a thread root. | |
6148 (if (null d) | |
6149 (setq roots (cons h roots))) | |
6150 )) | |
6151 ) | |
6152 ;; Make complete threads from the roots. | |
6153 ;; Note: dependencies are in reverse order, but | |
6154 ;; gnus-make-threads-1 processes it in reverse order again. So, | |
6155 ;; we don't have to worry about it. | |
6156 (mapcar | |
6157 (function | |
6158 (lambda (root) | |
6159 (gnus-make-threads-1 root dependencies))) (nreverse roots)) | |
6160 )) | |
6161 | |
6162 (defun gnus-make-threads-1 (parent dependencies) | |
6163 (let ((children nil) | |
6164 (d nil) | |
6165 (depends dependencies)) | |
6166 ;; Find children. | |
6167 (while depends | |
6168 (setq d (car depends)) | |
6169 (setq depends (cdr depends)) | |
6170 (and (cdr d) | |
6171 (eq (nntp-header-id parent) (nntp-header-id (cdr d))) | |
6172 (setq children (cons (car d) children)))) | |
6173 ;; Go down. | |
6174 (cons parent | |
6175 (mapcar | |
6176 (function | |
6177 (lambda (child) | |
6178 (gnus-make-threads-1 child dependencies))) children)) | |
6179 )) | |
6180 | |
6181 (defun gnus-narrow-to-page (&optional arg) | |
6182 "Make text outside current page invisible except for page delimiter. | |
6183 A numeric arg specifies to move forward or backward by that many pages, | |
6184 thus showing a page other than the one point was originally in." | |
6185 (interactive "P") | |
6186 (setq arg (if arg (prefix-numeric-value arg) 0)) | |
6187 (save-excursion | |
6188 (forward-page -1) ;Beginning of current page. | |
6189 (widen) | |
6190 (if (> arg 0) | |
6191 (forward-page arg) | |
6192 (if (< arg 0) | |
6193 (forward-page (1- arg)))) | |
6194 ;; Find the end of the page. | |
6195 (forward-page) | |
6196 ;; If we stopped due to end of buffer, stay there. | |
6197 ;; If we stopped after a page delimiter, put end of restriction | |
6198 ;; at the beginning of that line. | |
6199 ;; These are commented out. | |
6200 ;; (if (save-excursion (beginning-of-line) | |
6201 ;; (looking-at page-delimiter)) | |
6202 ;; (beginning-of-line)) | |
6203 (narrow-to-region (point) | |
6204 (progn | |
6205 ;; Find the top of the page. | |
6206 (forward-page -1) | |
6207 ;; If we found beginning of buffer, stay there. | |
6208 ;; If extra text follows page delimiter on same line, | |
6209 ;; include it. | |
6210 ;; Otherwise, show text starting with following line. | |
6211 (if (and (eolp) (not (bobp))) | |
6212 (forward-line 1)) | |
6213 (point))) | |
6214 )) | |
6215 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6216 ;; 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
|
6217 ;; gnus-killed-assoc, and gnus-marked-assoc. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6218 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6219 (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
|
6220 "Return hash table for ALIST. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6221 Optional argument HASHSIZE specifies the hashtable size. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6222 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
|
6223 (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
|
6224 (while alist |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6225 (gnus-sethash (car (car alist)) ;Newsgroup name |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6226 (car alist) ;Alist element |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6227 hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6228 (setq alist (cdr alist))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6229 hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6230 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6231 |
257 | 6232 (defun gnus-last-element (list) |
6233 "Return last element of LIST." | |
6234 (let ((last nil)) | |
6235 (while list | |
6236 (if (null (cdr list)) | |
6237 (setq last (car list))) | |
6238 (setq list (cdr list))) | |
6239 last | |
6240 )) | |
6241 | |
6242 (defun gnus-set-difference (list1 list2) | |
6243 "Return a list of elements of LIST1 that do not appear in LIST2." | |
6244 (let ((list1 (copy-sequence list1))) | |
6245 (while list2 | |
6246 (setq list1 (delq (car list2) list1)) | |
6247 (setq list2 (cdr list2))) | |
6248 list1 | |
6249 )) | |
6250 | |
6251 (defun gnus-intersection (list1 list2) | |
6252 "Return a list of elements that appear in both LIST1 and LIST2." | |
6253 (let ((result nil)) | |
6254 (while list2 | |
6255 (if (memq (car list2) list1) | |
6256 (setq result (cons (car list2) result))) | |
6257 (setq list2 (cdr list2))) | |
6258 result | |
6259 )) | |
6260 | |
6261 | |
6262 ;;; | |
6263 ;;; Get information about active articles, already read articles, and | |
6264 ;;; still unread articles. | |
6265 ;;; | |
6266 | |
6267 ;; GNUS internal format of gnus-newsrc-assoc and gnus-killed-assoc: | |
6268 ;; (("general" t (1 . 1)) | |
6269 ;; ("misc" t (1 . 10) (12 . 15)) | |
6270 ;; ("test" nil (1 . 99)) ...) | |
6271 ;; GNUS internal format of gnus-marked-assoc: | |
6272 ;; (("general" 1 2 3) | |
6273 ;; ("misc" 2) ...) | |
6274 ;; GNUS internal format of gnus-active-hashtb: | |
6275 ;; (("general" t (1 . 1)) | |
6276 ;; ("misc" t (1 . 10)) | |
6277 ;; ("test" nil (1 . 99)) ...) | |
6278 ;; GNUS internal format of gnus-unread-hashtb: | |
6279 ;; (("general" 1 (1 . 1)) | |
6280 ;; ("misc" 14 (1 . 10) (12 . 15)) | |
6281 ;; ("test" 99 (1 . 99)) ...) | |
6282 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6283 (defun gnus-setup-news (&optional rawfile) |
257 | 6284 "Setup news information. |
6285 If optional argument RAWFILE is non-nil, force to read raw startup file." | |
6286 (let ((init (not (and gnus-newsrc-assoc | |
6287 gnus-active-hashtb | |
6288 gnus-unread-hashtb | |
6289 (not rawfile) | |
6290 )))) | |
6291 ;; We have to clear some variables to re-initialize news info. | |
6292 (if init | |
6293 (setq gnus-newsrc-assoc nil | |
6294 gnus-active-hashtb nil | |
6295 gnus-unread-hashtb nil)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6296 (gnus-read-active-file) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6297 ;; Initialize only once. |
257 | 6298 (if init |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6299 (progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6300 ;; Get distributions only once. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6301 (gnus-read-distributions-file) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6302 ;; 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
|
6303 ;; 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
|
6304 (gnus-read-newsrc-file rawfile) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6305 )) |
257 | 6306 (gnus-expire-marked-articles) |
6307 (gnus-get-unread-articles) | |
10542
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
6308 |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
6309 ;; newsgroups description |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
6310 (if gnus-newsgroups-display |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
6311 (if (not gnus-newsgroups-alist) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
6312 ;; Get newsgroups file only once. |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
6313 (gnus-newsgroups-retrieve-description))) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
6314 |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
6315 (setq gnus-newsgroups-hashtb (gnus-make-hashtable-from-alist gnus-newsgroups-alist)) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
6316 |
257 | 6317 ;; Check new newsgroups and subscribe them. |
6318 (if init | |
6319 (let ((new-newsgroups (gnus-find-new-newsgroups))) | |
6320 (while new-newsgroups | |
6321 (funcall gnus-subscribe-newsgroup-method (car new-newsgroups)) | |
6322 (setq new-newsgroups (cdr new-newsgroups)) | |
6323 ))) | |
6324 )) | |
6325 | |
6326 (defun gnus-add-newsgroup (newsgroup) | |
6327 "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
|
6328 (and (null (gnus-gethash newsgroup gnus-newsrc-hashtb)) ;Really new? |
257 | 6329 (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
|
6330 (gnus-insert-newsgroup (or (gnus-gethash newsgroup gnus-killed-hashtb) |
257 | 6331 (list newsgroup t)) |
6332 (car (car gnus-newsrc-assoc))))) | |
6333 | |
6334 (defun gnus-find-new-newsgroups () | |
6335 "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
|
6336 `-n' option of options line in `.newsrc' file is recognized." |
257 | 6337 (let ((group nil) |
6338 (new-newsgroups nil)) | |
6339 (mapatoms | |
6340 (function | |
6341 (lambda (sym) | |
6342 (setq group (symbol-name sym)) | |
6343 ;; Taking account of `-n' option. | |
6344 (and (or (null gnus-newsrc-options-n-no) | |
6345 (not (string-match gnus-newsrc-options-n-no group)) | |
6346 (and gnus-newsrc-options-n-yes | |
6347 (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
|
6348 (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
|
6349 (null (gnus-gethash group gnus-newsrc-hashtb)) ;Really new. |
257 | 6350 ;; Find new newsgroup. |
6351 (setq new-newsgroups | |
6352 (cons group new-newsgroups))) | |
6353 )) | |
6354 gnus-active-hashtb) | |
6355 ;; Return new newsgroups. | |
6356 new-newsgroups | |
6357 )) | |
6358 | |
6359 (defun gnus-kill-newsgroup (group) | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
6360 "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
|
6361 (let ((info (gnus-gethash group gnus-newsrc-hashtb))) |
257 | 6362 (if (null info) |
6363 nil | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6364 ;; Delete from gnus-newsrc-assoc and gnus-newsrc-hashtb. |
257 | 6365 (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
|
6366 (gnus-sethash group nil gnus-newsrc-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6367 ;; Add to gnus-killed-assoc and gnus-killed-hashtb. |
257 | 6368 (setq gnus-killed-assoc |
6369 (cons info | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6370 (delq (gnus-gethash group gnus-killed-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6371 gnus-killed-assoc))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6372 (gnus-sethash group info gnus-killed-hashtb) |
257 | 6373 ;; Clear unread hashtable. |
6374 ;; Thanks cwitty@csli.Stanford.EDU (Carl Witty). | |
6375 (gnus-sethash group nil gnus-unread-hashtb) | |
6376 ;; Then delete from .newsrc | |
6377 (gnus-update-newsrc-buffer group 'delete) | |
6378 ;; Return the deleted newsrc entry. | |
6379 info | |
6380 ))) | |
6381 | |
6382 (defun gnus-insert-newsgroup (info &optional next) | |
6383 "Insert newsrc INFO entry before NEXT. | |
6384 If optional argument NEXT is nil, appended to the last." | |
6385 (if (null info) | |
6386 (error "Invalid argument: %s" info)) | |
6387 (let* ((group (car info)) ;Newsgroup name. | |
6388 (range | |
6389 (gnus-difference-of-range | |
6390 (nth 2 (gnus-gethash group gnus-active-hashtb)) (nthcdr 2 info)))) | |
6391 ;; Check duplication. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6392 (if (gnus-gethash group gnus-newsrc-hashtb) |
257 | 6393 (error "Duplicated: %s" group)) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6394 ;; Insert to gnus-newsrc-assoc and gnus-newsrc-hashtb. |
257 | 6395 (if (string-equal next (car (car gnus-newsrc-assoc))) |
6396 (setq gnus-newsrc-assoc | |
6397 (cons info gnus-newsrc-assoc)) | |
6398 (let ((found nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6399 (rest (cdr gnus-newsrc-assoc)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6400 (tail gnus-newsrc-assoc)) |
257 | 6401 ;; Seach insertion point. |
6402 (while (and (not found) rest) | |
6403 (if (string-equal next (car (car rest))) | |
6404 (setq found t) | |
6405 (setq rest (cdr rest)) | |
6406 (setq tail (cdr tail)) | |
6407 )) | |
6408 ;; Find it. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6409 (if (consp tail) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6410 (setcdr tail (cons info rest)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6411 ;; gnus-newsrc-assoc must be nil. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6412 (setq gnus-newsrc-assoc |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6413 (append gnus-newsrc-assoc (cons info rest)))) |
257 | 6414 )) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6415 (gnus-sethash group info gnus-newsrc-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6416 ;; Delete from gnus-killed-assoc and gnus-killed-hashtb. |
257 | 6417 (setq gnus-killed-assoc |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6418 (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
|
6419 (gnus-sethash group nil gnus-killed-hashtb) |
257 | 6420 ;; Then insert to .newsrc. |
6421 (gnus-update-newsrc-buffer group nil next) | |
6422 ;; Add to gnus-unread-hashtb. | |
6423 (gnus-sethash group | |
6424 (cons group ;Newsgroup name. | |
6425 (cons (gnus-number-of-articles range) range)) | |
6426 gnus-unread-hashtb) | |
6427 )) | |
6428 | |
6429 (defun gnus-check-killed-newsgroups () | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
6430 "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
|
6431 Update `gnus-killed-hashtb' also." |
257 | 6432 (let ((group nil) |
6433 (new-killed nil) | |
6434 (old-killed gnus-killed-assoc)) | |
6435 (while old-killed | |
6436 (setq group (car (car old-killed))) | |
6437 (and (or (null gnus-newsrc-options-n-no) | |
6438 (not (string-match gnus-newsrc-options-n-no group)) | |
6439 (and gnus-newsrc-options-n-yes | |
6440 (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
|
6441 (null (gnus-gethash group gnus-newsrc-hashtb)) ;No duplication. |
257 | 6442 ;; Subscribed in options line and not in gnus-newsrc-assoc. |
6443 (setq new-killed | |
6444 (cons (car old-killed) new-killed))) | |
6445 (setq old-killed (cdr old-killed)) | |
6446 ) | |
6447 (setq gnus-killed-assoc (nreverse new-killed)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6448 (setq gnus-killed-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6449 (gnus-make-hashtable-from-alist gnus-killed-assoc)) |
257 | 6450 )) |
6451 | |
6452 (defun gnus-check-bogus-newsgroups (&optional confirm) | |
6453 "Delete bogus newsgroups. | |
6454 If optional argument CONFIRM is non-nil, confirm deletion of newsgroups." | |
6455 (let ((group nil) ;Newsgroup name temporary used. | |
6456 (old-newsrc gnus-newsrc-assoc) | |
6457 (new-newsrc nil) | |
6458 (bogus nil) ;List of bogus newsgroups. | |
6459 (old-killed gnus-killed-assoc) | |
6460 (new-killed nil) | |
6461 (old-marked gnus-marked-assoc) | |
6462 (new-marked nil)) | |
6463 (message "Checking bogus newsgroups...") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6464 ;; Update gnus-newsrc-assoc and gnus-newsrc-hashtb. |
257 | 6465 (while old-newsrc |
6466 (setq group (car (car old-newsrc))) | |
6467 (if (or (gnus-gethash group gnus-active-hashtb) | |
6468 (and confirm | |
6469 (not (y-or-n-p | |
6470 (format "Delete bogus newsgroup: %s " group))))) | |
6471 ;; Active newsgroup. | |
6472 (setq new-newsrc (cons (car old-newsrc) new-newsrc)) | |
6473 ;; Found a bogus newsgroup. | |
6474 (setq bogus (cons group bogus))) | |
6475 (setq old-newsrc (cdr old-newsrc)) | |
6476 ) | |
6477 (setq gnus-newsrc-assoc (nreverse new-newsrc)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6478 (setq gnus-newsrc-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6479 (gnus-make-hashtable-from-alist gnus-newsrc-assoc)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6480 ;; Update gnus-killed-assoc and gnus-killed-hashtb. |
257 | 6481 ;; The killed newsgroups are deleted without any confirmations. |
6482 (while old-killed | |
6483 (setq group (car (car old-killed))) | |
6484 (and (gnus-gethash group gnus-active-hashtb) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6485 (null (gnus-gethash group gnus-newsrc-hashtb)) |
257 | 6486 ;; Active and really killed newsgroup. |
6487 (setq new-killed (cons (car old-killed) new-killed))) | |
6488 (setq old-killed (cdr old-killed)) | |
6489 ) | |
6490 (setq gnus-killed-assoc (nreverse new-killed)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6491 (setq gnus-killed-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6492 (gnus-make-hashtable-from-alist gnus-killed-assoc)) |
257 | 6493 ;; Remove BOGUS from .newsrc file. |
6494 (while bogus | |
6495 (gnus-update-newsrc-buffer (car bogus) 'delete) | |
6496 (setq bogus (cdr bogus))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6497 ;; Update gnus-marked-assoc and gnus-marked-hashtb. |
257 | 6498 (while old-marked |
6499 (setq group (car (car old-marked))) | |
6500 (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
|
6501 (gnus-gethash group gnus-newsrc-hashtb)) ;Not bogus? |
257 | 6502 (setq new-marked (cons (car old-marked) new-marked))) |
6503 (setq old-marked (cdr old-marked))) | |
6504 (setq gnus-marked-assoc new-marked) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6505 (setq gnus-marked-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6506 (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
|
6507 (message "Checking bogus newsgroups...done") |
257 | 6508 )) |
6509 | |
6510 (defun gnus-get-unread-articles () | |
6511 "Compute diffs between active and read articles." | |
6512 (let ((read gnus-newsrc-assoc) | |
6513 (group-info nil) | |
6514 (group-name nil) | |
6515 (active nil) | |
6516 (range nil)) | |
6517 (message "Checking new news...") | |
6518 (or gnus-unread-hashtb | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6519 (setq gnus-unread-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6520 (gnus-make-hashtable (length gnus-active-hashtb)))) |
257 | 6521 (while read |
6522 (setq group-info (car read)) ;About one newsgroup | |
6523 (setq group-name (car group-info)) | |
6524 (setq active (nth 2 (gnus-gethash group-name gnus-active-hashtb))) | |
6525 (if (and gnus-octive-hashtb | |
6526 ;; Is nothing changed? | |
6527 (equal active | |
6528 (nth 2 (gnus-gethash group-name gnus-octive-hashtb))) | |
6529 ;; Is this newsgroup in the unread hash table? | |
6530 (gnus-gethash group-name gnus-unread-hashtb) | |
6531 ) | |
6532 nil ;Nothing to do. | |
6533 (setq range (gnus-difference-of-range active (nthcdr 2 group-info))) | |
6534 (gnus-sethash group-name | |
6535 (cons group-name ;Group name | |
6536 (cons (gnus-number-of-articles range) | |
6537 range)) ;Range of unread articles | |
6538 gnus-unread-hashtb) | |
6539 ) | |
6540 (setq read (cdr read)) | |
6541 ) | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
6542 (message "Checking new news...done") |
257 | 6543 )) |
6544 | |
6545 (defun gnus-expire-marked-articles () | |
6546 "Check expired article which is marked as unread." | |
6547 (let ((marked-assoc gnus-marked-assoc) | |
6548 (updated-assoc nil) | |
6549 (marked nil) ;Current marked info. | |
6550 (articles nil) ;List of marked articles. | |
6551 (updated nil) ;List of real marked. | |
6552 (begin nil)) | |
6553 (while marked-assoc | |
6554 (setq marked (car marked-assoc)) | |
6555 (setq articles (cdr marked)) | |
6556 (setq updated nil) | |
6557 (setq begin | |
6558 (car (nth 2 (gnus-gethash (car marked) gnus-active-hashtb)))) | |
6559 (while (and begin articles) | |
6560 (if (>= (car articles) begin) | |
6561 ;; This article is still active. | |
6562 (setq updated (cons (car articles) updated))) | |
6563 (setq articles (cdr articles))) | |
6564 (if updated | |
6565 (setq updated-assoc | |
6566 (cons (cons (car marked) updated) updated-assoc))) | |
6567 (setq marked-assoc (cdr marked-assoc))) | |
6568 (setq gnus-marked-assoc updated-assoc) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6569 (setq gnus-marked-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6570 (gnus-make-hashtable-from-alist gnus-marked-assoc)) |
257 | 6571 )) |
6572 | |
6573 (defun gnus-mark-as-read-by-xref | |
6574 (group headers unreads &optional subscribed-only) | |
6575 "Mark articles as read using cross references and return updated newsgroups. | |
6576 Arguments are GROUP, HEADERS, UNREADS, and optional SUBSCRIBED-ONLY." | |
6577 (let ((xref-list nil) | |
6578 (header nil) | |
6579 (xrefs nil) ;One Xref: field info. | |
6580 (xref nil) ;(NEWSGROUP . ARTICLE) | |
6581 (gname nil) ;Newsgroup name | |
6582 (article nil)) ;Article number | |
6583 (while headers | |
6584 (setq header (car headers)) | |
6585 (if (memq (nntp-header-number header) unreads) | |
6586 ;; This article is not yet marked as read. | |
6587 nil | |
6588 (setq xrefs (gnus-parse-xref-field (nntp-header-xref header))) | |
6589 ;; For each cross reference info. in one Xref: field. | |
6590 (while xrefs | |
6591 (setq xref (car xrefs)) | |
6592 (setq gname (car xref)) ;Newsgroup name | |
6593 (setq article (cdr xref)) ;Article number | |
6594 (or (string-equal group gname) ;Ignore current newsgroup. | |
6595 ;; Ignore unsubscribed newsgroup if requested. | |
6596 (and subscribed-only | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6597 (not (nth 1 (gnus-gethash gname gnus-newsrc-hashtb)))) |
257 | 6598 ;; Ignore article marked as unread. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6599 (memq article (cdr (gnus-gethash gname gnus-marked-hashtb))) |
257 | 6600 (let ((group-xref (assoc gname xref-list))) |
6601 (if group-xref | |
6602 (if (memq article (cdr group-xref)) | |
6603 nil ;Alread marked. | |
6604 (setcdr group-xref (cons article (cdr group-xref)))) | |
6605 ;; Create new assoc entry for GROUP. | |
6606 (setq xref-list (cons (list gname article) xref-list))) | |
6607 )) | |
6608 (setq xrefs (cdr xrefs)) | |
6609 )) | |
6610 (setq headers (cdr headers))) | |
6611 ;; Mark cross referenced articles as read. | |
6612 (gnus-mark-xrefed-as-read xref-list) | |
6613 ;;(message "%s %s" (prin1-to-string unreads) (prin1-to-string xref-list)) | |
6614 ;; Return list of updated group name. | |
6615 (mapcar (function car) xref-list) | |
6616 )) | |
6617 | |
6618 (defun gnus-parse-xref-field (xref-value) | |
6619 "Parse Xref: field value, and return list of `(group . article-id)'." | |
6620 (let ((xref-list nil) | |
6621 (xref-value (or xref-value ""))) | |
6622 ;; Remove server host name. | |
6623 (if (string-match "^[ \t]*[^ \t,]+[ \t,]+\\(.*\\)$" xref-value) | |
6624 (setq xref-value (substring xref-value (match-beginning 1))) | |
6625 (setq xref-value nil)) | |
6626 ;; Process each xref info. | |
6627 (while xref-value | |
6628 (if (string-match | |
6629 "^[ \t,]*\\([^ \t,]+\\):\\([0-9]+\\)[^0-9]*" xref-value) | |
6630 (progn | |
6631 (setq xref-list | |
6632 (cons | |
6633 (cons | |
6634 ;; Group name | |
6635 (substring xref-value (match-beginning 1) (match-end 1)) | |
6636 ;; Article-ID | |
6637 (string-to-int | |
6638 (substring xref-value (match-beginning 2) (match-end 2)))) | |
6639 xref-list)) | |
6640 (setq xref-value (substring xref-value (match-end 2)))) | |
6641 (setq xref-value nil))) | |
6642 ;; Return alist. | |
6643 xref-list | |
6644 )) | |
6645 | |
6646 (defun gnus-mark-xrefed-as-read (xrefs) | |
6647 "Update unread article information using XREFS alist." | |
6648 (let ((group nil) | |
6649 (idlist nil) | |
6650 (unread nil)) | |
6651 (while xrefs | |
6652 (setq group (car (car xrefs))) | |
6653 (setq idlist (cdr (car xrefs))) | |
6654 (setq unread (gnus-uncompress-sequence | |
6655 (nthcdr 2 (gnus-gethash group gnus-unread-hashtb)))) | |
6656 (while idlist | |
6657 (setq unread (delq (car idlist) unread)) | |
6658 (setq idlist (cdr idlist))) | |
6659 (gnus-update-unread-articles group unread 'ignore) | |
6660 (setq xrefs (cdr xrefs)) | |
6661 ))) | |
6662 | |
6663 (defun gnus-update-unread-articles (group unread-list marked-list) | |
6664 "Update unread articles of GROUP using UNREAD-LIST and MARKED-LIST." | |
6665 (let ((active (nth 2 (gnus-gethash group gnus-active-hashtb))) | |
6666 (unread (gnus-gethash group gnus-unread-hashtb))) | |
6667 (if (or (null active) (null unread)) | |
6668 ;; Ignore unknown newsgroup. | |
6669 nil | |
6670 ;; Update gnus-unread-hashtb. | |
6671 (if unread-list | |
6672 (setcdr (cdr unread) | |
6673 (gnus-compress-sequence unread-list)) | |
6674 ;; All of the articles are read. | |
6675 (setcdr (cdr unread) '((0 . 0)))) | |
6676 ;; Number of unread articles. | |
6677 (setcar (cdr unread) | |
6678 (gnus-number-of-articles (nthcdr 2 unread))) | |
6679 ;; Update gnus-newsrc-assoc. | |
6680 (if (> (car active) 0) | |
6681 ;; Articles from 1 to N are not active. | |
6682 (setq active (cons 1 (cdr active)))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6683 (setcdr (cdr (gnus-gethash group gnus-newsrc-hashtb)) |
257 | 6684 (gnus-difference-of-range active (nthcdr 2 unread))) |
6685 ;; Update .newsrc buffer. | |
6686 (gnus-update-newsrc-buffer group) | |
6687 ;; Update gnus-marked-assoc. | |
6688 (if (listp marked-list) ;Includes NIL. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6689 (let ((marked (gnus-gethash group gnus-marked-hashtb))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6690 (cond (marked ;There is an entry. |
257 | 6691 (setcdr marked marked-list)) |
6692 (marked-list ;Non-NIL. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6693 (let ((info (cons group marked-list))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6694 ;; hashtb must share the same cons cell. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6695 (setq gnus-marked-assoc |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6696 (cons info gnus-marked-assoc)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6697 (gnus-sethash group info gnus-marked-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6698 )) |
257 | 6699 ))) |
6700 ))) | |
6701 | |
6702 (defun gnus-read-active-file () | |
6703 "Get active file from NNTP server." | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6704 ;; 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
|
6705 (gnus-start-news-server) |
257 | 6706 (message "Reading active file...") |
6707 (if (gnus-request-list) ;Get active file from server | |
6708 (save-excursion | |
6709 (set-buffer nntp-server-buffer) | |
6710 (gnus-active-to-gnus-format) | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
6711 (message "Reading active file...done")) |
257 | 6712 (error "Cannot read active file from NNTP server."))) |
6713 | |
6714 (defun gnus-active-to-gnus-format () | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6715 "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
|
6716 Lines matching `gnus-ignored-newsgroups' are ignored." |
257 | 6717 ;; Delete unnecessary lines. |
6718 (goto-char (point-min)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6719 ;;(delete-matching-lines "^to\\..*$") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6720 (delete-matching-lines gnus-ignored-newsgroups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6721 ;; Save OLD active info. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6722 (setq gnus-octive-hashtb gnus-active-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6723 ;; Make large enough hash table. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6724 (setq gnus-active-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6725 (gnus-make-hashtable (count-lines (point-min) (point-max)))) |
257 | 6726 ;; Store active file in hashtable. |
6727 (goto-char (point-min)) | |
6728 (while | |
6729 (re-search-forward | |
6730 "^\\([^ \t]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\([ymn]\\).*$" | |
6731 nil t) | |
6732 (gnus-sethash | |
6733 (buffer-substring (match-beginning 1) (match-end 1)) | |
6734 (list (buffer-substring (match-beginning 1) (match-end 1)) | |
6735 (string-equal | |
6736 "y" (buffer-substring (match-beginning 4) (match-end 4))) | |
6737 (cons (string-to-int | |
6738 (buffer-substring (match-beginning 3) (match-end 3))) | |
6739 (string-to-int | |
6740 (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
|
6741 gnus-active-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6742 )) |
257 | 6743 |
6744 (defun gnus-read-newsrc-file (&optional rawfile) | |
6745 "Read startup FILE. | |
6746 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
|
6747 (setq gnus-current-startup-file (gnus-make-newsrc-file gnus-startup-file)) |
257 | 6748 ;; Reset variables which may be included in the quick startup file. |
6749 (let ((variables gnus-variable-list)) | |
6750 (while variables | |
6751 (set (car variables) nil) | |
6752 (setq variables (cdr variables)))) | |
6753 (let* ((newsrc-file gnus-current-startup-file) | |
6754 (quick-file (concat newsrc-file ".el")) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6755 (quick-loaded nil)) |
257 | 6756 (save-excursion |
6757 ;; Prepare .newsrc buffer. | |
6758 (set-buffer (find-file-noselect newsrc-file)) | |
6759 ;; 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
|
6760 ;;(buffer-flush-undo (current-buffer)) |
257 | 6761 ;; Load quick .newsrc to restore gnus-marked-assoc and |
6762 ;; gnus-killed-assoc even if gnus-newsrc-assoc is out of date. | |
6763 (condition-case nil | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6764 (progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6765 (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
|
6766 ;; Recreate hashtables. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6767 (setq gnus-killed-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6768 (gnus-make-hashtable-from-alist gnus-killed-assoc)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6769 (setq gnus-marked-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6770 (gnus-make-hashtable-from-alist gnus-marked-assoc)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6771 ) |
257 | 6772 (error nil)) |
6773 (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
|
6774 ;; .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
|
6775 ;; 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
|
6776 ;; (on fast machines/disks). |
9eaa2151f7f6
(gnus-summary-isearch-article): Call isearch-forward
Richard M. Stallman <rms@gnu.org>
parents:
3331
diff
changeset
|
6777 (not (file-newer-than-file-p newsrc-file quick-file)) |
257 | 6778 quick-loaded |
6779 gnus-newsrc-assoc ;Really loaded? | |
6780 ) | |
6781 ;; 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
|
6782 ;; 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
|
6783 ;; So, we have to define the hashtable here. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6784 (setq gnus-newsrc-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6785 (gnus-make-hashtable-from-alist gnus-newsrc-assoc))) |
257 | 6786 (t |
6787 ;; Since .newsrc file is newer than quick file, read it. | |
6788 (message "Reading %s..." newsrc-file) | |
6789 (gnus-newsrc-to-gnus-format) | |
6790 (gnus-check-killed-newsgroups) | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
6791 (message "Reading %s...done" newsrc-file))) |
257 | 6792 ))) |
6793 | |
6794 (defun gnus-make-newsrc-file (file) | |
6795 "Make server dependent file name by catenating FILE and server host name." | |
6796 (let* ((file (expand-file-name file nil)) | |
6797 (real-file (concat file "-" gnus-nntp-server))) | |
6798 (if (file-exists-p real-file) | |
6799 real-file file) | |
6800 )) | |
6801 | |
6802 (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
|
6803 "Parse current buffer as `.newsrc' file." |
257 | 6804 (let ((newsgroup nil) |
6805 (subscribe nil) | |
6806 (ranges nil) | |
6807 (subrange nil) | |
6808 (read-list nil)) | |
6809 ;; We have to re-initialize these variable (except for | |
6810 ;; gnus-marked-assoc and gnus-killed-assoc) because quick startup | |
6811 ;; file may contain bogus values. | |
6812 (setq gnus-newsrc-options nil) | |
6813 (setq gnus-newsrc-options-n-yes nil) | |
6814 (setq gnus-newsrc-options-n-no nil) | |
6815 (setq gnus-newsrc-assoc nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6816 ;; Make large enough hash table. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6817 (setq gnus-newsrc-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6818 (gnus-make-hashtable |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6819 (max (length gnus-active-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6820 (count-lines (point-min) (point-max))))) |
257 | 6821 ;; Save options line to variable. |
6822 ;; Lines beginning with white spaces are treated as continuation | |
6823 ;; line. Refer man page of newsrc(5). | |
6824 (goto-char (point-min)) | |
6825 (if (re-search-forward | |
6826 "^[ \t]*options[ \t]*\\(.*\\(\n[ \t]+.*\\)*\\)[ \t]*$" nil t) | |
6827 (progn | |
6828 ;; Save entire options line. | |
6829 (setq gnus-newsrc-options | |
6830 (buffer-substring (match-beginning 1) (match-end 1))) | |
6831 ;; Compile "-n" option. | |
6832 (if (string-match "\\(^\\|[ \t\n]\\)-n" gnus-newsrc-options) | |
6833 (let ((yes-and-no | |
6834 (gnus-parse-n-options | |
6835 (substring gnus-newsrc-options (match-end 0))))) | |
6836 (setq gnus-newsrc-options-n-yes (car yes-and-no)) | |
6837 (setq gnus-newsrc-options-n-no (cdr yes-and-no)) | |
6838 )) | |
6839 )) | |
6840 ;; Parse body of .newsrc file | |
6841 ;; Options line continuation lines must be also considered here. | |
6842 ;; Before supporting continuation lines, " newsgroup ! 1-5" was | |
6843 ;; okay, but now it is invalid. It should be "newsgroup! 1-5". | |
6844 (goto-char (point-min)) | |
7793
4a683dc76931
(gnus-newsrc-to-gnus-format): In main loop,
Richard M. Stallman <rms@gnu.org>
parents:
7705
diff
changeset
|
6845 ;; We used this regexp, but it caused overflows. |
257 | 6846 ;; "^\\([^:! \t\n]+\\)\\([:!]\\)[ \t]*\\(.*\\)$" |
3610
b0c94b723e6a
* gnus.el (gnus-newsrc-to-gnus-format): Change regexp which
Jim Blandy <jimb@redhat.com>
parents:
3591
diff
changeset
|
6847 ;; 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
|
6848 ;; 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
|
6849 ;; "^\\([^:! \t\n]+\\)\\([:!]\\)[ \t]*\\(\\(...\\)*.*\\)$" |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
6850 ;; but, the following causes trouble on some case: |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
6851 ;; "^\\([^:! \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
|
6852 ;; 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
|
6853 ;; 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
|
6854 (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
|
6855 nil t) |
257 | 6856 (setq newsgroup (buffer-substring (match-beginning 1) (match-end 1))) |
6857 ;; Check duplications of newsgroups. | |
6858 ;; 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
|
6859 (if (gnus-gethash newsgroup gnus-newsrc-hashtb) |
257 | 6860 (message "Ignore duplicated newsgroup: %s" newsgroup) |
6861 (setq subscribe | |
6862 (string-equal | |
6863 ":" (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
|
6864 (skip-chars-forward " \t") |
4a683dc76931
(gnus-newsrc-to-gnus-format): In main loop,
Richard M. Stallman <rms@gnu.org>
parents:
7705
diff
changeset
|
6865 (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
|
6866 (end-of-line) (point)))) |
257 | 6867 (setq read-list nil) |
6868 (while (string-match "^[, \t]*\\([0-9-]+\\)" ranges) | |
6869 (setq subrange (substring ranges (match-beginning 1) (match-end 1))) | |
6870 (setq ranges (substring ranges (match-end 1))) | |
6871 (cond ((string-match "^\\([0-9]+\\)-\\([0-9]+\\)$" subrange) | |
6872 (setq read-list | |
6873 (cons | |
6874 (cons (string-to-int | |
6875 (substring subrange | |
6876 (match-beginning 1) (match-end 1))) | |
6877 (string-to-int | |
6878 (substring subrange | |
6879 (match-beginning 2) (match-end 2)))) | |
6880 read-list))) | |
6881 ((string-match "^[0-9]+$" subrange) | |
6882 (setq read-list | |
6883 (cons (cons (string-to-int subrange) | |
6884 (string-to-int subrange)) | |
6885 read-list))) | |
6886 (t | |
6887 (ding) (message "Ignoring bogus lines of %s" newsgroup) | |
6888 (sit-for 0)) | |
6889 )) | |
6890 (setq gnus-newsrc-assoc | |
6891 (cons (cons newsgroup (cons subscribe (nreverse read-list))) | |
6892 gnus-newsrc-assoc)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6893 ;; Update gnus-newsrc-hashtb one by one. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6894 (gnus-sethash newsgroup (car gnus-newsrc-assoc) gnus-newsrc-hashtb) |
257 | 6895 )) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6896 (setq gnus-newsrc-assoc (nreverse gnus-newsrc-assoc)) |
257 | 6897 )) |
6898 | |
6899 (defun gnus-parse-n-options (options) | |
6900 "Parse -n NEWSGROUPS options and return a cons of YES and NO regexps." | |
6901 (let ((yes nil) | |
6902 (no nil) | |
6903 (yes-or-no nil) ;`!' or not. | |
6904 (newsgroup nil)) | |
6905 ;; Parse each newsgroup description such as "comp.all". Commas | |
6906 ;; and white spaces can be a newsgroup separator. | |
6907 (while | |
6309
9217f29851c2
Don't use triple-hyphen in a character class.
Karl Heuer <kwzh@gnu.org>
parents:
5911
diff
changeset
|
6908 (string-match "^[ \t\n,]*\\(!?\\)\\([^- \t\n,][^ \t\n,]*\\)" options) |
257 | 6909 (setq yes-or-no |
6910 (substring options (match-beginning 1) (match-end 1))) | |
6911 (setq newsgroup | |
6912 (regexp-quote | |
6913 (substring options | |
6914 (match-beginning 2) (match-end 2)))) | |
6915 (setq options (substring options (match-end 2))) | |
6916 ;; Rewrite "all" to ".+" not ".*". ".+" requires at least one | |
6917 ;; character. | |
6918 (while (string-match "\\(^\\|\\\\[.]\\)all\\(\\\\[.]\\|$\\)" newsgroup) | |
6919 (setq newsgroup | |
6920 (concat (substring newsgroup 0 (match-end 1)) | |
6921 ".+" | |
6922 (substring newsgroup (match-beginning 2))))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6923 ;; It is yes or no. |
257 | 6924 (cond ((string-equal yes-or-no "!") |
6925 (setq no (cons newsgroup no))) | |
6926 ((string-equal newsgroup ".+")) ;Ignore `all'. | |
6927 (t | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6928 (setq yes (cons newsgroup yes)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6929 ) |
257 | 6930 ;; 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
|
6931 ;; 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
|
6932 ;; 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
|
6933 ;; "jp.network". |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6934 ;; Fixes for large regexp problems are from yonezu@nak.math.keio.ac.jp. |
257 | 6935 (cons (if yes |
6936 (concat "^\\(" | |
6937 (apply (function concat) | |
6938 (mapcar | |
6939 (function | |
6940 (lambda (newsgroup) | |
6941 (concat newsgroup "\\|"))) | |
6942 (cdr yes))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6943 (car yes) "\\)\\(\\.\\|$\\)")) |
257 | 6944 (if no |
6945 (concat "^\\(" | |
6946 (apply (function concat) | |
6947 (mapcar | |
6948 (function | |
6949 (lambda (newsgroup) | |
6950 (concat newsgroup "\\|"))) | |
6951 (cdr no))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6952 (car no) "\\)\\(\\.\\|$\\)"))) |
257 | 6953 )) |
6954 | |
6955 (defun gnus-save-newsrc-file () | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
6956 "Save current status in the `.newsrc' file." |
257 | 6957 ;; Note: We cannot save .newsrc file if all newsgroups are removed |
6958 ;; from the variable gnus-newsrc-assoc. | |
6959 (and (or gnus-newsrc-assoc gnus-killed-assoc) | |
6960 gnus-current-startup-file | |
6961 (save-excursion | |
6962 ;; A buffer containing .newsrc file may be deleted. | |
6963 (set-buffer (find-file-noselect gnus-current-startup-file)) | |
6964 (if (not (buffer-modified-p)) | |
6965 (message "(No changes need to be saved)") | |
6966 (message "Saving %s..." gnus-current-startup-file) | |
6967 (let ((make-backup-files t) | |
6968 (version-control nil) | |
6969 (require-final-newline t)) ;Don't ask even if requested. | |
6970 ;; Make backup file of master newsrc. | |
6971 ;; You can stop or change version control of backup file. | |
6972 ;; Suggested by jason@violet.berkeley.edu. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6973 (run-hooks 'gnus-save-newsrc-hook) |
257 | 6974 (save-buffer)) |
6975 ;; Quickly loadable .newsrc. | |
6976 (set-buffer (get-buffer-create " *GNUS-newsrc*")) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6977 (buffer-flush-undo (current-buffer)) |
257 | 6978 (erase-buffer) |
6979 (gnus-gnus-to-quick-newsrc-format) | |
6980 (let ((make-backup-files nil) | |
6981 (version-control nil) | |
6982 (require-final-newline t)) ;Don't ask even if requested. | |
6983 (write-file (concat gnus-current-startup-file ".el"))) | |
6984 (kill-buffer (current-buffer)) | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
6985 (message "Saving %s...done" gnus-current-startup-file) |
257 | 6986 )) |
6987 )) | |
6988 | |
6989 (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
|
6990 "Incrementally update `.newsrc' buffer about GROUP. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6991 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
|
6992 If optional 2nd argument NEXT is non-nil, inserted before it." |
257 | 6993 (save-excursion |
6994 ;; Taking account of the killed startup file. | |
6995 ;; Suggested by tale@pawl.rpi.edu. | |
6996 (set-buffer (or (get-file-buffer gnus-current-startup-file) | |
6997 (find-file-noselect gnus-current-startup-file))) | |
6998 ;; Options line continuation lines must be also considered here. | |
6999 ;; Before supporting continuation lines, " newsgroup ! 1-5" was | |
7000 ;; okay, but now it is invalid. It should be "newsgroup! 1-5". | |
7001 (let ((deleted nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7002 (case-fold-search nil) ;Should NOT ignore case. |
257 | 7003 (buffer-read-only nil)) ;May be not modifiable. |
7004 ;; Delete ALL entries which match for GROUP. | |
7005 (goto-char (point-min)) | |
7006 (while (re-search-forward | |
7007 (concat "^" (regexp-quote group) "[:!]") nil t) | |
7008 (beginning-of-line) | |
7009 (delete-region (point) (progn (forward-line 1) (point))) | |
7010 (setq deleted t) ;Old entry is deleted. | |
7011 ) | |
7012 (if delete | |
7013 nil | |
7014 ;; Insert group entry. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7015 (let ((newsrc (gnus-gethash group gnus-newsrc-hashtb))) |
257 | 7016 (if (null newsrc) |
7017 nil | |
7018 ;; Find insertion point. | |
7019 (cond (deleted nil) ;Insert here. | |
7020 ((and (stringp next) | |
7021 (progn | |
7022 (goto-char (point-min)) | |
7023 (re-search-forward | |
7024 (concat "^" (regexp-quote next) "[:!]") nil t))) | |
7025 (beginning-of-line)) | |
7026 (t | |
7027 (goto-char (point-max)) | |
7028 (or (bolp) | |
7029 (insert "\n")))) | |
7030 ;; Insert after options line. | |
7031 (if (looking-at "^[ \t]*options\\([ \t]\\|$\\)") | |
7032 (progn | |
7033 (forward-line 1) | |
7034 ;; Skip continuation lines. | |
7035 (while (and (not (eobp)) | |
7036 (looking-at "^[ \t]+")) | |
7037 (forward-line 1)))) | |
7038 (insert group ;Group name | |
7039 (if (nth 1 newsrc) ": " "! ")) ;Subscribed? | |
7040 (gnus-ranges-to-newsrc-format (nthcdr 2 newsrc)) ;Read articles | |
7041 (insert "\n") | |
7042 ))) | |
7043 ))) | |
7044 | |
7045 (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
|
7046 "Insert GNUS variables such as `gnus-newsrc-assoc' in Lisp format." |
257 | 7047 (insert ";; GNUS internal format of .newsrc.\n") |
7048 (insert ";; Touch .newsrc instead if you think to remove this file.\n") | |
7049 (let ((variable nil) | |
11875
ea4aa045a1b0
(gnus-gnus-to-quick-newsrc-format): don't save
Karl Heuer <kwzh@gnu.org>
parents:
11837
diff
changeset
|
7050 (variables gnus-variable-list) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7051 ;; Temporary rebind to make changes |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7052 ;; gnus-check-killed-newsgroups in invisible. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7053 (gnus-killed-assoc gnus-killed-assoc) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7054 (gnus-killed-hashtb gnus-killed-hashtb)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7055 ;; Remove duplicated or unsubscribed newsgroups in |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7056 ;; gnus-killed-assoc (and gnus-killed-hashtb). |
257 | 7057 (gnus-check-killed-newsgroups) |
7058 ;; Then, insert lisp expressions. | |
7059 (while variables | |
7060 (setq variable (car variables)) | |
7061 (and (boundp variable) | |
7062 (symbol-value variable) | |
7063 (insert "(setq " (symbol-name variable) " '" | |
7064 (prin1-to-string (symbol-value variable)) | |
7065 ")\n")) | |
7066 (setq variables (cdr variables))) | |
7067 )) | |
7068 | |
7069 (defun gnus-ranges-to-newsrc-format (ranges) | |
7070 "Insert ranges of read articles." | |
7071 (let ((range nil)) ;Range is a pair of BEGIN and END. | |
7072 (while ranges | |
7073 (setq range (car ranges)) | |
7074 (setq ranges (cdr ranges)) | |
7075 (cond ((= (car range) (cdr range)) | |
7076 (if (= (car range) 0) | |
7077 (setq ranges nil) ;No unread articles. | |
7078 (insert (int-to-string (car range))) | |
7079 (if ranges (insert ",")) | |
7080 )) | |
7081 (t | |
7082 (insert (int-to-string (car range)) | |
7083 "-" | |
7084 (int-to-string (cdr range))) | |
7085 (if ranges (insert ",")) | |
7086 )) | |
7087 ))) | |
7088 | |
7089 (defun gnus-compress-sequence (numbers) | |
7090 "Convert list of sorted numbers to ranges." | |
7091 (let* ((numbers (sort (copy-sequence numbers) (function <))) | |
7092 (first (car numbers)) | |
7093 (last (car numbers)) | |
7094 (result nil)) | |
7095 (while numbers | |
7096 (cond ((= last (car numbers)) nil) ;Omit duplicated number | |
7097 ((= (1+ last) (car numbers)) ;Still in sequence | |
7098 (setq last (car numbers))) | |
7099 (t ;End of one sequence | |
7100 (setq result (cons (cons first last) result)) | |
7101 (setq first (car numbers)) | |
7102 (setq last (car numbers))) | |
7103 ) | |
7104 (setq numbers (cdr numbers)) | |
7105 ) | |
7106 (nreverse (cons (cons first last) result)) | |
7107 )) | |
7108 | |
7109 (defun gnus-uncompress-sequence (ranges) | |
7110 "Expand compressed format of sequence." | |
7111 (let ((first nil) | |
7112 (last nil) | |
7113 (result nil)) | |
7114 (while ranges | |
7115 (setq first (car (car ranges))) | |
7116 (setq last (cdr (car ranges))) | |
7117 (while (< first last) | |
7118 (setq result (cons first result)) | |
7119 (setq first (1+ first))) | |
7120 (setq result (cons first result)) | |
7121 (setq ranges (cdr ranges)) | |
7122 ) | |
7123 (nreverse result) | |
7124 )) | |
7125 | |
7126 (defun gnus-number-of-articles (range) | |
7127 "Compute number of articles from RANGE `((beg1 . end1) (beg2 . end2) ...)'." | |
7128 (let ((count 0)) | |
7129 (while range | |
7130 (if (/= (cdr (car range)) 0) | |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
7131 ;; If end1 is 0, it must be skipped. Usually no articles in |
257 | 7132 ;; this group. |
7133 (setq count (+ count 1 (- (cdr (car range)) (car (car range)))))) | |
7134 (setq range (cdr range)) | |
7135 ) | |
7136 count ;Result | |
7137 )) | |
7138 | |
7139 (defun gnus-difference-of-range (src obj) | |
7140 "Compute (SRC - OBJ) on range. | |
7141 Range of SRC is expressed as `(beg . end)'. | |
7142 Range of OBJ is expressed as `((beg1 . end1) (beg2 . end2) ...)." | |
7143 (let ((beg (car src)) | |
7144 (end (cdr src)) | |
7145 (range nil)) ;This is result. | |
7146 ;; Src may be nil. | |
7147 (while (and src obj) | |
7148 (let ((beg1 (car (car obj))) | |
7149 (end1 (cdr (car obj)))) | |
7150 (cond ((> beg end) | |
7151 (setq obj nil)) ;Terminate loop | |
7152 ((< beg beg1) | |
7153 (setq range (cons (cons beg (min (1- beg1) end)) range)) | |
7154 (setq beg (1+ end1))) | |
7155 ((>= beg beg1) | |
7156 (setq beg (max beg (1+ end1)))) | |
7157 ) | |
7158 (setq obj (cdr obj)) ;Next OBJ | |
7159 )) | |
7160 ;; Src may be nil. | |
7161 (if (and src (<= beg end)) | |
7162 (setq range (cons (cons beg end) range))) | |
7163 ;; Result | |
7164 (if range | |
7165 (nreverse range) | |
7166 (list (cons 0 0))) | |
7167 )) | |
7168 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7169 (defun gnus-read-distributions-file () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7170 "Get distributions file from NNTP server (NNTP2 functionality)." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7171 ;; 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
|
7172 (gnus-start-news-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7173 (message "Reading distributions file...") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7174 (setq gnus-distribution-list nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7175 (if (gnus-request-list-distributions) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7176 (save-excursion |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7177 (set-buffer nntp-server-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7178 (gnus-distributions-to-gnus-format) |
10073
71b3508d5418
Many doc fixes. Fix progress message formats.
Richard M. Stallman <rms@gnu.org>
parents:
9824
diff
changeset
|
7179 (message "Reading distributions file...done")) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7180 ;; It's not a fatal error. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7181 ;;(error "Cannot read distributions file from NNTP server.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7182 ) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7183 ;; Merge with user supplied default distributions. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7184 (let ((defaults (reverse gnus-local-distributions)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7185 (dist nil)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7186 (while defaults |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7187 (setq dist (assoc (car defaults) gnus-distribution-list)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7188 (if dist |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7189 (setq gnus-distribution-list |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7190 (delq dist gnus-distribution-list))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7191 (setq gnus-distribution-list |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7192 (cons (list (car defaults)) gnus-distribution-list)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7193 (setq defaults (cdr defaults)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7194 ))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7195 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7196 (defun gnus-distributions-to-gnus-format () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7197 "Convert distributions file format to internal format." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7198 (setq gnus-distribution-list nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7199 (goto-char (point-min)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7200 (while (re-search-forward "^\\([^ \t\n]+\\).*$" nil t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7201 (setq gnus-distribution-list |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7202 (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
|
7203 gnus-distribution-list))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7204 (setq gnus-distribution-list |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7205 (nreverse gnus-distribution-list))) |
257 | 7206 |
10542
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7207 (defun gnus-newsgroups-retrieve-description () |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7208 "Retrieve newsgroups description and build gnus-newsgroups-alist" |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7209 (message "Reading newsgroups file...") |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7210 (if (gnus-request-list-newsgroups) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7211 (save-excursion |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7212 (setq gnus-newsgroups-alist nil) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7213 (set-buffer nntp-server-buffer) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7214 (goto-char (point-min)) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7215 (while (re-search-forward gnus-newsgroups-regex nil t) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7216 (setq gnus-newsgroups-alist |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7217 (cons (cons (buffer-substring (match-beginning 1) (match-end 1)) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7218 (buffer-substring (match-beginning 2) (match-end 2))) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7219 gnus-newsgroups-alist))) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7220 (message "Reading newsgroups file...done")) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7221 (message "Cannot read newsgroups file"))) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7222 |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7223 (defun gnus-newsgroups-update-description () |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7224 "Update the newsgroups description" |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7225 (interactive) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7226 (gnus-newsgroups-retrieve-description) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7227 (setq gnus-newsgroups-hashtb (gnus-make-hashtable-from-alist gnus-newsgroups-alist))) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7228 |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7229 (defun gnus-newsgroups-display-toggle () |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7230 "Toggle displaying newsgroup descriptions in *Newsgroup* buffer." |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7231 (interactive) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7232 (setq gnus-newsgroups-display (not gnus-newsgroups-display)) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7233 (if gnus-newsgroups-showall |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7234 (gnus-group-list-groups t) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7235 (gnus-group-list-groups nil))) |
0701b42497fc
Added support for descriptions in the group buffer:
Richard M. Stallman <rms@gnu.org>
parents:
10177
diff
changeset
|
7236 |
8470
999e5521d05a
Require timezone when loading this file.
Richard M. Stallman <rms@gnu.org>
parents:
8444
diff
changeset
|
7237 (provide 'gnus) |
999e5521d05a
Require timezone when loading this file.
Richard M. Stallman <rms@gnu.org>
parents:
8444
diff
changeset
|
7238 |
257 | 7239 ;;Local variables: |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7240 ;;eval: (put 'gnus-eval-in-buffer-window 'lisp-indent-hook 1) |
257 | 7241 ;;end: |
4173
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
7242 |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
7243 ;;; gnus.el ends here |