Mercurial > emacs
annotate lisp/=gnus.el @ 9973:1d5a908f201e
(access_keymap): Use type test macros.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Wed, 16 Nov 1994 05:59:53 +0000 |
parents | 1a60406f3d3e |
children | 71b3508d5418 |
rev | line source |
---|---|
9550
5b91f8657de6
(gnus-group-group-name): Get rid of text properties.
Richard M. Stallman <rms@gnu.org>
parents:
8523
diff
changeset
|
1 ;;; gnus.el --- NNTP-based News Reader for GNU Emacs |
7300 | 2 ;; Copyright (C) 1987,88,89,90,93,94 Free Software Foundation, Inc. |
4173
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
3 |
4317 | 4 ;; Author: Masanobu UMEDA <umerin@mse.kyutech.ac.jp> |
4173
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
5 ;; Keywords: news |
807
4f28bd14272c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
716
diff
changeset
|
6 |
257 | 7 ;; This file is part of GNU Emacs. |
8 | |
711
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
9 ;; GNU Emacs is free software; you can redistribute it and/or modify |
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
10 ;; it under the terms of the GNU General Public License as published by |
807
4f28bd14272c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
716
diff
changeset
|
11 ;; the Free Software Foundation; either version 2, or (at your option) |
711
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
12 ;; any later version. |
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
13 |
257 | 14 ;; GNU Emacs is distributed in the hope that it will be useful, |
711
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
17 ;; GNU General Public License for more details. |
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
18 |
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
19 ;; You should have received a copy of the GNU General Public License |
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
20 ;; along with GNU Emacs; see the file COPYING. If not, write to |
22b98190b7ef
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
660
diff
changeset
|
21 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
257 | 22 |
807
4f28bd14272c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
716
diff
changeset
|
23 ;;; Commentary: |
4f28bd14272c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
716
diff
changeset
|
24 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
25 ;; How to Install GNUS: |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
26 ;; (0) First of all, remove GNUS related OLD *.elc files (at least |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
27 ;; nntp.elc). |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
28 ;; (1) Unshar gnus.el, gnuspost.el, gnusmail.el, gnusmisc.el, and |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
29 ;; nntp.el. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
30 ;; (2) byte-compile-file nntp.el, gnus.el, gnuspost.el, gnusmail.el, |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
31 ;; and gnusmisc.el. If you have a local news spool, |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
32 ;; byte-compile-file nnspool.el, too. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
33 ;; (3) Define three environment variables in .login file as follows: |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
34 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
35 ;; setenv NNTPSERVER flab |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
36 ;; setenv DOMAINNAME "stars.flab.Fujitsu.CO.JP" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
37 ;; setenv ORGANIZATION "Fujitsu Laboratories Ltd., Kawasaki, Japan." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
38 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
39 ;; Or instead, define lisp variables in your .emacs, site-init.el, |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
40 ;; or default.el as follows: |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
41 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
42 ;; (setq gnus-nntp-server "flab") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
43 ;; (setq gnus-local-domain "stars.flab.Fujitsu.CO.JP") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
44 ;; (setq gnus-local-organization "Fujitsu Laboratories Ltd., ...") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
45 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
46 ;; If the function (system-name) returns the full internet name, |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
47 ;; you don't have to define the domain. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
48 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
49 ;; (4) You may have to define NNTP service name as number 119. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
50 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
51 ;; (setq gnus-nntp-service 119) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
52 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
53 ;; Or, if you'd like to use a local news spool directly in stead |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
54 ;; of NNTP, install nnspool.el and set the variable to nil as |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
55 ;; follows: |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
56 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
57 ;; (setq gnus-nntp-service nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
58 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
59 ;; (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
|
60 ;; define the variable as follows: |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
61 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
62 ;; (setq gnus-use-generic-from t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
63 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
64 ;; (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
|
65 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
66 ;; (autoload 'gnus "gnus" "Read network news." t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
67 ;; (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
|
68 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
69 ;; (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
|
70 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
71 ;; (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
|
72 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
73 ;; 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
|
74 ;; private directory using GNUS. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
75 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
76 ;; 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
|
77 ;; 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
|
78 ;; communicating with NNTP server inside Emacs. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
79 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
80 ;; (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
|
81 ;; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
82 ;; 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
|
83 ;; 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
|
84 ;; variable gnus-info-directory to that directory. |
257 | 85 ;; |
4173
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
86 ;; 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
|
87 ;; gnu.emacs.gnus. |
257 | 88 |
89 ;; TO DO: | |
90 ;; (1) Incremental update of active info. | |
4173
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
91 ;; (2) Asynchronous transmission of large messages. |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
92 |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
93 ;;; Code: |
257 | 94 |
95 (require 'nntp) | |
96 (require 'mail-utils) | |
8470
999e5521d05a
Require timezone when loading this file.
Richard M. Stallman <rms@gnu.org>
parents:
8444
diff
changeset
|
97 (require 'timezone) |
257 | 98 |
4173
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
99 (defvar gnus-default-nntp-server nil |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
100 "*Specify default NNTP server. |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
101 This variable should be defined in paths.el.") |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
102 |
3331
3ab36486eede
(gnus-nntp-server): Use gnus-default-nntp-server.
Richard M. Stallman <rms@gnu.org>
parents:
2845
diff
changeset
|
103 (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
|
104 "*The name of the host running NNTP server. |
257 | 105 If it is a string such as `:DIRECTORY', the user's private DIRECTORY |
106 is used as a news spool. | |
107 Initialized from the NNTPSERVER environment variable.") | |
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. | |
3591
507f64624555
Apply typo patches from Paul Eggert.
Jim Blandy <jimb@redhat.com>
parents:
3496
diff
changeset
|
127 If nil, ignore followup-to: field. If t, use its value except for |
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 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
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. | |
149 The default function is `rmail-output' which saves in Unix mailbox format.") | |
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 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
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") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
158 "*A directory name to save articles to (default to ~/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:" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
249 "*All random fields within the header of a message.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
250 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
251 (defvar gnus-required-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
252 '(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
|
253 "*All required fields for articles you post. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
254 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
|
255 and Path fields. Organization, Distribution and Lines are optional. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
256 If you want GNUS not to insert some field, remove it from the |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
257 variable.") |
257 | 258 |
259 (defvar gnus-show-all-headers nil | |
260 "*Show all headers of an article if non-nil.") | |
261 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
262 (defvar gnus-save-all-headers t |
257 | 263 "*Save all headers of an article if non-nil.") |
264 | |
265 (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
|
266 "*A function generating a optional string displayed in GNUS Summary |
257 | 267 mode buffer. The function is called with an article HEADER. The |
268 result must be a string excluding `[' and `]'.") | |
269 | |
270 (defvar gnus-auto-extend-newsgroup t | |
3591
507f64624555
Apply typo patches from Paul Eggert.
Jim Blandy <jimb@redhat.com>
parents:
3496
diff
changeset
|
271 "*Extend visible articles to forward and backward if non-nil.") |
257 | 272 |
273 (defvar gnus-auto-select-first t | |
274 "*Select the first unread article automagically if non-nil. | |
275 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
|
276 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
|
277 or `gnus-apply-kill-hook'.") |
257 | 278 |
279 (defvar gnus-auto-select-next t | |
280 "*Select the next newsgroup automagically if non-nil. | |
281 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
|
282 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
|
283 nor t, GNUS will select the following unread newsgroup. Especially, if |
257 | 284 the value is the symbol `quietly', the next unread newsgroup will be |
285 selected without any confirmations.") | |
286 | |
287 (defvar gnus-auto-select-same nil | |
288 "*Select the next article with the same subject automagically if non-nil.") | |
289 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
290 (defvar gnus-auto-center-summary t |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
291 "*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
|
292 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
293 (defvar gnus-auto-mail-to-author nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
294 "*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
|
295 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
|
296 `gnus-mail-send-method'.") |
257 | 297 |
298 (defvar gnus-break-pages t | |
299 "*Break an article into pages if non-nil. | |
300 Page delimiter is specified by the variable `gnus-page-delimiter'.") | |
301 | |
302 (defvar gnus-page-delimiter "^\^L" | |
303 "*Regexp describing line-beginnings that separate pages of news article.") | |
304 | |
305 (defvar gnus-digest-show-summary t | |
306 "*Show a summary of undigestified messages if non-nil.") | |
307 | |
308 (defvar gnus-digest-separator "^Subject:[ \t]" | |
309 "*Regexp that separates messages in a digest article.") | |
310 | |
311 (defvar gnus-use-full-window t | |
312 "*Non-nil means to take up the entire screen of Emacs.") | |
313 | |
314 (defvar gnus-window-configuration | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
315 '((summary (0 1 0)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
316 (newsgroups (1 0 0)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
317 (article (0 3 10))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
318 "*Specify window configurations for each action. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
319 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
|
320 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
|
321 respectively. ACTION is `summary', `newsgroups', or `article'.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
322 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
323 (defvar gnus-show-mime-method (function metamail-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
324 "*Function to process a MIME message. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
325 The function is expected to process current buffer as a MIME message.") |
257 | 326 |
327 (defvar gnus-mail-reply-method | |
328 (function gnus-mail-reply-using-mail) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
329 "*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
|
330 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
|
331 program. The function `gnus-mail-reply-using-mhe' uses the MH-E mail |
257 | 332 program. You can use yet another program by customizing this variable.") |
333 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
334 (defvar gnus-mail-forward-method |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
335 (function gnus-mail-forward-using-mail) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
336 "*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
|
337 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
|
338 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
|
339 |
257 | 340 (defvar gnus-mail-other-window-method |
341 (function gnus-mail-other-window-using-mail) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
342 "*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
|
343 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
|
344 mail program. The function `gnus-mail-other-window-using-mhe' uses the MH-E |
257 | 345 mail program. You can use yet another program by customizing this variable.") |
346 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
347 (defvar gnus-mail-send-method send-mail-function |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
348 "*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
|
349 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
|
350 the variable `send-mail-function'.") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
351 |
257 | 352 (defvar gnus-subscribe-newsgroup-method |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
353 (function gnus-subscribe-alphabetically) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
354 "*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
|
355 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
|
356 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
|
357 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
|
358 `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
|
359 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
|
360 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
361 (defvar gnus-group-mode-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
362 "*A hook for GNUS Group Mode.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
363 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
364 (defvar gnus-summary-mode-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
365 "*A hook for GNUS Summary Mode.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
366 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
367 (defvar gnus-article-mode-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
368 "*A hook for GNUS Article Mode.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
369 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
370 (defvar gnus-kill-file-mode-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
371 "*A hook for GNUS KILL File Mode.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
372 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
373 (defvar gnus-open-server-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
374 "*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
|
375 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
376 (defvar gnus-startup-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
377 "*A hook called at start up time. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
378 This hook is called after GNUS is connected to the NNTP server. So, it |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
379 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
|
380 NNTP server.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
381 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
382 (defvar gnus-group-prepare-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
383 "*A hook called after newsgroup list is created in the Newsgroup buffer. |
257 | 384 If you want to modify the Newsgroup buffer, you can use this hook.") |
385 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
386 (defvar gnus-summary-prepare-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
387 "*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
|
388 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
|
389 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
390 (defvar gnus-article-prepare-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
391 "*A hook called after an article is prepared in the Article buffer. |
257 | 392 If you want to run a special decoding program like nkf, use this hook.") |
393 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
394 (defvar gnus-select-group-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
395 "*A hook called when a newsgroup is selected. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
396 If you want to sort Summary buffer by date and then by subject, you |
257 | 397 can use the following hook: |
398 | |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
399 \(setq 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
|
400 (list |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
401 (function |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
402 (lambda () |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
403 ;; 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
|
404 (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
|
405 (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
|
406 (function |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
407 (lambda (a) |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
408 (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
|
409 ;; 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
|
410 ;; 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
|
411 (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
|
412 (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
|
413 (function |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
414 (lambda (a) |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
415 (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
|
416 (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
|
417 (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 )))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
419 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
420 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
|
421 `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
|
422 following hook: |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
423 |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
424 \(setq 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
|
425 (list |
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)))) |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
434 gnus-newsgroup-headers))))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
435 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
436 In some newsgroups author name is meaningless. It is possible to |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
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 |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
439 \(setq 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
|
440 (list |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
441 (function |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
442 (lambda () |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
443 (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
|
444 (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
|
445 (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
|
446 (t |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
447 (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
|
448 (function gnus-optional-lines-and-from))))))))") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
449 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
450 (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
|
451 '(gnus-summary-show-thread) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
452 "*A hook called when an article is selected. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
453 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
|
454 article automatically using `gnus-summary-show-thread'. |
257 | 455 |
456 If you'd like to run RMAIL on a digest article automagically, you can | |
457 use the following hook: | |
458 | |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
459 \(setq gnus-select-article-hook |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
460 (list |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
461 (function |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
462 (lambda () |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
463 (gnus-summary-show-thread) |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
464 (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
|
465 (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
|
466 ((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
|
467 (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
|
468 (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
|
469 (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
|
470 ))))))") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
471 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
472 (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
|
473 (list |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
474 (function |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
475 (lambda () |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
476 ;; 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
|
477 (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
|
478 (progn |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
479 (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
|
480 (insert (gnus-fetch-field "From"))))))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
481 "*A hook called when reading digest messages using Rmail. |
257 | 482 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
|
483 \(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
|
484 |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
485 \(setq gnus-select-digest-hook |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
486 (list |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
487 (function |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
488 (lambda () |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
489 ;; 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
|
490 (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
|
491 (progn |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
492 (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
|
493 (insert (gnus-fetch-field \"From\"))))))))") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
494 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
495 (defvar gnus-rmail-digest-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
496 "*A hook called when reading digest messages using Rmail. |
257 | 497 This hook is intended to customize Rmail mode for reading digest articles.") |
498 | |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
499 (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
|
500 "*A hook called when a newsgroup is selected and summary list is prepared. |
257 | 501 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
|
502 The function `gnus-apply-kill-file' is called by default. |
257 | 503 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
504 Since a general KILL file is too heavy to use only for a few |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
505 newsgroups, I recommend you to use a lighter hook function. For |
257 | 506 example, if you'd like to apply a KILL file to articles which contains |
507 a string `rmgroup' in subject in newsgroup `control', you can use the | |
508 following hook: | |
509 | |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
510 \(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
|
511 (list |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
512 (function |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
513 (lambda () |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
514 (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
|
515 (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
|
516 (gnus-expunge \"X\")))))))") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
517 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
518 (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
|
519 (list |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
520 (function |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
521 (lambda () |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
522 (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
|
523 (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
|
524 (gnus-summary-set-current-mark "+")))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
525 "*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
|
526 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
|
527 automatically when it is selected. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
528 |
257 | 529 If you'd like to mark as unread (-) instead, use the following hook: |
530 | |
4321
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
531 \(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
|
532 (list |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
533 (function |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
534 (lambda () |
2eb6fe350374
(gnus-apply-kill-hook): Make default value a list of functions.
Richard M. Stallman <rms@gnu.org>
parents:
4317
diff
changeset
|
535 (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
|
536 (gnus-summary-set-current-mark \"+\")))))") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
537 |
3474
9eaa2151f7f6
(gnus-summary-isearch-article): Call isearch-forward
Richard M. Stallman <rms@gnu.org>
parents:
3331
diff
changeset
|
538 (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
|
539 "*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
|
540 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
|
541 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
|
542 |
9eaa2151f7f6
(gnus-summary-isearch-article): Call isearch-forward
Richard M. Stallman <rms@gnu.org>
parents:
3331
diff
changeset
|
543 (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
|
544 "*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
|
545 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
|
546 to a file).") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
547 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
548 (defvar gnus-exit-group-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
549 "*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
|
550 If your machine is so slow that exiting from Summary mode takes very |
3474
9eaa2151f7f6
(gnus-summary-isearch-article): Call isearch-forward
Richard M. Stallman <rms@gnu.org>
parents:
3331
diff
changeset
|
551 long time, set the variable `gnus-use-cross-reference' to nil. This |
257 | 552 inhibits marking articles as read using cross-reference information.") |
553 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
554 (defvar gnus-suspend-gnus-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
555 "*A hook called when suspending (not exiting) 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-exit-gnus-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
558 "*A hook called when exiting (not suspending) GNUS.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
559 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
560 (defvar gnus-save-newsrc-hook nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
561 "*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
|
562 This hook is called before saving the `.newsrc' file.") |
257 | 563 |
2843
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 ;; Site dependent variables. You have to define these variables in |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
566 ;; site-init.el, default.el or your .emacs. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
567 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
568 (defvar gnus-local-timezone nil |
3496
509112098ff1
(gnus-local-timezone): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
3474
diff
changeset
|
569 "*Local time zone. |
509112098ff1
(gnus-local-timezone): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
3474
diff
changeset
|
570 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
|
571 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
|
572 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
|
573 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
|
574 |
509112098ff1
(gnus-local-timezone): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
3474
diff
changeset
|
575 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
|
576 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
|
577 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
578 (defvar gnus-local-domain nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
579 "*Local domain name without a host name like: \"stars.flab.Fujitsu.CO.JP\" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
580 The `DOMAINNAME' environment variable is used instead if defined. If |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
581 the function (system-name) returns the full internet name, there is no |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
582 need to define the name.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
583 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
584 (defvar gnus-local-organization nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
585 "*Local organization like: \"Fujitsu Laboratories Ltd., Kawasaki, Japan.\" |
257 | 586 The `ORGANIZATION' environment variable is used instead if defined.") |
587 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
588 (defvar gnus-local-distributions '("local" "world") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
589 "*List of distributions. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
590 The first element in the list is used as default. If distributions |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
591 file is available, its content is also used.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
592 |
257 | 593 (defvar gnus-use-generic-from nil |
594 "*If nil, prepend local host name to the defined domain in the From: | |
595 field; if stringp, use this; if non-nil, strip of the local host name.") | |
596 | |
597 (defvar gnus-use-generic-path nil | |
598 "*If nil, use the NNTP server name in the Path: field; if stringp, | |
599 use this; if non-nil, use no host name (user name only)") | |
600 | |
601 ;; Internal variables. | |
602 | |
4173
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
603 (defconst gnus-version "GNUS 4.1" |
257 | 604 "Version numbers of this version of GNUS.") |
605 | |
4173
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
606 (defconst gnus-emacs-version |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
607 (progn |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
608 (string-match "[0-9]*" emacs-version) |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
609 (string-to-int (substring emacs-version |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
610 (match-beginning 0) (match-end 0)))) |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
611 "Major version number of this emacs.") |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
612 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
613 (defvar gnus-info-nodes |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
614 '((gnus-group-mode "(gnus)Newsgroup Commands") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
615 (gnus-summary-mode "(gnus)Summary Commands") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
616 (gnus-article-mode "(gnus)Article Commands") |
4118
4248276b1113
(gnus-info-nodes): Update node names.
Richard M. Stallman <rms@gnu.org>
parents:
3922
diff
changeset
|
617 (gnus-kill-file-mode "(gnus)Kill File") |
4248276b1113
(gnus-info-nodes): Update node names.
Richard M. Stallman <rms@gnu.org>
parents:
3922
diff
changeset
|
618 (gnus-browse-killed-mode "(gnus)Maintaining Subscriptions")) |
257 | 619 "Assoc list of major modes and related Info nodes.") |
620 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
621 ;; Alist syntax is different from that of 3.14.3. |
257 | 622 (defvar gnus-access-methods |
623 '((nntp | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
624 (gnus-retrieve-headers nntp-retrieve-headers) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
625 (gnus-open-server nntp-open-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
626 (gnus-close-server nntp-close-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
627 (gnus-server-opened nntp-server-opened) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
628 (gnus-status-message nntp-status-message) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
629 (gnus-request-article nntp-request-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
630 (gnus-request-group nntp-request-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
631 (gnus-request-list nntp-request-list) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
632 (gnus-request-list-newsgroups nntp-request-list-newsgroups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
633 (gnus-request-list-distributions nntp-request-list-distributions) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
634 (gnus-request-post nntp-request-post)) |
257 | 635 (nnspool |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
636 (gnus-retrieve-headers nnspool-retrieve-headers) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
637 (gnus-open-server nnspool-open-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
638 (gnus-close-server nnspool-close-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
639 (gnus-server-opened nnspool-server-opened) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
640 (gnus-status-message nnspool-status-message) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
641 (gnus-request-article nnspool-request-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
642 (gnus-request-group nnspool-request-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
643 (gnus-request-list nnspool-request-list) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
644 (gnus-request-list-newsgroups nnspool-request-list-newsgroups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
645 (gnus-request-list-distributions nnspool-request-list-distributions) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
646 (gnus-request-post nnspool-request-post)) |
257 | 647 (mhspool |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
648 (gnus-retrieve-headers mhspool-retrieve-headers) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
649 (gnus-open-server mhspool-open-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
650 (gnus-close-server mhspool-close-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
651 (gnus-server-opened mhspool-server-opened) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
652 (gnus-status-message mhspool-status-message) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
653 (gnus-request-article mhspool-request-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
654 (gnus-request-group mhspool-request-group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
655 (gnus-request-list mhspool-request-list) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
656 (gnus-request-list-newsgroups mhspool-request-list-newsgroups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
657 (gnus-request-list-distributions mhspool-request-list-distributions) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
658 (gnus-request-post mhspool-request-post))) |
257 | 659 "Access method for NNTP, nnspool, and mhspool.") |
660 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
661 (defvar gnus-group-buffer "*Newsgroup*") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
662 (defvar gnus-summary-buffer "*Summary*") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
663 (defvar gnus-article-buffer "*Article*") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
664 (defvar gnus-digest-buffer "GNUS Digest") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
665 (defvar gnus-digest-summary-buffer "GNUS Digest-summary") |
257 | 666 |
667 (defvar gnus-buffer-list | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
668 (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
|
669 gnus-digest-buffer gnus-digest-summary-buffer) |
257 | 670 "GNUS buffer names which should be killed when exiting.") |
671 | |
672 (defvar gnus-variable-list | |
673 '(gnus-newsrc-options | |
674 gnus-newsrc-options-n-yes gnus-newsrc-options-n-no | |
675 gnus-newsrc-assoc gnus-killed-assoc gnus-marked-assoc) | |
676 "GNUS variables saved in the quick startup file.") | |
677 | |
678 (defvar gnus-overload-functions | |
679 '((news-inews gnus-inews-news "rnewspost") | |
680 (caesar-region gnus-caesar-region "rnews")) | |
681 "Functions overloaded by gnus. | |
682 It is a list of `(original overload &optional file)'.") | |
683 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
684 (defvar gnus-distribution-list nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
685 |
257 | 686 (defvar gnus-newsrc-options nil |
687 "Options line in the .newsrc file.") | |
688 | |
689 (defvar gnus-newsrc-options-n-yes nil | |
690 "Regexp representing subscribed newsgroups.") | |
691 | |
692 (defvar gnus-newsrc-options-n-no nil | |
693 "Regexp representing unsubscribed newsgroups.") | |
694 | |
695 (defvar gnus-newsrc-assoc nil | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
696 "Assoc list of read articles. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
697 gnus-newsrc-hashtb should be kept so that both hold the same information.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
698 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
699 (defvar gnus-newsrc-hashtb nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
700 "Hashtable of gnus-newsrc-assoc.") |
257 | 701 |
702 (defvar gnus-killed-assoc nil | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
703 "Assoc list of newsgroups removed from gnus-newsrc-assoc. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
704 gnus-killed-hashtb should be kept so that both hold the same information.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
705 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
706 (defvar gnus-killed-hashtb nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
707 "Hashtable of gnus-killed-assoc.") |
257 | 708 |
709 (defvar gnus-marked-assoc nil | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
710 "Assoc list of articles marked as unread. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
711 gnus-marked-hashtb should be kept so that both hold the same information.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
712 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
713 (defvar gnus-marked-hashtb nil |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
714 "Hashtable of gnus-marked-assoc.") |
257 | 715 |
716 (defvar gnus-unread-hashtb nil | |
717 "Hashtable of unread articles.") | |
718 | |
719 (defvar gnus-active-hashtb nil | |
720 "Hashtable of active articles.") | |
721 | |
722 (defvar gnus-octive-hashtb nil | |
723 "Hashtable of OLD active articles.") | |
724 | |
725 (defvar gnus-current-startup-file nil | |
726 "Startup file for the current host.") | |
727 | |
728 (defvar gnus-last-search-regexp nil | |
729 "Default regexp for article search command.") | |
730 | |
731 (defvar gnus-last-shell-command nil | |
732 "Default shell command on article.") | |
733 | |
734 (defvar gnus-have-all-newsgroups nil) | |
735 | |
736 (defvar gnus-newsgroup-name nil) | |
737 (defvar gnus-newsgroup-begin nil) | |
738 (defvar gnus-newsgroup-end nil) | |
739 (defvar gnus-newsgroup-last-rmail nil) | |
740 (defvar gnus-newsgroup-last-mail nil) | |
741 (defvar gnus-newsgroup-last-folder nil) | |
742 (defvar gnus-newsgroup-last-file nil) | |
743 | |
744 (defvar gnus-newsgroup-unreads nil | |
745 "List of unread articles in the current newsgroup.") | |
746 | |
747 (defvar gnus-newsgroup-unselected nil | |
748 "List of unselected unread articles in the current newsgroup.") | |
749 | |
750 (defvar gnus-newsgroup-marked nil | |
751 "List of marked articles in the current newsgroup (a subset of unread art).") | |
752 | |
753 (defvar gnus-newsgroup-headers nil | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
754 "List of article headers in the current newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
755 If the variable is modified (added or deleted), the function |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
756 gnus-clear-hashtables-for-newsgroup-headers must be called to clear |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
757 the hash tables.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
758 (defvar gnus-newsgroup-headers-hashtb-by-id nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
759 (defvar gnus-newsgroup-headers-hashtb-by-number nil) |
257 | 760 |
761 (defvar gnus-current-article nil) | |
762 (defvar gnus-current-headers nil) | |
763 (defvar gnus-current-history nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
764 (defvar gnus-have-all-headers nil "Must be either T or NIL.") |
257 | 765 (defvar gnus-last-article nil) |
766 (defvar gnus-current-kill-article nil) | |
767 | |
768 ;; Save window configuration. | |
769 (defvar gnus-winconf-kill-file nil) | |
770 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
771 (defvar gnus-group-mode-map nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
772 (defvar gnus-summary-mode-map nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
773 (defvar gnus-article-mode-map nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
774 (defvar gnus-kill-file-mode-map nil) |
257 | 775 |
7560
e63efa2d587c
rmail-default-file renamed from rmail-last-file,
Richard M. Stallman <rms@gnu.org>
parents:
7524
diff
changeset
|
776 (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
|
777 (defvar rmail-default-rmail-file (expand-file-name "~/XNEWS")) |
257 | 778 |
779 ;; Define GNUS Subsystems. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
780 (autoload 'gnus-group-post-news "gnuspost" |
257 | 781 "Post an article." t) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
782 (autoload 'gnus-summary-post-news "gnuspost" |
257 | 783 "Post an article." t) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
784 (autoload 'gnus-summary-followup "gnuspost" |
257 | 785 "Post a reply article." t) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
786 (autoload 'gnus-summary-followup-with-original "gnuspost" |
257 | 787 "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
|
788 (autoload 'gnus-summary-cancel-article "gnuspost" |
257 | 789 "Cancel an article you posted." t) |
790 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
791 (autoload 'gnus-summary-reply "gnusmail" |
257 | 792 "Reply mail to news author." t) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
793 (autoload 'gnus-summary-reply-with-original "gnusmail" |
257 | 794 "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
|
795 (autoload 'gnus-summary-mail-forward "gnusmail" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
796 "Forward the current message to another user." t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
797 (autoload 'gnus-summary-mail-other-window "gnusmail" |
257 | 798 "Compose mail in other window." t) |
799 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
800 (autoload 'gnus-group-kill-group "gnusmisc" |
257 | 801 "Kill newsgroup on current line." t) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
802 (autoload 'gnus-group-yank-group "gnusmisc" |
257 | 803 "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
|
804 (autoload 'gnus-group-kill-region "gnusmisc" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
805 "Kill newsgroups in current region." t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
806 (autoload 'gnus-group-transpose-groups "gnusmisc" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
807 "Exchange current newsgroup and previous newsgroup." t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
808 (autoload 'gnus-list-killed-groups "gnusmisc" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
809 "List the killed newsgroups." t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
810 (autoload 'gnus-gmt-to-local "gnusmisc" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
811 "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
|
812 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
813 (autoload 'metamail-buffer "metamail" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
814 "Process current buffer through 'metamail'." t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
815 |
257 | 816 (autoload 'rmail-output "rmailout" |
817 "Append this message to Unix mail file named FILE-NAME." t) | |
818 (autoload 'mail-position-on-field "sendmail") | |
819 (autoload 'mh-find-path "mh-e") | |
820 (autoload 'mh-prompt-for-folder "mh-e") | |
821 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
822 (put 'gnus-group-mode 'mode-class 'special) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
823 (put 'gnus-summary-mode 'mode-class 'special) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
824 (put 'gnus-article-mode 'mode-class 'special) |
257 | 825 |
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
|
826 (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
|
827 (autoload 'gnus-uu-mark-article "gnus-uu" nil t) |
257 | 828 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
829 ;;(put 'gnus-eval-in-buffer-window 'lisp-indent-hook 1) |
257 | 830 |
831 (defmacro gnus-eval-in-buffer-window (buffer &rest forms) | |
832 "Pop to BUFFER, evaluate FORMS, and then returns to original window." | |
833 (` (let ((GNUSStartBufferWindow (selected-window))) | |
834 (unwind-protect | |
835 (progn | |
836 (pop-to-buffer (, buffer)) | |
837 (,@ forms)) | |
838 (select-window GNUSStartBufferWindow))))) | |
839 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
840 (defmacro gnus-make-hashtable (&optional hashsize) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
841 "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
|
842 Optional argument HASHSIZE specifies the table size." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
843 (` (make-vector (, (if hashsize (` (max (, hashsize) 200)) 200)) 0))) |
257 | 844 |
845 (defmacro gnus-gethash (string hashtable) | |
846 "Get hash value of STRING in HASHTABLE." | |
847 ;;(` (symbol-value (abbrev-symbol (, string) (, hashtable)))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
848 ;;(` (abbrev-expansion (, string) (, hashtable))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
849 (` (symbol-value (intern-soft (, string) (, hashtable))))) |
257 | 850 |
851 (defmacro gnus-sethash (string value hashtable) | |
852 "Set hash value. Arguments are STRING, VALUE, and HASHTABLE." | |
853 ;; We cannot use define-abbrev since it only accepts string as value. | |
854 (` (set (intern (, string) (, hashtable)) (, value)))) | |
855 | |
856 ;; Note: Macros defined here are also defined in nntp.el. I don't like | |
857 ;; to put them here, but many users got troubled with the old | |
858 ;; definitions in nntp.elc. These codes are NNTP 3.10 version. | |
859 | |
860 (defmacro nntp-header-number (header) | |
861 "Return article number in HEADER." | |
862 (` (aref (, header) 0))) | |
863 | |
864 (defmacro nntp-set-header-number (header number) | |
865 "Set article number of HEADER to NUMBER." | |
866 (` (aset (, header) 0 (, number)))) | |
867 | |
868 (defmacro nntp-header-subject (header) | |
869 "Return subject string in HEADER." | |
870 (` (aref (, header) 1))) | |
871 | |
872 (defmacro nntp-set-header-subject (header subject) | |
873 "Set article subject of HEADER to SUBJECT." | |
874 (` (aset (, header) 1 (, subject)))) | |
875 | |
876 (defmacro nntp-header-from (header) | |
877 "Return author string in HEADER." | |
878 (` (aref (, header) 2))) | |
879 | |
880 (defmacro nntp-set-header-from (header from) | |
881 "Set article author of HEADER to FROM." | |
882 (` (aset (, header) 2 (, from)))) | |
883 | |
884 (defmacro nntp-header-xref (header) | |
885 "Return xref string in HEADER." | |
886 (` (aref (, header) 3))) | |
887 | |
888 (defmacro nntp-set-header-xref (header xref) | |
889 "Set article xref of HEADER to xref." | |
890 (` (aset (, header) 3 (, xref)))) | |
891 | |
892 (defmacro nntp-header-lines (header) | |
893 "Return lines in HEADER." | |
894 (` (aref (, header) 4))) | |
895 | |
896 (defmacro nntp-set-header-lines (header lines) | |
897 "Set article lines of HEADER to LINES." | |
898 (` (aset (, header) 4 (, lines)))) | |
899 | |
900 (defmacro nntp-header-date (header) | |
901 "Return date in HEADER." | |
902 (` (aref (, header) 5))) | |
903 | |
904 (defmacro nntp-set-header-date (header date) | |
905 "Set article date of HEADER to DATE." | |
906 (` (aset (, header) 5 (, date)))) | |
907 | |
908 (defmacro nntp-header-id (header) | |
909 "Return Id in HEADER." | |
910 (` (aref (, header) 6))) | |
911 | |
912 (defmacro nntp-set-header-id (header id) | |
913 "Set article Id of HEADER to ID." | |
914 (` (aset (, header) 6 (, id)))) | |
915 | |
916 (defmacro nntp-header-references (header) | |
917 "Return references in HEADER." | |
918 (` (aref (, header) 7))) | |
919 | |
920 (defmacro nntp-set-header-references (header ref) | |
921 "Set article references of HEADER to REF." | |
922 (` (aset (, header) 7 (, ref)))) | |
923 | |
924 | |
925 ;;; | |
926 ;;; GNUS Group Mode | |
927 ;;; | |
928 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
929 (if gnus-group-mode-map |
257 | 930 nil |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
931 (setq gnus-group-mode-map (make-keymap)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
932 (suppress-keymap gnus-group-mode-map) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
933 (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
|
934 (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
|
935 (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
|
936 (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
|
937 (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
|
938 (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
|
939 (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
|
940 (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
|
941 (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
|
942 (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
|
943 (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
|
944 (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
|
945 (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
|
946 ;;(define-key gnus-group-mode-map "/" 'isearch-forward) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
947 (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
|
948 (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
|
949 (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
|
950 (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
|
951 (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
|
952 (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
|
953 (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
|
954 (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
|
955 (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
|
956 (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
|
957 (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
|
958 (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
|
959 (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
|
960 (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
|
961 (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
|
962 (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
|
963 (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
|
964 (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
|
965 (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
|
966 (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
|
967 (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
|
968 ;;(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
|
969 (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
|
970 (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
|
971 (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
|
972 (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
|
973 (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
|
974 (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
|
975 (define-key gnus-group-mode-map [mouse-2] 'gnus-mouse-pick-group) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
976 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
977 ;; Make a menu bar item. |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
978 (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
|
979 (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
|
980 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
981 (define-key gnus-group-mode-map [menu-bar GNUS force-update] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
982 '("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
|
983 (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
|
984 '("Quit" . gnus-group-quit)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
985 (define-key gnus-group-mode-map [menu-bar GNUS exit] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
986 '("Exit" . gnus-group-exit)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
987 (define-key gnus-group-mode-map [menu-bar GNUS restart] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
988 '("Restart" . gnus-group-restart)) |
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 [menu-bar GNUS suspend] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
990 '("Suspend" . gnus-group-suspend)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
991 (define-key gnus-group-mode-map [menu-bar GNUS get-new-news] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
992 '("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
|
993 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
994 ;; Make a menu bar item. |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
995 (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
|
996 (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
|
997 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
998 (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
|
999 '("Catchup" . gnus-group-catchup)) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1000 (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
|
1001 '("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
|
1002 |
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 groups separator-2] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1004 '("--")) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1005 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1006 (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
|
1007 '("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
|
1008 (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
|
1009 '("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
|
1010 |
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 separator-1] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1012 '("--")) |
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 jump-to-group] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1015 '("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
|
1016 (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
|
1017 '("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
|
1018 (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
|
1019 '("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
|
1020 (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
|
1021 '("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
|
1022 ) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1023 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1024 (defun gnus-group-mode () |
257 | 1025 "Major mode for reading network news. |
1026 All normal editing commands are turned off. | |
1027 Instead, these commands are available: | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1028 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1029 SPC Read articles in this newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1030 = Select this newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1031 j Move to the specified newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1032 n Move to the next unread newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1033 p Move to the previous unread newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1034 C-n Move to the next newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1035 C-p Move to the previous newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1036 < Move point to the beginning of this buffer. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1037 > Move point to the end of this buffer. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1038 u Unsubscribe from (subscribe to) this newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1039 U Unsubscribe from (subscribe to) the specified newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1040 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
|
1041 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
|
1042 l Revert this buffer. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1043 L List all newsgroups. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1044 g Get new news. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1045 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
|
1046 b Check bogus newsgroups. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1047 r Restrict visible newsgroups to the current region. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1048 a Post a new article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1049 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
|
1050 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
|
1051 C-k Kill this newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1052 C-y Yank killed newsgroup here. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1053 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
|
1054 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
|
1055 C-c C-l list killed newsgroups. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1056 s Save .newsrc file. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1057 z Suspend reading news. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1058 q Quit reading news. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1059 Q Quit reading news without saving .newsrc file. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1060 V Show the version number of this GNUS. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1061 ? Describe Group Mode commands briefly. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1062 C-h m Describe Group Mode. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1063 C-c C-i Read Info about Group Mode. |
257 | 1064 |
1065 The name of the host running NNTP server is asked for if no default | |
1066 host is specified. It is also possible to choose another NNTP server | |
1067 even when the default server is defined by giving a prefix argument to | |
1068 the command `\\[gnus]'. | |
1069 | |
1070 If an NNTP server is preceded by a colon such as `:Mail', the user's | |
1071 private directory `~/Mail' is used as a news spool. This makes it | |
1072 possible to read mail stored in MH folders or articles saved by GNUS. | |
1073 File names of mail or articles must consist of only numeric | |
1074 characters. Otherwise, they are ignored. | |
1075 | |
1076 If there is a file named `~/.newsrc-SERVER', it is used as the | |
1077 startup file instead of standard one when talking to SERVER. It is | |
1078 possible to talk to many hosts by using different startup files for | |
1079 each. | |
1080 | |
1081 Option `-n' of the options line in the startup file is recognized | |
1082 properly the same as the Bnews system. For example, if the options | |
1083 line is `options -n !talk talk.rumors', newsgroups under the `talk' | |
1084 hierarchy except for `talk.rumors' are ignored while checking new | |
1085 newsgroups. | |
1086 | |
1087 If there is a file named `~/.signature-DISTRIBUTION', it is used as | |
1088 signature file instead of standard one when posting a news in | |
1089 DISTRIBUTION. | |
1090 | |
1091 If an Info file generated from `gnus.texinfo' is installed, you can | |
1092 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
|
1093 current major mode of GNUS by \\[gnus-info-find-node]. |
257 | 1094 |
1095 The variable `gnus-version', `nntp-version', `nnspool-version', and | |
1096 `mhspool-version' have the version numbers of this version of gnus.el, | |
1097 nntp.el, nnspool.el, and mhspoo.el, respectively. | |
1098 | |
1099 User customizable variables: | |
1100 gnus-nntp-server | |
1101 Specifies the name of the host running the NNTP server. If its | |
1102 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
|
1103 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
|
1104 from the NNTPSERVER environment variable. |
257 | 1105 |
1106 gnus-nntp-service | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1107 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
|
1108 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
|
1109 `gnus-nntp-server' is set to the local host name. |
257 | 1110 |
1111 gnus-startup-file | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1112 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
|
1113 `.newsrc-SERVER', it's used instead when talking to SERVER. I |
257 | 1114 recommend you to use the server specific file, if you'd like to |
1115 talk to many servers. Especially if you'd like to read your | |
1116 private directory, the name of the file must be | |
1117 `.newsrc-:DIRECTORY'. | |
1118 | |
1119 gnus-signature-file | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1120 Specifies a signature file (.signature). If there is a file named |
257 | 1121 `.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
|
1122 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
|
1123 appending the file automatically. If you use an NNTP inews which |
257 | 1124 comes with the NNTP package, you may have to set the variable to |
1125 nil. | |
1126 | |
1127 gnus-use-cross-reference | |
1128 Specifies what to do with cross references (Xref: field). If it | |
1129 is nil, cross references are ignored. If it is t, articles in | |
1130 subscribed newsgroups are only marked as read. Otherwise, if it | |
1131 is not nil nor t, articles in all newsgroups are marked as read. | |
1132 | |
1133 gnus-use-followup-to | |
1134 Specifies what to do with followup-to: field. If it is nil, its | |
1135 value is ignored. If it is non-nil, its value is used as followup | |
1136 newsgroups. Especially, if it is t and field value is `poster', | |
1137 your confirmation is required. | |
1138 | |
1139 gnus-author-copy | |
1140 Specifies a file name to save a copy of article you posted using | |
1141 FCC: field. If the first character of the value is `|', the | |
1142 contents of the article is piped out to a program specified by the | |
1143 rest of the value. The variable is initialized from the | |
1144 AUTHORCOPY environment variable. | |
1145 | |
1146 gnus-author-copy-saver | |
1147 Specifies a function to save an author copy. The function is | |
1148 called with a file name. The default function `rmail-output' | |
1149 saves in Unix mail format. | |
1150 | |
1151 gnus-kill-file-name | |
1152 Use specified file name as a KILL file (default to `KILL'). | |
1153 | |
1154 gnus-novice-user | |
1155 Non-nil means that you are a novice to USENET. If non-nil, | |
1156 verbose messages may be displayed or your confirmations may be | |
1157 required. | |
1158 | |
1159 gnus-interactive-post | |
1160 Non-nil means that newsgroup, subject and distribution are asked | |
1161 for interactively when posting a new article. | |
1162 | |
1163 gnus-use-full-window | |
1164 Non-nil means to take up the entire screen of Emacs. | |
1165 | |
1166 gnus-window-configuration | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1167 Specifies the configuration of Group, Summary, and Article |
257 | 1168 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
|
1169 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
|
1170 respectively. ACTION is `summary', `newsgroups', or `article'. |
257 | 1171 |
1172 gnus-subscribe-newsgroup-method | |
1173 Specifies a function called with a newsgroup name when new | |
1174 newsgroup is found. The default definition adds new newsgroup at | |
1175 the beginning of other newsgroups. | |
1176 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1177 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
|
1178 |
257 | 1179 Various hooks for customization: |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1180 gnus-group-mode-hook |
257 | 1181 Entry to this mode calls the value with no arguments, if that |
1182 value is non-nil. This hook is called before GNUS is connected to | |
1183 the NNTP server. So, you can change or define the NNTP server in | |
1184 this hook. | |
1185 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1186 gnus-startup-hook |
257 | 1187 Called with no arguments after the NNTP server is selected. It is |
1188 possible to change the behavior of GNUS or initialize the | |
1189 variables according to the selected NNTP server. | |
1190 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1191 gnus-group-prepare-hook |
257 | 1192 Called with no arguments after a newsgroup list is created in the |
1193 Newsgroup buffer, if that value is non-nil. | |
1194 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1195 gnus-save-newsrc-hook |
257 | 1196 Called with no arguments when saving newsrc file if that value is |
1197 non-nil. | |
1198 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1199 gnus-prepare-article-hook |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1200 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
|
1201 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
|
1202 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
|
1203 inserts a signature file. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1204 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1205 gnus-inews-article-hook |
257 | 1206 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
|
1207 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
|
1208 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
|
1209 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1210 gnus-suspend-gnus-hook |
257 | 1211 Called with no arguments when suspending (not exiting) GNUS, if |
1212 that value is non-nil. | |
1213 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1214 gnus-exit-gnus-hook |
257 | 1215 Called with no arguments when exiting (not suspending) GNUS, if |
1216 that value is non-nil." | |
1217 (interactive) | |
1218 (kill-all-local-variables) | |
1219 ;; Gee. Why don't you upgrade? | |
1220 (cond ((boundp 'mode-line-modified) | |
1221 (setq mode-line-modified "--- ")) | |
1222 ((listp (default-value 'mode-line-format)) | |
1223 (setq mode-line-format | |
1224 (cons "--- " (cdr (default-value 'mode-line-format))))) | |
1225 (t | |
1226 (setq mode-line-format | |
1227 "--- GNUS: List of Newsgroups %[(%m)%]----%3p-%-"))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1228 (setq major-mode 'gnus-group-mode) |
257 | 1229 (setq mode-name "Newsgroup") |
1230 (setq mode-line-buffer-identification "GNUS: List of Newsgroups") | |
1231 (setq mode-line-process nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1232 (use-local-map gnus-group-mode-map) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1233 (buffer-flush-undo (current-buffer)) |
257 | 1234 (setq buffer-read-only t) ;Disable modification |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1235 (run-hooks 'gnus-group-mode-hook)) |
257 | 1236 |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1237 (defun gnus-mouse-pick-group (e) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1238 (interactive "e") |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1239 (mouse-set-point e) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1240 (gnus-group-read-group nil)) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1241 |
257 | 1242 ;;;###autoload |
1243 (defun gnus (&optional confirm) | |
1244 "Read network news. | |
1245 If optional argument CONFIRM is non-nil, ask NNTP server." | |
1246 (interactive "P") | |
1247 (unwind-protect | |
1248 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1249 (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
|
1250 (gnus-group-mode) |
257 | 1251 (gnus-start-news-server confirm)) |
1252 (if (not (gnus-server-opened)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1253 (gnus-group-quit) |
257 | 1254 ;; NNTP server is successfully open. |
1255 (setq mode-line-process (format " {%s}" gnus-nntp-server)) | |
1256 (let ((buffer-read-only nil)) | |
1257 (erase-buffer) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1258 (gnus-group-startup-message) |
257 | 1259 (sit-for 0)) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1260 (run-hooks 'gnus-startup-hook) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1261 (gnus-setup-news) |
257 | 1262 (if gnus-novice-user |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1263 (gnus-group-describe-briefly)) ;Show brief help message. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1264 (gnus-group-list-groups nil) |
257 | 1265 ))) |
1266 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1267 (defun gnus-group-startup-message () |
257 | 1268 "Insert startup message in current buffer." |
1269 ;; Insert the message. | |
4173
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
1270 (insert |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
1271 (format " |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
1272 %s |
257 | 1273 |
1274 NNTP-based News Reader for GNU Emacs | |
1275 | |
1276 | |
1277 If you have any trouble with this software, please let me | |
1278 know. I will fix your problems in the next release. | |
1279 | |
1280 Comments, suggestions, and bug fixes are welcome. | |
1281 | |
1282 Masanobu UMEDA | |
4173
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
1283 umerin@mse.kyutech.ac.jp" gnus-version)) |
257 | 1284 ;; And then hack it. |
1285 ;; 57 is the longest line. | |
1286 (indent-rigidly (point-min) (point-max) (/ (max (- (window-width) 57) 0) 2)) | |
1287 (goto-char (point-min)) | |
1288 ;; +4 is fuzzy factor. | |
1289 (insert-char ?\n (/ (max (- (window-height) 18) 0) 2))) | |
1290 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1291 (defun gnus-group-list-groups (show-all) |
257 | 1292 "List newsgroups in the Newsgroup buffer. |
1293 If argument SHOW-ALL is non-nil, unsubscribed groups are also listed." | |
1294 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1295 (let ((case-fold-search nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1296 (last-group ;Current newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1297 (gnus-group-group-name)) |
257 | 1298 (next-group ;Next possible newsgroup. |
1299 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1300 (gnus-group-search-forward nil nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1301 (gnus-group-group-name))) |
257 | 1302 (prev-group ;Previous possible newsgroup. |
1303 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1304 (gnus-group-search-forward t nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1305 (gnus-group-group-name)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1306 (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
|
1307 (gnus-group-prepare show-all) |
257 | 1308 (if (zerop (buffer-size)) |
1309 (message "No news is good news") | |
1310 ;; Go to last newsgroup if possible. If cannot, try next and | |
1311 ;; previous. If all fail, go to first unread newsgroup. | |
1312 (goto-char (point-min)) | |
1313 (or (and last-group | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1314 (re-search-forward (gnus-group-make-regexp last-group) nil t)) |
257 | 1315 (and next-group |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1316 (re-search-forward (gnus-group-make-regexp next-group) nil t)) |
257 | 1317 (and prev-group |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1318 (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
|
1319 (gnus-group-search-forward nil nil t)) |
257 | 1320 ;; Adjust cursor point. |
1321 (beginning-of-line) | |
1322 (search-forward ":" nil t) | |
1323 ))) | |
1324 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1325 (defun gnus-group-prepare (&optional all) |
257 | 1326 "Prepare list of newsgroups in current buffer. |
1327 If optional argument ALL is non-nil, unsubscribed groups are also listed." | |
1328 (let ((buffer-read-only nil) | |
1329 (newsrc gnus-newsrc-assoc) | |
1330 (group-info nil) | |
1331 (group-name nil) | |
1332 (unread-count 0) | |
1333 ;; This specifies the format of Group buffer. | |
1334 (cntl "%s%s%5d: %s\n")) | |
1335 (erase-buffer) | |
1336 ;; List newsgroups. | |
1337 (while newsrc | |
1338 (setq group-info (car newsrc)) | |
1339 (setq group-name (car group-info)) | |
1340 (setq unread-count (nth 1 (gnus-gethash group-name gnus-unread-hashtb))) | |
1341 (if (or all | |
1342 (and (nth 1 group-info) ;Subscribed. | |
1343 (> unread-count 0))) ;There are unread articles. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1344 ;; Yes, I can use gnus-group-prepare-line, but this is faster. |
257 | 1345 (insert |
1346 (format cntl | |
1347 ;; Subscribed or not. | |
1348 (if (nth 1 group-info) " " "U") | |
1349 ;; Has new news? | |
1350 (if (and (> unread-count 0) | |
1351 (>= 0 | |
1352 (- unread-count | |
1353 (length | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1354 (cdr (gnus-gethash group-name |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1355 gnus-marked-hashtb)))))) |
257 | 1356 "*" " ") |
1357 ;; Number of unread articles. | |
1358 unread-count | |
1359 ;; Newsgroup name. | |
1360 group-name)) | |
1361 ) | |
1362 (setq newsrc (cdr newsrc)) | |
1363 ) | |
1364 (setq gnus-have-all-newsgroups all) | |
1365 (goto-char (point-min)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1366 (run-hooks 'gnus-group-prepare-hook) |
257 | 1367 )) |
1368 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1369 (defun gnus-group-prepare-line (info) |
257 | 1370 "Return a string for the Newsgroup buffer from INFO. |
1371 INFO is an element of gnus-newsrc-assoc or gnus-killed-assoc." | |
1372 (let* ((group-name (car info)) | |
1373 (unread-count | |
1374 (or (nth 1 (gnus-gethash group-name gnus-unread-hashtb)) | |
1375 ;; Not in hash table, so compute it now. | |
1376 (gnus-number-of-articles | |
1377 (gnus-difference-of-range | |
1378 (nth 2 (gnus-gethash group-name gnus-active-hashtb)) | |
1379 (nthcdr 2 info))))) | |
1380 ;; This specifies the format of Group buffer. | |
1381 (cntl "%s%s%5d: %s\n")) | |
1382 (format cntl | |
1383 ;; Subscribed or not. | |
1384 (if (nth 1 info) " " "U") | |
1385 ;; Has new news? | |
1386 (if (and (> unread-count 0) | |
1387 (>= 0 | |
1388 (- unread-count | |
1389 (length | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1390 (cdr (gnus-gethash group-name |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1391 gnus-marked-hashtb)))))) |
257 | 1392 "*" " ") |
1393 ;; Number of unread articles. | |
1394 unread-count | |
1395 ;; Newsgroup name. | |
1396 group-name | |
1397 ))) | |
1398 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1399 (defun gnus-group-update-group (group &optional visible-only) |
257 | 1400 "Update newsgroup info of GROUP. |
1401 If optional argument VISIBLE-ONLY is non-nil, non displayed group is ignored." | |
1402 (let ((buffer-read-only nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1403 (case-fold-search nil) ;appleIIgs vs. appleiigs |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1404 (regexp (gnus-group-make-regexp group)) |
257 | 1405 (visible nil)) |
1406 ;; Buffer may be narrowed. | |
1407 (save-restriction | |
1408 (widen) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1409 ;; 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
|
1410 ;; 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
|
1411 ;; 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
|
1412 ;; 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
|
1413 ;; the beginning. Otherwise, search from the end. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1414 (if (cond ((progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1415 (beginning-of-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1416 (looking-at regexp))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1417 ((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
|
1418 (progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1419 (goto-char (point-min)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1420 (re-search-forward regexp nil t)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1421 ((progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1422 (goto-char (point-max)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1423 (re-search-backward regexp nil t)))) |
257 | 1424 ;; GROUP is listed in current buffer. So, delete old line. |
1425 (progn | |
1426 (setq visible t) | |
1427 (beginning-of-line) | |
1428 (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
|
1429 ) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1430 ;; 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
|
1431 (goto-char (point-min))) |
257 | 1432 (if (or visible (not visible-only)) |
1433 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1434 (insert (gnus-group-prepare-line |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1435 (gnus-gethash group gnus-newsrc-hashtb))) |
257 | 1436 (forward-line -1) ;Move point on that line. |
1437 )) | |
1438 ))) | |
1439 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1440 (defun gnus-group-group-name () |
257 | 1441 "Get newsgroup name around point." |
1442 (save-excursion | |
1443 (beginning-of-line) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1444 (if (looking-at "^.+:[ \t]+\\([^ \t\n]+\\)\\([ \t].*\\|$\\)") |
9550
5b91f8657de6
(gnus-group-group-name): Get rid of text properties.
Richard M. Stallman <rms@gnu.org>
parents:
8523
diff
changeset
|
1445 (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
|
1446 (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
|
1447 group-name)))) |
257 | 1448 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1449 (defun gnus-group-make-regexp (newsgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1450 "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
|
1451 (concat "^.+: " (regexp-quote newsgroup) "\\([ \t].*\\|$\\)")) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1452 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1453 (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
|
1454 "Search for the next (or previous) newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1455 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
|
1456 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
|
1457 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
|
1458 (let ((case-fold-search nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1459 (func |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1460 (if backward |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1461 (function re-search-backward) (function re-search-forward))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1462 (regexp |
257 | 1463 (format "^%s[ \t]*\\(%s\\):" |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1464 (if norest ".." " [ \t]") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1465 (if norest "[0-9]+" "[1-9][0-9]*"))) |
257 | 1466 (found nil)) |
1467 (if backward | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1468 (if heretoo |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1469 (end-of-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1470 (beginning-of-line)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1471 (if heretoo |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1472 (beginning-of-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1473 (end-of-line))) |
257 | 1474 (setq found (funcall func regexp nil t)) |
1475 ;; Adjust cursor point. | |
1476 (beginning-of-line) | |
1477 (search-forward ":" nil t) | |
1478 ;; Return T if found. | |
1479 found | |
1480 )) | |
1481 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1482 ;; GNUS Group mode command |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1483 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1484 (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
|
1485 "Read news in this newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1486 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
|
1487 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
|
1488 (interactive "P") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1489 (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
|
1490 (if group |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1491 (gnus-summary-read-group |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1492 group |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1493 (or all |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1494 ;;(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
|
1495 (zerop |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1496 (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
|
1497 no-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1498 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1499 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1500 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1501 (defun gnus-group-select-group (all) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1502 "Select this newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1503 No article is selected automatically. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1504 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
|
1505 (interactive "P") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1506 (gnus-group-read-group all t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1507 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1508 (defun gnus-group-jump-to-group (group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1509 "Jump to newsgroup GROUP." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1510 (interactive |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1511 (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
|
1512 (let ((case-fold-search nil)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1513 (goto-char (point-min)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1514 (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
|
1515 (if (gnus-gethash group gnus-newsrc-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1516 ;; Add GROUP entry, then seach again. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1517 (gnus-group-update-group group))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1518 ;; Adjust cursor point. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1519 (beginning-of-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1520 (search-forward ":" nil t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1521 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1522 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1523 (defun gnus-group-next-group (n) |
257 | 1524 "Go to next N'th newsgroup." |
1525 (interactive "p") | |
1526 (while (and (> n 1) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1527 (gnus-group-search-forward nil t)) |
257 | 1528 (setq n (1- n))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1529 (or (gnus-group-search-forward nil t) |
257 | 1530 (message "No more newsgroups"))) |
1531 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1532 (defun gnus-group-next-unread-group (n) |
257 | 1533 "Go to next N'th unread newsgroup." |
1534 (interactive "p") | |
1535 (while (and (> n 1) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1536 (gnus-group-search-forward nil nil)) |
257 | 1537 (setq n (1- n))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1538 (or (gnus-group-search-forward nil nil) |
257 | 1539 (message "No more unread newsgroups"))) |
1540 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1541 (defun gnus-group-prev-group (n) |
257 | 1542 "Go to previous N'th newsgroup." |
1543 (interactive "p") | |
1544 (while (and (> n 1) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1545 (gnus-group-search-forward t t)) |
257 | 1546 (setq n (1- n))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1547 (or (gnus-group-search-forward t t) |
257 | 1548 (message "No more newsgroups"))) |
1549 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1550 (defun gnus-group-prev-unread-group (n) |
257 | 1551 "Go to previous N'th unread newsgroup." |
1552 (interactive "p") | |
1553 (while (and (> n 1) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1554 (gnus-group-search-forward t nil)) |
257 | 1555 (setq n (1- n))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1556 (or (gnus-group-search-forward t nil) |
257 | 1557 (message "No more unread newsgroups"))) |
1558 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1559 (defun gnus-group-catchup (all) |
257 | 1560 "Mark all articles not marked as unread in current newsgroup as read. |
1561 If prefix argument ALL is non-nil, all articles are marked as read. | |
1562 Cross references (Xref: field) of articles are ignored." | |
1563 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1564 (let* ((group (gnus-group-group-name)) |
257 | 1565 (marked (if (not all) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1566 (cdr (gnus-gethash group gnus-marked-hashtb))))) |
257 | 1567 (and group |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1568 (or (not gnus-interactive-catchup) ;Without confirmation? |
257 | 1569 (y-or-n-p |
1570 (if all | |
1571 "Do you really want to mark everything as read? " | |
1572 "Delete all articles not marked as read? "))) | |
1573 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1574 (message "") ;Clear "Yes or No" question. |
257 | 1575 ;; Any marked articles will be preserved. |
1576 (gnus-update-unread-articles group marked marked) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1577 (gnus-group-update-group group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1578 (gnus-group-next-group 1))) |
257 | 1579 )) |
1580 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1581 (defun gnus-group-catchup-all () |
257 | 1582 "Mark all articles in current newsgroup as read. |
1583 Cross references (Xref: field) of articles are ignored." | |
1584 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1585 (gnus-group-catchup t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1586 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1587 (defun gnus-group-unsubscribe-current-group () |
257 | 1588 "Toggle subscribe from/to unsubscribe current group." |
1589 (interactive) | |
7573
059281285df7
(gnus-group-unsubscribe-current-group):
Richard M. Stallman <rms@gnu.org>
parents:
7560
diff
changeset
|
1590 (let ((group (gnus-group-group-name))) |
059281285df7
(gnus-group-unsubscribe-current-group):
Richard M. Stallman <rms@gnu.org>
parents:
7560
diff
changeset
|
1591 (if group |
059281285df7
(gnus-group-unsubscribe-current-group):
Richard M. Stallman <rms@gnu.org>
parents:
7560
diff
changeset
|
1592 (progn |
059281285df7
(gnus-group-unsubscribe-current-group):
Richard M. Stallman <rms@gnu.org>
parents:
7560
diff
changeset
|
1593 (gnus-group-unsubscribe-group group) |
059281285df7
(gnus-group-unsubscribe-current-group):
Richard M. Stallman <rms@gnu.org>
parents:
7560
diff
changeset
|
1594 (gnus-group-next-group 1)) |
059281285df7
(gnus-group-unsubscribe-current-group):
Richard M. Stallman <rms@gnu.org>
parents:
7560
diff
changeset
|
1595 (message "No Newsgroup found to \(un\)subscribe")))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1596 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1597 (defun gnus-group-unsubscribe-group (group) |
257 | 1598 "Toggle subscribe from/to unsubscribe GROUP. |
1599 New newsgroup is added to .newsrc automatically." | |
1600 (interactive | |
1601 (list (completing-read "Newsgroup: " | |
1602 gnus-active-hashtb nil 'require-match))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1603 (let ((newsrc (gnus-gethash group gnus-newsrc-hashtb))) |
257 | 1604 (cond ((not (null newsrc)) |
1605 ;; Toggle subscription flag. | |
1606 (setcar (nthcdr 1 newsrc) (not (nth 1 newsrc))) | |
1607 (gnus-update-newsrc-buffer group) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1608 (gnus-group-update-group group) |
257 | 1609 ;; Adjust cursor point. |
1610 (beginning-of-line) | |
1611 (search-forward ":" nil t)) | |
1612 ((and (stringp group) | |
1613 (gnus-gethash group gnus-active-hashtb)) | |
1614 ;; Add new newsgroup. | |
1615 (gnus-add-newsgroup group) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1616 (gnus-group-update-group group) |
257 | 1617 ;; Adjust cursor point. |
1618 (beginning-of-line) | |
1619 (search-forward ":" nil t)) | |
1620 (t (error "No such newsgroup: %s" group))) | |
1621 )) | |
1622 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1623 (defun gnus-group-list-all-groups () |
257 | 1624 "List all of newsgroups in the Newsgroup buffer." |
1625 (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
|
1626 (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
|
1627 (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
|
1628 (message "Listing all groups...done")) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1629 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1630 (defun gnus-group-get-new-news () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1631 "Get newly arrived articles. In fact, read the active file again." |
257 | 1632 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1633 (gnus-setup-news) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1634 (gnus-group-list-groups gnus-have-all-newsgroups)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1635 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1636 (defun gnus-group-restart () |
257 | 1637 "Force GNUS to read the raw startup file." |
1638 (interactive) | |
1639 (gnus-save-newsrc-file) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1640 (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
|
1641 (gnus-group-list-groups gnus-have-all-newsgroups)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1642 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1643 (defun gnus-group-check-bogus-groups () |
257 | 1644 "Check bogus newsgroups." |
1645 (interactive) | |
1646 (gnus-check-bogus-newsgroups t) ;Require confirmation. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1647 (gnus-group-list-groups gnus-have-all-newsgroups)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1648 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1649 (defun gnus-group-restrict-groups (start end) |
257 | 1650 "Restrict visible newsgroups to the current region (START and END). |
1651 Type \\[widen] to remove restriction." | |
1652 (interactive "r") | |
1653 (save-excursion | |
1654 (narrow-to-region (progn | |
1655 (goto-char start) | |
1656 (beginning-of-line) | |
1657 (point)) | |
1658 (progn | |
1659 (goto-char end) | |
1660 (forward-line 1) | |
1661 (point)))) | |
1662 (message (substitute-command-keys "Type \\[widen] to remove restriction"))) | |
1663 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1664 (defun gnus-group-edit-global-kill () |
257 | 1665 "Edit a global KILL file." |
1666 (interactive) | |
1667 (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
|
1668 (gnus-kill-file-edit-file nil) ;Nil stands for global KILL file. |
257 | 1669 (message |
1670 (substitute-command-keys | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1671 "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
|
1672 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1673 (defun gnus-group-edit-local-kill () |
257 | 1674 "Edit a local KILL file." |
1675 (interactive) | |
1676 (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
|
1677 (gnus-kill-file-edit-file (gnus-group-group-name)) |
257 | 1678 (message |
1679 (substitute-command-keys | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1680 "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
|
1681 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1682 (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
|
1683 "Update `.newsrc' file." |
257 | 1684 (interactive) |
1685 (gnus-save-newsrc-file)) | |
1686 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1687 (defun gnus-group-suspend () |
257 | 1688 "Suspend the current GNUS session. |
1689 In fact, cleanup buffers except for Group Mode buffer. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1690 The hook gnus-suspend-gnus-hook is called before actually suspending." |
257 | 1691 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1692 (run-hooks 'gnus-suspend-gnus-hook) |
257 | 1693 ;; 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
|
1694 (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
|
1695 (group-buf (get-buffer gnus-group-buffer))) |
257 | 1696 (while buffers |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1697 (and (not (eq (car buffers) gnus-group-buffer)) |
257 | 1698 (get-buffer (car buffers)) |
1699 (kill-buffer (car buffers))) | |
1700 (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
|
1701 ) |
425ac5eebc19
(gnus-group-suspend): Be sure to bury the right buffer.
Richard M. Stallman <rms@gnu.org>
parents:
8258
diff
changeset
|
1702 (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
|
1703 (delete-windows-on group-buf t))) |
257 | 1704 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1705 (defun gnus-group-exit () |
257 | 1706 "Quit reading news after updating .newsrc. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1707 The hook gnus-exit-gnus-hook is called before actually quitting." |
257 | 1708 (interactive) |
1709 (if (or noninteractive ;For gnus-batch-kill | |
1710 (zerop (buffer-size)) ;No news is good news. | |
1711 (not (gnus-server-opened)) ;NNTP connection closed. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1712 (not gnus-interactive-exit) ;Without confirmation |
257 | 1713 (y-or-n-p "Are you sure you want to quit reading news? ")) |
1714 (progn | |
1715 (message "") ;Erase "Yes or No" question. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1716 (run-hooks 'gnus-exit-gnus-hook) |
257 | 1717 (gnus-save-newsrc-file) |
1718 (gnus-clear-system) | |
1719 (gnus-close-server)) | |
1720 )) | |
1721 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1722 (defun gnus-group-quit () |
257 | 1723 "Quit reading news without updating .newsrc. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1724 The hook gnus-exit-gnus-hook is called before actually quitting." |
257 | 1725 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1726 (if (or noninteractive ;For gnus-batch-kill |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1727 (zerop (buffer-size)) |
257 | 1728 (not (gnus-server-opened)) |
1729 (yes-or-no-p | |
1730 (format "Quit reading news without saving %s? " | |
1731 (file-name-nondirectory gnus-current-startup-file)))) | |
1732 (progn | |
1733 (message "") ;Erase "Yes or No" question. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1734 (run-hooks 'gnus-exit-gnus-hook) |
257 | 1735 (gnus-clear-system) |
1736 (gnus-close-server)) | |
1737 )) | |
1738 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1739 (defun gnus-group-describe-briefly () |
257 | 1740 "Describe Group mode commands briefly." |
1741 (interactive) | |
1742 (message | |
1743 (concat | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1744 (substitute-command-keys "\\[gnus-group-read-group]:Select ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1745 (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
|
1746 (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
|
1747 (substitute-command-keys "\\[gnus-group-exit]:Exit ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1748 (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
|
1749 (substitute-command-keys "\\[gnus-group-describe-briefly]:This help") |
257 | 1750 ))) |
1751 | |
1752 | |
1753 ;;; | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1754 ;;; GNUS Summary Mode |
257 | 1755 ;;; |
1756 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1757 (if gnus-summary-mode-map |
257 | 1758 nil |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1759 (setq gnus-summary-mode-map (make-keymap)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1760 (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
|
1761 (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
|
1762 (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
|
1763 (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
|
1764 (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
|
1765 (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
|
1766 (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
|
1767 (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
|
1768 (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
|
1769 (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
|
1770 (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
|
1771 (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
|
1772 ;;(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
|
1773 ;;(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
|
1774 (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
|
1775 (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
|
1776 (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
|
1777 (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
|
1778 (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
|
1779 (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
|
1780 (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
|
1781 (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
|
1782 ;;(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
|
1783 ;;(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
|
1784 (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
|
1785 ;;(define-key gnus-summary-mode-map "/" 'isearch-forward) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1786 (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
|
1787 (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
|
1788 ;;(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
|
1789 (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
|
1790 (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
|
1791 (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
|
1792 (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
|
1793 ;;(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
|
1794 (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
|
1795 (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
|
1796 ;;(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
|
1797 (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
|
1798 (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
|
1799 (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
|
1800 (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
|
1801 (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
|
1802 (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
|
1803 (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
|
1804 (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
|
1805 (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
|
1806 (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
|
1807 (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
|
1808 (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
|
1809 (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
|
1810 (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
|
1811 (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
|
1812 (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
|
1813 (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
|
1814 (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
|
1815 ;;(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
|
1816 ;;(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
|
1817 (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
|
1818 ;;(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
|
1819 (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
|
1820 (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
|
1821 (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
|
1822 (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
|
1823 (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
|
1824 (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
|
1825 (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
|
1826 (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
|
1827 (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
|
1828 (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
|
1829 (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
|
1830 (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
|
1831 ;;(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
|
1832 (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
|
1833 (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
|
1834 (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
|
1835 (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
|
1836 (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
|
1837 ;;(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
|
1838 (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
|
1839 (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
|
1840 (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
|
1841 (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
|
1842 (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
|
1843 (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
|
1844 (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
|
1845 (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
|
1846 (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
|
1847 (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
|
1848 (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
|
1849 (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
|
1850 (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
|
1851 (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
|
1852 (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
|
1853 (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
|
1854 (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
|
1855 (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
|
1856 (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
|
1857 (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
|
1858 (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
|
1859 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1860 (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
|
1861 (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
|
1862 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1863 (define-key gnus-summary-mode-map [menu-bar misc caesar-message] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1864 '("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
|
1865 (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
|
1866 '("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
|
1867 (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
|
1868 '("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
|
1869 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1870 (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
|
1871 '("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
|
1872 (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
|
1873 '("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
|
1874 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1875 (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
|
1876 '("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
|
1877 (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
|
1878 '("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
|
1879 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1880 (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
|
1881 (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
|
1882 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1883 (define-key gnus-summary-mode-map [menu-bar sort sort-by-author] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1884 '("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
|
1885 (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
|
1886 '("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
|
1887 (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
|
1888 '("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
|
1889 (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
|
1890 '("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
|
1891 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1892 (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
|
1893 (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
|
1894 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1895 (define-key gnus-summary-mode-map [menu-bar show/hide hide-all-threads] |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1896 '("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
|
1897 (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
|
1898 '("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
|
1899 (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
|
1900 '("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
|
1901 (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
|
1902 '("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
|
1903 (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
|
1904 '("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
|
1905 (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
|
1906 '("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
|
1907 (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
|
1908 '("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
|
1909 (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
|
1910 '("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
|
1911 (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
|
1912 '("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
|
1913 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1914 (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
|
1915 (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
|
1916 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1917 (define-key gnus-summary-mode-map [menu-bar action kill-same-subject] |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1918 '("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
|
1919 (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
|
1920 '("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
|
1921 (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
|
1922 '("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
|
1923 (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
|
1924 '("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
|
1925 (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
|
1926 '("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
|
1927 (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
|
1928 '("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
|
1929 |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1930 (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
|
1931 '("---")) |
8046
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 action save-in-file] |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1934 '("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
|
1935 (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
|
1936 '("Save Article" . gnus-summary-save-article)) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1937 |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1938 (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
|
1939 '("---")) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1940 |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1941 (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
|
1942 '("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
|
1943 (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
|
1944 '("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
|
1945 (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
|
1946 '("Followup" . gnus-summary-followup)) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1947 (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
|
1948 '("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
|
1949 (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
|
1950 '("Reply" . gnus-summary-reply)) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1951 (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
|
1952 '("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
|
1953 |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1954 (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
|
1955 (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
|
1956 |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1957 (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
|
1958 '("Search in Article" . gnus-summary-isearch-article)) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
1959 (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
|
1960 '("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
|
1961 (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
|
1962 '("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
|
1963 (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
|
1964 '("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
|
1965 (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
|
1966 '("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
|
1967 (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
|
1968 '("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
|
1969 (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
|
1970 '("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
|
1971 (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
|
1972 '("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
|
1973 (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
|
1974 '("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
|
1975 (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
|
1976 '("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
|
1977 ) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
1978 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1979 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1980 (defun gnus-summary-mode () |
257 | 1981 "Major mode for reading articles in this newsgroup. |
1982 All normal editing commands are turned off. | |
1983 Instead, these commands are available: | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1984 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1985 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
|
1986 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
|
1987 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
|
1988 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
|
1989 n Move to the next unread article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1990 p Move to the previous unread article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1991 N Move to the next article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1992 P Move to the previous article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1993 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
|
1994 current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1995 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
|
1996 current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1997 \\[gnus-summary-next-unread-same-subject] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
1998 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
|
1999 current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2000 \\[gnus-summary-prev-unread-same-subject] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2001 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
|
2002 the current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2003 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
|
2004 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
|
2005 C-n Move to the next subject. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2006 C-p Move to the previous subject. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2007 ESC n Move to the next unread subject. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2008 ESC p Move to the previous unread subject. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2009 \\[gnus-summary-next-group] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2010 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
|
2011 \\[gnus-summary-prev-group] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2012 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
|
2013 . 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
|
2014 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
|
2015 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
|
2016 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
|
2017 < 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
|
2018 > 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
|
2019 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
|
2020 l Jump to the article you read last. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2021 ^ Refer to parent of the current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2022 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
|
2023 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
|
2024 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
|
2025 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
|
2026 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
|
2027 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
|
2028 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
|
2029 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
|
2030 read, and then select the next unread article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2031 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
|
2032 read. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2033 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
|
2034 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
|
2035 ESC C-t Toggle showing conversation threads. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2036 ESC C-s Show thread subtrees. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2037 ESC C-h Hide thread subtrees. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2038 \\[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
|
2039 \\[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
|
2040 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
|
2041 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
|
2042 ESC C-d Go downward current thread. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2043 ESC C-u Go upward current thread. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2044 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
|
2045 & Execute a command for each article conditionally. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2046 \\[gnus-summary-catchup] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2047 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
|
2048 articles marked as unread. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2049 \\[gnus-summary-catchup-all] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2050 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
|
2051 \\[gnus-summary-catchup-and-exit] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2052 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
|
2053 current newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2054 \\[gnus-summary-catchup-all-and-exit] |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2055 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
|
2056 C-t Toggle truncations of subject lines. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2057 x Delete subject lines marked as read. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2058 X Delete subject lines with the specific marks. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2059 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
|
2060 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
|
2061 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
|
2062 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
|
2063 = Expand Summary window to show headers full window. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2064 C-x C-s Reselect the current newsgroup. Prefix argument means to select all. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2065 w Stop page breaking by linefeed. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2066 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
|
2067 g Force to show the current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2068 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
|
2069 vice versa. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2070 ESC-t Toggle MIME processing. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2071 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
|
2072 a Post a new article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2073 f Post a reply article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2074 F Post a reply article with original article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2075 C Cancel the current article. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2076 r Mail a message to the author. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2077 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
|
2078 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
|
2079 m Mail a message in other window. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2080 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
|
2081 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
|
2082 | 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
|
2083 q Quit reading news in the current newsgroup. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2084 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
|
2085 V Show the version number of this GNUS. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2086 ? Describe Summary mode commands briefly. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2087 C-h m Describe Summary mode. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2088 C-c C-i Read Info about Summary mode. |
257 | 2089 |
2090 User customizable variables: | |
2091 gnus-large-newsgroup | |
2092 The number of articles which indicates a large newsgroup. If the | |
2093 number of articles in a newsgroup is greater than the value, the | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2094 number of articles to be selected is asked for. If the given value |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2095 N is positive, the last N articles is selected. If N is negative, |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2096 the first N articles are selected. An empty string means to select |
257 | 2097 all articles. |
2098 | |
2099 gnus-use-long-file-name | |
2100 Non-nil means that a newsgroup name is used as a default file name | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2101 to save articles to. If it's nil, the directory form of a |
257 | 2102 newsgroup is used instead. |
2103 | |
2104 gnus-default-article-saver | |
2105 Specifies your favorite article saver which is interactively | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2106 funcallable. Following functions are available: |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2107 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2108 gnus-summary-save-in-rmail (in Rmail format) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2109 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
|
2110 gnus-summary-save-in-folder (in MH folder) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2111 gnus-summary-save-in-file (in article format). |
257 | 2112 |
2113 gnus-rmail-save-name | |
2114 gnus-mail-save-name | |
2115 gnus-folder-save-name | |
2116 gnus-file-save-name | |
2117 Specifies a function generating a file name to save articles in | |
2118 specified format. The function is called with NEWSGROUP, HEADERS, | |
2119 and optional LAST-FILE. Access macros to the headers are defined | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2120 as nntp-header-FIELD, and functions are defined as |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2121 gnus-header-FIELD. |
257 | 2122 |
2123 gnus-article-save-directory | |
2124 Specifies a directory name to save articles to using the commands | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2125 gnus-summary-save-in-rmail, gnus-summary-save-in-mail and |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2126 gnus-summary-save-in-file. The variable is initialized from the |
257 | 2127 SAVEDIR environment variable. |
2128 | |
8444 | 2129 gnus-kill-files-directory |
2130 Specifies a directory name to save KILL files to using the commands | |
2131 gnus-edit-global-kill, and gnus-edit-local-kill. The variable is | |
2132 initialized from the SAVEDIR environment variable. | |
2133 | |
257 | 2134 gnus-show-all-headers |
2135 Non-nil means that all headers of an article are shown. | |
2136 | |
2137 gnus-save-all-headers | |
2138 Non-nil means that all headers of an article are saved in a file. | |
2139 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2140 gnus-show-mime |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2141 Non-nil means that show a MIME message. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2142 |
257 | 2143 gnus-show-threads |
2144 Non-nil means that conversation threads are shown in tree structure. | |
2145 | |
2146 gnus-thread-hide-subject | |
2147 Non-nil means that subjects for thread subtrees are hidden. | |
2148 | |
2149 gnus-thread-hide-subtree | |
2150 Non-nil means that thread subtrees are hidden initially. | |
2151 | |
2152 gnus-thread-hide-killed | |
2153 Non-nil means that killed thread subtrees are hidden automatically. | |
2154 | |
2155 gnus-thread-ignore-subject | |
2156 Non-nil means that subject differences are ignored in constructing | |
2157 thread trees. | |
2158 | |
2159 gnus-thread-indent-level | |
2160 Indentation of thread subtrees. | |
2161 | |
2162 gnus-optional-headers | |
2163 Specifies a function which generates an optional string displayed | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2164 in the Summary buffer. The function is called with an article |
257 | 2165 HEADERS. The result must be a string excluding `[' and `]'. The |
2166 default function returns a string like NNN:AUTHOR, where NNN is | |
2167 the number of lines in an article and AUTHOR is the name of the | |
2168 author. | |
2169 | |
2170 gnus-auto-extend-newsgroup | |
2171 Non-nil means visible articles are extended to forward and | |
2172 backward automatically if possible. | |
2173 | |
2174 gnus-auto-select-first | |
2175 Non-nil means the first unread article is selected automagically | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2176 when a newsgroup is selected normally (by gnus-group-read-group). |
257 | 2177 If you'd like to prevent automatic selection of the first unread |
2178 article in some newsgroups, set the variable to nil in | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2179 gnus-select-group-hook or gnus-apply-kill-hook. |
257 | 2180 |
2181 gnus-auto-select-next | |
2182 Non-nil means the next newsgroup is selected automagically at the | |
2183 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
|
2184 empty (no unread articles), GNUS will exit Summary mode and go |
257 | 2185 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
|
2186 exit Summary mode but select the following unread newsgroup. |
257 | 2187 Especially, if the value is the symbol `quietly', the next unread |
2188 newsgroup will be selected without any confirmations. | |
2189 | |
2190 gnus-auto-select-same | |
2191 Non-nil means an article with the same subject as the current | |
2192 article is selected automagically like `rn -S'. | |
2193 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2194 gnus-auto-center-summary |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2195 Non-nil means the point of Summary Mode window is always kept |
257 | 2196 centered. |
2197 | |
2198 gnus-break-pages | |
2199 Non-nil means an article is broken into pages at page delimiters. | |
2200 This may not work with some versions of GNU Emacs earlier than | |
2201 version 18.50. | |
2202 | |
2203 gnus-page-delimiter | |
2204 Specifies a regexp describing line-beginnings that separate pages | |
2205 of news article. | |
2206 | |
2207 [gnus-more-message is obsolete. overlay-arrow-string interfares | |
2208 with other subsystems, such as dbx mode.] | |
2209 | |
2210 gnus-digest-show-summary | |
2211 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
|
2212 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
|
2213 command. |
257 | 2214 |
2215 gnus-digest-separator | |
2216 Specifies a regexp separating messages in a digest article. | |
2217 | |
2218 gnus-mail-reply-method | |
2219 gnus-mail-other-window-method | |
2220 Specifies a function to begin composing mail message using | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2221 commands gnus-summary-reply and gnus-summary-mail-other-window. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2222 Functions gnus-mail-reply-using-mail and gnus-mail-reply-using-mhe |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2223 are available for the value of gnus-mail-reply-method. And |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2224 functions gnus-mail-other-window-using-mail and |
257 | 2225 gnus-mail-other-window-using-mhe are available for the value of |
2226 gnus-mail-other-window-method. | |
2227 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2228 gnus-mail-send-method |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2229 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
|
2230 as an article. The message must have To: or Cc: field. The value |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2231 of the variable send-mail-function is the default function which |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2232 uses sendmail mail program. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2233 |
257 | 2234 Various hooks for customization: |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2235 gnus-summary-mode-hook |
257 | 2236 Entry to this mode calls the value with no arguments, if that |
2237 value is non-nil. | |
2238 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2239 gnus-select-group-hook |
257 | 2240 Called with no arguments when newsgroup is selected, if that value |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2241 is non-nil. It is possible to sort subjects in this hook. See the |
257 | 2242 documentation of this variable for more information. |
2243 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2244 gnus-summary-prepare-hook |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2245 Called with no arguments after a summary list is created in the |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2246 Summary buffer, if that value is non-nil. If you'd like to modify |
257 | 2247 the buffer, you can use this hook. |
2248 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2249 gnus-select-article-hook |
257 | 2250 Called with no arguments when an article is selected, if that |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2251 value is non-nil. See the documentation of this variable for more |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2252 information. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2253 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2254 gnus-select-digest-hook |
257 | 2255 Called with no arguments when reading digest messages using Rmail, |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2256 if that value is non-nil. This hook can be used to modify an |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2257 article so that Rmail can work with it. See the documentation of |
257 | 2258 the variable for more information. |
2259 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2260 gnus-rmail-digest-hook |
257 | 2261 Called with no arguments when reading digest messages using Rmail, |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2262 if that value is non-nil. This hook is intended to customize Rmail |
257 | 2263 mode. |
2264 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2265 gnus-apply-kill-hook |
257 | 2266 Called with no arguments when a newsgroup is selected and the |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2267 Summary buffer is prepared. This hook is intended to apply a KILL |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2268 file to the selected newsgroup. The format of KILL file is |
257 | 2269 completely different from that of version 3.8. You have to rewrite |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2270 them in the new format. See the documentation of Kill file mode |
257 | 2271 for more information. |
2272 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2273 gnus-mark-article-hook |
257 | 2274 Called with no arguments when an article is selected at the first |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2275 time. The hook is intended to mark an article as read (or unread) |
257 | 2276 automatically when it is selected. See the documentation of the |
2277 variable for more information. | |
2278 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2279 gnus-exit-group-hook |
257 | 2280 Called with no arguments when exiting the current newsgroup, if |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2281 that value is non-nil. If your machine is so slow that exiting |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2282 from Summary mode takes very long time, inhibit marking articles |
257 | 2283 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
|
2284 gnus-use-cross-reference to nil in this hook." |
257 | 2285 (interactive) |
2286 (kill-all-local-variables) | |
2287 ;; Gee. Why don't you upgrade? | |
2288 (cond ((boundp 'mode-line-modified) | |
2289 (setq mode-line-modified "--- ")) | |
2290 ((listp (default-value 'mode-line-format)) | |
2291 (setq mode-line-format | |
2292 (cons "--- " (cdr (default-value 'mode-line-format)))))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2293 ;; To disable display-time facility. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2294 ;;(make-local-variable 'global-mode-string) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2295 ;;(setq global-mode-string nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2296 (setq major-mode 'gnus-summary-mode) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2297 (setq mode-name "Summary") |
257 | 2298 ;;(setq mode-line-process '(" " gnus-newsgroup-name)) |
2299 (make-local-variable 'minor-mode-alist) | |
2300 (or (assq 'gnus-show-threads minor-mode-alist) | |
2301 (setq minor-mode-alist | |
2302 (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
|
2303 (gnus-summary-set-mode-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2304 (use-local-map gnus-summary-mode-map) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2305 (buffer-flush-undo (current-buffer)) |
257 | 2306 (setq buffer-read-only t) ;Disable modification |
2307 (setq truncate-lines t) ;Stop line folding | |
2308 (setq selective-display t) | |
2309 (setq selective-display-ellipses t) ;Display `...' | |
2310 ;;(setq case-fold-search t) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2311 (run-hooks 'gnus-summary-mode-hook)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2312 |
8258
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
2313 (defun gnus-mouse-pick-article (e) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
2314 (interactive "e") |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
2315 (mouse-set-point e) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
2316 (gnus-summary-next-page nil)) |
44773d8bee3e
Clean up menu item string format.
Richard M. Stallman <rms@gnu.org>
parents:
8162
diff
changeset
|
2317 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2318 (defun gnus-summary-setup-buffer () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2319 "Initialize Summary buffer." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2320 (if (get-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2321 (set-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2322 (set-buffer (get-buffer-create gnus-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2323 (gnus-summary-mode) |
257 | 2324 )) |
2325 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2326 (defun gnus-summary-read-group (group &optional show-all no-article) |
257 | 2327 "Start reading news in newsgroup GROUP. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2328 If optional 1st argument SHOW-ALL is non-nil, already read articles are |
257 | 2329 also listed. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2330 If optional 2nd argument NO-ARTICLE is non-nil, no article is selected |
257 | 2331 initially." |
2332 (message "Retrieving newsgroup: %s..." group) | |
2333 (if (gnus-select-newsgroup group show-all) | |
2334 (progn | |
2335 ;; Don't switch-to-buffer to prevent displaying old contents | |
2336 ;; of the buffer until new subjects list is created. | |
2337 ;; Suggested by Juha Heinanen <jh@tut.fi> | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2338 (gnus-summary-setup-buffer) |
257 | 2339 ;; 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
|
2340 (run-hooks 'gnus-select-group-hook) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2341 (gnus-summary-prepare) |
257 | 2342 ;; 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
|
2343 (run-hooks 'gnus-apply-kill-hook) |
257 | 2344 (if (zerop (buffer-size)) |
2345 ;; This newsgroup is empty. | |
2346 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2347 (gnus-summary-catchup-and-exit nil t) ;Without confirmations. |
257 | 2348 (message "No unread news")) |
2349 ;; 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
|
2350 ;; gnus-summary-prepare-hook since kill processing may not |
257 | 2351 ;; work with hidden articles. |
2352 (and gnus-show-threads | |
2353 gnus-thread-hide-subtree | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2354 (gnus-summary-hide-all-threads)) |
257 | 2355 ;; Show first unread article if requested. |
2356 (goto-char (point-min)) | |
2357 (if (and (not no-article) | |
2358 gnus-auto-select-first | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2359 (gnus-summary-first-unread-article)) |
257 | 2360 ;; Window is configured automatically. |
2361 ;; 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
|
2362 ;; evaluation, especially by gnus-summary-rmail-digest |
257 | 2363 ;; 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
|
2364 (if (eq (current-buffer) (get-buffer gnus-summary-buffer)) |
257 | 2365 (progn |
2366 ;; Adjust cursor point. | |
2367 (beginning-of-line) | |
2368 (search-forward ":" nil t))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2369 (gnus-configure-windows 'summary) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2370 (pop-to-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2371 (gnus-summary-set-mode-line) |
257 | 2372 ;; 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
|
2373 (if (get-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2374 (if (get-buffer-window gnus-article-buffer) |
257 | 2375 (save-excursion |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2376 (set-buffer gnus-article-buffer) |
257 | 2377 (let ((buffer-read-only nil)) |
2378 (erase-buffer))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2379 (kill-buffer gnus-article-buffer))) |
257 | 2380 ;; Adjust cursor point. |
2381 (beginning-of-line) | |
2382 (search-forward ":" nil t)) | |
2383 )) | |
2384 ;; Cannot select newsgroup GROUP. | |
2385 (if (gnus-gethash group gnus-active-hashtb) | |
2386 (progn | |
2387 ;; If NNTP is used, nntp_access file may not be installed | |
2388 ;; properly. Otherwise, may be active file problem. | |
2389 (ding) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2390 (message |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2391 (gnus-nntp-message |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2392 (format "Cannot select %s. May be security or active file problem." group))) |
257 | 2393 (sit-for 0)) |
2394 ;; Check bogus newsgroups. | |
2395 ;; We must be in Group Mode buffer. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2396 (gnus-group-check-bogus-groups)) |
257 | 2397 )) |
2398 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2399 (defun gnus-summary-prepare () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2400 "Prepare summary list of current newsgroup in Summary buffer." |
257 | 2401 (let ((buffer-read-only nil)) |
2402 ;; 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
|
2403 ;; want it can define them in gnus-select-group-hook. |
257 | 2404 ;; Print verbose messages if too many articles are selected. |
2405 ;; (and (numberp gnus-large-newsgroup) | |
2406 ;; (> (length gnus-newsgroup-headers) gnus-large-newsgroup) | |
2407 ;; (message "Preparing headers...")) | |
2408 (erase-buffer) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2409 (gnus-summary-prepare-threads |
257 | 2410 (if gnus-show-threads |
2411 (gnus-make-threads gnus-newsgroup-headers) | |
2412 gnus-newsgroup-headers) 0) | |
2413 ;; Erase header retrieval message. | |
2414 (message "") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2415 ;; Call hooks for modifying Summary buffer. |
257 | 2416 ;; Suggested by sven@tde.LTH.Se (Sven Mattisson). |
2417 (goto-char (point-min)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2418 (run-hooks 'gnus-summary-prepare-hook) |
257 | 2419 )) |
2420 | |
2421 ;; 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
|
2422 ;; 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
|
2423 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2424 (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
|
2425 "Prepare Summary buffer from THREADS and indentation LEVEL. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2426 THREADS is a list of `(PARENT [(CHILD1 [(GRANDCHILD ...]...) ...]).' |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2427 Optional PARENT-SUBJECT specifies the subject of the parent." |
257 | 2428 (let ((thread nil) |
2429 (header nil) | |
2430 (number nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2431 (subject nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2432 (child-subject nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2433 (parent-subject (or parent-subject "")) |
257 | 2434 ;; `M Indent NUM: [OPT] SUBJECT' |
2435 (cntl (format "%%s %%s%%%dd: [%%s] %%s\n" | |
2436 (length (prin1-to-string gnus-newsgroup-end))))) | |
2437 (while threads | |
2438 (setq thread (car threads)) | |
2439 (setq threads (cdr threads)) | |
2440 ;; If thread is a cons, hierarchical threads is given. | |
2441 ;; Otherwise, thread itself is header. | |
2442 (if (consp thread) | |
2443 (setq header (car thread)) | |
2444 (setq header thread)) | |
2445 ;; Print valid header only. | |
2446 (if (vectorp header) ;Depends on nntp.el. | |
2447 (progn | |
2448 (setq number (nntp-header-number header)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2449 (setq subject (nntp-header-subject header)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2450 (setq child-subject (gnus-simplify-subject subject 're-only)) |
257 | 2451 (insert |
2452 (format cntl | |
2453 ;; Read or not. | |
2454 (cond ((memq number gnus-newsgroup-marked) "-") | |
2455 ((memq number gnus-newsgroup-unreads) " ") | |
2456 (t "D")) | |
2457 ;; Thread level. | |
2458 (make-string (* level gnus-thread-indent-level) ? ) | |
2459 ;; Article number. | |
2460 number | |
2461 ;; Optional headers. | |
2462 (or (and gnus-optional-headers | |
2463 (funcall gnus-optional-headers header)) "") | |
2464 ;; Its subject string. | |
2465 (concat (if (or (zerop level) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2466 (not gnus-thread-hide-subject) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2467 ;; Subject is different from the parent. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2468 (not (string-equal |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2469 parent-subject child-subject))) |
257 | 2470 nil |
2471 (make-string (window-width) ? )) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2472 subject) |
257 | 2473 )) |
2474 )) | |
2475 ;; Print subthreads. | |
2476 (and (consp thread) | |
2477 (cdr thread) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2478 (gnus-summary-prepare-threads |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2479 (cdr thread) (1+ level) child-subject)) |
257 | 2480 ))) |
2481 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2482 ;;(defun gnus-summary-set-mode-line () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2483 ;; "Set Summary mode line string." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2484 ;; ;; 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
|
2485 ;; (let ((subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2486 ;; (if gnus-current-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2487 ;; (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
|
2488 ;; (setq mode-line-buffer-identification |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2489 ;; (concat "GNUS: " |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2490 ;; subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2491 ;; ;; Enough spaces to pad subject to 17 positions. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2492 ;; (make-string (max 0 (- 17 (length subject))) ? )))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2493 ;; (set-buffer-modified-p t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2494 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2495 ;; New implementation in gnus 3.14.3 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2496 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2497 (defun gnus-summary-set-mode-line () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2498 "Set Summary mode line string. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2499 If you don't like it, define your own gnus-summary-set-mode-line." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2500 (let ((unmarked |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2501 (- (length gnus-newsgroup-unreads) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2502 (length (gnus-intersection |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2503 gnus-newsgroup-unreads gnus-newsgroup-marked)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2504 (unselected |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2505 (- (length gnus-newsgroup-unselected) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2506 (length (gnus-intersection |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2507 gnus-newsgroup-unselected gnus-newsgroup-marked))))) |
257 | 2508 (setq mode-line-buffer-identification |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2509 (list 17 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2510 (format "GNUS: %s%s %s" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2511 gnus-newsgroup-name |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2512 (if gnus-current-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2513 (format "/%d" gnus-current-article) "") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2514 ;; Basic ideas by tale@pawl.rpi.edu. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2515 (cond ((and (zerop unmarked) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2516 (zerop unselected)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2517 "") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2518 ((zerop unselected) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2519 (format "{%d more}" unmarked)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2520 (t |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2521 (format "{%d(+%d) more}" unmarked unselected))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2522 )))) |
257 | 2523 (set-buffer-modified-p t)) |
2524 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2525 ;; GNUS Summary mode command. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2526 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2527 (defun gnus-summary-search-group (&optional backward) |
257 | 2528 "Search for next unread newsgroup. |
2529 If optional argument BACKWARD is non-nil, search backward instead." | |
2530 (save-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2531 (set-buffer gnus-group-buffer) |
257 | 2532 (save-excursion |
2533 ;; 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
|
2534 (if (gnus-group-search-forward backward nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2535 (gnus-group-group-name)) |
257 | 2536 ))) |
2537 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2538 (defun gnus-summary-search-subject (backward unread subject) |
257 | 2539 "Search for article forward. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2540 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
|
2541 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
|
2542 If 3rd argument SUBJECT is non-nil, the article which has |
257 | 2543 the same subject will be searched for." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2544 (let ((func |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2545 (if backward |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2546 (function re-search-backward) (function re-search-forward))) |
257 | 2547 (article nil) |
2548 ;; We have to take care of hidden lines. | |
2549 (regexp | |
2550 (format "^%s[ \t]+\\([0-9]+\\):.\\[[^]\r\n]*\\][ \t]+%s" | |
2551 ;;(if unread " " ".") | |
6309
9217f29851c2
Don't use triple-hyphen in a character class.
Karl Heuer <kwzh@gnu.org>
parents:
5911
diff
changeset
|
2552 (cond ((eq unread t) " ") (unread "[- ]") (t ".")) |
257 | 2553 (if subject |
2554 (concat "\\([Rr][Ee]:[ \t]+\\)*" | |
2555 (regexp-quote (gnus-simplify-subject subject)) | |
2556 ;; Ignore words in parentheses. | |
2557 "\\([ \t]*([^\r\n]*)\\)*[ \t]*\\(\r\\|$\\)") | |
2558 "") | |
2559 ))) | |
2560 (if backward | |
2561 (beginning-of-line) | |
2562 (end-of-line)) | |
2563 (if (funcall func regexp nil t) | |
2564 (setq article | |
2565 (string-to-int | |
2566 (buffer-substring (match-beginning 1) (match-end 1))))) | |
2567 ;; Adjust cursor point. | |
2568 (beginning-of-line) | |
2569 (search-forward ":" nil t) | |
2570 ;; This is the result. | |
2571 article | |
2572 )) | |
2573 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2574 (defun gnus-summary-search-forward (&optional unread subject) |
257 | 2575 "Search for article forward. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2576 If 1st optional argument UNREAD is non-nil, only unread article is selected. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2577 If 2nd optional argument SUBJECT is non-nil, the article which has |
257 | 2578 the same subject will be searched for." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2579 (gnus-summary-search-subject nil unread subject)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2580 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2581 (defun gnus-summary-search-backward (&optional unread subject) |
257 | 2582 "Search for article backward. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2583 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
|
2584 If 2nd optional argument SUBJECT is non-nil, the article which has |
257 | 2585 the same subject will be searched for." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2586 (gnus-summary-search-subject t unread subject)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2587 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2588 (defun gnus-summary-article-number () |
257 | 2589 "Article number around point. If nothing, return current number." |
2590 (save-excursion | |
2591 (beginning-of-line) | |
2592 (if (looking-at ".[ \t]+\\([0-9]+\\):") | |
2593 (string-to-int | |
2594 (buffer-substring (match-beginning 1) (match-end 1))) | |
2595 ;; If search fail, return current article number. | |
2596 gnus-current-article | |
2597 ))) | |
2598 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2599 (defun gnus-summary-subject-string () |
257 | 2600 "Return current subject string or nil if nothing." |
2601 (save-excursion | |
2602 ;; 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
|
2603 ;; `gnus-summary-article-number' and `gnus-newsgroup-headers'. |
257 | 2604 (beginning-of-line) |
2605 ;; We have to take care of hidden lines. | |
2606 (if (looking-at ".[ \t]+[0-9]+:.\\[[^]\r\n]*\\][ \t]+\\([^\r\n]*\\)[\r\n]") | |
2607 (buffer-substring (match-beginning 1) (match-end 1))) | |
2608 )) | |
2609 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2610 (defun gnus-summary-goto-subject (article) |
257 | 2611 "Move point to ARTICLE's subject." |
2612 (interactive | |
2613 (list | |
2614 (string-to-int | |
2615 (completing-read "Article number: " | |
2616 (mapcar | |
2617 (function | |
2618 (lambda (headers) | |
2619 (list | |
2620 (int-to-string (nntp-header-number headers))))) | |
2621 gnus-newsgroup-headers) | |
2622 nil 'require-match)))) | |
2623 (let ((current (point))) | |
2624 (goto-char (point-min)) | |
2625 (or (and article (re-search-forward (format "^.[ \t]+%d:" article) nil t)) | |
2626 (progn (goto-char current) nil)) | |
2627 )) | |
2628 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2629 (defun gnus-summary-recenter () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2630 "Center point in Summary window." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2631 ;; Scroll window so as to cursor comes center of Summary window |
257 | 2632 ;; only when article is displayed. |
2633 ;; Suggested by earle@mahendo.JPL.NASA.GOV (Greg Earle). | |
2634 ;; Recenter only when requested. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2635 ;; Subbested by popovich@park.cs.columbia.edu |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2636 (and gnus-auto-center-summary |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2637 (get-buffer-window gnus-article-buffer) |
257 | 2638 (< (/ (- (window-height) 1) 2) |
2639 (count-lines (point) (point-max))) | |
2640 (recenter (/ (- (window-height) 2) 2)))) | |
2641 | |
2642 ;; Walking around Group mode buffer. | |
2643 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2644 (defun gnus-summary-jump-to-group (newsgroup) |
257 | 2645 "Move point to NEWSGROUP in Group mode buffer." |
2646 ;; Keep update point of Group mode buffer if visible. | |
2647 (if (eq (current-buffer) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2648 (get-buffer gnus-group-buffer)) |
257 | 2649 (save-window-excursion |
2650 ;; Take care of tree window mode. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2651 (if (get-buffer-window gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2652 (pop-to-buffer gnus-group-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2653 (gnus-group-jump-to-group newsgroup)) |
257 | 2654 (save-excursion |
2655 ;; Take care of tree window mode. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2656 (if (get-buffer-window gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2657 (pop-to-buffer gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2658 (set-buffer gnus-group-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2659 (gnus-group-jump-to-group newsgroup)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2660 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2661 (defun gnus-summary-next-group (no-article) |
257 | 2662 "Exit current newsgroup and then select next unread newsgroup. |
2663 If prefix argument NO-ARTICLE is non-nil, no article is selected initially." | |
2664 (interactive "P") | |
2665 ;; 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
|
2666 (gnus-summary-jump-to-group gnus-newsgroup-name) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2667 (let ((group (gnus-summary-search-group))) |
257 | 2668 (if (null group) |
2669 (progn | |
2670 (message "Exiting %s..." gnus-newsgroup-name) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2671 (gnus-summary-exit) |
257 | 2672 (message "")) |
2673 (message "Selecting %s..." group) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2674 (gnus-summary-exit t) ;Exit Summary mode temporary. |
257 | 2675 ;; We are now in Group mode buffer. |
2676 ;; 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
|
2677 (gnus-summary-jump-to-group group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2678 (gnus-summary-read-group group nil no-article) |
257 | 2679 (or (eq (current-buffer) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2680 (get-buffer gnus-summary-buffer)) |
257 | 2681 (eq gnus-auto-select-next t) |
2682 ;; Expected newsgroup has nothing to read since the articles | |
2683 ;; are marked as read by cross-referencing. So, try next | |
2684 ;; newsgroup. (Make sure we are in Group mode buffer now.) | |
2685 (and (eq (current-buffer) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2686 (get-buffer gnus-group-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2687 (gnus-group-group-name) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2688 (gnus-summary-read-group |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2689 (gnus-group-group-name) nil no-article)) |
257 | 2690 ) |
2691 ))) | |
2692 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2693 (defun gnus-summary-prev-group (no-article) |
257 | 2694 "Exit current newsgroup and then select previous unread newsgroup. |
2695 If prefix argument NO-ARTICLE is non-nil, no article is selected initially." | |
2696 (interactive "P") | |
2697 ;; 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
|
2698 (gnus-summary-jump-to-group gnus-newsgroup-name) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2699 (let ((group (gnus-summary-search-group t))) |
257 | 2700 (if (null group) |
2701 (progn | |
2702 (message "Exiting %s..." gnus-newsgroup-name) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2703 (gnus-summary-exit) |
257 | 2704 (message "")) |
2705 (message "Selecting %s..." group) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2706 (gnus-summary-exit t) ;Exit Summary mode temporary. |
257 | 2707 ;; We are now in Group mode buffer. |
2708 ;; We have to adjust point of Group mode buffer because current | |
2709 ;; 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
|
2710 (gnus-summary-jump-to-group group) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2711 (gnus-summary-read-group group nil no-article) |
257 | 2712 (or (eq (current-buffer) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2713 (get-buffer gnus-summary-buffer)) |
257 | 2714 (eq gnus-auto-select-next t) |
2715 ;; Expected newsgroup has nothing to read since the articles | |
2716 ;; are marked as read by cross-referencing. So, try next | |
2717 ;; newsgroup. (Make sure we are in Group mode buffer now.) | |
2718 (and (eq (current-buffer) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2719 (get-buffer gnus-group-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2720 (gnus-summary-search-group t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2721 (gnus-summary-read-group |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2722 (gnus-summary-search-group t) nil no-article)) |
257 | 2723 ) |
2724 ))) | |
2725 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2726 ;; Walking around summary lines. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2727 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2728 (defun gnus-summary-next-subject (n &optional unread) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2729 "Go to next N'th summary line. |
257 | 2730 If optional argument UNREAD is non-nil, only unread article is selected." |
2731 (interactive "p") | |
2732 (while (and (> n 1) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2733 (gnus-summary-search-forward unread)) |
257 | 2734 (setq n (1- n))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2735 (cond ((gnus-summary-search-forward unread) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2736 (gnus-summary-recenter)) |
257 | 2737 (unread |
2738 (message "No more unread articles")) | |
2739 (t | |
2740 (message "No more articles")) | |
2741 )) | |
2742 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2743 (defun gnus-summary-next-unread-subject (n) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2744 "Go to next N'th unread summary line." |
257 | 2745 (interactive "p") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2746 (gnus-summary-next-subject n t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2747 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2748 (defun gnus-summary-prev-subject (n &optional unread) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2749 "Go to previous N'th summary line. |
257 | 2750 If optional argument UNREAD is non-nil, only unread article is selected." |
2751 (interactive "p") | |
2752 (while (and (> n 1) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2753 (gnus-summary-search-backward unread)) |
257 | 2754 (setq n (1- n))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2755 (cond ((gnus-summary-search-backward unread) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2756 (gnus-summary-recenter)) |
257 | 2757 (unread |
2758 (message "No more unread articles")) | |
2759 (t | |
2760 (message "No more articles")) | |
2761 )) | |
2762 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2763 (defun gnus-summary-prev-unread-subject (n) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2764 "Go to previous N'th unread summary line." |
257 | 2765 (interactive "p") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2766 (gnus-summary-prev-subject n t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2767 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2768 ;; Walking around summary lines with displaying articles. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2769 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2770 (defun gnus-summary-expand-window () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2771 "Expand Summary window to show headers full window." |
257 | 2772 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2773 (gnus-configure-windows 'summary) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2774 (pop-to-buffer gnus-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2775 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2776 (defun gnus-summary-display-article (article &optional all-header) |
257 | 2777 "Display ARTICLE in Article buffer." |
2778 (if (null article) | |
2779 nil | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2780 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2781 (pop-to-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2782 (gnus-article-prepare article all-header) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2783 (gnus-summary-recenter) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2784 (gnus-summary-set-mode-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2785 (run-hooks 'gnus-select-article-hook) |
257 | 2786 ;; Successfully display article. |
2787 t | |
2788 )) | |
2789 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2790 (defun gnus-summary-select-article (&optional all-headers force) |
257 | 2791 "Select the current article. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2792 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
|
2793 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
|
2794 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
|
2795 (let ((article (gnus-summary-article-number)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2796 (all-headers (not (not all-headers)))) ;Must be T or NIL. |
257 | 2797 (if (or (null gnus-current-article) |
2798 (/= article gnus-current-article) | |
2799 (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
|
2800 ;; 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
|
2801 (gnus-summary-display-article article all-headers) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2802 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2803 (pop-to-buffer gnus-summary-buffer)) |
257 | 2804 )) |
2805 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2806 (defun gnus-summary-set-current-mark (&optional current-mark) |
257 | 2807 "Put `+' at the current article. |
2808 Optional argument specifies CURRENT-MARK instead of `+'." | |
2809 (save-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2810 (set-buffer gnus-summary-buffer) |
257 | 2811 (let ((buffer-read-only nil)) |
2812 (goto-char (point-min)) | |
2813 ;; First of all clear mark at last article. | |
2814 (if (re-search-forward "^.[ \t]+[0-9]+:[^ \t]" nil t) | |
2815 (progn | |
2816 (delete-char -1) | |
2817 (insert " ") | |
2818 (goto-char (point-min)))) | |
2819 (if (re-search-forward (format "^.[ \t]+%d:" gnus-current-article) nil t) | |
2820 (progn | |
2821 (delete-char 1) | |
2822 (insert (or current-mark "+")))) | |
2823 ))) | |
2824 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2825 ;;(defun gnus-summary-next-article (unread &optional subject) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2826 ;; "Select article after current one. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2827 ;;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
|
2828 ;; (interactive "P") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2829 ;; (cond ((gnus-summary-display-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2830 ;; (gnus-summary-search-forward unread subject))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2831 ;; (unread |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2832 ;; (message "No more unread articles")) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2833 ;; (t |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2834 ;; (message "No more articles")) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2835 ;; )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2836 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2837 (defun gnus-summary-next-article (unread &optional subject) |
257 | 2838 "Select article after current one. |
2839 If argument UNREAD is non-nil, only unread article is selected." | |
2840 (interactive "P") | |
2841 (let ((header nil)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2842 (cond ((gnus-summary-display-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2843 (gnus-summary-search-forward unread subject))) |
257 | 2844 ((and subject |
2845 gnus-auto-select-same | |
2846 (gnus-set-difference gnus-newsgroup-unreads | |
2847 gnus-newsgroup-marked) | |
2848 (memq this-command | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2849 '(gnus-summary-next-unread-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2850 gnus-summary-next-page |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2851 gnus-summary-kill-same-subject-and-select |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2852 ;;gnus-summary-next-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2853 ;;gnus-summary-next-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2854 ;;gnus-summary-next-unread-same-subject |
257 | 2855 ))) |
2856 ;; 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
|
2857 ;; Hook function, such as gnus-summary-rmail-digest, may |
257 | 2858 ;; change current buffer, so need check. |
2859 (let ((buffer (current-buffer)) | |
2860 (last-point (point))) | |
2861 ;; No more articles with same subject, so jump to the first | |
2862 ;; unread article. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2863 (gnus-summary-first-unread-article) |
257 | 2864 ;;(and (eq buffer (current-buffer)) |
2865 ;; (= (point) last-point) | |
2866 ;; ;; Ignore given SUBJECT, and try again. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2867 ;; (gnus-summary-next-article unread nil)) |
257 | 2868 (and (eq buffer (current-buffer)) |
2869 (< (point) last-point) | |
2870 (message "Wrapped")) | |
2871 )) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2872 ((and gnus-auto-extend-newsgroup |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2873 (not unread) ;Not unread only |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2874 (not subject) ;Only if subject is not specified. |
257 | 2875 (setq header (gnus-more-header-forward))) |
2876 ;; Extend to next article if possible. | |
2877 ;; Basic ideas by himacdonald@watdragon.waterloo.edu | |
2878 (gnus-extend-newsgroup header nil) | |
2879 ;; Threads feature must be turned off. | |
2880 (let ((buffer-read-only nil)) | |
2881 (goto-char (point-max)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2882 (gnus-summary-prepare-threads (list header) 0)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2883 (gnus-summary-goto-article gnus-newsgroup-end)) |
257 | 2884 (t |
2885 ;; 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
|
2886 (let ((cmd (aref (this-command-keys) 0)) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2887 (group (gnus-summary-search-group)) |
257 | 2888 (auto-select |
2889 (and gnus-auto-select-next | |
2890 ;;(null (gnus-set-difference gnus-newsgroup-unreads | |
2891 ;; gnus-newsgroup-marked)) | |
2892 (memq this-command | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2893 '(gnus-summary-next-unread-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2894 gnus-summary-next-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2895 gnus-summary-next-page |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2896 gnus-summary-next-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2897 gnus-summary-next-unread-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2898 gnus-summary-kill-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2899 gnus-summary-kill-same-subject-and-select |
257 | 2900 )) |
2901 ;; Ignore characters typed ahead. | |
2902 (not (input-pending-p)) | |
2903 ))) | |
7974
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2904 ;; 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
|
2905 (if (listp cmd) |
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2906 (setq cmd (car cmd))) |
257 | 2907 (message "No more%s articles%s" |
2908 (if unread " unread" "") | |
2909 (if (and auto-select | |
2910 (not (eq gnus-auto-select-next 'quietly))) | |
2911 (if group | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2912 (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
|
2913 (single-key-description cmd) |
257 | 2914 group |
2915 (nth 1 (gnus-gethash group | |
2916 gnus-unread-hashtb))) | |
2917 (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
|
2918 (single-key-description cmd) |
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2919 gnus-newsgroup-name)) |
257 | 2920 "")) |
2921 ;; Select next unread newsgroup automagically. | |
2922 (cond ((and auto-select | |
2923 (eq gnus-auto-select-next 'quietly)) | |
2924 ;; Select quietly. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2925 (gnus-summary-next-group nil)) |
257 | 2926 (auto-select |
2927 ;; Confirm auto selection. | |
7974
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2928 (let* ((event (read-event)) |
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2929 (type |
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2930 (if (listp event) |
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2931 (car event) |
de3b4f95a9db
(gnus-summary-next-article): Handle non-character events.
Richard M. Stallman <rms@gnu.org>
parents:
7793
diff
changeset
|
2932 event))) |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
2933 (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
|
2934 (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
|
2935 (setq unread-command-events (list event))))) |
257 | 2936 ) |
2937 )) | |
2938 ))) | |
2939 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2940 (defun gnus-summary-next-unread-article () |
257 | 2941 "Select unread article after current one." |
2942 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2943 (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
|
2944 (gnus-summary-subject-string)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2945 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2946 (defun gnus-summary-prev-article (unread &optional subject) |
257 | 2947 "Select article before current one. |
2948 If argument UNREAD is non-nil, only unread article is selected." | |
2949 (interactive "P") | |
2950 (let ((header nil)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2951 (cond ((gnus-summary-display-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2952 (gnus-summary-search-backward unread subject))) |
257 | 2953 ((and subject |
2954 gnus-auto-select-same | |
2955 (gnus-set-difference gnus-newsgroup-unreads | |
2956 gnus-newsgroup-marked) | |
2957 (memq this-command | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2958 '(gnus-summary-prev-unread-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2959 ;;gnus-summary-prev-page |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2960 ;;gnus-summary-prev-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2961 ;;gnus-summary-prev-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2962 ;;gnus-summary-prev-unread-same-subject |
257 | 2963 ))) |
2964 ;; Ignore given SUBJECT, and try again. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2965 (gnus-summary-prev-article unread nil)) |
257 | 2966 (unread |
2967 (message "No more unread articles")) | |
2968 ((and gnus-auto-extend-newsgroup | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2969 (not subject) ;Only if subject is not specified. |
257 | 2970 (setq header (gnus-more-header-backward))) |
2971 ;; Extend to previous article if possible. | |
2972 ;; Basic ideas by himacdonald@watdragon.waterloo.edu | |
2973 (gnus-extend-newsgroup header t) | |
2974 (let ((buffer-read-only nil)) | |
2975 (goto-char (point-min)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2976 (gnus-summary-prepare-threads (list header) 0)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2977 (gnus-summary-goto-article gnus-newsgroup-begin)) |
257 | 2978 (t |
2979 (message "No more articles")) | |
2980 ))) | |
2981 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2982 (defun gnus-summary-prev-unread-article () |
257 | 2983 "Select unred article before current one." |
2984 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2985 (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
|
2986 (gnus-summary-subject-string)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2987 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2988 (defun gnus-summary-next-page (lines) |
257 | 2989 "Show next page of selected article. |
3591
507f64624555
Apply typo patches from Paul Eggert.
Jim Blandy <jimb@redhat.com>
parents:
3496
diff
changeset
|
2990 If end of article, select next article. |
257 | 2991 Argument LINES specifies lines to be scrolled up." |
2992 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2993 (let ((article (gnus-summary-article-number)) |
257 | 2994 (endp nil)) |
2995 (if (or (null gnus-current-article) | |
2996 (/= article gnus-current-article)) | |
2997 ;; 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
|
2998 (gnus-summary-display-article article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
2999 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3000 (pop-to-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3001 (gnus-eval-in-buffer-window gnus-article-buffer |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3002 (setq endp (gnus-article-next-page lines))) |
257 | 3003 (cond ((and endp lines) |
3004 (message "End of message")) | |
3005 ((and endp (null lines)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3006 (gnus-summary-next-unread-article))) |
257 | 3007 ))) |
3008 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3009 (defun gnus-summary-prev-page (lines) |
257 | 3010 "Show previous page of selected article. |
3011 Argument LINES specifies lines to be scrolled down." | |
3012 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3013 (let ((article (gnus-summary-article-number))) |
257 | 3014 (if (or (null gnus-current-article) |
3015 (/= article gnus-current-article)) | |
3016 ;; 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
|
3017 (gnus-summary-display-article article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3018 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3019 (pop-to-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3020 (gnus-eval-in-buffer-window gnus-article-buffer |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3021 (gnus-article-prev-page lines)) |
257 | 3022 ))) |
3023 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3024 (defun gnus-summary-scroll-up (lines) |
257 | 3025 "Scroll up (or down) one line current article. |
3026 Argument LINES specifies lines to be scrolled up (or down if negative)." | |
3027 (interactive "p") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3028 (gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3029 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3030 (cond ((> lines 0) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3031 (if (gnus-article-next-page lines) |
257 | 3032 (message "End of message"))) |
3033 ((< lines 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3034 (gnus-article-prev-page (- 0 lines)))) |
257 | 3035 )) |
3036 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3037 (defun gnus-summary-next-same-subject () |
257 | 3038 "Select next article which has the same subject as current one." |
3039 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3040 (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
|
3041 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3042 (defun gnus-summary-prev-same-subject () |
257 | 3043 "Select previous article which has the same subject as current one." |
3044 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3045 (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
|
3046 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3047 (defun gnus-summary-next-unread-same-subject () |
257 | 3048 "Select next unread article which has the same subject as current one." |
3049 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3050 (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
|
3051 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3052 (defun gnus-summary-prev-unread-same-subject () |
257 | 3053 "Select previous unread article which has the same subject as current one." |
3054 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3055 (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
|
3056 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3057 (defun gnus-summary-refer-parent-article (child) |
257 | 3058 "Refer parent article of current article. |
3059 If a prefix argument CHILD is non-nil, go back to the child article | |
3060 using internally maintained articles history. | |
3061 NOTE: This command may not work with nnspool.el." | |
3062 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3063 (gnus-summary-select-article t t) ;Request all headers. |
257 | 3064 (let ((referenced-id nil)) ;Message-id of parent or child article. |
3065 (if child | |
3066 ;; Go back to child article using history. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3067 (gnus-summary-refer-article nil) |
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 ;; Look for parent Message-ID. |
3070 ;; 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
|
3071 ;; because we may be looking at parent or referred article. |
257 | 3072 (let ((references (gnus-fetch-field "References"))) |
3073 ;; Get the last message-id in the references. | |
3074 (and references | |
3075 (string-match "\\(<[^<>]+>\\)[^>]*\\'" references) | |
3076 (setq referenced-id | |
3077 (substring references | |
3078 (match-beginning 1) (match-end 1)))) | |
3079 )) | |
3080 (if (stringp referenced-id) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3081 (gnus-summary-refer-article referenced-id) |
257 | 3082 (error "No more parents")) |
3083 ))) | |
3084 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3085 (defun gnus-summary-refer-article (message-id) |
257 | 3086 "Refer article specified by MESSAGE-ID. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3087 If the MESSAGE-ID is nil or an empty string, Message-ID is poped from |
257 | 3088 internally maintained articles history. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3089 NOTE: This command may not work with nnspool.el nor mhspool.el." |
257 | 3090 (interactive "sMessage-ID: ") |
3091 ;; Make sure that this command depends on the fact that article | |
3092 ;; related information is not updated when an article is retrieved | |
3093 ;; by Message-ID. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3094 (gnus-summary-select-article t t) ;Request all headers. |
257 | 3095 (if (and (stringp message-id) |
3096 (> (length message-id) 0)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3097 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3098 ;; Construct the correct Message-ID if necessary. |
3099 ;; Suggested by tale@pawl.rpi.edu. | |
3100 (or (string-match "^<" message-id) | |
3101 (setq message-id (concat "<" message-id))) | |
3102 (or (string-match ">$" message-id) | |
3103 (setq message-id (concat message-id ">"))) | |
3104 ;; Push current message-id on history. | |
3105 ;; 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
|
3106 ;; message-id because we may be looking at parent or referred |
257 | 3107 ;; article. |
3108 (let ((current (gnus-fetch-field "Message-ID"))) | |
3109 (or (equal current message-id) ;Nothing to do. | |
3110 (equal current (car gnus-current-history)) | |
3111 (setq gnus-current-history | |
3112 (cons current gnus-current-history))) | |
3113 )) | |
3114 ;; Pop message-id from history. | |
3115 (setq message-id (car gnus-current-history)) | |
3116 (setq gnus-current-history (cdr gnus-current-history))) | |
3117 (if (stringp message-id) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3118 ;; 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
|
3119 ;; nnspool nor mhspool. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3120 (gnus-article-prepare message-id t) |
257 | 3121 (error "No such references")) |
3122 ) | |
3123 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3124 (defun gnus-summary-next-digest (nth) |
257 | 3125 "Move to head of NTH next digested message." |
3126 (interactive "p") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3127 (gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3128 (gnus-eval-in-buffer-window gnus-article-buffer |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3129 (gnus-article-next-digest (or nth 1)) |
257 | 3130 )) |
3131 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3132 (defun gnus-summary-prev-digest (nth) |
257 | 3133 "Move to head of NTH previous digested message." |
3134 (interactive "p") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3135 (gnus-summary-select-article) |
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 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3137 (gnus-article-prev-digest (or nth 1)) |
257 | 3138 )) |
3139 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3140 (defun gnus-summary-first-unread-article () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3141 "Select first unread article. Return non-nil if successfully selected." |
257 | 3142 (interactive) |
3143 (let ((begin (point))) | |
3144 (goto-char (point-min)) | |
3145 (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
|
3146 (gnus-summary-display-article (gnus-summary-article-number)) |
257 | 3147 ;; If there is no unread articles, stay there. |
3148 (goto-char begin) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3149 ;;(gnus-summary-display-article (gnus-summary-article-number)) |
257 | 3150 (message "No more unread articles") |
3151 nil | |
3152 ) | |
3153 )) | |
3154 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3155 (defun gnus-summary-isearch-article () |
257 | 3156 "Do incremental search forward on current article." |
3157 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3158 (gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3159 (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
|
3160 (isearch-forward))) |
257 | 3161 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3162 (defun gnus-summary-search-article-forward (regexp) |
257 | 3163 "Search for an article containing REGEXP forward. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3164 gnus-select-article-hook is not called during the search." |
257 | 3165 (interactive |
3166 (list (read-string | |
3167 (concat "Search forward (regexp): " | |
3168 (if gnus-last-search-regexp | |
3169 (concat "(default " gnus-last-search-regexp ") ")))))) | |
3170 (if (string-equal regexp "") | |
3171 (setq regexp (or gnus-last-search-regexp "")) | |
3172 (setq gnus-last-search-regexp regexp)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3173 (if (gnus-summary-search-article regexp nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3174 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3175 (recenter 0) |
3176 ;;(sit-for 1) | |
3177 ) | |
3178 (error "Search failed: \"%s\"" regexp) | |
3179 )) | |
3180 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3181 (defun gnus-summary-search-article-backward (regexp) |
257 | 3182 "Search for an article containing REGEXP backward. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3183 gnus-select-article-hook is not called during the search." |
257 | 3184 (interactive |
3185 (list (read-string | |
3186 (concat "Search backward (regexp): " | |
3187 (if gnus-last-search-regexp | |
3188 (concat "(default " gnus-last-search-regexp ") ")))))) | |
3189 (if (string-equal regexp "") | |
3190 (setq regexp (or gnus-last-search-regexp "")) | |
3191 (setq gnus-last-search-regexp regexp)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3192 (if (gnus-summary-search-article regexp t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3193 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3194 (recenter 0) |
3195 ;;(sit-for 1) | |
3196 ) | |
3197 (error "Search failed: \"%s\"" regexp) | |
3198 )) | |
3199 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3200 (defun gnus-summary-search-article (regexp &optional backward) |
257 | 3201 "Search for an article containing REGEXP. |
3202 Optional argument BACKWARD means do search for backward. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3203 gnus-select-article-hook is not called during the search." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3204 (let ((gnus-select-article-hook nil) ;Disable hook. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3205 (gnus-mark-article-hook nil) ;Inhibit marking as read. |
257 | 3206 (re-search |
3207 (if backward | |
3208 (function re-search-backward) (function re-search-forward))) | |
3209 (found nil) | |
3210 (last nil)) | |
3211 ;; 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
|
3212 (gnus-summary-show-all-threads) |
257 | 3213 ;; First of all, search current article. |
3214 ;; We don't want to read article again from NNTP server nor reset | |
3215 ;; current point. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3216 (gnus-summary-select-article) |
257 | 3217 (message "Searching article: %d..." gnus-current-article) |
3218 (setq last gnus-current-article) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3219 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3220 (save-restriction |
3221 (widen) | |
3222 ;; Begin search from current point. | |
3223 (setq found (funcall re-search regexp nil t)))) | |
3224 ;; Then search next articles. | |
3225 (while (and (not found) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3226 (gnus-summary-display-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3227 (gnus-summary-search-subject backward nil nil))) |
257 | 3228 (message "Searching article: %d..." gnus-current-article) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3229 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3230 (save-restriction |
3231 (widen) | |
3232 (goto-char (if backward (point-max) (point-min))) | |
3233 (setq found (funcall re-search regexp nil t))) | |
3234 )) | |
3235 (message "") | |
3236 ;; Adjust article pointer. | |
3237 (or (eq last gnus-current-article) | |
3238 (setq gnus-last-article last)) | |
3239 ;; Return T if found such article. | |
3240 found | |
3241 )) | |
3242 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3243 (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
|
3244 "If FIELD of article header matches REGEXP, execute a COMMAND string. |
257 | 3245 If FIELD is an empty string (or nil), entire article body is searched for. |
3246 If optional (prefix) argument BACKWARD is non-nil, do backward instead." | |
3247 (interactive | |
3248 (list (let ((completion-ignore-case t)) | |
3249 (completing-read "Field name: " | |
3250 '(("Number")("Subject")("From") | |
3251 ("Lines")("Date")("Id") | |
3252 ("Xref")("References")) | |
3253 nil 'require-match)) | |
3254 (read-string "Regexp: ") | |
3255 (read-key-sequence "Command: ") | |
3256 current-prefix-arg)) | |
3257 ;; 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
|
3258 (gnus-summary-show-all-threads) |
257 | 3259 ;; We don't want to change current point nor window configuration. |
3260 (save-excursion | |
3261 (save-window-excursion | |
3262 (message "Executing %s..." (key-description command)) | |
3263 ;; We'd like to execute COMMAND interactively so as to give arguments. | |
3264 (gnus-execute field regexp | |
3265 (` (lambda () | |
3266 (call-interactively '(, (key-binding command))))) | |
3267 backward) | |
3268 (message "Executing %s... done" (key-description command))))) | |
3269 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3270 (defun gnus-summary-beginning-of-article () |
257 | 3271 "Go to beginning of article body" |
3272 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3273 (gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3274 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3275 (widen) |
3276 (beginning-of-buffer) | |
3277 (if gnus-break-pages | |
3278 (gnus-narrow-to-page)) | |
3279 )) | |
3280 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3281 (defun gnus-summary-end-of-article () |
257 | 3282 "Go to end of article body" |
3283 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3284 (gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3285 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3286 (widen) |
3287 (end-of-buffer) | |
3288 (if gnus-break-pages | |
3289 (gnus-narrow-to-page)) | |
3290 )) | |
3291 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3292 (defun gnus-summary-goto-article (article &optional all-headers) |
257 | 3293 "Read ARTICLE if exists. |
3294 Optional argument ALL-HEADERS means all headers are shown." | |
3295 (interactive | |
3296 (list | |
3297 (string-to-int | |
3298 (completing-read "Article number: " | |
3299 (mapcar | |
3300 (function | |
3301 (lambda (headers) | |
3302 (list | |
3303 (int-to-string (nntp-header-number headers))))) | |
3304 gnus-newsgroup-headers) | |
3305 nil 'require-match)))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3306 (if (gnus-summary-goto-subject article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3307 (gnus-summary-display-article article all-headers))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3308 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3309 (defun gnus-summary-goto-last-article () |
257 | 3310 "Go to last subject line." |
3311 (interactive) | |
3312 (if gnus-last-article | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3313 (gnus-summary-goto-article gnus-last-article))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3314 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3315 (defun gnus-summary-show-article () |
257 | 3316 "Force to show current article." |
3317 (interactive) | |
3318 ;; The following is a trick to force to read the current article again. | |
3319 (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
|
3320 (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
|
3321 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3322 (defun gnus-summary-toggle-header (arg) |
257 | 3323 "Show original header if pruned header currently shown, or vice versa. |
3324 With arg, show original header iff arg is positive." | |
3325 (interactive "P") | |
3326 ;; Variable gnus-show-all-headers must be NIL to toggle really. | |
3327 (let ((gnus-show-all-headers nil) | |
3328 (all-headers | |
3329 (if (null arg) (not gnus-have-all-headers) | |
3330 (> (prefix-numeric-value arg) 0)))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3331 (gnus-summary-select-article all-headers t))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3332 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3333 (defun gnus-summary-show-all-headers () |
257 | 3334 "Show original article header." |
3335 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3336 (gnus-summary-select-article t t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3337 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3338 (defun gnus-summary-toggle-mime (arg) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3339 "Toggle MIME processing. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3340 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
|
3341 (interactive "P") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3342 (setq gnus-show-mime |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3343 (if (null arg) (not gnus-show-mime) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3344 (> (prefix-numeric-value arg) 0))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3345 ;; 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
|
3346 (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
|
3347 (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
|
3348 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3349 (defun gnus-summary-stop-page-breaking () |
257 | 3350 "Stop page breaking by linefeed temporary (Widen article buffer)." |
3351 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3352 (gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3353 (gnus-eval-in-buffer-window gnus-article-buffer |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3354 (widen) |
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 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3357 (defun gnus-summary-kill-same-subject-and-select (unmark) |
257 | 3358 "Mark articles which has the same subject as read, and then select next. |
3359 If argument UNMARK is positive, remove any kinds of marks. | |
3360 If argument UNMARK is negative, mark articles as unread instead." | |
3361 (interactive "P") | |
3362 (if unmark | |
3363 (setq unmark (prefix-numeric-value unmark))) | |
3364 (let ((count | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3365 (gnus-summary-mark-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3366 (gnus-summary-subject-string) unmark))) |
257 | 3367 ;; Select next unread article. If auto-select-same mode, should |
3368 ;; select the first unread article. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3369 (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
|
3370 (gnus-summary-subject-string))) |
257 | 3371 (message "%d articles are marked as %s" |
3372 count (if unmark "unread" "read")) | |
3373 )) | |
3374 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3375 (defun gnus-summary-kill-same-subject (unmark) |
257 | 3376 "Mark articles which has the same subject as read. |
3377 If argument UNMARK is positive, remove any kinds of marks. | |
3378 If argument UNMARK is negative, mark articles as unread instead." | |
3379 (interactive "P") | |
3380 (if unmark | |
3381 (setq unmark (prefix-numeric-value unmark))) | |
3382 (let ((count | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3383 (gnus-summary-mark-same-subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3384 (gnus-summary-subject-string) unmark))) |
257 | 3385 ;; If marked as read, go to next unread subject. |
3386 (if (null unmark) | |
3387 ;; Go to next unread subject. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3388 (gnus-summary-next-subject 1 t)) |
257 | 3389 (message "%d articles are marked as %s" |
3390 count (if unmark "unread" "read")) | |
3391 )) | |
3392 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3393 (defun gnus-summary-mark-same-subject (subject &optional unmark) |
257 | 3394 "Mark articles with same SUBJECT as read, and return marked number. |
3395 If optional argument UNMARK is positive, remove any kinds of marks. | |
3396 If optional argument UNMARK is negative, mark articles as unread instead." | |
3397 (let ((count 1)) | |
3398 (save-excursion | |
3399 (cond ((null unmark) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3400 (gnus-summary-mark-as-read nil "K")) |
257 | 3401 ((> unmark 0) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3402 (gnus-summary-mark-as-unread nil t)) |
257 | 3403 (t |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3404 (gnus-summary-mark-as-unread))) |
257 | 3405 (while (and subject |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3406 (gnus-summary-search-forward nil subject)) |
257 | 3407 (cond ((null unmark) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3408 (gnus-summary-mark-as-read nil "K")) |
257 | 3409 ((> unmark 0) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3410 (gnus-summary-mark-as-unread nil t)) |
257 | 3411 (t |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3412 (gnus-summary-mark-as-unread))) |
257 | 3413 (setq count (1+ count)) |
3414 )) | |
3415 ;; Hide killed thread subtrees. Does not work properly always. | |
3416 ;;(and (null unmark) | |
3417 ;; gnus-thread-hide-killed | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3418 ;; (gnus-summary-hide-thread)) |
257 | 3419 ;; Return number of articles marked as read. |
3420 count | |
3421 )) | |
3422 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3423 (defun gnus-summary-mark-as-unread-forward (count) |
257 | 3424 "Mark current article as unread, and then go forward. |
3425 Argument COUNT specifies number of articles marked as unread." | |
3426 (interactive "p") | |
3427 (while (> count 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3428 (gnus-summary-mark-as-unread nil nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3429 (gnus-summary-next-subject 1 nil) |
257 | 3430 (setq count (1- count)))) |
3431 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3432 (defun gnus-summary-mark-as-unread-backward (count) |
257 | 3433 "Mark current article as unread, and then go backward. |
3434 Argument COUNT specifies number of articles marked as unread." | |
3435 (interactive "p") | |
3436 (while (> count 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3437 (gnus-summary-mark-as-unread nil nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3438 (gnus-summary-prev-subject 1 nil) |
257 | 3439 (setq count (1- count)))) |
3440 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3441 (defun gnus-summary-mark-as-unread (&optional article clear-mark) |
257 | 3442 "Mark current article as unread. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3443 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
|
3444 Optional 2nd argument CLEAR-MARK remove any kinds of mark." |
257 | 3445 (save-excursion |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3446 (set-buffer gnus-summary-buffer) |
257 | 3447 ;; First of all, show hidden thread subtrees. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3448 (gnus-summary-show-thread) |
257 | 3449 (let* ((buffer-read-only nil) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3450 (current (gnus-summary-article-number)) |
257 | 3451 (article (or article current))) |
3452 (gnus-mark-article-as-unread article clear-mark) | |
3453 (if (or (eq article current) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3454 (gnus-summary-goto-subject article)) |
257 | 3455 (progn |
3456 (beginning-of-line) | |
3457 (delete-char 1) | |
3458 (insert (if clear-mark " " "-")))) | |
3459 ))) | |
3460 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3461 (defun gnus-summary-mark-as-read-forward (count) |
257 | 3462 "Mark current article as read, and then go forward. |
3463 Argument COUNT specifies number of articles marked as read" | |
3464 (interactive "p") | |
3465 (while (> count 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3466 (gnus-summary-mark-as-read) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3467 (gnus-summary-next-subject 1 'unread-only) |
257 | 3468 (setq count (1- count)))) |
3469 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3470 (defun gnus-summary-mark-as-read-backward (count) |
257 | 3471 "Mark current article as read, and then go backward. |
3472 Argument COUNT specifies number of articles marked as read" | |
3473 (interactive "p") | |
3474 (while (> count 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3475 (gnus-summary-mark-as-read) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3476 (gnus-summary-prev-subject 1 'unread-only) |
257 | 3477 (setq count (1- count)))) |
3478 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3479 (defun gnus-summary-mark-as-read (&optional article mark) |
257 | 3480 "Mark current article as read. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3481 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
|
3482 Optional 2nd argument MARK specifies a string inserted at beginning of line. |
257 | 3483 Any kind of string (length 1) except for a space and `-' is ok." |
3484 (save-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3485 (set-buffer gnus-summary-buffer) |
257 | 3486 ;; First of all, show hidden thread subtrees. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3487 (gnus-summary-show-thread) |
257 | 3488 (let* ((buffer-read-only nil) |
3489 (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
|
3490 (current (gnus-summary-article-number)) |
257 | 3491 (article (or article current))) |
3492 (gnus-mark-article-as-read article) | |
3493 (if (or (eq article current) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3494 (gnus-summary-goto-subject article)) |
257 | 3495 (progn |
3496 (beginning-of-line) | |
3497 (delete-char 1) | |
3498 (insert mark))) | |
3499 ))) | |
3500 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3501 (defun gnus-summary-clear-mark-forward (count) |
257 | 3502 "Remove current article's mark, and go forward. |
3503 Argument COUNT specifies number of articles unmarked" | |
3504 (interactive "p") | |
3505 (while (> count 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3506 (gnus-summary-mark-as-unread nil t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3507 (gnus-summary-next-subject 1 nil) |
257 | 3508 (setq count (1- count)))) |
3509 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3510 (defun gnus-summary-clear-mark-backward (count) |
257 | 3511 "Remove current article's mark, and go backward. |
3512 Argument COUNT specifies number of articles unmarked" | |
3513 (interactive "p") | |
3514 (while (> count 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3515 (gnus-summary-mark-as-unread nil t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3516 (gnus-summary-prev-subject 1 nil) |
257 | 3517 (setq count (1- count)))) |
3518 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3519 (defun gnus-summary-delete-marked-as-read () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3520 "Delete lines which is marked as read." |
257 | 3521 (interactive) |
3522 (if gnus-newsgroup-unreads | |
3523 (let ((buffer-read-only nil)) | |
3524 (save-excursion | |
3525 (goto-char (point-min)) | |
6309
9217f29851c2
Don't use triple-hyphen in a character class.
Karl Heuer <kwzh@gnu.org>
parents:
5911
diff
changeset
|
3526 (delete-non-matching-lines "^[- ]")) |
257 | 3527 ;; Adjust point. |
3528 (if (eobp) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3529 (gnus-summary-prev-subject 1) |
257 | 3530 (beginning-of-line) |
3531 (search-forward ":" nil t))) | |
3532 ;; It is not so good idea to make the buffer empty. | |
3533 (message "All articles are marked as read") | |
3534 )) | |
3535 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3536 (defun gnus-summary-delete-marked-with (marks) |
257 | 3537 "Delete lines which are marked with MARKS (e.g. \"DK\")." |
3538 (interactive "sMarks: ") | |
3539 (let ((buffer-read-only nil)) | |
3540 (save-excursion | |
3541 (goto-char (point-min)) | |
3542 (delete-matching-lines (concat "^[" marks "]"))) | |
3543 ;; Adjust point. | |
3544 (or (zerop (buffer-size)) | |
3545 (if (eobp) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3546 (gnus-summary-prev-subject 1) |
257 | 3547 (beginning-of-line) |
3548 (search-forward ":" nil t))) | |
3549 )) | |
3550 | |
3551 ;; Thread-based commands. | |
3552 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3553 (defun gnus-summary-toggle-threads (arg) |
257 | 3554 "Toggle showing conversation threads. |
3555 With arg, turn showing conversation threads on iff arg is positive." | |
3556 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3557 (let ((current (gnus-summary-article-number))) |
257 | 3558 (setq gnus-show-threads |
3559 (if (null arg) (not gnus-show-threads) | |
3560 (> (prefix-numeric-value arg) 0))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3561 (gnus-summary-prepare) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3562 (gnus-summary-goto-subject current) |
257 | 3563 )) |
3564 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3565 (defun gnus-summary-show-all-threads () |
257 | 3566 "Show all thread subtrees." |
3567 (interactive) | |
3568 (if gnus-show-threads | |
3569 (save-excursion | |
3570 (let ((buffer-read-only nil)) | |
3571 (subst-char-in-region (point-min) (point-max) ?\^M ?\n t) | |
3572 )))) | |
3573 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3574 (defun gnus-summary-show-thread () |
257 | 3575 "Show thread subtrees." |
3576 (interactive) | |
3577 (if gnus-show-threads | |
3578 (save-excursion | |
3579 (let ((buffer-read-only nil)) | |
3580 (subst-char-in-region (progn | |
3581 (beginning-of-line) (point)) | |
3582 (progn | |
3583 (end-of-line) (point)) | |
3584 ?\^M ?\n t) | |
3585 )))) | |
3586 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3587 (defun gnus-summary-hide-all-threads () |
257 | 3588 "Hide all thread subtrees." |
3589 (interactive) | |
3590 (if gnus-show-threads | |
3591 (save-excursion | |
3592 ;; Adjust cursor point. | |
3593 (goto-char (point-min)) | |
3594 (search-forward ":" nil t) | |
3595 (let ((level (current-column))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3596 (gnus-summary-hide-thread) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3597 (while (gnus-summary-search-forward) |
257 | 3598 (and (>= level (current-column)) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3599 (gnus-summary-hide-thread))) |
257 | 3600 )))) |
3601 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3602 (defun gnus-summary-hide-thread () |
257 | 3603 "Hide thread subtrees." |
3604 (interactive) | |
3605 (if gnus-show-threads | |
3606 (save-excursion | |
3607 ;; Adjust cursor point. | |
3608 (beginning-of-line) | |
3609 (search-forward ":" nil t) | |
3610 (let ((buffer-read-only nil) | |
3611 (init (point)) | |
3612 (last (point)) | |
3613 (level (current-column))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3614 (while (and (gnus-summary-search-forward) |
257 | 3615 (< level (current-column))) |
3616 ;; Interested in lower levels. | |
3617 (if (< level (current-column)) | |
3618 (progn | |
3619 (setq last (point)) | |
3620 )) | |
3621 ) | |
3622 (subst-char-in-region init last ?\n ?\^M t) | |
3623 )))) | |
3624 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3625 (defun gnus-summary-next-thread (n) |
257 | 3626 "Go to the same level next thread. |
3627 Argument N specifies the number of threads." | |
3628 (interactive "p") | |
3629 ;; Adjust cursor point. | |
3630 (beginning-of-line) | |
3631 (search-forward ":" nil t) | |
3632 (let ((init (point)) | |
3633 (last (point)) | |
3634 (level (current-column))) | |
3635 (while (and (> n 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3636 (gnus-summary-search-forward) |
257 | 3637 (<= level (current-column))) |
3638 ;; We have to skip lower levels. | |
3639 (if (= level (current-column)) | |
3640 (progn | |
3641 (setq last (point)) | |
3642 (setq n (1- n)) | |
3643 )) | |
3644 ) | |
3645 ;; Return non-nil if successfully move to the next. | |
3646 (prog1 (not (= init last)) | |
3647 (goto-char last)) | |
3648 )) | |
3649 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3650 (defun gnus-summary-prev-thread (n) |
257 | 3651 "Go to the same level previous thread. |
3652 Argument N specifies the number of threads." | |
3653 (interactive "p") | |
3654 ;; Adjust cursor point. | |
3655 (beginning-of-line) | |
3656 (search-forward ":" nil t) | |
3657 (let ((init (point)) | |
3658 (last (point)) | |
3659 (level (current-column))) | |
3660 (while (and (> n 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3661 (gnus-summary-search-backward) |
257 | 3662 (<= level (current-column))) |
3663 ;; We have to skip lower levels. | |
3664 (if (= level (current-column)) | |
3665 (progn | |
3666 (setq last (point)) | |
3667 (setq n (1- n)) | |
3668 )) | |
3669 ) | |
3670 ;; Return non-nil if successfully move to the previous. | |
3671 (prog1 (not (= init last)) | |
3672 (goto-char last)) | |
3673 )) | |
3674 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3675 (defun gnus-summary-down-thread (d) |
257 | 3676 "Go downward current thread. |
3677 Argument D specifies the depth goes down." | |
3678 (interactive "p") | |
3679 ;; Adjust cursor point. | |
3680 (beginning-of-line) | |
3681 (search-forward ":" nil t) | |
3682 (let ((last (point)) | |
3683 (level (current-column))) | |
3684 (while (and (> d 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3685 (gnus-summary-search-forward) |
257 | 3686 (<= level (current-column))) ;<= can be <. Which do you like? |
3687 ;; We have to skip the same levels. | |
3688 (if (< level (current-column)) | |
3689 (progn | |
3690 (setq last (point)) | |
3691 (setq level (current-column)) | |
3692 (setq d (1- d)) | |
3693 )) | |
3694 ) | |
3695 (goto-char last) | |
3696 )) | |
3697 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3698 (defun gnus-summary-up-thread (d) |
257 | 3699 "Go upward current thread. |
3700 Argument D specifies the depth goes up." | |
3701 (interactive "p") | |
3702 ;; Adjust cursor point. | |
3703 (beginning-of-line) | |
3704 (search-forward ":" nil t) | |
3705 (let ((last (point)) | |
3706 (level (current-column))) | |
3707 (while (and (> d 0) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3708 (gnus-summary-search-backward)) |
257 | 3709 ;; We have to skip the same levels. |
3710 (if (> level (current-column)) | |
3711 (progn | |
3712 (setq last (point)) | |
3713 (setq level (current-column)) | |
3714 (setq d (1- d)) | |
3715 )) | |
3716 ) | |
3717 (goto-char last) | |
3718 )) | |
3719 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3720 (defun gnus-summary-kill-thread (unmark) |
257 | 3721 "Mark articles under current thread as read. |
3722 If argument UNMARK is positive, remove any kinds of marks. | |
3723 If argument UNMARK is negative, mark articles as unread instead." | |
3724 (interactive "P") | |
3725 (if unmark | |
3726 (setq unmark (prefix-numeric-value unmark))) | |
3727 ;; Adjust cursor point. | |
3728 (beginning-of-line) | |
3729 (search-forward ":" nil t) | |
3730 (save-excursion | |
3731 (let ((level (current-column))) | |
3732 ;; Mark current article. | |
3733 (cond ((null unmark) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3734 (gnus-summary-mark-as-read nil "K")) |
257 | 3735 ((> unmark 0) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3736 (gnus-summary-mark-as-unread nil t)) |
257 | 3737 (t |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3738 (gnus-summary-mark-as-unread)) |
257 | 3739 ) |
3740 ;; Mark following articles. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3741 (while (and (gnus-summary-search-forward) |
257 | 3742 (< level (current-column))) |
3743 (cond ((null unmark) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3744 (gnus-summary-mark-as-read nil "K")) |
257 | 3745 ((> unmark 0) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3746 (gnus-summary-mark-as-unread nil t)) |
257 | 3747 (t |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3748 (gnus-summary-mark-as-unread)) |
257 | 3749 )) |
3750 )) | |
3751 ;; Hide killed subtrees. | |
3752 (and (null unmark) | |
3753 gnus-thread-hide-killed | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3754 (gnus-summary-hide-thread)) |
257 | 3755 ;; If marked as read, go to next unread subject. |
3756 (if (null unmark) | |
3757 ;; Go to next unread subject. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3758 (gnus-summary-next-subject 1 t)) |
257 | 3759 ) |
3760 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3761 (defun gnus-summary-toggle-truncation (arg) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3762 "Toggle truncation of summary lines. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3763 With arg, turn line truncation on iff arg is positive." |
257 | 3764 (interactive "P") |
3765 (setq truncate-lines | |
3766 (if (null arg) (not truncate-lines) | |
3767 (> (prefix-numeric-value arg) 0))) | |
3768 (redraw-display)) | |
3769 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3770 (defun gnus-summary-sort-by-number (reverse) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3771 "Sort Summary buffer by article number. |
257 | 3772 Argument REVERSE means reverse order." |
3773 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3774 (gnus-summary-keysort-summary |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3775 (function <) |
257 | 3776 (function |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3777 (lambda (a) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3778 (nntp-header-number a))) |
257 | 3779 reverse |
3780 )) | |
3781 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3782 (defun gnus-summary-sort-by-author (reverse) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3783 "Sort Summary buffer by author name alphabetically. |
257 | 3784 If case-fold-search is non-nil, case of letters is ignored. |
3785 Argument REVERSE means reverse order." | |
3786 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3787 (gnus-summary-keysort-summary |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3788 (function string-lessp) |
257 | 3789 (function |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3790 (lambda (a) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3791 (if case-fold-search |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3792 (downcase (nntp-header-from a)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3793 (nntp-header-from a)))) |
257 | 3794 reverse |
3795 )) | |
3796 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3797 (defun gnus-summary-sort-by-subject (reverse) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3798 "Sort Summary buffer by subject alphabetically. `Re:'s are ignored. |
257 | 3799 If case-fold-search is non-nil, case of letters is ignored. |
3800 Argument REVERSE means reverse order." | |
3801 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3802 (gnus-summary-keysort-summary |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3803 (function string-lessp) |
257 | 3804 (function |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3805 (lambda (a) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3806 (if case-fold-search |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3807 (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
|
3808 (gnus-simplify-subject (nntp-header-subject a) 're-only)))) |
257 | 3809 reverse |
3810 )) | |
3811 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3812 (defun gnus-summary-sort-by-date (reverse) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3813 "Sort Summary buffer by date. |
257 | 3814 Argument REVERSE means reverse order." |
3815 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3816 (gnus-summary-keysort-summary |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3817 (function string-lessp) |
257 | 3818 (function |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3819 (lambda (a) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3820 (gnus-sortable-date (nntp-header-date a)))) |
257 | 3821 reverse |
3822 )) | |
3823 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3824 (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
|
3825 "Sort Summary buffer by PREDICATE using a value passed by KEY. |
257 | 3826 Optional argument REVERSE means reverse order." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3827 (let ((current (gnus-summary-article-number))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3828 (gnus-keysort-headers predicate key reverse) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3829 (gnus-summary-prepare) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3830 (gnus-summary-goto-subject current) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3831 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3832 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3833 (defun gnus-summary-sort-summary (predicate &optional reverse) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3834 "Sort Summary buffer by PREDICATE. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3835 Optional argument REVERSE means reverse order." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3836 (let ((current (gnus-summary-article-number))) |
257 | 3837 (gnus-sort-headers predicate reverse) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3838 (gnus-summary-prepare) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3839 (gnus-summary-goto-subject current) |
257 | 3840 )) |
3841 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3842 (defun gnus-summary-reselect-current-group (show-all) |
257 | 3843 "Once exit and then reselect the current newsgroup. |
3844 Prefix argument SHOW-ALL means to select all articles." | |
3845 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3846 (let ((current-subject (gnus-summary-article-number))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3847 (gnus-summary-exit t) |
257 | 3848 ;; We have to adjust the point of Group mode buffer because the |
3849 ;; current point was moved to the next unread newsgroup by | |
3850 ;; exiting. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3851 (gnus-summary-jump-to-group gnus-newsgroup-name) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3852 (gnus-group-read-group show-all t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3853 (gnus-summary-goto-subject current-subject) |
257 | 3854 )) |
3855 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3856 (defun gnus-summary-caesar-message (rotnum) |
257 | 3857 "Caesar rotates all letters of current message by 13/47 places. |
3858 With prefix arg, specifies the number of places to rotate each letter forward. | |
3859 Caesar rotates Japanese letters by 47 places in any case." | |
3860 (interactive "P") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3861 (gnus-summary-select-article) |
257 | 3862 (gnus-overload-functions) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3863 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3864 (save-restriction |
3865 (widen) | |
3866 ;; We don't want to jump to the beginning of the message. | |
3867 ;; `save-excursion' does not do its job. | |
3868 (move-to-window-line 0) | |
3869 (let ((last (point))) | |
3870 (news-caesar-buffer-body rotnum) | |
3871 (goto-char last) | |
3872 (recenter 0) | |
3873 )) | |
3874 )) | |
3875 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3876 (defun gnus-summary-rmail-digest () |
257 | 3877 "Run RMAIL on current digest article. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3878 gnus-select-digest-hook will be called with no arguments, if that |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3879 value is non-nil. It is possible to modify the article so that Rmail |
257 | 3880 can work with it. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3881 gnus-rmail-digest-hook will be called with no arguments, if that value |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3882 is non-nil. The hook is intended to customize Rmail mode." |
257 | 3883 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3884 (gnus-summary-select-article) |
257 | 3885 (require 'rmail) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3886 (let ((artbuf gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3887 (digbuf (get-buffer-create gnus-digest-buffer)) |
257 | 3888 (mail-header-separator "")) |
3889 (set-buffer digbuf) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3890 (buffer-flush-undo (current-buffer)) |
257 | 3891 (setq buffer-read-only nil) |
3892 (erase-buffer) | |
3893 (insert-buffer-substring artbuf) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3894 (run-hooks 'gnus-select-digest-hook) |
257 | 3895 (gnus-convert-article-to-rmail) |
3896 (goto-char (point-min)) | |
3897 ;; Rmail initializations. | |
3898 (rmail-insert-rmail-file-header) | |
3899 (rmail-mode) | |
3900 (rmail-set-message-counters) | |
3901 (rmail-show-message) | |
3902 (condition-case () | |
3903 (progn | |
3904 (undigestify-rmail-message) | |
3905 (rmail-expunge) ;Delete original message. | |
3906 ;; File name is meaningless but `save-buffer' requires it. | |
3907 (setq buffer-file-name "GNUS Digest") | |
3908 (setq mode-line-buffer-identification | |
3909 (concat "Digest: " | |
3910 (nntp-header-subject gnus-current-headers))) | |
3911 ;; There is no need to write this buffer to a file. | |
3912 (make-local-variable 'write-file-hooks) | |
3913 (setq write-file-hooks | |
3914 (list (function | |
3915 (lambda () | |
3916 (set-buffer-modified-p nil) | |
3917 (message "(No changes need to be saved)") | |
3918 'no-need-to-write-this-buffer)))) | |
3919 ;; 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
|
3920 (setq rmail-default-rmail-file |
257 | 3921 (funcall gnus-rmail-save-name |
3922 gnus-newsgroup-name | |
3923 gnus-current-headers | |
3924 gnus-newsgroup-last-rmail | |
3925 )) | |
7560
e63efa2d587c
rmail-default-file renamed from rmail-last-file,
Richard M. Stallman <rms@gnu.org>
parents:
7524
diff
changeset
|
3926 (setq rmail-default-file |
257 | 3927 (funcall gnus-mail-save-name |
3928 gnus-newsgroup-name | |
3929 gnus-current-headers | |
3930 gnus-newsgroup-last-mail | |
3931 )) | |
3932 ;; Prevent generating new buffer named ***<N> each time. | |
3933 (setq rmail-summary-buffer | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3934 (get-buffer-create gnus-digest-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3935 (run-hooks 'gnus-rmail-digest-hook) |
257 | 3936 ;; Take all windows safely. |
3937 (gnus-configure-windows '(1 0 0)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3938 (pop-to-buffer gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3939 ;; Use Summary Article windows for Digest summary and |
257 | 3940 ;; Digest buffers. |
3941 (if gnus-digest-show-summary | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3942 (let ((gnus-summary-buffer gnus-digest-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3943 (gnus-article-buffer gnus-digest-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3944 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3945 (pop-to-buffer gnus-digest-buffer) |
257 | 3946 (rmail-summary) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3947 (pop-to-buffer gnus-digest-summary-buffer) |
257 | 3948 (message (substitute-command-keys |
3949 "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
|
3950 (let ((gnus-summary-buffer gnus-digest-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3951 (gnus-configure-windows 'summary) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3952 (pop-to-buffer gnus-digest-buffer) |
257 | 3953 (message (substitute-command-keys |
3954 "Type \\[rmail-quit] to return to GNUS"))) | |
3955 ) | |
3956 ;; 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
|
3957 (bury-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3958 (bury-buffer gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3959 (bury-buffer gnus-digest-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3960 (bury-buffer gnus-digest-buffer)) |
257 | 3961 (error (set-buffer-modified-p nil) |
3962 (kill-buffer digbuf) | |
3963 ;; This command should not signal an error because the | |
3964 ;; command is called from hooks. | |
3965 (ding) (message "Article is not a digest"))) | |
3966 )) | |
3967 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3968 (defun gnus-summary-save-article () |
257 | 3969 "Save this article using default saver function. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3970 The variable `gnus-default-article-saver' specifies the saver function." |
257 | 3971 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3972 (gnus-summary-select-article gnus-save-all-headers gnus-save-all-headers) |
257 | 3973 (if gnus-default-article-saver |
3974 (call-interactively gnus-default-article-saver) | |
3975 (error "No default saver is defined."))) | |
3976 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3977 (defun gnus-summary-save-in-rmail (&optional filename) |
257 | 3978 "Append this article to Rmail file. |
3979 Optional argument FILENAME specifies file name. | |
3980 Directory to save to is default to `gnus-article-save-directory' which | |
3981 is initialized from the SAVEDIR environment variable." | |
3982 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
3983 (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
|
3984 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 3985 (save-excursion |
3986 (save-restriction | |
3987 (widen) | |
3988 (let ((default-name | |
3989 (funcall gnus-rmail-save-name | |
3990 gnus-newsgroup-name | |
3991 gnus-current-headers | |
3992 gnus-newsgroup-last-rmail | |
3993 ))) | |
3994 (or filename | |
3995 (setq filename | |
3996 (read-file-name | |
3997 (concat "Save article in Rmail file: (default " | |
3998 (file-name-nondirectory default-name) | |
3999 ") ") | |
4000 (file-name-directory default-name) | |
4001 default-name))) | |
4002 (gnus-make-directory (file-name-directory filename)) | |
4003 (gnus-output-to-rmail filename) | |
4004 ;; Remember the directory name to save articles. | |
4005 (setq gnus-newsgroup-last-rmail filename) | |
4006 ))) | |
4007 )) | |
4008 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4009 (defun gnus-summary-save-in-mail (&optional filename) |
257 | 4010 "Append this article to Unix mail file. |
4011 Optional argument FILENAME specifies file name. | |
4012 Directory to save to is default to `gnus-article-save-directory' which | |
4013 is initialized from the SAVEDIR environment variable." | |
4014 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4015 (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
|
4016 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 4017 (save-excursion |
4018 (save-restriction | |
4019 (widen) | |
4020 (let ((default-name | |
4021 (funcall gnus-mail-save-name | |
4022 gnus-newsgroup-name | |
4023 gnus-current-headers | |
4024 gnus-newsgroup-last-mail | |
4025 ))) | |
4026 (or filename | |
4027 (setq filename | |
4028 (read-file-name | |
4029 (concat "Save article in Unix mail file: (default " | |
4030 (file-name-nondirectory default-name) | |
4031 ") ") | |
4032 (file-name-directory default-name) | |
4033 default-name))) | |
5052
b605cd28d596
(gnus-summary-save-in-mail): Don't use rmail-output.
Richard M. Stallman <rms@gnu.org>
parents:
5012
diff
changeset
|
4034 (setq filename |
b605cd28d596
(gnus-summary-save-in-mail): Don't use rmail-output.
Richard M. Stallman <rms@gnu.org>
parents:
5012
diff
changeset
|
4035 (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
|
4036 (and default-name |
b605cd28d596
(gnus-summary-save-in-mail): Don't use rmail-output.
Richard M. Stallman <rms@gnu.org>
parents:
5012
diff
changeset
|
4037 (file-name-directory default-name)))) |
257 | 4038 (gnus-make-directory (file-name-directory filename)) |
5052
b605cd28d596
(gnus-summary-save-in-mail): Don't use rmail-output.
Richard M. Stallman <rms@gnu.org>
parents:
5012
diff
changeset
|
4039 (if (and (file-readable-p filename) (rmail-file-p filename)) |
b605cd28d596
(gnus-summary-save-in-mail): Don't use rmail-output.
Richard M. Stallman <rms@gnu.org>
parents:
5012
diff
changeset
|
4040 (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
|
4041 (rmail-output filename 1 t t)) |
257 | 4042 ;; Remember the directory name to save articles. |
4043 (setq gnus-newsgroup-last-mail filename) | |
4044 ))) | |
4045 )) | |
4046 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4047 (defun gnus-summary-save-in-file (&optional filename) |
257 | 4048 "Append this article to file. |
4049 Optional argument FILENAME specifies file name. | |
4050 Directory to save to is default to `gnus-article-save-directory' which | |
4051 is initialized from the SAVEDIR environment variable." | |
4052 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4053 (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
|
4054 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 4055 (save-excursion |
4056 (save-restriction | |
4057 (widen) | |
4058 (let ((default-name | |
4059 (funcall gnus-file-save-name | |
4060 gnus-newsgroup-name | |
4061 gnus-current-headers | |
4062 gnus-newsgroup-last-file | |
4063 ))) | |
4064 (or filename | |
4065 (setq filename | |
4066 (read-file-name | |
4067 (concat "Save article in file: (default " | |
4068 (file-name-nondirectory default-name) | |
4069 ") ") | |
4070 (file-name-directory default-name) | |
4071 default-name))) | |
4072 (gnus-make-directory (file-name-directory filename)) | |
4073 (gnus-output-to-file filename) | |
4074 ;; Remember the directory name to save articles. | |
4075 (setq gnus-newsgroup-last-file filename) | |
4076 ))) | |
4077 )) | |
4078 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4079 (defun gnus-summary-save-in-folder (&optional folder) |
257 | 4080 "Save this article to MH folder (using `rcvstore' in MH library). |
4081 Optional argument FOLDER specifies folder name." | |
4082 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4083 (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
|
4084 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 4085 (save-restriction |
4086 (widen) | |
4087 ;; Thanks to yuki@flab.Fujitsu.JUNET and ohm@kaba.junet. | |
4088 (mh-find-path) | |
4089 (let ((folder | |
4090 (or folder | |
4091 (mh-prompt-for-folder "Save article in" | |
4092 (funcall gnus-folder-save-name | |
4093 gnus-newsgroup-name | |
4094 gnus-current-headers | |
4095 gnus-newsgroup-last-folder | |
4096 ) | |
4097 t | |
4098 ))) | |
4099 (errbuf (get-buffer-create " *GNUS rcvstore*"))) | |
4100 (unwind-protect | |
4101 (call-process-region (point-min) (point-max) | |
4102 (expand-file-name "rcvstore" mh-lib) | |
4103 nil errbuf nil folder) | |
4104 (set-buffer errbuf) | |
4105 (if (zerop (buffer-size)) | |
4106 (message "Article saved in folder: %s" folder) | |
4107 (message "%s" (buffer-string))) | |
4108 (kill-buffer errbuf) | |
4109 (setq gnus-newsgroup-last-folder folder)) | |
4110 )) | |
4111 )) | |
4112 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4113 (defun gnus-summary-pipe-output () |
257 | 4114 "Pipe this article to subprocess." |
4115 (interactive) | |
4116 ;; 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
|
4117 ;;(gnus-summary-select-article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4118 ;; Huuum. Is this right? |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4119 (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
|
4120 (gnus-eval-in-buffer-window gnus-article-buffer |
257 | 4121 (save-restriction |
4122 (widen) | |
4123 (let ((command (read-string "Shell command on article: " | |
4124 gnus-last-shell-command))) | |
4125 (if (string-equal command "") | |
4126 (setq command gnus-last-shell-command)) | |
4127 (shell-command-on-region (point-min) (point-max) command nil) | |
4128 (setq gnus-last-shell-command command) | |
4129 )) | |
4130 )) | |
4131 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4132 (defun gnus-summary-catchup (all &optional quietly) |
257 | 4133 "Mark all articles not marked as unread in this newsgroup as read. |
4134 If prefix argument ALL is non-nil, all articles are marked as read." | |
4135 (interactive "P") | |
4136 (if (or quietly | |
7705
b10cc49f6c37
(gnus-summary-catchup): Check gnus-interactive-catchup.
Richard M. Stallman <rms@gnu.org>
parents:
7639
diff
changeset
|
4137 (not gnus-interactive-catchup) ;Without confirmation? |
257 | 4138 (y-or-n-p |
4139 (if all | |
4140 "Do you really want to mark everything as read? " | |
4141 "Delete all articles not marked as unread? "))) | |
4142 (let ((unmarked | |
4143 (gnus-set-difference gnus-newsgroup-unreads | |
4144 (if (not all) gnus-newsgroup-marked)))) | |
4145 (message "") ;Erase "Yes or No" question. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4146 ;; Hidden thread subtrees must be searched for ,too. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4147 (gnus-summary-show-all-threads) |
257 | 4148 (while unmarked |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4149 (gnus-summary-mark-as-read (car unmarked) "C") |
257 | 4150 (setq unmarked (cdr unmarked)) |
4151 )) | |
4152 )) | |
4153 | |
8046
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
4154 (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
|
4155 "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
|
4156 (interactive) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
4157 (beginning-of-line) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
4158 (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
|
4159 (beginning-of-buffer) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
4160 (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
|
4161 (gnus-summary-mark-as-read) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
4162 (gnus-summary-next-subject 1)))) |
4fca34ed47e4
(gnus-summary-mode-map): Add menu bar menus.
Richard M. Stallman <rms@gnu.org>
parents:
7974
diff
changeset
|
4163 |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4164 (defun gnus-summary-catchup-all (&optional quietly) |
257 | 4165 "Mark all articles in this newsgroup as read." |
4166 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4167 (gnus-summary-catchup t quietly)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4168 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4169 (defun gnus-summary-catchup-and-exit (all &optional quietly) |
257 | 4170 "Mark all articles not marked as unread in this newsgroup as read, then exit. |
4171 If prefix argument ALL is non-nil, all articles are marked as read." | |
4172 (interactive "P") | |
4173 (if (or quietly | |
7705
b10cc49f6c37
(gnus-summary-catchup): Check gnus-interactive-catchup.
Richard M. Stallman <rms@gnu.org>
parents:
7639
diff
changeset
|
4174 (not gnus-interactive-catchup) ;Without confirmation? |
257 | 4175 (y-or-n-p |
4176 (if all | |
4177 "Do you really want to mark everything as read? " | |
4178 "Delete all articles not marked as unread? "))) | |
4179 (let ((unmarked | |
4180 (gnus-set-difference gnus-newsgroup-unreads | |
4181 (if (not all) gnus-newsgroup-marked)))) | |
4182 (message "") ;Erase "Yes or No" question. | |
4183 (while unmarked | |
4184 (gnus-mark-article-as-read (car unmarked)) | |
4185 (setq unmarked (cdr unmarked))) | |
4186 ;; Select next newsgroup or exit. | |
4187 (cond ((eq gnus-auto-select-next 'quietly) | |
4188 ;; Select next newsgroup quietly. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4189 (gnus-summary-next-group nil)) |
257 | 4190 (t |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4191 (gnus-summary-exit))) |
257 | 4192 ))) |
4193 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4194 (defun gnus-summary-catchup-all-and-exit (&optional quietly) |
257 | 4195 "Mark all articles in this newsgroup as read, and then exit." |
4196 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4197 (gnus-summary-catchup-and-exit t quietly)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4198 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4199 (defun gnus-summary-edit-global-kill () |
257 | 4200 "Edit a global KILL file." |
4201 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4202 (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
|
4203 (gnus-kill-file-edit-file nil) ;Nil stands for global KILL file. |
257 | 4204 (message |
4205 (substitute-command-keys | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4206 "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
|
4207 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4208 (defun gnus-summary-edit-local-kill () |
257 | 4209 "Edit a local KILL file applied to the current newsgroup." |
4210 (interactive) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4211 (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
|
4212 (gnus-kill-file-edit-file gnus-newsgroup-name) |
257 | 4213 (message |
4214 (substitute-command-keys | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4215 "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
|
4216 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4217 (defun gnus-summary-exit (&optional temporary) |
257 | 4218 "Exit reading current newsgroup, and then return to group selection mode. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4219 gnus-exit-group-hook is called with no arguments if that value is non-nil." |
257 | 4220 (interactive) |
4221 (let ((updated nil) | |
4222 (gnus-newsgroup-headers gnus-newsgroup-headers) | |
4223 (gnus-newsgroup-unreads gnus-newsgroup-unreads) | |
4224 (gnus-newsgroup-unselected gnus-newsgroup-unselected) | |
4225 (gnus-newsgroup-marked gnus-newsgroup-marked)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4226 ;; 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
|
4227 ;; Summary buffer even if hook changes them. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4228 (run-hooks 'gnus-exit-group-hook) |
257 | 4229 (gnus-update-unread-articles gnus-newsgroup-name |
4230 (append gnus-newsgroup-unselected | |
4231 gnus-newsgroup-unreads) | |
4232 gnus-newsgroup-marked) | |
4233 ;; T means ignore unsubscribed newsgroups. | |
4234 (if gnus-use-cross-reference | |
4235 (setq updated | |
4236 (gnus-mark-as-read-by-xref gnus-newsgroup-name | |
4237 gnus-newsgroup-headers | |
4238 gnus-newsgroup-unreads | |
4239 (eq gnus-use-cross-reference t) | |
4240 ))) | |
4241 ;; 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
|
4242 (set-buffer gnus-group-buffer) |
257 | 4243 ;; Update cross referenced group info. |
4244 (while updated | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4245 (gnus-group-update-group (car updated) t) ;Ignore invisible group. |
257 | 4246 (setq updated (cdr updated))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4247 (gnus-group-update-group gnus-newsgroup-name)) |
257 | 4248 ;; 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
|
4249 (gnus-group-jump-to-group gnus-newsgroup-name) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4250 (gnus-group-next-unread-group 1) |
257 | 4251 (if temporary |
4252 ;; If exiting temporary, caller should adjust Group mode | |
4253 ;; buffer point by itself. | |
4254 nil ;Nothing to do. | |
4255 ;; Return to Group mode buffer. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4256 (if (get-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4257 (bury-buffer gnus-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4258 (if (get-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4259 (bury-buffer gnus-article-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4260 (gnus-configure-windows 'newsgroups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4261 (pop-to-buffer gnus-group-buffer))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4262 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4263 (defun gnus-summary-quit () |
257 | 4264 "Quit reading current newsgroup without updating read article info." |
4265 (interactive) | |
4266 (if (y-or-n-p "Do you really wanna quit reading this group? ") | |
4267 (progn | |
4268 (message "") ;Erase "Yes or No" question. | |
4269 ;; Return to Group selection mode. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4270 (if (get-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4271 (bury-buffer gnus-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4272 (if (get-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4273 (bury-buffer gnus-article-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4274 (gnus-configure-windows 'newsgroups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4275 (pop-to-buffer gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4276 (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
|
4277 (gnus-group-next-group 1) ;(gnus-group-next-unread-group 1) |
257 | 4278 ))) |
4279 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4280 (defun gnus-summary-describe-briefly () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4281 "Describe Summary mode commands briefly." |
257 | 4282 (interactive) |
4283 (message | |
4284 (concat | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4285 (substitute-command-keys "\\[gnus-summary-next-page]:Select ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4286 (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
|
4287 (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
|
4288 (substitute-command-keys "\\[gnus-summary-exit]:Exit ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4289 (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
|
4290 (substitute-command-keys "\\[gnus-summary-describe-briefly]:This help") |
257 | 4291 ))) |
4292 | |
4293 | |
4294 ;;; | |
4295 ;;; GNUS Article Mode | |
4296 ;;; | |
4297 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4298 (if gnus-article-mode-map |
257 | 4299 nil |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4300 (setq gnus-article-mode-map (make-keymap)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4301 (suppress-keymap gnus-article-mode-map) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4302 (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
|
4303 (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
|
4304 (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
|
4305 (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
|
4306 (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
|
4307 (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
|
4308 (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
|
4309 (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
|
4310 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4311 (defun gnus-article-mode () |
257 | 4312 "Major mode for browsing through an article. |
4313 All normal editing commands are turned off. | |
4314 Instead, these commands are available: | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4315 \\{gnus-article-mode-map} |
257 | 4316 |
4317 Various hooks for customization: | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4318 gnus-article-mode-hook |
257 | 4319 Entry to this mode calls the value with no arguments, if that |
4320 value is non-nil. | |
4321 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4322 gnus-article-prepare-hook |
257 | 4323 Called with no arguments after an article is prepared for reading, |
4324 if that value is non-nil." | |
4325 (interactive) | |
4326 (kill-all-local-variables) | |
4327 ;; Gee. Why don't you upgrade? | |
4328 (cond ((boundp 'mode-line-modified) | |
4329 (setq mode-line-modified "--- ")) | |
4330 ((listp (default-value 'mode-line-format)) | |
4331 (setq mode-line-format | |
4332 (cons "--- " (cdr (default-value 'mode-line-format)))))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4333 ;; To disable display-time facility. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4334 ;;(make-local-variable 'global-mode-string) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4335 ;;(setq global-mode-string nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4336 (setq major-mode 'gnus-article-mode) |
257 | 4337 (setq mode-name "Article") |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4338 (make-local-variable 'minor-mode-alist) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4339 (or (assq 'gnus-show-mime minor-mode-alist) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4340 (setq minor-mode-alist |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4341 (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
|
4342 (gnus-article-set-mode-line) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4343 (use-local-map gnus-article-mode-map) |
257 | 4344 (make-local-variable 'page-delimiter) |
4345 (setq page-delimiter gnus-page-delimiter) | |
4346 (make-local-variable 'mail-header-separator) | |
4347 (setq mail-header-separator "") ;For caesar function. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4348 (buffer-flush-undo (current-buffer)) |
257 | 4349 (setq buffer-read-only t) ;Disable modification |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4350 (run-hooks 'gnus-article-mode-hook)) |
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-setup-buffer () |
257 | 4353 "Initialize Article mode buffer." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4354 (or (get-buffer gnus-article-buffer) |
257 | 4355 (save-excursion |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4356 (set-buffer (get-buffer-create gnus-article-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4357 (gnus-article-mode)) |
257 | 4358 )) |
4359 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4360 (defun gnus-article-prepare (article &optional all-headers) |
257 | 4361 "Prepare ARTICLE in Article mode buffer. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4362 ARTICLE can be either a article number or Message-ID. |
257 | 4363 If optional argument ALL-HEADERS is non-nil, all headers are inserted." |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4364 ;; 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
|
4365 (if (not (gnus-server-opened)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4366 (progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4367 (gnus-start-news-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4368 (gnus-request-group gnus-newsgroup-name))) |
257 | 4369 (save-excursion |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4370 (set-buffer gnus-article-buffer) |
257 | 4371 (let ((buffer-read-only nil)) |
4372 (erase-buffer) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4373 ;; 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
|
4374 ;; 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
|
4375 ;; nnspool too. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4376 ;; 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
|
4377 ;; 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
|
4378 ;; in the following. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4379 (if (let* ((header |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4380 (and (stringp article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4381 (gnus-get-header-by-id article))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4382 (article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4383 (if header |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4384 (nntp-header-number header) article))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4385 (gnus-request-article article)) |
257 | 4386 (progn |
4387 ;; Prepare article buffer | |
4388 (insert-buffer-substring nntp-server-buffer) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4389 ;; 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
|
4390 (setq gnus-have-all-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4391 (not (not (or all-headers gnus-show-all-headers)))) |
257 | 4392 (if (and (numberp article) |
4393 (not (eq article gnus-current-article))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4394 ;; Seems me that a new article has been selected. |
257 | 4395 (progn |
4396 ;; gnus-current-article must be an article number. | |
4397 (setq gnus-last-article gnus-current-article) | |
4398 (setq gnus-current-article article) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4399 ;; (setq gnus-current-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4400 ;; (gnus-find-header-by-number gnus-newsgroup-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4401 ;; gnus-current-article)) |
257 | 4402 (setq gnus-current-headers |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4403 (gnus-get-header-by-number gnus-current-article)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4404 (run-hooks 'gnus-mark-article-hook) |
257 | 4405 )) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4406 ;; Clear article history only when the article is |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4407 ;; retrieved by the article number. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4408 (if (numberp article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4409 (setq gnus-current-history nil)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4410 ;; Hooks for modifying contents of the article. This hook |
257 | 4411 ;; must be called before being narrowed. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4412 (run-hooks 'gnus-article-prepare-hook) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4413 ;; Decode MIME message. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4414 (if (and gnus-show-mime |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4415 (gnus-fetch-field "Mime-Version")) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4416 (funcall gnus-show-mime-method)) |
257 | 4417 ;; Delete unnecessary headers. |
4418 (or gnus-have-all-headers | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4419 (gnus-article-delete-headers)) |
257 | 4420 ;; Do page break. |
4421 (goto-char (point-min)) | |
4422 (if gnus-break-pages | |
4423 (gnus-narrow-to-page)) | |
4424 ;; Next function must be called after setting | |
4425 ;; `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
|
4426 (gnus-article-set-mode-line) |
257 | 4427 ) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4428 ;; There is no such article. |
257 | 4429 (if (numberp article) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4430 (gnus-summary-mark-as-read article)) |
257 | 4431 (ding) (message "No such article (may be canceled)")) |
4432 ))) | |
4433 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4434 (defun gnus-article-show-all-headers () |
257 | 4435 "Show all article headers in Article mode buffer." |
4436 (or gnus-have-all-headers | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4437 (gnus-article-prepare gnus-current-article t))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4438 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4439 ;;(defun gnus-article-set-mode-line () |
257 | 4440 ;; "Set Article mode line string." |
4441 ;; (setq mode-line-buffer-identification | |
4442 ;; (list 17 | |
4443 ;; (format "GNUS: %s {%d-%d} %d" | |
4444 ;; gnus-newsgroup-name | |
4445 ;; gnus-newsgroup-begin | |
4446 ;; gnus-newsgroup-end | |
4447 ;; gnus-current-article | |
4448 ;; ))) | |
4449 ;; (set-buffer-modified-p t)) | |
4450 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4451 ;;(defun gnus-article-set-mode-line () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4452 ;; "Set Article mode line string." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4453 ;; (let ((unmarked |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4454 ;; (- (length gnus-newsgroup-unreads) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4455 ;; (length (gnus-intersection |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4456 ;; gnus-newsgroup-unreads gnus-newsgroup-marked)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4457 ;; (unselected |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4458 ;; (- (length gnus-newsgroup-unselected) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4459 ;; (length (gnus-intersection |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4460 ;; gnus-newsgroup-unselected gnus-newsgroup-marked))))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4461 ;; (setq mode-line-buffer-identification |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4462 ;; (list 17 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4463 ;; (format "GNUS: %s{%d} %s" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4464 ;; gnus-newsgroup-name |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4465 ;; gnus-current-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4466 ;; ;; This is proposed by tale@pawl.rpi.edu. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4467 ;; (cond ((and (zerop unmarked) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4468 ;; (zerop unselected)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4469 ;; " ") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4470 ;; ((zerop unselected) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4471 ;; (format "%d more" unmarked)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4472 ;; (t |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4473 ;; (format "%d(+%d) more" unmarked unselected))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4474 ;; )))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4475 ;; (set-buffer-modified-p t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4476 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4477 ;; New implementation in gnus 3.14.3 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4478 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4479 (defun gnus-article-set-mode-line () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4480 "Set Article mode line string. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4481 If you don't like it, define your own gnus-article-set-mode-line." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4482 (let ((maxlen 15) ;Maximum subject length |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4483 (subject |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4484 (if gnus-current-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4485 (nntp-header-subject gnus-current-headers) ""))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4486 ;; The value must be a string to escape %-constructs because of subject. |
257 | 4487 (setq mode-line-buffer-identification |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4488 (format "GNUS: %s%s %s%s%s" |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4489 gnus-newsgroup-name |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4490 (if gnus-current-article |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4491 (format "/%d" gnus-current-article) "") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4492 (substring subject 0 (min (length subject) maxlen)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4493 (if (> (length subject) maxlen) "..." "") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4494 (make-string (max 0 (- 17 (length subject))) ? ) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4495 ))) |
257 | 4496 (set-buffer-modified-p t)) |
4497 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4498 (defun gnus-article-delete-headers () |
257 | 4499 "Delete unnecessary headers." |
4500 (save-excursion | |
4501 (save-restriction | |
4502 (goto-char (point-min)) | |
4503 (narrow-to-region (point-min) | |
4504 (progn (search-forward "\n\n" nil 'move) (point))) | |
4505 (goto-char (point-min)) | |
4506 (and (stringp gnus-ignored-headers) | |
4507 (while (re-search-forward gnus-ignored-headers nil t) | |
4508 (beginning-of-line) | |
4509 (delete-region (point) | |
4510 (progn (re-search-forward "\n[^ \t]") | |
4511 (forward-char -1) | |
4512 (point))))) | |
4513 ))) | |
4514 | |
4515 ;; Working on article's buffer | |
4516 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4517 (defun gnus-article-next-page (lines) |
257 | 4518 "Show next page of current article. |
4519 If end of article, return non-nil. Otherwise return nil. | |
4520 Argument LINES specifies lines to be scrolled up." | |
4521 (interactive "P") | |
4522 (move-to-window-line -1) | |
4523 ;; Fixed by enami@ptgd.sony.co.jp (enami tsugutomo) | |
4524 (if (save-excursion | |
4525 (end-of-line) | |
4526 (and (pos-visible-in-window-p) ;Not continuation line. | |
4527 (eobp))) | |
4528 ;; Nothing in this page. | |
4529 (if (or (not gnus-break-pages) | |
4530 (save-excursion | |
4531 (save-restriction | |
4532 (widen) (forward-line 1) (eobp)))) ;Real end-of-buffer? | |
4533 t ;Nothing more. | |
4534 (gnus-narrow-to-page 1) ;Go to next page. | |
4535 nil | |
4536 ) | |
4537 ;; More in this page. | |
4538 (condition-case () | |
4539 (scroll-up lines) | |
4540 (end-of-buffer | |
4541 ;; Long lines may cause an end-of-buffer error. | |
4542 (goto-char (point-max)))) | |
4543 nil | |
4544 )) | |
4545 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4546 (defun gnus-article-prev-page (lines) |
257 | 4547 "Show previous page of current article. |
4548 Argument LINES specifies lines to be scrolled down." | |
4549 (interactive "P") | |
4550 (move-to-window-line 0) | |
4551 (if (and gnus-break-pages | |
4552 (bobp) | |
4553 (not (save-restriction (widen) (bobp)))) ;Real beginning-of-buffer? | |
4554 (progn | |
4555 (gnus-narrow-to-page -1) ;Go to previous page. | |
4556 (goto-char (point-max)) | |
4557 (recenter -1)) | |
4558 (scroll-down lines))) | |
4559 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4560 (defun gnus-article-next-digest (nth) |
257 | 4561 "Move to head of NTH next digested message. |
4562 Set mark at end of digested message." | |
4563 ;; Stop page breaking in digest mode. | |
4564 (widen) | |
4565 (end-of-line) | |
4566 ;; Skip NTH - 1 digest. | |
4567 ;; Suggested by Khalid Sattar <admin@cs.exeter.ac.uk>. | |
4568 ;; Digest separator is customizable. | |
4569 ;; Suggested by Skip Montanaro <montanaro@sprite.crd.ge.com>. | |
4570 (while (and (> nth 1) | |
4571 (re-search-forward gnus-digest-separator nil 'move)) | |
4572 (setq nth (1- nth))) | |
4573 (if (re-search-forward gnus-digest-separator nil t) | |
4574 (let ((begin (point))) | |
4575 ;; Search for end of this message. | |
4576 (end-of-line) | |
4577 (if (re-search-forward gnus-digest-separator nil t) | |
4578 (progn | |
4579 (search-backward "\n\n") ;This may be incorrect. | |
4580 (forward-line 1)) | |
4581 (goto-char (point-max))) | |
4582 (push-mark) ;Set mark at end of digested message. | |
4583 (goto-char begin) | |
4584 (beginning-of-line) | |
4585 ;; Show From: and Subject: fields. | |
4586 (recenter 1)) | |
4587 (message "End of message") | |
4588 )) | |
4589 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4590 (defun gnus-article-prev-digest (nth) |
257 | 4591 "Move to head of NTH previous digested message." |
4592 ;; Stop page breaking in digest mode. | |
4593 (widen) | |
4594 (beginning-of-line) | |
4595 ;; Skip NTH - 1 digest. | |
4596 ;; Suggested by Khalid Sattar <admin@cs.exeter.ac.uk>. | |
4597 ;; Digest separator is customizable. | |
4598 ;; Suggested by Skip Montanaro <montanaro@sprite.crd.ge.com>. | |
4599 (while (and (> nth 1) | |
4600 (re-search-backward gnus-digest-separator nil 'move)) | |
4601 (setq nth (1- nth))) | |
4602 (if (re-search-backward gnus-digest-separator nil t) | |
4603 (let ((begin (point))) | |
4604 ;; Search for end of this message. | |
4605 (end-of-line) | |
4606 (if (re-search-forward gnus-digest-separator nil t) | |
4607 (progn | |
4608 (search-backward "\n\n") ;This may be incorrect. | |
4609 (forward-line 1)) | |
4610 (goto-char (point-max))) | |
4611 (push-mark) ;Set mark at end of digested message. | |
4612 (goto-char begin) | |
4613 ;; Show From: and Subject: fields. | |
4614 (recenter 1)) | |
4615 (goto-char (point-min)) | |
4616 (message "Top of message") | |
4617 )) | |
4618 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4619 (defun gnus-article-refer-article () |
257 | 4620 "Read article specified by message-id around point." |
4621 (interactive) | |
4622 (save-window-excursion | |
4623 (save-excursion | |
4624 (re-search-forward ">" nil t) ;Move point to end of "<....>". | |
4625 (if (re-search-backward "\\(<[^<> \t\n]+>\\)" nil t) | |
4626 (let ((message-id | |
4627 (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
|
4628 (set-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4629 (gnus-summary-refer-article message-id)) |
257 | 4630 (error "No references around point")) |
4631 ))) | |
4632 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4633 (defun gnus-article-pop-article () |
257 | 4634 "Pop up article history." |
4635 (interactive) | |
4636 (save-window-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4637 (set-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4638 (gnus-summary-refer-article nil))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4639 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4640 (defun gnus-article-show-summary () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4641 "Reconfigure windows to show Summary buffer." |
257 | 4642 (interactive) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4643 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4644 (pop-to-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4645 (gnus-summary-goto-subject gnus-current-article)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4646 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4647 (defun gnus-article-describe-briefly () |
257 | 4648 "Describe Article mode commands briefly." |
4649 (interactive) | |
4650 (message | |
4651 (concat | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4652 (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
|
4653 (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
|
4654 (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
|
4655 (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
|
4656 (substitute-command-keys "\\[gnus-article-describe-briefly]:This help") |
257 | 4657 ))) |
4658 | |
4659 | |
4660 ;;; | |
4661 ;;; GNUS KILL-File Mode | |
4662 ;;; | |
4663 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4664 (if gnus-kill-file-mode-map |
257 | 4665 nil |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4666 (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
|
4667 (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
|
4668 (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
|
4669 (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
|
4670 (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
|
4671 (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
|
4672 (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
|
4673 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4674 (defun gnus-kill-file-mode () |
257 | 4675 "Major mode for editing KILL file. |
4676 | |
4677 In addition to Emacs-Lisp Mode, the following commands are available: | |
4678 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4679 \\[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
|
4680 \\[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
|
4681 \\[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
|
4682 \\[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
|
4683 \\[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
|
4684 \\[gnus-info-find-node] Read Info about KILL file. |
257 | 4685 |
8444 | 4686 A KILL file contains Lisp expressions to be applied to a selected |
4687 newsgroup. The purpose is to mark articles as read on the basis of | |
4688 some set of regexps. A global KILL file is applied to every newsgroup, | |
4689 and a local KILL file is applied to a specified newsgroup. Since a | |
257 | 4690 global KILL file is applied to every newsgroup, for better performance |
4691 use a local one. | |
4692 | |
8444 | 4693 A KILL file can contain any kind of Emacs Lisp expressions expected |
4694 to be evaluated in the Summary buffer. Writing Lisp programs for this | |
257 | 4695 purpose is not so easy because the internal working of GNUS must be |
8444 | 4696 well-known. For this reason, GNUS provides a general function which |
257 | 4697 does this easily for non-Lisp programmers. |
4698 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4699 The `gnus-kill' function executes commands available in Summary Mode |
257 | 4700 by their key sequences. `gnus-kill' should be called with FIELD, |
8444 | 4701 REGEXP and optional COMMAND and ALL. FIELD is a string representing |
4702 the header field or an empty string. If FIELD is an empty string, the | |
4703 entire article body is searched for. REGEXP is a string which is | |
257 | 4704 compared with FIELD value. COMMAND is a string representing a valid |
8444 | 4705 key sequence in Summary mode or Lisp expression. COMMAND defaults to |
4706 '(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
|
4707 executed in the Summary buffer. If the second optional argument ALL |
257 | 4708 is non-nil, the COMMAND is applied to articles which are already |
4709 marked as read or unread. Articles which are marked are skipped over | |
4710 by default. | |
4711 | |
4712 For example, if you want to mark articles of which subjects contain | |
4713 the string `AI' as read, a possible KILL file may look like: | |
4714 | |
4715 (gnus-kill \"Subject\" \"AI\") | |
4716 | |
4717 If you want to mark articles with `D' instead of `X', you can use | |
4718 the following expression: | |
4719 | |
4720 (gnus-kill \"Subject\" \"AI\" \"d\") | |
4721 | |
4722 In this example it is assumed that the command | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4723 `gnus-summary-mark-as-read-forward' is assigned to `d' in Summary Mode. |
257 | 4724 |
4725 It is possible to delete unnecessary headers which are marked with | |
4726 `X' in a KILL file as follows: | |
4727 | |
4728 (gnus-expunge \"X\") | |
4729 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4730 If the Summary buffer is empty after applying KILL files, GNUS will |
257 | 4731 exit the selected newsgroup normally. If headers which are marked |
4732 with `D' are deleted in a KILL file, it is impossible to read articles | |
4733 which are marked as read in the previous GNUS sessions. Marks other | |
4734 than `D' should be used for articles which should really be deleted. | |
4735 | |
4736 Entry to this mode calls emacs-lisp-mode-hook and | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4737 gnus-kill-file-mode-hook with no arguments, if that value is non-nil." |
257 | 4738 (interactive) |
4739 (kill-all-local-variables) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4740 (use-local-map gnus-kill-file-mode-map) |
257 | 4741 (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
|
4742 (setq major-mode 'gnus-kill-file-mode) |
257 | 4743 (setq mode-name "KILL-File") |
4744 (lisp-mode-variables nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4745 (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
|
4746 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4747 (defun gnus-kill-file-edit-file (newsgroup) |
257 | 4748 "Begin editing a KILL file of NEWSGROUP. |
4749 If NEWSGROUP is nil, the global KILL file is selected." | |
4750 (interactive "sNewsgroup: ") | |
4751 (let ((file (gnus-newsgroup-kill-file newsgroup))) | |
4752 (gnus-make-directory (file-name-directory file)) | |
4753 ;; Save current window configuration if this is first invocation. | |
4754 (or (and (get-file-buffer file) | |
4755 (get-buffer-window (get-file-buffer file))) | |
4756 (setq gnus-winconf-kill-file (current-window-configuration))) | |
4757 ;; Hack windows. | |
4758 (let ((buffer (find-file-noselect file))) | |
4759 (cond ((get-buffer-window buffer) | |
4760 (pop-to-buffer buffer)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4761 ((eq major-mode 'gnus-group-mode) |
257 | 4762 (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
|
4763 (pop-to-buffer gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4764 (let ((gnus-summary-buffer buffer)) |
257 | 4765 (gnus-configure-windows '(1 1 0)) ;Split into two. |
4766 (pop-to-buffer buffer))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4767 ((eq major-mode 'gnus-summary-mode) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4768 (gnus-configure-windows 'article) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4769 (pop-to-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4770 (bury-buffer gnus-article-buffer) |
257 | 4771 (switch-to-buffer buffer)) |
4772 (t ;No good rules. | |
4773 (find-file-other-window file)) | |
4774 )) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4775 (gnus-kill-file-mode) |
257 | 4776 )) |
4777 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4778 (defun gnus-kill-file-kill-by-subject () |
257 | 4779 "Insert KILL command for current subject." |
4780 (interactive) | |
4781 (insert | |
4782 (format "(gnus-kill \"Subject\" %s)\n" | |
4783 (prin1-to-string | |
4784 (if gnus-current-kill-article | |
4785 (regexp-quote | |
4786 (nntp-header-subject | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4787 ;; No need to speed up this command. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4788 ;;(gnus-get-header-by-number gnus-current-kill-article) |
257 | 4789 (gnus-find-header-by-number gnus-newsgroup-headers |
4790 gnus-current-kill-article))) | |
4791 ""))))) | |
4792 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4793 (defun gnus-kill-file-kill-by-author () |
257 | 4794 "Insert KILL command for current author." |
4795 (interactive) | |
4796 (insert | |
4797 (format "(gnus-kill \"From\" %s)\n" | |
4798 (prin1-to-string | |
4799 (if gnus-current-kill-article | |
4800 (regexp-quote | |
4801 (nntp-header-from | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4802 ;; No need to speed up this command. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4803 ;;(gnus-get-header-by-number gnus-current-kill-article) |
257 | 4804 (gnus-find-header-by-number gnus-newsgroup-headers |
4805 gnus-current-kill-article))) | |
4806 ""))))) | |
4807 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4808 (defun gnus-kill-file-apply-buffer () |
257 | 4809 "Apply current buffer to current newsgroup." |
4810 (interactive) | |
4811 (if (and gnus-current-kill-article | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4812 (get-buffer gnus-summary-buffer)) |
257 | 4813 ;; Assume newsgroup is selected. |
4814 (let ((string (concat "(progn \n" (buffer-string) "\n)" ))) | |
4815 (save-excursion | |
4816 (save-window-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4817 (pop-to-buffer gnus-summary-buffer) |
257 | 4818 (eval (car (read-from-string string)))))) |
4819 (ding) (message "No newsgroup is selected."))) | |
4820 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4821 (defun gnus-kill-file-apply-last-sexp () |
257 | 4822 "Apply sexp before point in current buffer to current newsgroup." |
4823 (interactive) | |
4824 (if (and gnus-current-kill-article | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4825 (get-buffer gnus-summary-buffer)) |
257 | 4826 ;; Assume newsgroup is selected. |
4827 (let ((string | |
4828 (buffer-substring | |
4829 (save-excursion (forward-sexp -1) (point)) (point)))) | |
4830 (save-excursion | |
4831 (save-window-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4832 (pop-to-buffer gnus-summary-buffer) |
257 | 4833 (eval (car (read-from-string string)))))) |
4834 (ding) (message "No newsgroup is selected."))) | |
4835 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4836 (defun gnus-kill-file-exit () |
257 | 4837 "Save a KILL file, then return to the previous buffer." |
4838 (interactive) | |
4839 (save-buffer) | |
4840 (let ((killbuf (current-buffer))) | |
4841 ;; 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
|
4842 (and (get-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4843 (bury-buffer (get-buffer gnus-article-buffer))) |
257 | 4844 ;; Delete the KILL file windows. |
4845 (delete-windows-on killbuf) | |
4846 ;; Restore last window configuration if available. | |
4847 (and gnus-winconf-kill-file | |
4848 (set-window-configuration gnus-winconf-kill-file)) | |
4849 (setq gnus-winconf-kill-file nil) | |
4850 ;; Kill the KILL file buffer. Suggested by tale@pawl.rpi.edu. | |
4851 (kill-buffer killbuf))) | |
4852 | |
4853 | |
4854 ;;; | |
4855 ;;; Utility functions | |
4856 ;;; | |
4857 | |
4858 ;; Basic ideas by emv@math.lsa.umich.edu (Edward Vielmetti) | |
4859 | |
4860 (defun gnus-batch-kill () | |
4861 "Run batched KILL. | |
4862 Usage: emacs -batch -l gnus -f gnus-batch-kill NEWSGROUP ..." | |
4863 (if (not noninteractive) | |
4864 (error "gnus-batch-kill is to be used only with -batch")) | |
4865 (let* ((group nil) | |
4866 (subscribed nil) | |
4867 (newsrc nil) | |
4868 (yes-and-no | |
4869 (gnus-parse-n-options | |
4870 (apply (function concat) | |
4871 (mapcar (function (lambda (g) (concat g " "))) | |
4872 command-line-args-left)))) | |
4873 (yes (car yes-and-no)) | |
4874 (no (cdr yes-and-no)) | |
4875 ;; Disable verbose message. | |
4876 (gnus-novice-user nil) | |
4877 (gnus-large-newsgroup nil) | |
4878 (nntp-large-newsgroup nil)) | |
4879 ;; Eat all arguments. | |
4880 (setq command-line-args-left nil) | |
4881 ;; Startup GNUS. | |
4882 (gnus) | |
4883 ;; Apply kills to specified newsgroups in command line arguments. | |
4884 (setq newsrc (copy-sequence gnus-newsrc-assoc)) | |
4885 (while newsrc | |
4886 (setq group (car (car newsrc))) | |
4887 (setq subscribed (nth 1 (car newsrc))) | |
4888 (setq newsrc (cdr newsrc)) | |
4889 (if (and subscribed | |
4890 (not (zerop (nth 1 (gnus-gethash group gnus-unread-hashtb)))) | |
4891 (if yes | |
4892 (string-match yes group) t) | |
4893 (or (null no) | |
4894 (not (string-match no group)))) | |
4895 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4896 (gnus-summary-read-group group nil t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4897 (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
|
4898 (gnus-summary-exit t)) |
257 | 4899 )) |
4900 ) | |
4901 ;; Finally, exit Emacs. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4902 (set-buffer gnus-group-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4903 (gnus-group-exit) |
257 | 4904 )) |
4905 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4906 ;; For saving articles |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4907 |
257 | 4908 (defun gnus-Numeric-save-name (newsgroup headers &optional last-file) |
4909 "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. | |
4910 If variable `gnus-use-long-file-name' is nil, it is ~/News/News.group/num. | |
4911 Otherwise, it is like ~/News/news/group/num." | |
4912 (let ((default | |
4913 (expand-file-name | |
4914 (concat (if gnus-use-long-file-name | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4915 (gnus-capitalize-newsgroup newsgroup) |
257 | 4916 (gnus-newsgroup-directory-form newsgroup)) |
4917 "/" (int-to-string (nntp-header-number headers))) | |
4918 (or gnus-article-save-directory "~/News")))) | |
4919 (if (and last-file | |
4920 (string-equal (file-name-directory default) | |
4921 (file-name-directory last-file)) | |
4922 (string-match "^[0-9]+$" (file-name-nondirectory last-file))) | |
4923 default | |
4924 (or last-file default)))) | |
4925 | |
4926 (defun gnus-numeric-save-name (newsgroup headers &optional last-file) | |
4927 "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. | |
4928 If variable `gnus-use-long-file-name' is nil, it is ~/News/news.group/num. | |
4929 Otherwise, it is like ~/News/news/group/num." | |
4930 (let ((default | |
4931 (expand-file-name | |
4932 (concat (if gnus-use-long-file-name | |
4933 newsgroup | |
4934 (gnus-newsgroup-directory-form newsgroup)) | |
4935 "/" (int-to-string (nntp-header-number headers))) | |
4936 (or gnus-article-save-directory "~/News")))) | |
4937 (if (and last-file | |
4938 (string-equal (file-name-directory default) | |
4939 (file-name-directory last-file)) | |
4940 (string-match "^[0-9]+$" (file-name-nondirectory last-file))) | |
4941 default | |
4942 (or last-file default)))) | |
4943 | |
4944 (defun gnus-Plain-save-name (newsgroup headers &optional last-file) | |
4945 "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. | |
4946 If variable `gnus-use-long-file-name' is nil, it is ~/News/News.group. | |
4947 Otherwise, it is like ~/News/news/group/news." | |
4948 (or last-file | |
4949 (expand-file-name | |
4950 (if gnus-use-long-file-name | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4951 (gnus-capitalize-newsgroup newsgroup) |
257 | 4952 (concat (gnus-newsgroup-directory-form newsgroup) "/news")) |
4953 (or gnus-article-save-directory "~/News")))) | |
4954 | |
4955 (defun gnus-plain-save-name (newsgroup headers &optional last-file) | |
4956 "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. | |
4957 If variable `gnus-use-long-file-name' is nil, it is ~/News/news.group. | |
4958 Otherwise, it is like ~/News/news/group/news." | |
4959 (or last-file | |
4960 (expand-file-name | |
4961 (if gnus-use-long-file-name | |
4962 newsgroup | |
4963 (concat (gnus-newsgroup-directory-form newsgroup) "/news")) | |
4964 (or gnus-article-save-directory "~/News")))) | |
4965 | |
4966 (defun gnus-Folder-save-name (newsgroup headers &optional last-folder) | |
4967 "Generate folder name from NEWSGROUP, HEADERS, and optional LAST-FOLDER. | |
4968 If variable `gnus-use-long-file-name' is nil, it is +News.group. | |
4969 Otherwise, it is like +news/group." | |
4970 (or last-folder | |
4971 (concat "+" | |
4972 (if gnus-use-long-file-name | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4973 (gnus-capitalize-newsgroup newsgroup) |
257 | 4974 (gnus-newsgroup-directory-form newsgroup))))) |
4975 | |
4976 (defun gnus-folder-save-name (newsgroup headers &optional last-folder) | |
4977 "Generate folder name from NEWSGROUP, HEADERS, and optional LAST-FOLDER. | |
4978 If variable `gnus-use-long-file-name' is nil, it is +news.group. | |
4979 Otherwise, it is like +news/group." | |
4980 (or last-folder | |
4981 (concat "+" | |
4982 (if gnus-use-long-file-name | |
4983 newsgroup | |
4984 (gnus-newsgroup-directory-form newsgroup))))) | |
4985 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4986 ;; For KILL files |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
4987 |
257 | 4988 (defun gnus-apply-kill-file () |
4989 "Apply KILL file to the current newsgroup." | |
4990 ;; Apply the global KILL file. | |
4991 (load (gnus-newsgroup-kill-file nil) t nil t) | |
4992 ;; And then apply the local KILL file. | |
4993 (load (gnus-newsgroup-kill-file gnus-newsgroup-name) t nil t)) | |
4994 | |
4995 (defun gnus-Newsgroup-kill-file (newsgroup) | |
4996 "Return the name of a KILL file of NEWSGROUP. | |
4997 If NEWSGROUP is nil, return the global KILL file instead." | |
4998 (cond ((or (null newsgroup) | |
4999 (string-equal newsgroup "")) | |
5000 ;; The global KILL file is placed at top of the directory. | |
5001 (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
|
5002 (or gnus-kill-files-directory "~/News"))) |
257 | 5003 (gnus-use-long-file-name |
5004 ;; Append ".KILL" to capitalized newsgroup name. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5005 (expand-file-name (concat (gnus-capitalize-newsgroup newsgroup) |
257 | 5006 "." gnus-kill-file-name) |
8439
e3040f870f4f
(gnus-kill-files-directory): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
8413
diff
changeset
|
5007 (or gnus-kill-files-directory "~/News"))) |
257 | 5008 (t |
5009 ;; Place "KILL" under the hierarchical directory. | |
5010 (expand-file-name (concat (gnus-newsgroup-directory-form newsgroup) | |
5011 "/" gnus-kill-file-name) | |
8439
e3040f870f4f
(gnus-kill-files-directory): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
8413
diff
changeset
|
5012 (or gnus-kill-files-directory "~/News"))) |
257 | 5013 )) |
5014 | |
5015 (defun gnus-newsgroup-kill-file (newsgroup) | |
5016 "Return the name of a KILL file of NEWSGROUP. | |
5017 If NEWSGROUP is nil, return the global KILL file instead." | |
5018 (cond ((or (null newsgroup) | |
5019 (string-equal newsgroup "")) | |
5020 ;; The global KILL file is placed at top of the directory. | |
5021 (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
|
5022 (or gnus-kill-files-directory "~/News"))) |
257 | 5023 (gnus-use-long-file-name |
5024 ;; Append ".KILL" to newsgroup name. | |
5025 (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
|
5026 (or gnus-kill-files-directory "~/News"))) |
257 | 5027 (t |
5028 ;; Place "KILL" under the hierarchical directory. | |
5029 (expand-file-name (concat (gnus-newsgroup-directory-form newsgroup) | |
5030 "/" gnus-kill-file-name) | |
8439
e3040f870f4f
(gnus-kill-files-directory): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
8413
diff
changeset
|
5031 (or gnus-kill-files-directory "~/News"))) |
257 | 5032 )) |
5033 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5034 ;; For subscribing new newsgroup |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5035 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5036 (defun gnus-subscribe-randomly (newsgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5037 "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
|
5038 (gnus-subscribe-newsgroup newsgroup |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5039 (car (car gnus-newsrc-assoc)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5040 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5041 (defun gnus-subscribe-alphabetically (newgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5042 "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
|
5043 ;; 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
|
5044 (let ((groups gnus-newsrc-assoc) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5045 (before nil)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5046 (while (and (not before) groups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5047 (if (string< newgroup (car (car groups))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5048 (setq before (car (car groups))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5049 (setq groups (cdr groups)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5050 (gnus-subscribe-newsgroup newgroup before) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5051 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5052 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5053 (defun gnus-subscribe-hierarchically (newgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5054 "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
|
5055 ;; 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
|
5056 (save-excursion |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5057 (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
|
5058 (let ((groupkey newgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5059 (before nil)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5060 (while (and (not before) groupkey) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5061 (goto-char (point-min)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5062 (let ((groupkey-re |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5063 (concat "^\\(" (regexp-quote groupkey) ".*\\)[!:]"))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5064 (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
|
5065 (progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5066 (setq before (buffer-substring |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5067 (match-beginning 1) (match-end 1))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5068 (string< before newgroup))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5069 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5070 ;; 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
|
5071 (setq groupkey |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5072 (if (string-match "^\\(.*\\)\\.[^.]+$" groupkey) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5073 (substring groupkey (match-beginning 1) (match-end 1))))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5074 (gnus-subscribe-newsgroup newgroup before) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5075 ))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5076 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5077 (defun gnus-subscribe-interactively (newsgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5078 "Subscribe new NEWSGROUP interactively. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5079 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
|
5080 Unless, it is killed." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5081 (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
|
5082 (gnus-subscribe-hierarchically newsgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5083 ;; Save in kill-ring |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5084 (gnus-subscribe-newsgroup newsgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5085 (gnus-kill-newsgroup newsgroup))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5086 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5087 (defun gnus-subscribe-newsgroup (newsgroup &optional next) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5088 "Subscribe new NEWSGROUP. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5089 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
|
5090 (gnus-insert-newsgroup (list newsgroup t) next) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5091 (message "Subscribe newsgroup: %s" newsgroup)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5092 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5093 ;; For directories |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5094 |
257 | 5095 (defun gnus-newsgroup-directory-form (newsgroup) |
5096 "Make hierarchical directory name from NEWSGROUP name." | |
5097 (let ((newsgroup (substring newsgroup 0)) ;Copy string. | |
5098 (len (length newsgroup)) | |
5099 (idx 0)) | |
3591
507f64624555
Apply typo patches from Paul Eggert.
Jim Blandy <jimb@redhat.com>
parents:
3496
diff
changeset
|
5100 ;; Replace all occurrences of `.' with `/'. |
257 | 5101 (while (< idx len) |
5102 (if (= (aref newsgroup idx) ?.) | |
5103 (aset newsgroup idx ?/)) | |
5104 (setq idx (1+ idx))) | |
5105 newsgroup | |
5106 )) | |
5107 | |
5108 (defun gnus-make-directory (directory) | |
5109 "Make DIRECTORY recursively." | |
5110 (let ((directory (expand-file-name directory default-directory))) | |
5111 (or (file-exists-p directory) | |
5112 (gnus-make-directory-1 "" directory)) | |
5113 )) | |
5114 | |
5115 (defun gnus-make-directory-1 (head tail) | |
5116 (cond ((string-match "^/\\([^/]+\\)" tail) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5117 ;; ange-ftp interferes with calling match-* after |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5118 ;; calling file-name-as-directory. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5119 (let ((beg (match-beginning 1)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5120 (end (match-end 1))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5121 (setq head (concat (file-name-as-directory head) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5122 (substring tail beg end))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5123 (or (file-exists-p head) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5124 (call-process "mkdir" nil nil nil head)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5125 (gnus-make-directory-1 head (substring tail end)))) |
257 | 5126 ((string-equal tail "") t) |
5127 )) | |
5128 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5129 (defun gnus-capitalize-newsgroup (newsgroup) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5130 "Capitalize NEWSGROUP name with treating '.' and '-' as part of words." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5131 ;; 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
|
5132 (let ((current-syntax-table (syntax-table))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5133 (unwind-protect |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5134 (progn |
5313
3189e46001fd
(gnus-capitalize-newsgroup): Modify a new temporary
Richard M. Stallman <rms@gnu.org>
parents:
5057
diff
changeset
|
5135 (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
|
5136 (modify-syntax-entry ?- "w") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5137 (modify-syntax-entry ?. "w") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5138 (capitalize newsgroup)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5139 (set-syntax-table current-syntax-table)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5140 |
257 | 5141 (defun gnus-simplify-subject (subject &optional re-only) |
5142 "Remove `Re:' and words in parentheses. | |
5143 If optional argument RE-ONLY is non-nil, strip `Re:' only." | |
5144 (let ((case-fold-search t)) ;Ignore case. | |
5145 ;; Remove `Re:' and `Re^N:'. | |
5146 (if (string-match "\\`\\(re\\(\\^[0-9]+\\)?:[ \t]+\\)+" subject) | |
5147 (setq subject (substring subject (match-end 0)))) | |
5148 ;; Remove words in parentheses from end. | |
5149 (or re-only | |
5150 (while (string-match "[ \t\n]*([^()]*)[ \t\n]*\\'" subject) | |
5151 (setq subject (substring subject 0 (match-beginning 0))))) | |
5152 ;; Return subject string. | |
5153 subject | |
5154 )) | |
5155 | |
5156 (defun gnus-optional-lines-and-from (header) | |
5157 "Return a string like `NNN:AUTHOR' from HEADER." | |
5158 (let ((name-length (length "umerin@photon"))) | |
5159 (substring (format "%3d:%s" | |
5160 ;; Lines of the article. | |
5161 ;; Suggested by dana@bellcore.com. | |
5162 (nntp-header-lines header) | |
5163 ;; Its author. | |
5164 (concat (mail-strip-quoted-names | |
5165 (nntp-header-from header)) | |
5166 (make-string name-length ? ))) | |
5167 ;; 4 stands for length of `NNN:'. | |
5168 0 (+ 4 name-length)))) | |
5169 | |
5170 (defun gnus-optional-lines (header) | |
5171 "Return a string like `NNN' from HEADER." | |
5172 (format "%4d" (nntp-header-lines header))) | |
5173 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5174 ;; 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
|
5175 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5176 (defun gnus-keysort-headers (predicate key &optional reverse) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5177 "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
|
5178 *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
|
5179 Optional argument REVERSE means reverse order." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5180 (let ((inhibit-quit t)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5181 (setq gnus-newsgroup-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5182 (if reverse |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5183 (nreverse |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5184 (gnus-keysort (nreverse gnus-newsgroup-headers) predicate key)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5185 (gnus-keysort gnus-newsgroup-headers predicate key))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5186 ;; Make sure we don't have to call |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5187 ;; 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
|
5188 ;; 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
|
5189 ;; 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
|
5190 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5191 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5192 (defun gnus-keysort (list predicate key) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5193 "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
|
5194 (mapcar (function cdr) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5195 (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
|
5196 (function (lambda (a b) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5197 (funcall predicate (car a) (car b))))))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5198 |
257 | 5199 (defun gnus-sort-headers (predicate &optional reverse) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5200 "Sort current headers by PREDICATE safely. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5201 *Safely* means C-g quitting is disabled during sort. |
257 | 5202 Optional argument REVERSE means reverse order." |
5203 (let ((inhibit-quit t)) | |
5204 (setq gnus-newsgroup-headers | |
5205 (if reverse | |
5206 (nreverse (sort (nreverse gnus-newsgroup-headers) predicate)) | |
5207 (sort gnus-newsgroup-headers predicate))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5208 ;; Make sure we don't have to call |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5209 ;; 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
|
5210 ;; 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
|
5211 ;; entry is added to nor deleted from the variable. |
257 | 5212 )) |
5213 | |
5214 (defun gnus-string-lessp (a b) | |
5215 "Return T if first arg string is less than second in lexicographic order. | |
5216 If case-fold-search is non-nil, case of letters is ignored." | |
5217 (if case-fold-search | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5218 (string-lessp (downcase a) (downcase b)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5219 (string-lessp a b))) |
257 | 5220 |
5221 (defun gnus-date-lessp (date1 date2) | |
5222 "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
|
5223 (string-lessp (gnus-sortable-date date1) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5224 (gnus-sortable-date date2))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5225 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5226 (defun gnus-sortable-date (date) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5227 "Make sortable string by string-lessp from DATE. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5228 Timezone package is used." |
8413
aa772e9e5f86
(gnus-sortable-date): Use timezone-make-time-string.
Richard M. Stallman <rms@gnu.org>
parents:
8382
diff
changeset
|
5229 (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
|
5230 (year (aref date 0)) |
aa772e9e5f86
(gnus-sortable-date): Use timezone-make-time-string.
Richard M. Stallman <rms@gnu.org>
parents:
8382
diff
changeset
|
5231 (month (aref date 1)) |
aa772e9e5f86
(gnus-sortable-date): Use timezone-make-time-string.
Richard M. Stallman <rms@gnu.org>
parents:
8382
diff
changeset
|
5232 (day (aref date 2))) |
aa772e9e5f86
(gnus-sortable-date): Use timezone-make-time-string.
Richard M. Stallman <rms@gnu.org>
parents:
8382
diff
changeset
|
5233 (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
|
5234 (timezone-make-time-string |
aa772e9e5f86
(gnus-sortable-date): Use timezone-make-time-string.
Richard M. Stallman <rms@gnu.org>
parents:
8382
diff
changeset
|
5235 (aref date 3) (aref date 4) (aref date 5))) |
257 | 5236 )) |
5237 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5238 ;;(defun gnus-sortable-date (date) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5239 ;; "Make sortable string by string-lessp from DATE." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5240 ;; (let ((month '(("JAN" . " 1")("FEB" . " 2")("MAR" . " 3") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5241 ;; ("APR" . " 4")("MAY" . " 5")("JUN" . " 6") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5242 ;; ("JUL" . " 7")("AUG" . " 8")("SEP" . " 9") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5243 ;; ("OCT" . "10")("NOV" . "11")("DEC" . "12"))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5244 ;; (date (or date ""))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5245 ;; ;; Can understand the following styles: |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5246 ;; ;; (1) 14 Apr 89 03:20:12 GMT |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5247 ;; ;; (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
|
5248 ;; (if (string-match |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5249 ;; "\\([0-9]+\\) \\([^ ,]+\\) \\([0-9]+\\) \\([0-9:]+\\)" date) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5250 ;; (concat |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5251 ;; ;; Year |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5252 ;; (substring date (match-beginning 3) (match-end 3)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5253 ;; ;; Month |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5254 ;; (cdr |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5255 ;; (assoc |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5256 ;; (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
|
5257 ;; ;; Day |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5258 ;; (format "%2d" (string-to-int |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5259 ;; (substring date |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5260 ;; (match-beginning 1) (match-end 1)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5261 ;; ;; Time |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5262 ;; (substring date (match-beginning 4) (match-end 4))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5263 ;; ;; Cannot understand DATE string. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5264 ;; date |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5265 ;; ) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5266 ;; )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5267 |
257 | 5268 (defun gnus-fetch-field (field) |
5269 "Return the value of the header FIELD of current article." | |
5270 (save-excursion | |
5271 (save-restriction | |
5272 (widen) | |
5273 (goto-char (point-min)) | |
5274 (narrow-to-region (point-min) | |
5275 (progn (search-forward "\n\n" nil 'move) (point))) | |
5276 (mail-fetch-field field)))) | |
5277 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5278 (fset 'gnus-expunge 'gnus-summary-delete-marked-with) |
257 | 5279 |
5280 (defun gnus-kill (field regexp &optional command all) | |
5281 "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
|
5282 Optional 1st argument COMMAND is default to |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5283 (gnus-summary-mark-as-read nil \"X\"). |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5284 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
|
5285 If FIELD is an empty string (or nil), entire article body is searched for. |
257 | 5286 COMMAND must be a lisp expression or a string representing a key sequence." |
5287 ;; We don't want to change current point nor window configuration. | |
5288 (save-excursion | |
5289 (save-window-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5290 ;; Selected window must be Summary buffer to execute keyboard |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5291 ;; macros correctly. See command_loop_1. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5292 (switch-to-buffer gnus-summary-buffer 'norecord) |
257 | 5293 (goto-char (point-min)) ;From the beginning. |
5294 (if (null command) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5295 (setq command '(gnus-summary-mark-as-read nil "X"))) |
257 | 5296 (gnus-execute field regexp command nil (not all)) |
5297 ))) | |
5298 | |
5299 (defun gnus-execute (field regexp form &optional backward ignore-marked) | |
5300 "If FIELD of article header matches REGEXP, execute lisp FORM (or a string). | |
5301 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
|
5302 If optional 1st argument BACKWARD is non-nil, do backward instead. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5303 If optional 2nd argument IGNORE-MARKED is non-nil, articles which are |
257 | 5304 marked as read or unread are ignored." |
5305 (let ((function nil) | |
5306 (header nil) | |
5307 (article nil)) | |
5308 (if (string-equal field "") | |
5309 (setq field nil)) | |
5310 (if (null field) | |
5311 nil | |
5312 (or (stringp field) | |
5313 (setq field (symbol-name field))) | |
5314 ;; Get access function of header filed. | |
5315 (setq function (intern-soft (concat "gnus-header-" (downcase field)))) | |
5316 (if (and function (fboundp function)) | |
5317 (setq function (symbol-function function)) | |
5318 (error "Unknown header field: \"%s\"" field))) | |
5319 ;; Make FORM funcallable. | |
5320 (if (and (listp form) (not (eq (car form) 'lambda))) | |
5321 (setq form (list 'lambda nil form))) | |
5322 ;; Starting from the current article. | |
5323 (or (and ignore-marked | |
5324 ;; 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
|
5325 (setq article (gnus-summary-article-number)) |
257 | 5326 (or (not (memq article gnus-newsgroup-unreads)) ;Marked as read. |
5327 (memq article gnus-newsgroup-marked) ;Marked as unread. | |
5328 )) | |
5329 (gnus-execute-1 function regexp form)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5330 (while (gnus-summary-search-subject backward ignore-marked nil) |
257 | 5331 (gnus-execute-1 function regexp form)) |
5332 )) | |
5333 | |
5334 (defun gnus-execute-1 (function regexp form) | |
5335 (save-excursion | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5336 ;; 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
|
5337 (let ((article (gnus-summary-article-number))) |
257 | 5338 (if (null article) |
5339 nil ;Nothing to do. | |
5340 (if function | |
5341 ;; Compare with header field. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5342 (let (;;(header (gnus-find-header-by-number |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5343 ;; gnus-newsgroup-headers article)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5344 (header (gnus-get-header-by-number article)) |
257 | 5345 (value nil)) |
5346 (and header | |
5347 (progn | |
5348 (setq value (funcall function header)) | |
5349 ;; Number (Lines:) or symbol must be converted to string. | |
5350 (or (stringp value) | |
5351 (setq value (prin1-to-string value))) | |
5352 (string-match regexp value)) | |
5353 (if (stringp form) ;Keyboard macro. | |
5354 (execute-kbd-macro form) | |
5355 (funcall form)))) | |
5356 ;; Search article body. | |
5357 (let ((gnus-current-article nil) ;Save article pointer. | |
5358 (gnus-last-article nil) | |
5359 (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
|
5360 (gnus-mark-article-hook nil)) ;Inhibit marking as read. |
257 | 5361 (message "Searching for article: %d..." article) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5362 (gnus-article-setup-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5363 (gnus-article-prepare article t) |
257 | 5364 (if (save-excursion |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5365 (set-buffer gnus-article-buffer) |
257 | 5366 (goto-char (point-min)) |
5367 (re-search-forward regexp nil t)) | |
5368 (if (stringp form) ;Keyboard macro. | |
5369 (execute-kbd-macro form) | |
5370 (funcall form)))) | |
5371 )) | |
5372 ))) | |
5373 | |
5374 ;;; caesar-region written by phr@prep.ai.mit.edu Nov 86 | |
5375 ;;; modified by tower@prep Nov 86 | |
5376 ;;; Modified by umerin@flab.flab.Fujitsu.JUNET for ROT47. | |
5377 | |
5378 (defun gnus-caesar-region (&optional n) | |
5379 "Caesar rotation of region by N, default 13, for decrypting netnews. | |
5380 ROT47 will be performed for Japanese text in any case." | |
5381 (interactive (if current-prefix-arg ; Was there a prefix arg? | |
5382 (list (prefix-numeric-value current-prefix-arg)) | |
5383 (list nil))) | |
5384 (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
|
5385 (t (setq n (mod n 26)))) ;canonicalize N |
257 | 5386 (if (not (zerop n)) ; no action needed for a rot of 0 |
5387 (progn | |
5388 (if (or (not (boundp 'caesar-translate-table)) | |
5389 (/= (aref caesar-translate-table ?a) (+ ?a n))) | |
5390 (let ((i 0) (lower "abcdefghijklmnopqrstuvwxyz") upper) | |
5391 (message "Building caesar-translate-table...") | |
5392 (setq caesar-translate-table (make-vector 256 0)) | |
5393 (while (< i 256) | |
5394 (aset caesar-translate-table i i) | |
5395 (setq i (1+ i))) | |
5396 (setq lower (concat lower lower) upper (upcase lower) i 0) | |
5397 (while (< i 26) | |
5398 (aset caesar-translate-table (+ ?a i) (aref lower (+ i n))) | |
5399 (aset caesar-translate-table (+ ?A i) (aref upper (+ i n))) | |
5400 (setq i (1+ i))) | |
5401 ;; ROT47 for Japanese text. | |
5402 ;; Thanks to ichikawa@flab.fujitsu.junet. | |
5403 (setq i 161) | |
5404 (let ((t1 (logior ?O 128)) | |
5405 (t2 (logior ?! 128)) | |
5406 (t3 (logior ?~ 128))) | |
5407 (while (< i 256) | |
5408 (aset caesar-translate-table i | |
5409 (let ((v (aref caesar-translate-table i))) | |
5410 (if (<= v t1) (if (< v t2) v (+ v 47)) | |
5411 (if (<= v t3) (- v 47) v)))) | |
5412 (setq i (1+ i)))) | |
5413 (message "Building caesar-translate-table... done"))) | |
5414 (let ((from (region-beginning)) | |
5415 (to (region-end)) | |
5416 (i 0) str len) | |
5417 (setq str (buffer-substring from to)) | |
5418 (setq len (length str)) | |
5419 (while (< i len) | |
5420 (aset str i (aref caesar-translate-table (aref str i))) | |
5421 (setq i (1+ i))) | |
5422 (goto-char from) | |
5423 (delete-region from to) | |
5424 (insert str))))) | |
5425 | |
5426 ;; Functions accessing headers. | |
5427 ;; Functions are more convenient than macros in some case. | |
5428 | |
5429 (defun gnus-header-number (header) | |
5430 "Return article number in HEADER." | |
5431 (nntp-header-number header)) | |
5432 | |
5433 (defun gnus-header-subject (header) | |
5434 "Return subject string in HEADER." | |
5435 (nntp-header-subject header)) | |
5436 | |
5437 (defun gnus-header-from (header) | |
5438 "Return author string in HEADER." | |
5439 (nntp-header-from header)) | |
5440 | |
5441 (defun gnus-header-xref (header) | |
5442 "Return xref string in HEADER." | |
5443 (nntp-header-xref header)) | |
5444 | |
5445 (defun gnus-header-lines (header) | |
5446 "Return lines in HEADER." | |
5447 (nntp-header-lines header)) | |
5448 | |
5449 (defun gnus-header-date (header) | |
5450 "Return date in HEADER." | |
5451 (nntp-header-date header)) | |
5452 | |
5453 (defun gnus-header-id (header) | |
5454 "Return Id in HEADER." | |
5455 (nntp-header-id header)) | |
5456 | |
5457 (defun gnus-header-references (header) | |
5458 "Return references in HEADER." | |
5459 (nntp-header-references header)) | |
5460 | |
5461 | |
5462 ;;; | |
5463 ;;; Article savers. | |
5464 ;;; | |
5465 | |
5466 (defun gnus-output-to-rmail (file-name) | |
5467 "Append the current article to an Rmail file named FILE-NAME." | |
5468 (require 'rmail) | |
5469 ;; Most of these codes are borrowed from rmailout.el. | |
5470 (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
|
5471 (setq rmail-default-rmail-file file-name) |
257 | 5472 (let ((artbuf (current-buffer)) |
5473 (tmpbuf (get-buffer-create " *GNUS-output*"))) | |
5474 (save-excursion | |
5475 (or (get-file-buffer file-name) | |
5476 (file-exists-p file-name) | |
5477 (if (yes-or-no-p | |
5478 (concat "\"" file-name "\" does not exist, create it? ")) | |
5479 (let ((file-buffer (create-file-buffer file-name))) | |
5480 (save-excursion | |
5481 (set-buffer file-buffer) | |
5482 (rmail-insert-rmail-file-header) | |
5483 (let ((require-final-newline nil)) | |
5484 (write-region (point-min) (point-max) file-name t 1))) | |
5485 (kill-buffer file-buffer)) | |
5486 (error "Output file does not exist"))) | |
5487 (set-buffer tmpbuf) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5488 (buffer-flush-undo (current-buffer)) |
257 | 5489 (erase-buffer) |
5490 (insert-buffer-substring artbuf) | |
5491 (gnus-convert-article-to-rmail) | |
5492 ;; Decide whether to append to a file or to an Emacs buffer. | |
5493 (let ((outbuf (get-file-buffer file-name))) | |
5494 (if (not outbuf) | |
5495 (append-to-file (point-min) (point-max) file-name) | |
5496 ;; File has been visited, in buffer OUTBUF. | |
5497 (set-buffer outbuf) | |
5498 (let ((buffer-read-only nil) | |
5499 (msg (and (boundp 'rmail-current-message) | |
5500 rmail-current-message))) | |
5501 ;; If MSG is non-nil, buffer is in RMAIL mode. | |
5502 (if msg | |
5503 (progn (widen) | |
5504 (narrow-to-region (point-max) (point-max)))) | |
5505 (insert-buffer-substring tmpbuf) | |
5506 (if msg | |
5507 (progn | |
5508 (goto-char (point-min)) | |
5509 (widen) | |
5510 (search-backward "\^_") | |
5511 (narrow-to-region (point) (point-max)) | |
5512 (goto-char (1+ (point-min))) | |
5513 (rmail-count-new-messages t) | |
5514 (rmail-show-message msg)))))) | |
5515 ) | |
5516 (kill-buffer tmpbuf) | |
5517 )) | |
5518 | |
5519 (defun gnus-output-to-file (file-name) | |
5520 "Append the current article to a file named FILE-NAME." | |
5521 (setq file-name (expand-file-name file-name)) | |
5522 (let ((artbuf (current-buffer)) | |
5523 (tmpbuf (get-buffer-create " *GNUS-output*"))) | |
5524 (save-excursion | |
5525 (set-buffer tmpbuf) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5526 (buffer-flush-undo (current-buffer)) |
257 | 5527 (erase-buffer) |
5528 (insert-buffer-substring artbuf) | |
5529 ;; Append newline at end of the buffer as separator, and then | |
5530 ;; save it to file. | |
5531 (goto-char (point-max)) | |
5532 (insert "\n") | |
5533 (append-to-file (point-min) (point-max) file-name)) | |
5534 (kill-buffer tmpbuf) | |
5535 )) | |
5536 | |
5537 (defun gnus-convert-article-to-rmail () | |
5538 "Convert article in current buffer to Rmail message format." | |
5539 (let ((buffer-read-only nil)) | |
5540 ;; Convert article directly into Babyl format. | |
5541 ;; Suggested by Rob Austein <sra@lcs.mit.edu> | |
5542 (goto-char (point-min)) | |
5543 (insert "\^L\n0, unseen,,\n*** EOOH ***\n") | |
5544 (while (search-forward "\n\^_" nil t) ;single char | |
5545 (replace-match "\n^_")) ;2 chars: "^" and "_" | |
5546 (goto-char (point-max)) | |
5547 (insert "\^_"))) | |
5548 | |
5549 ;;(defun gnus-convert-article-to-rmail () | |
5550 ;; "Convert article in current buffer to Rmail message format." | |
5551 ;; (let ((buffer-read-only nil)) | |
5552 ;; ;; Insert special header of Unix mail. | |
5553 ;; (goto-char (point-min)) | |
5554 ;; (insert "From " | |
5555 ;; (or (mail-strip-quoted-names (mail-fetch-field "from")) | |
5556 ;; "unknown") | |
5557 ;; " " (current-time-string) "\n") | |
5558 ;; ;; Stop quoting `From' since this seems unnecessary in most cases. | |
5559 ;; ;; ``Quote'' "\nFrom " as "\n>From " | |
5560 ;; ;;(while (search-forward "\nFrom " nil t) | |
5561 ;; ;; (forward-char -5) | |
5562 ;; ;; (insert ?>)) | |
5563 ;; ;; Convert article to babyl format. | |
5564 ;; (rmail-convert-to-babyl-format) | |
5565 ;; )) | |
5566 | |
5567 | |
5568 ;;; | |
5569 ;;; Internal functions. | |
5570 ;;; | |
5571 | |
5572 (defun gnus-start-news-server (&optional confirm) | |
5573 "Open network stream to remote NNTP server. | |
5574 If optional argument CONFIRM is non-nil, ask you host that NNTP server | |
5575 is running even if it is defined. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5576 Run gnus-open-server-hook just before opening news server." |
257 | 5577 (if (gnus-server-opened) |
5578 ;; Stream is already opened. | |
5579 nil | |
5580 ;; Open NNTP server. | |
5581 (if (or confirm | |
5582 (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
|
5583 ;; 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
|
5584 ;; 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
|
5585 (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
|
5586 (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
|
5587 ;; 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
|
5588 (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
|
5589 (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
|
5590 (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
|
5591 gnus-secondary-servers) |
d701e7af5ba5
* gnus.el (gnus-start-news-server): If no server has been
Jim Blandy <jimb@redhat.com>
parents:
3610
diff
changeset
|
5592 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
|
5593 (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
|
5594 (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
|
5595 (setq gnus-nntp-server ""))) |
257 | 5596 ;; 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
|
5597 (if (or (string-equal gnus-nntp-server "") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5598 (string-equal gnus-nntp-server "::")) ;RMS preference. |
257 | 5599 (setq gnus-nntp-server (system-name))) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5600 ;; 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
|
5601 ;; 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
|
5602 ;; gnus-nntp-server. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5603 (cond ((and (null gnus-nntp-service) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5604 (string-equal gnus-nntp-server (system-name))) |
716
f11e7af7c0d9
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
711
diff
changeset
|
5605 (require 'nnspool) |
f11e7af7c0d9
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
711
diff
changeset
|
5606 (gnus-define-access-method 'nnspool) |
f11e7af7c0d9
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
711
diff
changeset
|
5607 (message "Looking up local news spool...")) |
f11e7af7c0d9
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
711
diff
changeset
|
5608 ((string-match ":" gnus-nntp-server) |
257 | 5609 ;; :DIRECTORY |
5610 (require 'mhspool) | |
5611 (gnus-define-access-method 'mhspool) | |
5612 (message "Looking up private directory...")) | |
5613 (t | |
5614 (gnus-define-access-method 'nntp) | |
5615 (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
|
5616 (run-hooks 'gnus-open-server-hook) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5617 (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
|
5618 (message "")) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5619 ((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
|
5620 (message "")) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5621 (t |
8481
b4c5b7658550
(gnus-start-news-server): Fix the call to `error'.
Richard M. Stallman <rms@gnu.org>
parents:
8470
diff
changeset
|
5622 (error "%s" |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5623 (gnus-nntp-message |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5624 (format "Cannot open NNTP server on %s" gnus-nntp-server))))) |
257 | 5625 )) |
5626 | |
5627 ;; Dummy functions used only once. Should return nil. | |
5628 (defun gnus-server-opened () nil) | |
5629 (defun gnus-close-server () nil) | |
5630 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5631 (defun gnus-nntp-message (&optional message) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5632 "Return a message returned from NNTP server. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5633 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
|
5634 (let ((status (gnus-status-message)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5635 (message (or message ""))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5636 (if (and (stringp status) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5637 (> (length status) 0)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5638 status message))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5639 |
257 | 5640 (defun gnus-define-access-method (method &optional access-methods) |
5641 "Define access functions for the access METHOD. | |
3591
507f64624555
Apply typo patches from Paul Eggert.
Jim Blandy <jimb@redhat.com>
parents:
3496
diff
changeset
|
5642 Methods definition is taken from optional argument ACCESS-METHODS or |
257 | 5643 the variable gnus-access-methods." |
5644 (let ((bindings | |
5645 (cdr (assoc method (or access-methods gnus-access-methods))))) | |
5646 (if (null bindings) | |
5647 (error "Unknown access method: %s" method) | |
5648 ;; Should not use symbol-function here since overload does not work. | |
5649 (while bindings | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5650 ;; 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
|
5651 (fset (car (car bindings)) (car (cdr (car bindings)))) |
257 | 5652 (setq bindings (cdr bindings))) |
5653 ))) | |
5654 | |
5655 (defun gnus-select-newsgroup (group &optional show-all) | |
5656 "Select newsgroup GROUP. | |
5657 If optional argument SHOW-ALL is non-nil, all of articles in the group | |
5658 are selected." | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5659 ;; 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
|
5660 (gnus-start-news-server) |
257 | 5661 (if (gnus-request-group group) |
5662 (let ((articles nil)) | |
5663 (setq gnus-newsgroup-name group) | |
5664 (setq gnus-newsgroup-unreads | |
5665 (gnus-uncompress-sequence | |
5666 (nthcdr 2 (gnus-gethash group gnus-unread-hashtb)))) | |
5667 (cond (show-all | |
5668 ;; Select all active articles. | |
5669 (setq articles | |
5670 (gnus-uncompress-sequence | |
5671 (nthcdr 2 (gnus-gethash group gnus-active-hashtb))))) | |
5672 (t | |
5673 ;; Select unread articles only. | |
5674 (setq articles gnus-newsgroup-unreads))) | |
5675 ;; Require confirmation if selecting large newsgroup. | |
5676 (setq gnus-newsgroup-unselected nil) | |
5677 (if (not (numberp gnus-large-newsgroup)) | |
5678 nil | |
5679 (let ((selected nil) | |
5680 (number (length articles))) | |
5681 (if (> number gnus-large-newsgroup) | |
5682 (progn | |
5683 (condition-case () | |
5684 (let ((input | |
5685 (read-string | |
5686 (format | |
5687 "How many articles from %s (default %d): " | |
5688 gnus-newsgroup-name number)))) | |
5689 (setq selected | |
5690 (if (string-equal input "") | |
5691 number (string-to-int input)))) | |
5692 (quit | |
5693 (setq selected 0))) | |
5694 (cond ((and (> selected 0) | |
5695 (< selected number)) | |
5696 ;; Select last N articles. | |
5697 (setq articles (nthcdr (- number selected) articles))) | |
5698 ((and (< selected 0) | |
5699 (< (- 0 selected) number)) | |
5700 ;; Select first N articles. | |
5701 (setq selected (- 0 selected)) | |
5702 (setq articles (copy-sequence articles)) | |
5703 (setcdr (nthcdr (1- selected) articles) nil)) | |
5704 ((zerop selected) | |
5705 (setq articles nil)) | |
5706 ;; Otherwise select all. | |
5707 ) | |
5708 ;; Get unselected unread articles. | |
5709 (setq gnus-newsgroup-unselected | |
5710 (gnus-set-difference gnus-newsgroup-unreads articles)) | |
5711 )) | |
5712 )) | |
5713 ;; Get headers list. | |
5714 (setq gnus-newsgroup-headers (gnus-retrieve-headers articles)) | |
5715 ;; UNREADS may contain expired articles, so we have to remove | |
5716 ;; them from the list. | |
5717 (setq gnus-newsgroup-unreads | |
5718 (gnus-intersection gnus-newsgroup-unreads | |
5719 (mapcar | |
5720 (function | |
5721 (lambda (header) | |
5722 (nntp-header-number header))) | |
5723 gnus-newsgroup-headers))) | |
5724 ;; Marked article must be a subset of unread articles. | |
5725 (setq gnus-newsgroup-marked | |
5726 (gnus-intersection (append gnus-newsgroup-unselected | |
5727 gnus-newsgroup-unreads) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5728 (cdr |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5729 (gnus-gethash group gnus-marked-hashtb)))) |
257 | 5730 ;; First and last article in this newsgroup. |
5731 (setq gnus-newsgroup-begin | |
5732 (if gnus-newsgroup-headers | |
5733 (nntp-header-number (car gnus-newsgroup-headers)) | |
5734 0 | |
5735 )) | |
5736 (setq gnus-newsgroup-end | |
5737 (if gnus-newsgroup-headers | |
5738 (nntp-header-number | |
5739 (gnus-last-element gnus-newsgroup-headers)) | |
5740 0 | |
5741 )) | |
5742 ;; File name that an article was saved last. | |
5743 (setq gnus-newsgroup-last-rmail nil) | |
5744 (setq gnus-newsgroup-last-mail nil) | |
5745 (setq gnus-newsgroup-last-folder nil) | |
5746 (setq gnus-newsgroup-last-file nil) | |
5747 ;; Reset article pointer etc. | |
5748 (setq gnus-current-article nil) | |
5749 (setq gnus-current-headers nil) | |
5750 (setq gnus-current-history nil) | |
5751 (setq gnus-have-all-headers nil) | |
5752 (setq gnus-last-article nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5753 ;; 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
|
5754 (gnus-clear-hashtables-for-newsgroup-headers) |
257 | 5755 ;; GROUP is successfully selected. |
5756 t | |
5757 ) | |
5758 )) | |
5759 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5760 ;; Hacking for making header search much faster. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5761 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5762 (defun gnus-get-header-by-number (number) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5763 "Return a header specified by a NUMBER. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5764 If the variable gnus-newsgroup-headers is updated, the hashed table |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5765 gnus-newsgroup-headers-hashtb-by-number must be set to nil to indicate |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5766 rehash is necessary." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5767 (or gnus-newsgroup-headers-hashtb-by-number |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5768 (gnus-make-headers-hashtable-by-number)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5769 (gnus-gethash (int-to-string number) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5770 gnus-newsgroup-headers-hashtb-by-number)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5771 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5772 (defun gnus-get-header-by-id (id) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5773 "Return a header specified by an ID. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5774 If the variable gnus-newsgroup-headers is updated, the hashed table |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5775 gnus-newsgroup-headers-hashtb-by-id must be set to nil to indicate |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5776 rehash is necessary." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5777 (or gnus-newsgroup-headers-hashtb-by-id |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5778 (gnus-make-headers-hashtable-by-id)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5779 (and (stringp id) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5780 (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
|
5781 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5782 (defun gnus-make-headers-hashtable-by-number () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5783 "Make hashtable for the variable gnus-newsgroup-headers by number." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5784 (let ((header nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5785 (headers gnus-newsgroup-headers)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5786 (setq gnus-newsgroup-headers-hashtb-by-number |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5787 (gnus-make-hashtable (length headers))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5788 (while headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5789 (setq header (car headers)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5790 (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
|
5791 header gnus-newsgroup-headers-hashtb-by-number) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5792 (setq headers (cdr headers)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5793 ))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5794 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5795 (defun gnus-make-headers-hashtable-by-id () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5796 "Make hashtable for the variable gnus-newsgroup-headers by id." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5797 (let ((header nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5798 (headers gnus-newsgroup-headers)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5799 (setq gnus-newsgroup-headers-hashtb-by-id |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5800 (gnus-make-hashtable (length headers))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5801 (while headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5802 (setq header (car headers)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5803 (gnus-sethash (nntp-header-id header) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5804 header gnus-newsgroup-headers-hashtb-by-id) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5805 (setq headers (cdr headers)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5806 ))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5807 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5808 (defun gnus-clear-hashtables-for-newsgroup-headers () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5809 "Clear hash tables created for the variable gnus-newsgroup-headers." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5810 (setq gnus-newsgroup-headers-hashtb-by-id nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5811 (setq gnus-newsgroup-headers-hashtb-by-number nil)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5812 |
257 | 5813 (defun gnus-more-header-backward () |
5814 "Find new header backward." | |
5815 (let ((first | |
5816 (car (nth 2 (gnus-gethash gnus-newsgroup-name gnus-active-hashtb)))) | |
5817 (artnum gnus-newsgroup-begin) | |
5818 (header nil)) | |
5819 (while (and (not header) | |
5820 (> artnum first)) | |
5821 (setq artnum (1- artnum)) | |
5822 (setq header (car (gnus-retrieve-headers (list artnum))))) | |
5823 header | |
5824 )) | |
5825 | |
5826 (defun gnus-more-header-forward () | |
5827 "Find new header forward." | |
5828 (let ((last | |
5829 (cdr (nth 2 (gnus-gethash gnus-newsgroup-name gnus-active-hashtb)))) | |
5830 (artnum gnus-newsgroup-end) | |
5831 (header nil)) | |
5832 (while (and (not header) | |
5833 (< artnum last)) | |
5834 (setq artnum (1+ artnum)) | |
5835 (setq header (car (gnus-retrieve-headers (list artnum))))) | |
5836 header | |
5837 )) | |
5838 | |
5839 (defun gnus-extend-newsgroup (header &optional backward) | |
5840 "Extend newsgroup selection with HEADER. | |
5841 Optional argument BACKWARD means extend toward backward." | |
5842 (if header | |
5843 (let ((artnum (nntp-header-number header))) | |
5844 (setq gnus-newsgroup-headers | |
5845 (if backward | |
5846 (cons header gnus-newsgroup-headers) | |
5847 (append gnus-newsgroup-headers (list header)))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5848 ;; 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
|
5849 (gnus-clear-hashtables-for-newsgroup-headers) |
257 | 5850 ;; We have to update unreads and unselected, but don't have to |
5851 ;; care about gnus-newsgroup-marked. | |
5852 (if (memq artnum gnus-newsgroup-unselected) | |
5853 (setq gnus-newsgroup-unreads | |
5854 (cons artnum gnus-newsgroup-unreads))) | |
5855 (setq gnus-newsgroup-unselected | |
5856 (delq artnum gnus-newsgroup-unselected)) | |
5857 (setq gnus-newsgroup-begin (min gnus-newsgroup-begin artnum)) | |
5858 (setq gnus-newsgroup-end (max gnus-newsgroup-end artnum)) | |
5859 ))) | |
5860 | |
5861 (defun gnus-mark-article-as-read (article) | |
5862 "Remember that ARTICLE is marked as read." | |
5863 ;; Remove from unread and marked list. | |
5864 (setq gnus-newsgroup-unreads | |
5865 (delq article gnus-newsgroup-unreads)) | |
5866 (setq gnus-newsgroup-marked | |
5867 (delq article gnus-newsgroup-marked))) | |
5868 | |
5869 (defun gnus-mark-article-as-unread (article &optional clear-mark) | |
5870 "Remember that ARTICLE is marked as unread. | |
5871 Optional argument CLEAR-MARK means ARTICLE should not be remembered | |
5872 that it was marked as read once." | |
5873 ;; Add to unread list. | |
5874 (or (memq article gnus-newsgroup-unreads) | |
5875 (setq gnus-newsgroup-unreads | |
5876 (cons article gnus-newsgroup-unreads))) | |
5877 ;; If CLEAR-MARK is non-nil, the article must be removed from marked | |
5878 ;; list. Otherwise, it must be added to the list. | |
5879 (if clear-mark | |
5880 (setq gnus-newsgroup-marked | |
5881 (delq article gnus-newsgroup-marked)) | |
5882 (or (memq article gnus-newsgroup-marked) | |
5883 (setq gnus-newsgroup-marked | |
5884 (cons article gnus-newsgroup-marked))))) | |
5885 | |
5886 (defun gnus-clear-system () | |
5887 "Clear all variables and buffer." | |
5888 ;; Clear GNUS variables. | |
5889 (let ((variables gnus-variable-list)) | |
5890 (while variables | |
5891 (set (car variables) nil) | |
5892 (setq variables (cdr variables)))) | |
5893 ;; Clear other internal variables. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5894 (setq gnus-newsrc-hashtb nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5895 (setq gnus-marked-hashtb nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5896 (setq gnus-killed-hashtb nil) |
257 | 5897 (setq gnus-active-hashtb nil) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5898 (setq gnus-octive-hashtb nil) |
257 | 5899 (setq gnus-unread-hashtb nil) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5900 (setq gnus-newsgroup-headers nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5901 (setq gnus-newsgroup-headers-hashtb-by-id nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5902 (setq gnus-newsgroup-headers-hashtb-by-number nil) |
257 | 5903 ;; Kill the startup file. |
5904 (and gnus-current-startup-file | |
5905 (get-file-buffer gnus-current-startup-file) | |
5906 (kill-buffer (get-file-buffer gnus-current-startup-file))) | |
5907 (setq gnus-current-startup-file nil) | |
5908 ;; Kill GNUS buffers. | |
5909 (let ((buffers gnus-buffer-list)) | |
5910 (while buffers | |
5911 (if (get-buffer (car buffers)) | |
5912 (kill-buffer (car buffers))) | |
5913 (setq buffers (cdr buffers)) | |
5914 ))) | |
5915 | |
5916 (defun gnus-configure-windows (action) | |
5917 "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
|
5918 The ACTION is either a symbol, such as `summary', or a |
257 | 5919 configuration list such as `(1 1 2)'. If ACTION is not a list, |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5920 configuration list is got from the variable gnus-window-configuration." |
257 | 5921 (let* ((windows |
5922 (if (listp action) | |
5923 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
|
5924 (grpwin (get-buffer-window gnus-group-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5925 (subwin (get-buffer-window gnus-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5926 (artwin (get-buffer-window gnus-article-buffer)) |
257 | 5927 (winsum nil) |
5928 (height nil) | |
5929 (grpheight 0) | |
5930 (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
|
5931 (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
|
5932 ;; 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
|
5933 (split-window-keep-point t)) |
257 | 5934 (if (or (null windows) ;No configuration is specified. |
5935 (and (eq (null grpwin) | |
5936 (zerop (nth 0 windows))) | |
5937 (eq (null subwin) | |
5938 (zerop (nth 1 windows))) | |
5939 (eq (null artwin) | |
5940 (zerop (nth 2 windows))))) | |
5941 ;; No need to change window configuration. | |
5942 nil | |
5943 (select-window (or grpwin subwin artwin (selected-window))) | |
5944 ;; First of all, compute the height of each window. | |
5945 (cond (gnus-use-full-window | |
5946 ;; Take up the entire screen. | |
5947 (delete-other-windows) | |
5948 (setq height (window-height (selected-window)))) | |
5949 (t | |
5950 (setq height (+ (if grpwin (window-height grpwin) 0) | |
5951 (if subwin (window-height subwin) 0) | |
5952 (if artwin (window-height artwin) 0))))) | |
5953 ;; The Newsgroup buffer exits always. So, use it to extend the | |
5954 ;; 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
|
5955 (switch-to-buffer gnus-group-buffer 'norecord) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5956 (and (get-buffer gnus-summary-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5957 (delete-windows-on gnus-summary-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5958 (and (get-buffer gnus-article-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5959 (delete-windows-on gnus-article-buffer)) |
257 | 5960 ;; Compute expected window height. |
5961 (setq winsum (apply (function +) windows)) | |
5962 (if (not (zerop (nth 0 windows))) | |
5963 (setq grpheight (max window-min-height | |
5964 (/ (* height (nth 0 windows)) winsum)))) | |
5965 (if (not (zerop (nth 1 windows))) | |
5966 (setq subheight (max window-min-height | |
5967 (/ (* height (nth 1 windows)) winsum)))) | |
5968 (if (not (zerop (nth 2 windows))) | |
5969 (setq artheight (max window-min-height | |
5970 (/ (* height (nth 2 windows)) winsum)))) | |
5971 (setq height (+ grpheight subheight artheight)) | |
5972 (enlarge-window (max 0 (- height (window-height (selected-window))))) | |
5973 ;; Then split the window. | |
5974 (and (not (zerop artheight)) | |
5975 (or (not (zerop grpheight)) | |
5976 (not (zerop subheight))) | |
5977 (split-window-vertically (+ grpheight subheight))) | |
5978 (and (not (zerop grpheight)) | |
5979 (not (zerop subheight)) | |
5980 (split-window-vertically grpheight)) | |
5981 ;; Then select buffers in each window. | |
5982 (and (not (zerop grpheight)) | |
5983 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5984 (switch-to-buffer gnus-group-buffer 'norecord) |
257 | 5985 (other-window 1))) |
5986 (and (not (zerop subheight)) | |
5987 (progn | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5988 (switch-to-buffer gnus-summary-buffer 'norecord) |
257 | 5989 (other-window 1))) |
5990 (and (not (zerop artheight)) | |
5991 (progn | |
5992 ;; If Article buffer does not exist, it will be created | |
5993 ;; and initialized. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5994 (gnus-article-setup-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
5995 (switch-to-buffer gnus-article-buffer 'norecord))) |
257 | 5996 ) |
5997 )) | |
5998 | |
5999 (defun gnus-find-header-by-number (headers number) | |
6000 "Return a header which is a element of HEADERS and has NUMBER." | |
6001 (let ((found nil)) | |
6002 (while (and headers (not found)) | |
6003 ;; We cannot use `=' to accept non-numeric NUMBER. | |
6004 (if (eq number (nntp-header-number (car headers))) | |
6005 (setq found (car headers))) | |
6006 (setq headers (cdr headers))) | |
6007 found | |
6008 )) | |
6009 | |
6010 (defun gnus-find-header-by-id (headers id) | |
6011 "Return a header which is a element of HEADERS and has Message-ID." | |
6012 (let ((found nil)) | |
6013 (while (and headers (not found)) | |
6014 (if (string-equal id (nntp-header-id (car headers))) | |
6015 (setq found (car headers))) | |
6016 (setq headers (cdr headers))) | |
6017 found | |
6018 )) | |
6019 | |
6020 (defun gnus-version () | |
6021 "Version numbers of this version of GNUS." | |
6022 (interactive) | |
6023 (cond ((and (boundp 'mhspool-version) (boundp 'nnspool-version)) | |
6024 (message "%s; %s; %s; %s" | |
6025 gnus-version nntp-version nnspool-version mhspool-version)) | |
6026 ((boundp 'mhspool-version) | |
6027 (message "%s; %s; %s" | |
6028 gnus-version nntp-version mhspool-version)) | |
6029 ((boundp 'nnspool-version) | |
6030 (message "%s; %s; %s" | |
6031 gnus-version nntp-version nnspool-version)) | |
6032 (t | |
6033 (message "%s; %s" gnus-version nntp-version)))) | |
6034 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6035 (defun gnus-info-find-node () |
257 | 6036 "Find Info documentation of GNUS." |
6037 (interactive) | |
6038 (require 'info) | |
6039 ;; Enlarge info window if needed. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6040 (cond ((eq major-mode 'gnus-group-mode) |
257 | 6041 (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
|
6042 (pop-to-buffer gnus-group-buffer)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6043 ((eq major-mode 'gnus-summary-mode) |
257 | 6044 (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
|
6045 (pop-to-buffer gnus-summary-buffer))) |
2845
7a48e4a67e8c
(gnus-info-directory): Variable removed.
Roland McGrath <roland@gnu.org>
parents:
2843
diff
changeset
|
6046 (Info-goto-node (car (cdr (assq major-mode gnus-info-nodes))))) |
257 | 6047 |
6048 (defun gnus-overload-functions (&optional overloads) | |
6049 "Overload functions specified by optional argument OVERLOADS. | |
6050 If nothing is specified, use the variable gnus-overload-functions." | |
6051 (let ((defs nil) | |
6052 (overloads (or overloads gnus-overload-functions))) | |
6053 (while overloads | |
6054 (setq defs (car overloads)) | |
6055 (setq overloads (cdr overloads)) | |
6056 ;; 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
|
6057 ;; sure we cannot use `require' always. |
257 | 6058 (and (not (fboundp (car defs))) |
6059 (car (cdr (cdr defs))) | |
6060 (load (car (cdr (cdr defs))) nil 'nomessage)) | |
6061 (fset (car defs) (car (cdr defs))) | |
6062 ))) | |
6063 | |
6064 (defun gnus-make-threads (newsgroup-headers) | |
6065 "Make conversation threads tree from NEWSGROUP-HEADERS." | |
6066 (let ((headers newsgroup-headers) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6067 (refer nil) |
257 | 6068 (h nil) |
6069 (d nil) | |
6070 (roots nil) | |
6071 (dependencies nil)) | |
6072 ;; Make message dependency alist. | |
6073 (while headers | |
6074 (setq h (car headers)) | |
6075 (setq headers (cdr headers)) | |
6076 ;; Ignore invalid headers. | |
6077 (if (vectorp h) ;Depends on nntp.el. | |
6078 (progn | |
6079 ;; 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
|
6080 (setq refer (nntp-header-references h)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6081 (setq d (and refer |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6082 (string-match "\\(<[^<>]+>\\)[^>]*$" refer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6083 ;; (gnus-find-header-by-id |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6084 ;; newsgroup-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6085 ;; (substring refer (match-beginning 1) (match-end 1))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6086 ;; In fact if the variable newsgroup-headers |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6087 ;; is not 'equal' to the variable |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6088 ;; gnus-newsgroup-headers, the following |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6089 ;; function call may return bogus value. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6090 (gnus-get-header-by-id |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6091 (substring refer (match-beginning 1) (match-end 1))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6092 )) |
257 | 6093 ;; Check subject equality. |
6094 (or gnus-thread-ignore-subject | |
6095 (null d) | |
6096 (string-equal (gnus-simplify-subject | |
6097 (nntp-header-subject h) 're) | |
6098 (gnus-simplify-subject | |
6099 (nntp-header-subject d) 're)) | |
6100 ;; H should be a thread root. | |
6101 (setq d nil)) | |
6102 ;; H depends on D. | |
6103 (setq dependencies | |
6104 (cons (cons h d) dependencies)) | |
6105 ;; H is a thread root. | |
6106 (if (null d) | |
6107 (setq roots (cons h roots))) | |
6108 )) | |
6109 ) | |
6110 ;; Make complete threads from the roots. | |
6111 ;; Note: dependencies are in reverse order, but | |
6112 ;; gnus-make-threads-1 processes it in reverse order again. So, | |
6113 ;; we don't have to worry about it. | |
6114 (mapcar | |
6115 (function | |
6116 (lambda (root) | |
6117 (gnus-make-threads-1 root dependencies))) (nreverse roots)) | |
6118 )) | |
6119 | |
6120 (defun gnus-make-threads-1 (parent dependencies) | |
6121 (let ((children nil) | |
6122 (d nil) | |
6123 (depends dependencies)) | |
6124 ;; Find children. | |
6125 (while depends | |
6126 (setq d (car depends)) | |
6127 (setq depends (cdr depends)) | |
6128 (and (cdr d) | |
6129 (eq (nntp-header-id parent) (nntp-header-id (cdr d))) | |
6130 (setq children (cons (car d) children)))) | |
6131 ;; Go down. | |
6132 (cons parent | |
6133 (mapcar | |
6134 (function | |
6135 (lambda (child) | |
6136 (gnus-make-threads-1 child dependencies))) children)) | |
6137 )) | |
6138 | |
6139 (defun gnus-narrow-to-page (&optional arg) | |
6140 "Make text outside current page invisible except for page delimiter. | |
6141 A numeric arg specifies to move forward or backward by that many pages, | |
6142 thus showing a page other than the one point was originally in." | |
6143 (interactive "P") | |
6144 (setq arg (if arg (prefix-numeric-value arg) 0)) | |
6145 (save-excursion | |
6146 (forward-page -1) ;Beginning of current page. | |
6147 (widen) | |
6148 (if (> arg 0) | |
6149 (forward-page arg) | |
6150 (if (< arg 0) | |
6151 (forward-page (1- arg)))) | |
6152 ;; Find the end of the page. | |
6153 (forward-page) | |
6154 ;; If we stopped due to end of buffer, stay there. | |
6155 ;; If we stopped after a page delimiter, put end of restriction | |
6156 ;; at the beginning of that line. | |
6157 ;; These are commented out. | |
6158 ;; (if (save-excursion (beginning-of-line) | |
6159 ;; (looking-at page-delimiter)) | |
6160 ;; (beginning-of-line)) | |
6161 (narrow-to-region (point) | |
6162 (progn | |
6163 ;; Find the top of the page. | |
6164 (forward-page -1) | |
6165 ;; If we found beginning of buffer, stay there. | |
6166 ;; If extra text follows page delimiter on same line, | |
6167 ;; include it. | |
6168 ;; Otherwise, show text starting with following line. | |
6169 (if (and (eolp) (not (bobp))) | |
6170 (forward-line 1)) | |
6171 (point))) | |
6172 )) | |
6173 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6174 ;; 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
|
6175 ;; gnus-killed-assoc, and gnus-marked-assoc. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6176 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6177 (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
|
6178 "Return hash table for ALIST. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6179 Optional argument HASHSIZE specifies the hashtable size. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6180 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
|
6181 (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
|
6182 (while alist |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6183 (gnus-sethash (car (car alist)) ;Newsgroup name |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6184 (car alist) ;Alist element |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6185 hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6186 (setq alist (cdr alist))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6187 hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6188 )) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6189 |
257 | 6190 (defun gnus-last-element (list) |
6191 "Return last element of LIST." | |
6192 (let ((last nil)) | |
6193 (while list | |
6194 (if (null (cdr list)) | |
6195 (setq last (car list))) | |
6196 (setq list (cdr list))) | |
6197 last | |
6198 )) | |
6199 | |
6200 (defun gnus-set-difference (list1 list2) | |
6201 "Return a list of elements of LIST1 that do not appear in LIST2." | |
6202 (let ((list1 (copy-sequence list1))) | |
6203 (while list2 | |
6204 (setq list1 (delq (car list2) list1)) | |
6205 (setq list2 (cdr list2))) | |
6206 list1 | |
6207 )) | |
6208 | |
6209 (defun gnus-intersection (list1 list2) | |
6210 "Return a list of elements that appear in both LIST1 and LIST2." | |
6211 (let ((result nil)) | |
6212 (while list2 | |
6213 (if (memq (car list2) list1) | |
6214 (setq result (cons (car list2) result))) | |
6215 (setq list2 (cdr list2))) | |
6216 result | |
6217 )) | |
6218 | |
6219 | |
6220 ;;; | |
6221 ;;; Get information about active articles, already read articles, and | |
6222 ;;; still unread articles. | |
6223 ;;; | |
6224 | |
6225 ;; GNUS internal format of gnus-newsrc-assoc and gnus-killed-assoc: | |
6226 ;; (("general" t (1 . 1)) | |
6227 ;; ("misc" t (1 . 10) (12 . 15)) | |
6228 ;; ("test" nil (1 . 99)) ...) | |
6229 ;; GNUS internal format of gnus-marked-assoc: | |
6230 ;; (("general" 1 2 3) | |
6231 ;; ("misc" 2) ...) | |
6232 ;; GNUS internal format of gnus-active-hashtb: | |
6233 ;; (("general" t (1 . 1)) | |
6234 ;; ("misc" t (1 . 10)) | |
6235 ;; ("test" nil (1 . 99)) ...) | |
6236 ;; GNUS internal format of gnus-unread-hashtb: | |
6237 ;; (("general" 1 (1 . 1)) | |
6238 ;; ("misc" 14 (1 . 10) (12 . 15)) | |
6239 ;; ("test" 99 (1 . 99)) ...) | |
6240 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6241 (defun gnus-setup-news (&optional rawfile) |
257 | 6242 "Setup news information. |
6243 If optional argument RAWFILE is non-nil, force to read raw startup file." | |
6244 (let ((init (not (and gnus-newsrc-assoc | |
6245 gnus-active-hashtb | |
6246 gnus-unread-hashtb | |
6247 (not rawfile) | |
6248 )))) | |
6249 ;; We have to clear some variables to re-initialize news info. | |
6250 (if init | |
6251 (setq gnus-newsrc-assoc nil | |
6252 gnus-active-hashtb nil | |
6253 gnus-unread-hashtb nil)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6254 (gnus-read-active-file) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6255 ;; Initialize only once. |
257 | 6256 (if init |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6257 (progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6258 ;; Get distributions only once. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6259 (gnus-read-distributions-file) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6260 ;; 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
|
6261 ;; 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
|
6262 (gnus-read-newsrc-file rawfile) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6263 )) |
257 | 6264 (gnus-expire-marked-articles) |
6265 (gnus-get-unread-articles) | |
6266 ;; Check new newsgroups and subscribe them. | |
6267 (if init | |
6268 (let ((new-newsgroups (gnus-find-new-newsgroups))) | |
6269 (while new-newsgroups | |
6270 (funcall gnus-subscribe-newsgroup-method (car new-newsgroups)) | |
6271 (setq new-newsgroups (cdr new-newsgroups)) | |
6272 ))) | |
6273 )) | |
6274 | |
6275 (defun gnus-add-newsgroup (newsgroup) | |
6276 "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
|
6277 (and (null (gnus-gethash newsgroup gnus-newsrc-hashtb)) ;Really new? |
257 | 6278 (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
|
6279 (gnus-insert-newsgroup (or (gnus-gethash newsgroup gnus-killed-hashtb) |
257 | 6280 (list newsgroup t)) |
6281 (car (car gnus-newsrc-assoc))))) | |
6282 | |
6283 (defun gnus-find-new-newsgroups () | |
6284 "Looking for new newsgroups and return names. | |
6285 `-n' option of options line in .newsrc file is recognized." | |
6286 (let ((group nil) | |
6287 (new-newsgroups nil)) | |
6288 (mapatoms | |
6289 (function | |
6290 (lambda (sym) | |
6291 (setq group (symbol-name sym)) | |
6292 ;; Taking account of `-n' option. | |
6293 (and (or (null gnus-newsrc-options-n-no) | |
6294 (not (string-match gnus-newsrc-options-n-no group)) | |
6295 (and gnus-newsrc-options-n-yes | |
6296 (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
|
6297 (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
|
6298 (null (gnus-gethash group gnus-newsrc-hashtb)) ;Really new. |
257 | 6299 ;; Find new newsgroup. |
6300 (setq new-newsgroups | |
6301 (cons group new-newsgroups))) | |
6302 )) | |
6303 gnus-active-hashtb) | |
6304 ;; Return new newsgroups. | |
6305 new-newsgroups | |
6306 )) | |
6307 | |
6308 (defun gnus-kill-newsgroup (group) | |
6309 "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
|
6310 (let ((info (gnus-gethash group gnus-newsrc-hashtb))) |
257 | 6311 (if (null info) |
6312 nil | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6313 ;; Delete from gnus-newsrc-assoc and gnus-newsrc-hashtb. |
257 | 6314 (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
|
6315 (gnus-sethash group nil gnus-newsrc-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6316 ;; Add to gnus-killed-assoc and gnus-killed-hashtb. |
257 | 6317 (setq gnus-killed-assoc |
6318 (cons info | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6319 (delq (gnus-gethash group gnus-killed-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6320 gnus-killed-assoc))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6321 (gnus-sethash group info gnus-killed-hashtb) |
257 | 6322 ;; Clear unread hashtable. |
6323 ;; Thanks cwitty@csli.Stanford.EDU (Carl Witty). | |
6324 (gnus-sethash group nil gnus-unread-hashtb) | |
6325 ;; Then delete from .newsrc | |
6326 (gnus-update-newsrc-buffer group 'delete) | |
6327 ;; Return the deleted newsrc entry. | |
6328 info | |
6329 ))) | |
6330 | |
6331 (defun gnus-insert-newsgroup (info &optional next) | |
6332 "Insert newsrc INFO entry before NEXT. | |
6333 If optional argument NEXT is nil, appended to the last." | |
6334 (if (null info) | |
6335 (error "Invalid argument: %s" info)) | |
6336 (let* ((group (car info)) ;Newsgroup name. | |
6337 (range | |
6338 (gnus-difference-of-range | |
6339 (nth 2 (gnus-gethash group gnus-active-hashtb)) (nthcdr 2 info)))) | |
6340 ;; Check duplication. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6341 (if (gnus-gethash group gnus-newsrc-hashtb) |
257 | 6342 (error "Duplicated: %s" group)) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6343 ;; Insert to gnus-newsrc-assoc and gnus-newsrc-hashtb. |
257 | 6344 (if (string-equal next (car (car gnus-newsrc-assoc))) |
6345 (setq gnus-newsrc-assoc | |
6346 (cons info gnus-newsrc-assoc)) | |
6347 (let ((found nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6348 (rest (cdr gnus-newsrc-assoc)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6349 (tail gnus-newsrc-assoc)) |
257 | 6350 ;; Seach insertion point. |
6351 (while (and (not found) rest) | |
6352 (if (string-equal next (car (car rest))) | |
6353 (setq found t) | |
6354 (setq rest (cdr rest)) | |
6355 (setq tail (cdr tail)) | |
6356 )) | |
6357 ;; Find it. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6358 (if (consp tail) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6359 (setcdr tail (cons info rest)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6360 ;; gnus-newsrc-assoc must be nil. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6361 (setq gnus-newsrc-assoc |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6362 (append gnus-newsrc-assoc (cons info rest)))) |
257 | 6363 )) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6364 (gnus-sethash group info gnus-newsrc-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6365 ;; Delete from gnus-killed-assoc and gnus-killed-hashtb. |
257 | 6366 (setq gnus-killed-assoc |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6367 (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
|
6368 (gnus-sethash group nil gnus-killed-hashtb) |
257 | 6369 ;; Then insert to .newsrc. |
6370 (gnus-update-newsrc-buffer group nil next) | |
6371 ;; Add to gnus-unread-hashtb. | |
6372 (gnus-sethash group | |
6373 (cons group ;Newsgroup name. | |
6374 (cons (gnus-number-of-articles range) range)) | |
6375 gnus-unread-hashtb) | |
6376 )) | |
6377 | |
6378 (defun gnus-check-killed-newsgroups () | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6379 "Check consistency between gnus-newsrc-assoc and gnus-killed-assoc. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6380 gnus-killed-hashtb is also updated." |
257 | 6381 (let ((group nil) |
6382 (new-killed nil) | |
6383 (old-killed gnus-killed-assoc)) | |
6384 (while old-killed | |
6385 (setq group (car (car old-killed))) | |
6386 (and (or (null gnus-newsrc-options-n-no) | |
6387 (not (string-match gnus-newsrc-options-n-no group)) | |
6388 (and gnus-newsrc-options-n-yes | |
6389 (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
|
6390 (null (gnus-gethash group gnus-newsrc-hashtb)) ;No duplication. |
257 | 6391 ;; Subscribed in options line and not in gnus-newsrc-assoc. |
6392 (setq new-killed | |
6393 (cons (car old-killed) new-killed))) | |
6394 (setq old-killed (cdr old-killed)) | |
6395 ) | |
6396 (setq gnus-killed-assoc (nreverse new-killed)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6397 (setq gnus-killed-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6398 (gnus-make-hashtable-from-alist gnus-killed-assoc)) |
257 | 6399 )) |
6400 | |
6401 (defun gnus-check-bogus-newsgroups (&optional confirm) | |
6402 "Delete bogus newsgroups. | |
6403 If optional argument CONFIRM is non-nil, confirm deletion of newsgroups." | |
6404 (let ((group nil) ;Newsgroup name temporary used. | |
6405 (old-newsrc gnus-newsrc-assoc) | |
6406 (new-newsrc nil) | |
6407 (bogus nil) ;List of bogus newsgroups. | |
6408 (old-killed gnus-killed-assoc) | |
6409 (new-killed nil) | |
6410 (old-marked gnus-marked-assoc) | |
6411 (new-marked nil)) | |
6412 (message "Checking bogus newsgroups...") | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6413 ;; Update gnus-newsrc-assoc and gnus-newsrc-hashtb. |
257 | 6414 (while old-newsrc |
6415 (setq group (car (car old-newsrc))) | |
6416 (if (or (gnus-gethash group gnus-active-hashtb) | |
6417 (and confirm | |
6418 (not (y-or-n-p | |
6419 (format "Delete bogus newsgroup: %s " group))))) | |
6420 ;; Active newsgroup. | |
6421 (setq new-newsrc (cons (car old-newsrc) new-newsrc)) | |
6422 ;; Found a bogus newsgroup. | |
6423 (setq bogus (cons group bogus))) | |
6424 (setq old-newsrc (cdr old-newsrc)) | |
6425 ) | |
6426 (setq gnus-newsrc-assoc (nreverse new-newsrc)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6427 (setq gnus-newsrc-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6428 (gnus-make-hashtable-from-alist gnus-newsrc-assoc)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6429 ;; Update gnus-killed-assoc and gnus-killed-hashtb. |
257 | 6430 ;; The killed newsgroups are deleted without any confirmations. |
6431 (while old-killed | |
6432 (setq group (car (car old-killed))) | |
6433 (and (gnus-gethash group gnus-active-hashtb) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6434 (null (gnus-gethash group gnus-newsrc-hashtb)) |
257 | 6435 ;; Active and really killed newsgroup. |
6436 (setq new-killed (cons (car old-killed) new-killed))) | |
6437 (setq old-killed (cdr old-killed)) | |
6438 ) | |
6439 (setq gnus-killed-assoc (nreverse new-killed)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6440 (setq gnus-killed-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6441 (gnus-make-hashtable-from-alist gnus-killed-assoc)) |
257 | 6442 ;; Remove BOGUS from .newsrc file. |
6443 (while bogus | |
6444 (gnus-update-newsrc-buffer (car bogus) 'delete) | |
6445 (setq bogus (cdr bogus))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6446 ;; Update gnus-marked-assoc and gnus-marked-hashtb. |
257 | 6447 (while old-marked |
6448 (setq group (car (car old-marked))) | |
6449 (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
|
6450 (gnus-gethash group gnus-newsrc-hashtb)) ;Not bogus? |
257 | 6451 (setq new-marked (cons (car old-marked) new-marked))) |
6452 (setq old-marked (cdr old-marked))) | |
6453 (setq gnus-marked-assoc new-marked) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6454 (setq gnus-marked-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6455 (gnus-make-hashtable-from-alist gnus-marked-assoc)) |
257 | 6456 (message "Checking bogus newsgroups... done") |
6457 )) | |
6458 | |
6459 (defun gnus-get-unread-articles () | |
6460 "Compute diffs between active and read articles." | |
6461 (let ((read gnus-newsrc-assoc) | |
6462 (group-info nil) | |
6463 (group-name nil) | |
6464 (active nil) | |
6465 (range nil)) | |
6466 (message "Checking new news...") | |
6467 (or gnus-unread-hashtb | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6468 (setq gnus-unread-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6469 (gnus-make-hashtable (length gnus-active-hashtb)))) |
257 | 6470 (while read |
6471 (setq group-info (car read)) ;About one newsgroup | |
6472 (setq group-name (car group-info)) | |
6473 (setq active (nth 2 (gnus-gethash group-name gnus-active-hashtb))) | |
6474 (if (and gnus-octive-hashtb | |
6475 ;; Is nothing changed? | |
6476 (equal active | |
6477 (nth 2 (gnus-gethash group-name gnus-octive-hashtb))) | |
6478 ;; Is this newsgroup in the unread hash table? | |
6479 (gnus-gethash group-name gnus-unread-hashtb) | |
6480 ) | |
6481 nil ;Nothing to do. | |
6482 (setq range (gnus-difference-of-range active (nthcdr 2 group-info))) | |
6483 (gnus-sethash group-name | |
6484 (cons group-name ;Group name | |
6485 (cons (gnus-number-of-articles range) | |
6486 range)) ;Range of unread articles | |
6487 gnus-unread-hashtb) | |
6488 ) | |
6489 (setq read (cdr read)) | |
6490 ) | |
6491 (message "Checking new news... done") | |
6492 )) | |
6493 | |
6494 (defun gnus-expire-marked-articles () | |
6495 "Check expired article which is marked as unread." | |
6496 (let ((marked-assoc gnus-marked-assoc) | |
6497 (updated-assoc nil) | |
6498 (marked nil) ;Current marked info. | |
6499 (articles nil) ;List of marked articles. | |
6500 (updated nil) ;List of real marked. | |
6501 (begin nil)) | |
6502 (while marked-assoc | |
6503 (setq marked (car marked-assoc)) | |
6504 (setq articles (cdr marked)) | |
6505 (setq updated nil) | |
6506 (setq begin | |
6507 (car (nth 2 (gnus-gethash (car marked) gnus-active-hashtb)))) | |
6508 (while (and begin articles) | |
6509 (if (>= (car articles) begin) | |
6510 ;; This article is still active. | |
6511 (setq updated (cons (car articles) updated))) | |
6512 (setq articles (cdr articles))) | |
6513 (if updated | |
6514 (setq updated-assoc | |
6515 (cons (cons (car marked) updated) updated-assoc))) | |
6516 (setq marked-assoc (cdr marked-assoc))) | |
6517 (setq gnus-marked-assoc updated-assoc) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6518 (setq gnus-marked-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6519 (gnus-make-hashtable-from-alist gnus-marked-assoc)) |
257 | 6520 )) |
6521 | |
6522 (defun gnus-mark-as-read-by-xref | |
6523 (group headers unreads &optional subscribed-only) | |
6524 "Mark articles as read using cross references and return updated newsgroups. | |
6525 Arguments are GROUP, HEADERS, UNREADS, and optional SUBSCRIBED-ONLY." | |
6526 (let ((xref-list nil) | |
6527 (header nil) | |
6528 (xrefs nil) ;One Xref: field info. | |
6529 (xref nil) ;(NEWSGROUP . ARTICLE) | |
6530 (gname nil) ;Newsgroup name | |
6531 (article nil)) ;Article number | |
6532 (while headers | |
6533 (setq header (car headers)) | |
6534 (if (memq (nntp-header-number header) unreads) | |
6535 ;; This article is not yet marked as read. | |
6536 nil | |
6537 (setq xrefs (gnus-parse-xref-field (nntp-header-xref header))) | |
6538 ;; For each cross reference info. in one Xref: field. | |
6539 (while xrefs | |
6540 (setq xref (car xrefs)) | |
6541 (setq gname (car xref)) ;Newsgroup name | |
6542 (setq article (cdr xref)) ;Article number | |
6543 (or (string-equal group gname) ;Ignore current newsgroup. | |
6544 ;; Ignore unsubscribed newsgroup if requested. | |
6545 (and subscribed-only | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6546 (not (nth 1 (gnus-gethash gname gnus-newsrc-hashtb)))) |
257 | 6547 ;; Ignore article marked as unread. |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6548 (memq article (cdr (gnus-gethash gname gnus-marked-hashtb))) |
257 | 6549 (let ((group-xref (assoc gname xref-list))) |
6550 (if group-xref | |
6551 (if (memq article (cdr group-xref)) | |
6552 nil ;Alread marked. | |
6553 (setcdr group-xref (cons article (cdr group-xref)))) | |
6554 ;; Create new assoc entry for GROUP. | |
6555 (setq xref-list (cons (list gname article) xref-list))) | |
6556 )) | |
6557 (setq xrefs (cdr xrefs)) | |
6558 )) | |
6559 (setq headers (cdr headers))) | |
6560 ;; Mark cross referenced articles as read. | |
6561 (gnus-mark-xrefed-as-read xref-list) | |
6562 ;;(message "%s %s" (prin1-to-string unreads) (prin1-to-string xref-list)) | |
6563 ;; Return list of updated group name. | |
6564 (mapcar (function car) xref-list) | |
6565 )) | |
6566 | |
6567 (defun gnus-parse-xref-field (xref-value) | |
6568 "Parse Xref: field value, and return list of `(group . article-id)'." | |
6569 (let ((xref-list nil) | |
6570 (xref-value (or xref-value ""))) | |
6571 ;; Remove server host name. | |
6572 (if (string-match "^[ \t]*[^ \t,]+[ \t,]+\\(.*\\)$" xref-value) | |
6573 (setq xref-value (substring xref-value (match-beginning 1))) | |
6574 (setq xref-value nil)) | |
6575 ;; Process each xref info. | |
6576 (while xref-value | |
6577 (if (string-match | |
6578 "^[ \t,]*\\([^ \t,]+\\):\\([0-9]+\\)[^0-9]*" xref-value) | |
6579 (progn | |
6580 (setq xref-list | |
6581 (cons | |
6582 (cons | |
6583 ;; Group name | |
6584 (substring xref-value (match-beginning 1) (match-end 1)) | |
6585 ;; Article-ID | |
6586 (string-to-int | |
6587 (substring xref-value (match-beginning 2) (match-end 2)))) | |
6588 xref-list)) | |
6589 (setq xref-value (substring xref-value (match-end 2)))) | |
6590 (setq xref-value nil))) | |
6591 ;; Return alist. | |
6592 xref-list | |
6593 )) | |
6594 | |
6595 (defun gnus-mark-xrefed-as-read (xrefs) | |
6596 "Update unread article information using XREFS alist." | |
6597 (let ((group nil) | |
6598 (idlist nil) | |
6599 (unread nil)) | |
6600 (while xrefs | |
6601 (setq group (car (car xrefs))) | |
6602 (setq idlist (cdr (car xrefs))) | |
6603 (setq unread (gnus-uncompress-sequence | |
6604 (nthcdr 2 (gnus-gethash group gnus-unread-hashtb)))) | |
6605 (while idlist | |
6606 (setq unread (delq (car idlist) unread)) | |
6607 (setq idlist (cdr idlist))) | |
6608 (gnus-update-unread-articles group unread 'ignore) | |
6609 (setq xrefs (cdr xrefs)) | |
6610 ))) | |
6611 | |
6612 (defun gnus-update-unread-articles (group unread-list marked-list) | |
6613 "Update unread articles of GROUP using UNREAD-LIST and MARKED-LIST." | |
6614 (let ((active (nth 2 (gnus-gethash group gnus-active-hashtb))) | |
6615 (unread (gnus-gethash group gnus-unread-hashtb))) | |
6616 (if (or (null active) (null unread)) | |
6617 ;; Ignore unknown newsgroup. | |
6618 nil | |
6619 ;; Update gnus-unread-hashtb. | |
6620 (if unread-list | |
6621 (setcdr (cdr unread) | |
6622 (gnus-compress-sequence unread-list)) | |
6623 ;; All of the articles are read. | |
6624 (setcdr (cdr unread) '((0 . 0)))) | |
6625 ;; Number of unread articles. | |
6626 (setcar (cdr unread) | |
6627 (gnus-number-of-articles (nthcdr 2 unread))) | |
6628 ;; Update gnus-newsrc-assoc. | |
6629 (if (> (car active) 0) | |
6630 ;; Articles from 1 to N are not active. | |
6631 (setq active (cons 1 (cdr active)))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6632 (setcdr (cdr (gnus-gethash group gnus-newsrc-hashtb)) |
257 | 6633 (gnus-difference-of-range active (nthcdr 2 unread))) |
6634 ;; Update .newsrc buffer. | |
6635 (gnus-update-newsrc-buffer group) | |
6636 ;; Update gnus-marked-assoc. | |
6637 (if (listp marked-list) ;Includes NIL. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6638 (let ((marked (gnus-gethash group gnus-marked-hashtb))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6639 (cond (marked ;There is an entry. |
257 | 6640 (setcdr marked marked-list)) |
6641 (marked-list ;Non-NIL. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6642 (let ((info (cons group marked-list))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6643 ;; hashtb must share the same cons cell. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6644 (setq gnus-marked-assoc |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6645 (cons info gnus-marked-assoc)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6646 (gnus-sethash group info gnus-marked-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6647 )) |
257 | 6648 ))) |
6649 ))) | |
6650 | |
6651 (defun gnus-read-active-file () | |
6652 "Get active file from NNTP server." | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6653 ;; 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
|
6654 (gnus-start-news-server) |
257 | 6655 (message "Reading active file...") |
6656 (if (gnus-request-list) ;Get active file from server | |
6657 (save-excursion | |
6658 (set-buffer nntp-server-buffer) | |
6659 (gnus-active-to-gnus-format) | |
6660 (message "Reading active file... done")) | |
6661 (error "Cannot read active file from NNTP server."))) | |
6662 | |
6663 (defun gnus-active-to-gnus-format () | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6664 "Convert active file format to internal format. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6665 Lines matching gnus-ignored-newsgroups are ignored." |
257 | 6666 ;; Delete unnecessary lines. |
6667 (goto-char (point-min)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6668 ;;(delete-matching-lines "^to\\..*$") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6669 (delete-matching-lines gnus-ignored-newsgroups) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6670 ;; Save OLD active info. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6671 (setq gnus-octive-hashtb gnus-active-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6672 ;; Make large enough hash table. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6673 (setq gnus-active-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6674 (gnus-make-hashtable (count-lines (point-min) (point-max)))) |
257 | 6675 ;; Store active file in hashtable. |
6676 (goto-char (point-min)) | |
6677 (while | |
6678 (re-search-forward | |
6679 "^\\([^ \t]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\([ymn]\\).*$" | |
6680 nil t) | |
6681 (gnus-sethash | |
6682 (buffer-substring (match-beginning 1) (match-end 1)) | |
6683 (list (buffer-substring (match-beginning 1) (match-end 1)) | |
6684 (string-equal | |
6685 "y" (buffer-substring (match-beginning 4) (match-end 4))) | |
6686 (cons (string-to-int | |
6687 (buffer-substring (match-beginning 3) (match-end 3))) | |
6688 (string-to-int | |
6689 (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
|
6690 gnus-active-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6691 )) |
257 | 6692 |
6693 (defun gnus-read-newsrc-file (&optional rawfile) | |
6694 "Read startup FILE. | |
6695 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
|
6696 (setq gnus-current-startup-file (gnus-make-newsrc-file gnus-startup-file)) |
257 | 6697 ;; Reset variables which may be included in the quick startup file. |
6698 (let ((variables gnus-variable-list)) | |
6699 (while variables | |
6700 (set (car variables) nil) | |
6701 (setq variables (cdr variables)))) | |
6702 (let* ((newsrc-file gnus-current-startup-file) | |
6703 (quick-file (concat newsrc-file ".el")) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6704 (quick-loaded nil)) |
257 | 6705 (save-excursion |
6706 ;; Prepare .newsrc buffer. | |
6707 (set-buffer (find-file-noselect newsrc-file)) | |
6708 ;; 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
|
6709 ;;(buffer-flush-undo (current-buffer)) |
257 | 6710 ;; Load quick .newsrc to restore gnus-marked-assoc and |
6711 ;; gnus-killed-assoc even if gnus-newsrc-assoc is out of date. | |
6712 (condition-case nil | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6713 (progn |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6714 (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
|
6715 ;; Recreate hashtables. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6716 (setq gnus-killed-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6717 (gnus-make-hashtable-from-alist gnus-killed-assoc)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6718 (setq gnus-marked-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6719 (gnus-make-hashtable-from-alist gnus-marked-assoc)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6720 ) |
257 | 6721 (error nil)) |
6722 (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
|
6723 ;; .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
|
6724 ;; 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
|
6725 ;; (on fast machines/disks). |
9eaa2151f7f6
(gnus-summary-isearch-article): Call isearch-forward
Richard M. Stallman <rms@gnu.org>
parents:
3331
diff
changeset
|
6726 (not (file-newer-than-file-p newsrc-file quick-file)) |
257 | 6727 quick-loaded |
6728 gnus-newsrc-assoc ;Really loaded? | |
6729 ) | |
6730 ;; 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
|
6731 ;; 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
|
6732 ;; So, we have to define the hashtable here. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6733 (setq gnus-newsrc-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6734 (gnus-make-hashtable-from-alist gnus-newsrc-assoc))) |
257 | 6735 (t |
6736 ;; Since .newsrc file is newer than quick file, read it. | |
6737 (message "Reading %s..." newsrc-file) | |
6738 (gnus-newsrc-to-gnus-format) | |
6739 (gnus-check-killed-newsgroups) | |
6740 (message "Reading %s... Done" newsrc-file))) | |
6741 ))) | |
6742 | |
6743 (defun gnus-make-newsrc-file (file) | |
6744 "Make server dependent file name by catenating FILE and server host name." | |
6745 (let* ((file (expand-file-name file nil)) | |
6746 (real-file (concat file "-" gnus-nntp-server))) | |
6747 (if (file-exists-p real-file) | |
6748 real-file file) | |
6749 )) | |
6750 | |
6751 (defun gnus-newsrc-to-gnus-format () | |
6752 "Parse current buffer as .newsrc file." | |
6753 (let ((newsgroup nil) | |
6754 (subscribe nil) | |
6755 (ranges nil) | |
6756 (subrange nil) | |
6757 (read-list nil)) | |
6758 ;; We have to re-initialize these variable (except for | |
6759 ;; gnus-marked-assoc and gnus-killed-assoc) because quick startup | |
6760 ;; file may contain bogus values. | |
6761 (setq gnus-newsrc-options nil) | |
6762 (setq gnus-newsrc-options-n-yes nil) | |
6763 (setq gnus-newsrc-options-n-no nil) | |
6764 (setq gnus-newsrc-assoc nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6765 ;; Make large enough hash table. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6766 (setq gnus-newsrc-hashtb |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6767 (gnus-make-hashtable |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6768 (max (length gnus-active-hashtb) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6769 (count-lines (point-min) (point-max))))) |
257 | 6770 ;; Save options line to variable. |
6771 ;; Lines beginning with white spaces are treated as continuation | |
6772 ;; line. Refer man page of newsrc(5). | |
6773 (goto-char (point-min)) | |
6774 (if (re-search-forward | |
6775 "^[ \t]*options[ \t]*\\(.*\\(\n[ \t]+.*\\)*\\)[ \t]*$" nil t) | |
6776 (progn | |
6777 ;; Save entire options line. | |
6778 (setq gnus-newsrc-options | |
6779 (buffer-substring (match-beginning 1) (match-end 1))) | |
6780 ;; Compile "-n" option. | |
6781 (if (string-match "\\(^\\|[ \t\n]\\)-n" gnus-newsrc-options) | |
6782 (let ((yes-and-no | |
6783 (gnus-parse-n-options | |
6784 (substring gnus-newsrc-options (match-end 0))))) | |
6785 (setq gnus-newsrc-options-n-yes (car yes-and-no)) | |
6786 (setq gnus-newsrc-options-n-no (cdr yes-and-no)) | |
6787 )) | |
6788 )) | |
6789 ;; Parse body of .newsrc file | |
6790 ;; Options line continuation lines must be also considered here. | |
6791 ;; Before supporting continuation lines, " newsgroup ! 1-5" was | |
6792 ;; okay, but now it is invalid. It should be "newsgroup! 1-5". | |
6793 (goto-char (point-min)) | |
7793
4a683dc76931
(gnus-newsrc-to-gnus-format): In main loop,
Richard M. Stallman <rms@gnu.org>
parents:
7705
diff
changeset
|
6794 ;; We used this regexp, but it caused overflows. |
257 | 6795 ;; "^\\([^:! \t\n]+\\)\\([:!]\\)[ \t]*\\(.*\\)$" |
3610
b0c94b723e6a
* gnus.el (gnus-newsrc-to-gnus-format): Change regexp which
Jim Blandy <jimb@redhat.com>
parents:
3591
diff
changeset
|
6796 ;; 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
|
6797 ;; 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
|
6798 ;; "^\\([^:! \t\n]+\\)\\([:!]\\)[ \t]*\\(\\(...\\)*.*\\)$" |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
6799 ;; but, the following causes trouble on some case: |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
6800 ;; "^\\([^:! \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
|
6801 ;; 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
|
6802 ;; 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
|
6803 (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
|
6804 nil t) |
257 | 6805 (setq newsgroup (buffer-substring (match-beginning 1) (match-end 1))) |
6806 ;; Check duplications of newsgroups. | |
6807 ;; 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
|
6808 (if (gnus-gethash newsgroup gnus-newsrc-hashtb) |
257 | 6809 (message "Ignore duplicated newsgroup: %s" newsgroup) |
6810 (setq subscribe | |
6811 (string-equal | |
6812 ":" (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
|
6813 (skip-chars-forward " \t") |
4a683dc76931
(gnus-newsrc-to-gnus-format): In main loop,
Richard M. Stallman <rms@gnu.org>
parents:
7705
diff
changeset
|
6814 (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
|
6815 (end-of-line) (point)))) |
257 | 6816 (setq read-list nil) |
6817 (while (string-match "^[, \t]*\\([0-9-]+\\)" ranges) | |
6818 (setq subrange (substring ranges (match-beginning 1) (match-end 1))) | |
6819 (setq ranges (substring ranges (match-end 1))) | |
6820 (cond ((string-match "^\\([0-9]+\\)-\\([0-9]+\\)$" subrange) | |
6821 (setq read-list | |
6822 (cons | |
6823 (cons (string-to-int | |
6824 (substring subrange | |
6825 (match-beginning 1) (match-end 1))) | |
6826 (string-to-int | |
6827 (substring subrange | |
6828 (match-beginning 2) (match-end 2)))) | |
6829 read-list))) | |
6830 ((string-match "^[0-9]+$" subrange) | |
6831 (setq read-list | |
6832 (cons (cons (string-to-int subrange) | |
6833 (string-to-int subrange)) | |
6834 read-list))) | |
6835 (t | |
6836 (ding) (message "Ignoring bogus lines of %s" newsgroup) | |
6837 (sit-for 0)) | |
6838 )) | |
6839 (setq gnus-newsrc-assoc | |
6840 (cons (cons newsgroup (cons subscribe (nreverse read-list))) | |
6841 gnus-newsrc-assoc)) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6842 ;; Update gnus-newsrc-hashtb one by one. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6843 (gnus-sethash newsgroup (car gnus-newsrc-assoc) gnus-newsrc-hashtb) |
257 | 6844 )) |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6845 (setq gnus-newsrc-assoc (nreverse gnus-newsrc-assoc)) |
257 | 6846 )) |
6847 | |
6848 (defun gnus-parse-n-options (options) | |
6849 "Parse -n NEWSGROUPS options and return a cons of YES and NO regexps." | |
6850 (let ((yes nil) | |
6851 (no nil) | |
6852 (yes-or-no nil) ;`!' or not. | |
6853 (newsgroup nil)) | |
6854 ;; Parse each newsgroup description such as "comp.all". Commas | |
6855 ;; and white spaces can be a newsgroup separator. | |
6856 (while | |
6309
9217f29851c2
Don't use triple-hyphen in a character class.
Karl Heuer <kwzh@gnu.org>
parents:
5911
diff
changeset
|
6857 (string-match "^[ \t\n,]*\\(!?\\)\\([^- \t\n,][^ \t\n,]*\\)" options) |
257 | 6858 (setq yes-or-no |
6859 (substring options (match-beginning 1) (match-end 1))) | |
6860 (setq newsgroup | |
6861 (regexp-quote | |
6862 (substring options | |
6863 (match-beginning 2) (match-end 2)))) | |
6864 (setq options (substring options (match-end 2))) | |
6865 ;; Rewrite "all" to ".+" not ".*". ".+" requires at least one | |
6866 ;; character. | |
6867 (while (string-match "\\(^\\|\\\\[.]\\)all\\(\\\\[.]\\|$\\)" newsgroup) | |
6868 (setq newsgroup | |
6869 (concat (substring newsgroup 0 (match-end 1)) | |
6870 ".+" | |
6871 (substring newsgroup (match-beginning 2))))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6872 ;; It is yes or no. |
257 | 6873 (cond ((string-equal yes-or-no "!") |
6874 (setq no (cons newsgroup no))) | |
6875 ((string-equal newsgroup ".+")) ;Ignore `all'. | |
6876 (t | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6877 (setq yes (cons newsgroup yes)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6878 ) |
257 | 6879 ;; 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
|
6880 ;; 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
|
6881 ;; 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
|
6882 ;; "jp.network". |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6883 ;; Fixes for large regexp problems are from yonezu@nak.math.keio.ac.jp. |
257 | 6884 (cons (if yes |
6885 (concat "^\\(" | |
6886 (apply (function concat) | |
6887 (mapcar | |
6888 (function | |
6889 (lambda (newsgroup) | |
6890 (concat newsgroup "\\|"))) | |
6891 (cdr yes))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6892 (car yes) "\\)\\(\\.\\|$\\)")) |
257 | 6893 (if no |
6894 (concat "^\\(" | |
6895 (apply (function concat) | |
6896 (mapcar | |
6897 (function | |
6898 (lambda (newsgroup) | |
6899 (concat newsgroup "\\|"))) | |
6900 (cdr no))) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6901 (car no) "\\)\\(\\.\\|$\\)"))) |
257 | 6902 )) |
6903 | |
6904 (defun gnus-save-newsrc-file () | |
6905 "Save to .newsrc FILE." | |
6906 ;; Note: We cannot save .newsrc file if all newsgroups are removed | |
6907 ;; from the variable gnus-newsrc-assoc. | |
6908 (and (or gnus-newsrc-assoc gnus-killed-assoc) | |
6909 gnus-current-startup-file | |
6910 (save-excursion | |
6911 ;; A buffer containing .newsrc file may be deleted. | |
6912 (set-buffer (find-file-noselect gnus-current-startup-file)) | |
6913 (if (not (buffer-modified-p)) | |
6914 (message "(No changes need to be saved)") | |
6915 (message "Saving %s..." gnus-current-startup-file) | |
6916 (let ((make-backup-files t) | |
6917 (version-control nil) | |
6918 (require-final-newline t)) ;Don't ask even if requested. | |
6919 ;; Make backup file of master newsrc. | |
6920 ;; You can stop or change version control of backup file. | |
6921 ;; Suggested by jason@violet.berkeley.edu. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6922 (run-hooks 'gnus-save-newsrc-hook) |
257 | 6923 (save-buffer)) |
6924 ;; Quickly loadable .newsrc. | |
6925 (set-buffer (get-buffer-create " *GNUS-newsrc*")) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6926 (buffer-flush-undo (current-buffer)) |
257 | 6927 (erase-buffer) |
6928 (gnus-gnus-to-quick-newsrc-format) | |
6929 (let ((make-backup-files nil) | |
6930 (version-control nil) | |
6931 (require-final-newline t)) ;Don't ask even if requested. | |
6932 (write-file (concat gnus-current-startup-file ".el"))) | |
6933 (kill-buffer (current-buffer)) | |
6934 (message "Saving %s... Done" gnus-current-startup-file) | |
6935 )) | |
6936 )) | |
6937 | |
6938 (defun gnus-update-newsrc-buffer (group &optional delete next) | |
6939 "Incrementally update .newsrc buffer about GROUP. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6940 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
|
6941 If optional 2nd argument NEXT is non-nil, inserted before it." |
257 | 6942 (save-excursion |
6943 ;; Taking account of the killed startup file. | |
6944 ;; Suggested by tale@pawl.rpi.edu. | |
6945 (set-buffer (or (get-file-buffer gnus-current-startup-file) | |
6946 (find-file-noselect gnus-current-startup-file))) | |
6947 ;; Options line continuation lines must be also considered here. | |
6948 ;; Before supporting continuation lines, " newsgroup ! 1-5" was | |
6949 ;; okay, but now it is invalid. It should be "newsgroup! 1-5". | |
6950 (let ((deleted nil) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6951 (case-fold-search nil) ;Should NOT ignore case. |
257 | 6952 (buffer-read-only nil)) ;May be not modifiable. |
6953 ;; Delete ALL entries which match for GROUP. | |
6954 (goto-char (point-min)) | |
6955 (while (re-search-forward | |
6956 (concat "^" (regexp-quote group) "[:!]") nil t) | |
6957 (beginning-of-line) | |
6958 (delete-region (point) (progn (forward-line 1) (point))) | |
6959 (setq deleted t) ;Old entry is deleted. | |
6960 ) | |
6961 (if delete | |
6962 nil | |
6963 ;; Insert group entry. | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6964 (let ((newsrc (gnus-gethash group gnus-newsrc-hashtb))) |
257 | 6965 (if (null newsrc) |
6966 nil | |
6967 ;; Find insertion point. | |
6968 (cond (deleted nil) ;Insert here. | |
6969 ((and (stringp next) | |
6970 (progn | |
6971 (goto-char (point-min)) | |
6972 (re-search-forward | |
6973 (concat "^" (regexp-quote next) "[:!]") nil t))) | |
6974 (beginning-of-line)) | |
6975 (t | |
6976 (goto-char (point-max)) | |
6977 (or (bolp) | |
6978 (insert "\n")))) | |
6979 ;; Insert after options line. | |
6980 (if (looking-at "^[ \t]*options\\([ \t]\\|$\\)") | |
6981 (progn | |
6982 (forward-line 1) | |
6983 ;; Skip continuation lines. | |
6984 (while (and (not (eobp)) | |
6985 (looking-at "^[ \t]+")) | |
6986 (forward-line 1)))) | |
6987 (insert group ;Group name | |
6988 (if (nth 1 newsrc) ": " "! ")) ;Subscribed? | |
6989 (gnus-ranges-to-newsrc-format (nthcdr 2 newsrc)) ;Read articles | |
6990 (insert "\n") | |
6991 ))) | |
6992 ))) | |
6993 | |
6994 (defun gnus-gnus-to-quick-newsrc-format () | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
6995 "Insert GNUS variables such as gnus-newsrc-assoc in lisp format." |
257 | 6996 (insert ";; GNUS internal format of .newsrc.\n") |
6997 (insert ";; Touch .newsrc instead if you think to remove this file.\n") | |
6998 (let ((variable nil) | |
6999 (variables gnus-variable-list) | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7000 ;; Temporary rebind to make changes |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7001 ;; gnus-check-killed-newsgroups in invisible. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7002 (gnus-killed-assoc gnus-killed-assoc) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7003 (gnus-killed-hashtb gnus-killed-hashtb)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7004 ;; Remove duplicated or unsubscribed newsgroups in |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7005 ;; gnus-killed-assoc (and gnus-killed-hashtb). |
257 | 7006 (gnus-check-killed-newsgroups) |
7007 ;; Then, insert lisp expressions. | |
7008 (while variables | |
7009 (setq variable (car variables)) | |
7010 (and (boundp variable) | |
7011 (symbol-value variable) | |
7012 (insert "(setq " (symbol-name variable) " '" | |
7013 (prin1-to-string (symbol-value variable)) | |
7014 ")\n")) | |
7015 (setq variables (cdr variables))) | |
7016 )) | |
7017 | |
7018 (defun gnus-ranges-to-newsrc-format (ranges) | |
7019 "Insert ranges of read articles." | |
7020 (let ((range nil)) ;Range is a pair of BEGIN and END. | |
7021 (while ranges | |
7022 (setq range (car ranges)) | |
7023 (setq ranges (cdr ranges)) | |
7024 (cond ((= (car range) (cdr range)) | |
7025 (if (= (car range) 0) | |
7026 (setq ranges nil) ;No unread articles. | |
7027 (insert (int-to-string (car range))) | |
7028 (if ranges (insert ",")) | |
7029 )) | |
7030 (t | |
7031 (insert (int-to-string (car range)) | |
7032 "-" | |
7033 (int-to-string (cdr range))) | |
7034 (if ranges (insert ",")) | |
7035 )) | |
7036 ))) | |
7037 | |
7038 (defun gnus-compress-sequence (numbers) | |
7039 "Convert list of sorted numbers to ranges." | |
7040 (let* ((numbers (sort (copy-sequence numbers) (function <))) | |
7041 (first (car numbers)) | |
7042 (last (car numbers)) | |
7043 (result nil)) | |
7044 (while numbers | |
7045 (cond ((= last (car numbers)) nil) ;Omit duplicated number | |
7046 ((= (1+ last) (car numbers)) ;Still in sequence | |
7047 (setq last (car numbers))) | |
7048 (t ;End of one sequence | |
7049 (setq result (cons (cons first last) result)) | |
7050 (setq first (car numbers)) | |
7051 (setq last (car numbers))) | |
7052 ) | |
7053 (setq numbers (cdr numbers)) | |
7054 ) | |
7055 (nreverse (cons (cons first last) result)) | |
7056 )) | |
7057 | |
7058 (defun gnus-uncompress-sequence (ranges) | |
7059 "Expand compressed format of sequence." | |
7060 (let ((first nil) | |
7061 (last nil) | |
7062 (result nil)) | |
7063 (while ranges | |
7064 (setq first (car (car ranges))) | |
7065 (setq last (cdr (car ranges))) | |
7066 (while (< first last) | |
7067 (setq result (cons first result)) | |
7068 (setq first (1+ first))) | |
7069 (setq result (cons first result)) | |
7070 (setq ranges (cdr ranges)) | |
7071 ) | |
7072 (nreverse result) | |
7073 )) | |
7074 | |
7075 (defun gnus-number-of-articles (range) | |
7076 "Compute number of articles from RANGE `((beg1 . end1) (beg2 . end2) ...)'." | |
7077 (let ((count 0)) | |
7078 (while range | |
7079 (if (/= (cdr (car range)) 0) | |
7080 ;; If end1 is 0, it must be skipped. Usually no articles in | |
7081 ;; this group. | |
7082 (setq count (+ count 1 (- (cdr (car range)) (car (car range)))))) | |
7083 (setq range (cdr range)) | |
7084 ) | |
7085 count ;Result | |
7086 )) | |
7087 | |
7088 (defun gnus-difference-of-range (src obj) | |
7089 "Compute (SRC - OBJ) on range. | |
7090 Range of SRC is expressed as `(beg . end)'. | |
7091 Range of OBJ is expressed as `((beg1 . end1) (beg2 . end2) ...)." | |
7092 (let ((beg (car src)) | |
7093 (end (cdr src)) | |
7094 (range nil)) ;This is result. | |
7095 ;; Src may be nil. | |
7096 (while (and src obj) | |
7097 (let ((beg1 (car (car obj))) | |
7098 (end1 (cdr (car obj)))) | |
7099 (cond ((> beg end) | |
7100 (setq obj nil)) ;Terminate loop | |
7101 ((< beg beg1) | |
7102 (setq range (cons (cons beg (min (1- beg1) end)) range)) | |
7103 (setq beg (1+ end1))) | |
7104 ((>= beg beg1) | |
7105 (setq beg (max beg (1+ end1)))) | |
7106 ) | |
7107 (setq obj (cdr obj)) ;Next OBJ | |
7108 )) | |
7109 ;; Src may be nil. | |
7110 (if (and src (<= beg end)) | |
7111 (setq range (cons (cons beg end) range))) | |
7112 ;; Result | |
7113 (if range | |
7114 (nreverse range) | |
7115 (list (cons 0 0))) | |
7116 )) | |
7117 | |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7118 (defun gnus-read-distributions-file () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7119 "Get distributions file from NNTP server (NNTP2 functionality)." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7120 ;; 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
|
7121 (gnus-start-news-server) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7122 (message "Reading distributions file...") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7123 (setq gnus-distribution-list nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7124 (if (gnus-request-list-distributions) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7125 (save-excursion |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7126 (set-buffer nntp-server-buffer) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7127 (gnus-distributions-to-gnus-format) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7128 (message "Reading distributions file... done")) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7129 ;; It's not a fatal error. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7130 ;;(error "Cannot read distributions file from NNTP server.") |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7131 ) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7132 ;; Merge with user supplied default distributions. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7133 (let ((defaults (reverse gnus-local-distributions)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7134 (dist nil)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7135 (while defaults |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7136 (setq dist (assoc (car defaults) gnus-distribution-list)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7137 (if dist |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7138 (setq gnus-distribution-list |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7139 (delq dist gnus-distribution-list))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7140 (setq gnus-distribution-list |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7141 (cons (list (car defaults)) gnus-distribution-list)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7142 (setq defaults (cdr defaults)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7143 ))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7144 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7145 (defun gnus-distributions-to-gnus-format () |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7146 "Convert distributions file format to internal format." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7147 (setq gnus-distribution-list nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7148 (goto-char (point-min)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7149 (while (re-search-forward "^\\([^ \t\n]+\\).*$" nil t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7150 (setq gnus-distribution-list |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7151 (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
|
7152 gnus-distribution-list))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7153 (setq gnus-distribution-list |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7154 (nreverse gnus-distribution-list))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7155 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7156 ;; Some older version of GNU Emacs does not support function |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7157 ;; `file-newer-than-file-p'. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7158 |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7159 (or (fboundp 'file-newer-than-file-p) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7160 (defun file-newer-than-file-p (file1 file2) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7161 "Return t if file FILE1 is newer than file FILE2. |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7162 If FILE1 does not exist, the answer is nil; |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7163 otherwise, if FILE2 does not exist, the answer is t." |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7164 (let ((mod1 (nth 5 (file-attributes file1))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7165 (mod2 (nth 5 (file-attributes file2)))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7166 (cond ((not (file-exists-p file1)) nil) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7167 ((not (file-exists-p file2)) t) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7168 ((and mod2 mod1) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7169 (or (< (car mod2) (car mod1)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7170 (and (= (car mod2) (car mod1)) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7171 (<= (nth 1 mod2) (nth 1 mod1))))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7172 )))) |
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7173 |
257 | 7174 |
8470
999e5521d05a
Require timezone when loading this file.
Richard M. Stallman <rms@gnu.org>
parents:
8444
diff
changeset
|
7175 (provide 'gnus) |
999e5521d05a
Require timezone when loading this file.
Richard M. Stallman <rms@gnu.org>
parents:
8444
diff
changeset
|
7176 |
257 | 7177 ;;Local variables: |
2843
cd90d49526ae
Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents:
1821
diff
changeset
|
7178 ;;eval: (put 'gnus-eval-in-buffer-window 'lisp-indent-hook 1) |
257 | 7179 ;;end: |
4173
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
7180 |
2b3fb8d12918
(gnus-emacs-version): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
4118
diff
changeset
|
7181 ;;; gnus.el ends here |