Mercurial > emacs
annotate lisp/gnus/gnus-group.el @ 68462:94d7d70879d2
Minor cleaups.
(Screen): Clean up the intro paragraphs.
(Mode Line): Lots of rewriting. Handle frame-name better.
eol-mnemonic-... vars moved out.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 29 Jan 2006 17:04:09 +0000 |
parents | 6c7c654eb3c7 |
children | 55665aaac72b d88caeac70d7 |
rev | line source |
---|---|
17493 | 1 ;;; gnus-group.el --- group mode commands for Gnus |
64754
fafd692d1e40
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64085
diff
changeset
|
2 |
fafd692d1e40
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64085
diff
changeset
|
3 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
68230
6c7c654eb3c7
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-702
Miles Bader <miles@gnu.org>
parents:
68129
diff
changeset
|
4 ;; 2005, 2006 Free Software Foundation, Inc. |
17493 | 5 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
6 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> |
17493 | 7 ;; Keywords: news |
8 | |
9 ;; This file is part of GNU Emacs. | |
10 | |
11 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
12 ;; it under the terms of the GNU General Public License as published by | |
13 ;; the Free Software Foundation; either version 2, or (at your option) | |
14 ;; any later version. | |
15 | |
16 ;; GNU Emacs is distributed in the hope that it will be useful, | |
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 ;; GNU General Public License for more details. | |
20 | |
21 ;; You should have received a copy of the GNU General Public License | |
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
64085 | 23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
24 ;; Boston, MA 02110-1301, USA. | |
17493 | 25 |
26 ;;; Commentary: | |
27 | |
28 ;;; Code: | |
29 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
30 (eval-when-compile |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
31 (require 'cl) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
32 (defvar tool-bar-map)) |
19521
6f6cf9184e93
Require cl at compile time.
Richard M. Stallman <rms@gnu.org>
parents:
18575
diff
changeset
|
33 |
17493 | 34 (require 'gnus) |
35 (require 'gnus-start) | |
36 (require 'nnmail) | |
37 (require 'gnus-spec) | |
38 (require 'gnus-int) | |
39 (require 'gnus-range) | |
40 (require 'gnus-win) | |
41 (require 'gnus-undo) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
42 (require 'time-date) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
43 (require 'gnus-ems) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
44 |
62943
11d53dd5abd9
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-345
Miles Bader <miles@gnu.org>
parents:
62907
diff
changeset
|
45 (eval-when-compile |
11d53dd5abd9
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-345
Miles Bader <miles@gnu.org>
parents:
62907
diff
changeset
|
46 (require 'mm-url) |
11d53dd5abd9
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-345
Miles Bader <miles@gnu.org>
parents:
62907
diff
changeset
|
47 (let ((features (cons 'gnus-group features))) |
11d53dd5abd9
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-345
Miles Bader <miles@gnu.org>
parents:
62907
diff
changeset
|
48 (require 'gnus-sum)) |
11d53dd5abd9
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-345
Miles Bader <miles@gnu.org>
parents:
62907
diff
changeset
|
49 (defvar gnus-cache-active-hashtb)) |
17493 | 50 |
51 (defcustom gnus-group-archive-directory | |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
52 "/ftp@ftp.hpc.uh.edu:/pub/emacs/ding-list/" |
17493 | 53 "*The address of the (ding) archives." |
54 :group 'gnus-group-foreign | |
55 :type 'directory) | |
56 | |
57 (defcustom gnus-group-recent-archive-directory | |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
58 "/ftp@ftp.hpc.uh.edu:/pub/emacs/ding-list-recent/" |
17493 | 59 "*The address of the most recent (ding) articles." |
60 :group 'gnus-group-foreign | |
61 :type 'directory) | |
62 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
63 (defcustom gnus-no-groups-message "No gnus is bad news" |
17493 | 64 "*Message displayed by Gnus when no groups are available." |
65 :group 'gnus-start | |
66 :type 'string) | |
67 | |
68 (defcustom gnus-keep-same-level nil | |
69 "*Non-nil means that the next newsgroup after the current will be on the same level. | |
70 When you type, for instance, `n' after reading the last article in the | |
71 current newsgroup, you will go to the next newsgroup. If this variable | |
72 is nil, the next newsgroup will be the next from the group | |
73 buffer. | |
74 If this variable is non-nil, Gnus will either put you in the | |
75 next newsgroup with the same level, or, if no such newsgroup is | |
76 available, the next newsgroup with the lowest possible level higher | |
77 than the current level. | |
78 If this variable is `best', Gnus will make the next newsgroup the one | |
79 with the best level." | |
80 :group 'gnus-group-levels | |
81 :type '(choice (const nil) | |
82 (const best) | |
83 (sexp :tag "other" t))) | |
84 | |
85 (defcustom gnus-group-goto-unread t | |
86 "*If non-nil, movement commands will go to the next unread and subscribed group." | |
87 :link '(custom-manual "(gnus)Group Maneuvering") | |
88 :group 'gnus-group-various | |
89 :type 'boolean) | |
90 | |
91 (defcustom gnus-goto-next-group-when-activating t | |
92 "*If non-nil, the \\<gnus-group-mode-map>\\[gnus-group-get-new-news-this-group] command will advance point to the next group." | |
93 :link '(custom-manual "(gnus)Scanning New Messages") | |
94 :group 'gnus-group-various | |
95 :type 'boolean) | |
96 | |
97 (defcustom gnus-permanently-visible-groups nil | |
98 "*Regexp to match groups that should always be listed in the group buffer. | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
99 This means that they will still be listed even when there are no |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
100 unread articles in the groups. |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
101 |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
102 If nil, no groups are permanently visible." |
17493 | 103 :group 'gnus-group-listing |
24834
d0ccf995f1ae
(gnus-permanently-visible-groups): Fix custom type.
Karl Heuer <kwzh@gnu.org>
parents:
24357
diff
changeset
|
104 :type '(choice regexp (const nil))) |
17493 | 105 |
106 (defcustom gnus-list-groups-with-ticked-articles t | |
107 "*If non-nil, list groups that have only ticked articles. | |
108 If nil, only list groups that have unread articles." | |
109 :group 'gnus-group-listing | |
110 :type 'boolean) | |
111 | |
112 (defcustom gnus-group-default-list-level gnus-level-subscribed | |
113 "*Default listing level. | |
114 Ignored if `gnus-group-use-permanent-levels' is non-nil." | |
115 :group 'gnus-group-listing | |
116 :type 'integer) | |
117 | |
118 (defcustom gnus-group-list-inactive-groups t | |
119 "*If non-nil, inactive groups will be listed." | |
120 :group 'gnus-group-listing | |
121 :group 'gnus-group-levels | |
122 :type 'boolean) | |
123 | |
124 (defcustom gnus-group-sort-function 'gnus-group-sort-by-alphabet | |
125 "*Function used for sorting the group buffer. | |
126 This function will be called with group info entries as the arguments | |
127 for the groups to be sorted. Pre-made functions include | |
128 `gnus-group-sort-by-alphabet', `gnus-group-sort-by-real-name', | |
129 `gnus-group-sort-by-unread', `gnus-group-sort-by-level', | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
130 `gnus-group-sort-by-score', `gnus-group-sort-by-method', |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
131 `gnus-group-sort-by-server', and `gnus-group-sort-by-rank'. |
17493 | 132 |
133 This variable can also be a list of sorting functions. In that case, | |
134 the most significant sort function should be the last function in the | |
135 list." | |
136 :group 'gnus-group-listing | |
137 :link '(custom-manual "(gnus)Sorting Groups") | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
138 :type '(repeat :value-to-internal (lambda (widget value) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
139 (if (listp value) value (list value))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
140 :match (lambda (widget value) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
141 (or (symbolp value) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
142 (widget-editable-list-match widget value))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
143 (choice (function-item gnus-group-sort-by-alphabet) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
144 (function-item gnus-group-sort-by-real-name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
145 (function-item gnus-group-sort-by-unread) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
146 (function-item gnus-group-sort-by-level) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
147 (function-item gnus-group-sort-by-score) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
148 (function-item gnus-group-sort-by-method) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
149 (function-item gnus-group-sort-by-server) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
150 (function-item gnus-group-sort-by-rank) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
151 (function :tag "other" nil)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
152 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
153 (defcustom gnus-group-line-format "%M\%S\%p\%P\%5y:%B%(%g%)%l %O\n" |
17493 | 154 "*Format of group lines. |
155 It works along the same lines as a normal formatting string, | |
156 with some simple extensions. | |
157 | |
158 %M Only marked articles (character, \"*\" or \" \") | |
159 %S Whether the group is subscribed (character, \"U\", \"K\", \"Z\" or \" \") | |
160 %L Level of subscribedness (integer) | |
161 %N Number of unread articles (integer) | |
162 %I Number of dormant articles (integer) | |
163 %i Number of ticked and dormant (integer) | |
164 %T Number of ticked articles (integer) | |
165 %R Number of read articles (integer) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
166 %U Number of unseen articles (integer) |
17493 | 167 %t Estimated total number of articles (integer) |
168 %y Number of unread, unticked articles (integer) | |
169 %G Group name (string) | |
170 %g Qualified group name (string) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
171 %c Short (collapsed) group name. See `gnus-group-uncollapsed-levels'. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
172 %C Group comment (string) |
17493 | 173 %D Group description (string) |
174 %s Select method (string) | |
175 %o Moderated group (char, \"m\") | |
176 %p Process mark (char) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
177 %B Whether a summary buffer for the group is open (char, \"*\") |
17493 | 178 %O Moderated group (string, \"(m)\" or \"\") |
179 %P Topic indentation (string) | |
180 %m Whether there is new(ish) mail in the group (char, \"%\") | |
181 %l Whether there are GroupLens predictions for this group (string) | |
182 %n Select from where (string) | |
183 %z A string that look like `<%s:%n>' if a foreign select method is used | |
184 %d The date the group was last entered. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
185 %E Icon as defined by `gnus-group-icon-list'. |
17493 | 186 %u User defined specifier. The next character in the format string should |
187 be a letter. Gnus will call the function gnus-user-format-function-X, | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
188 where X is the letter following %u. The function will be passed a |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
189 single dummy parameter as argument. The function should return a |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
190 string, which will be inserted into the buffer just like information |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
191 from any other group specifier. |
17493 | 192 |
193 Note that this format specification is not always respected. For | |
194 reasons of efficiency, when listing killed groups, this specification | |
195 is ignored altogether. If the spec is changed considerably, your | |
196 output may end up looking strange when listing both alive and killed | |
197 groups. | |
198 | |
199 If you use %o or %O, reading the active file will be slower and quite | |
200 a bit of extra memory will be used. %D will also worsen performance. | |
201 Also note that if you change the format specification to include any | |
202 of these specs, you must probably re-start Gnus to see them go into | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
203 effect. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
204 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
205 General format specifiers can also be used. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
206 See Info node `(gnus)Formatting Variables'." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
207 :link '(custom-manual "(gnus)Formatting Variables") |
17493 | 208 :group 'gnus-group-visual |
209 :type 'string) | |
210 | |
211 (defcustom gnus-group-mode-line-format "Gnus: %%b {%M\%:%S}" | |
212 "*The format specification for the group mode line. | |
213 It works along the same lines as a normal formatting string, | |
214 with some simple extensions: | |
215 | |
216 %S The native news server. | |
217 %M The native select method. | |
218 %: \":\" if %S isn't \"\"." | |
219 :group 'gnus-group-visual | |
220 :type 'string) | |
221 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
222 ;; Extracted from gnus-xmas-redefine in order to preserve user settings |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
223 (when (featurep 'xemacs) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
224 (add-hook 'gnus-group-mode-hook 'gnus-xmas-group-menu-add) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
225 (add-hook 'gnus-group-mode-hook 'gnus-xmas-setup-group-toolbar)) |
17493 | 226 |
227 (defcustom gnus-group-menu-hook nil | |
228 "Hook run after the creation of the group mode menu." | |
229 :group 'gnus-group-various | |
230 :type 'hook) | |
231 | |
232 (defcustom gnus-group-catchup-group-hook nil | |
233 "Hook run when catching up a group from the group buffer." | |
234 :group 'gnus-group-various | |
235 :link '(custom-manual "(gnus)Group Data") | |
236 :type 'hook) | |
237 | |
238 (defcustom gnus-group-update-group-hook nil | |
239 "Hook called when updating group lines." | |
240 :group 'gnus-group-visual | |
241 :type 'hook) | |
242 | |
243 (defcustom gnus-group-prepare-function 'gnus-group-prepare-flat | |
244 "*A function that is called to generate the group buffer. | |
245 The function is called with three arguments: The first is a number; | |
246 all group with a level less or equal to that number should be listed, | |
247 if the second is non-nil, empty groups should also be displayed. If | |
248 the third is non-nil, it is a number. No groups with a level lower | |
249 than this number should be displayed. | |
250 | |
251 The only current function implemented is `gnus-group-prepare-flat'." | |
252 :group 'gnus-group-listing | |
253 :type 'function) | |
254 | |
255 (defcustom gnus-group-prepare-hook nil | |
256 "Hook called after the group buffer has been generated. | |
257 If you want to modify the group buffer, you can use this hook." | |
258 :group 'gnus-group-listing | |
259 :type 'hook) | |
260 | |
261 (defcustom gnus-suspend-gnus-hook nil | |
262 "Hook called when suspending (not exiting) Gnus." | |
263 :group 'gnus-exit | |
264 :type 'hook) | |
265 | |
266 (defcustom gnus-exit-gnus-hook nil | |
267 "Hook called when exiting Gnus." | |
268 :group 'gnus-exit | |
269 :type 'hook) | |
270 | |
271 (defcustom gnus-after-exiting-gnus-hook nil | |
272 "Hook called after exiting Gnus." | |
273 :group 'gnus-exit | |
274 :type 'hook) | |
275 | |
276 (defcustom gnus-group-update-hook '(gnus-group-highlight-line) | |
277 "Hook called when a group line is changed. | |
278 The hook will not be called if `gnus-visual' is nil. | |
279 | |
280 The default function `gnus-group-highlight-line' will | |
281 highlight the line according to the `gnus-group-highlight' | |
282 variable." | |
283 :group 'gnus-group-visual | |
284 :type 'hook) | |
285 | |
286 (defcustom gnus-useful-groups | |
68129
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
287 '(("(ding) mailing list mirrored at gmane.org" |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
288 "gmane.emacs.gnus.general" |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
289 (nntp "Gmane" |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
290 (nntp-address "news.gmane.org"))) |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
291 ("Gnus bug archive" |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
292 "gnus.gnus-bug" |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
293 (nntp "news.gnus.org" |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
294 (nntp-address "news.gnus.org"))) |
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
295 ("Local Gnus help group" |
17493 | 296 "gnus-help" |
297 (nndoc "gnus-help" | |
298 (nndoc-article-type mbox) | |
299 (eval `(nndoc-address | |
300 ,(let ((file (nnheader-find-etc-directory | |
301 "gnus-tut.txt" t))) | |
302 (unless file | |
303 (error "Couldn't find doc group")) | |
304 file)))))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
305 "*Alist of useful group-server pairs." |
17493 | 306 :group 'gnus-group-listing |
307 :type '(repeat (list (string :tag "Description") | |
308 (string :tag "Name") | |
309 (sexp :tag "Method")))) | |
310 | |
311 (defcustom gnus-group-highlight | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
312 '(;; Mail. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
313 ((and mailp (= unread 0) (eq level 1)) . |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
62943
diff
changeset
|
314 gnus-group-mail-1-empty) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
315 ((and mailp (eq level 1)) . |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
62943
diff
changeset
|
316 gnus-group-mail-1) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
317 ((and mailp (= unread 0) (eq level 2)) . |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
62943
diff
changeset
|
318 gnus-group-mail-2-empty) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
319 ((and mailp (eq level 2)) . |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
62943
diff
changeset
|
320 gnus-group-mail-2) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
321 ((and mailp (= unread 0) (eq level 3)) . |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
62943
diff
changeset
|
322 gnus-group-mail-3-empty) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
323 ((and mailp (eq level 3)) . |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
62943
diff
changeset
|
324 gnus-group-mail-3) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
325 ((and mailp (= unread 0)) . |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
62943
diff
changeset
|
326 gnus-group-mail-low-empty) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
327 ((and mailp) . |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
62943
diff
changeset
|
328 gnus-group-mail-low) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
329 ;; News. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
330 ((and (= unread 0) (eq level 1)) . |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
62943
diff
changeset
|
331 gnus-group-news-1-empty) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
332 ((and (eq level 1)) . |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
62943
diff
changeset
|
333 gnus-group-news-1) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
334 ((and (= unread 0) (eq level 2)) . |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
62943
diff
changeset
|
335 gnus-group-news-2-empty) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
336 ((and (eq level 2)) . |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
62943
diff
changeset
|
337 gnus-group-news-2) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
338 ((and (= unread 0) (eq level 3)) . |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
62943
diff
changeset
|
339 gnus-group-news-3-empty) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
340 ((and (eq level 3)) . |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
62943
diff
changeset
|
341 gnus-group-news-3) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
342 ((and (= unread 0) (eq level 4)) . |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
62943
diff
changeset
|
343 gnus-group-news-4-empty) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
344 ((and (eq level 4)) . |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
62943
diff
changeset
|
345 gnus-group-news-4) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
346 ((and (= unread 0) (eq level 5)) . |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
62943
diff
changeset
|
347 gnus-group-news-5-empty) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
348 ((and (eq level 5)) . |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
62943
diff
changeset
|
349 gnus-group-news-5) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
350 ((and (= unread 0) (eq level 6)) . |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
62943
diff
changeset
|
351 gnus-group-news-6-empty) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
352 ((and (eq level 6)) . |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
62943
diff
changeset
|
353 gnus-group-news-6) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
354 ((and (= unread 0)) . |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
62943
diff
changeset
|
355 gnus-group-news-low-empty) |
17493 | 356 (t . |
63480
53e7abe8917f
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Miles Bader <miles@gnu.org>
parents:
62943
diff
changeset
|
357 gnus-group-news-low)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
358 "*Controls the highlighting of group buffer lines. |
17493 | 359 |
360 Below is a list of `Form'/`Face' pairs. When deciding how a a | |
361 particular group line should be displayed, each form is | |
362 evaluated. The content of the face field after the first true form is | |
363 used. You can change how those group lines are displayed by | |
364 editing the face field. | |
365 | |
366 It is also possible to change and add form fields, but currently that | |
367 requires an understanding of Lisp expressions. Hopefully this will | |
368 change in a future release. For now, you can use the following | |
369 variables in the Lisp expression: | |
370 | |
371 group: The name of the group. | |
372 unread: The number of unread articles in the group. | |
373 method: The select method used. | |
374 mailp: Whether it's a mail group or not. | |
375 level: The level of the group. | |
376 score: The score of the group. | |
377 ticked: The number of ticked articles." | |
378 :group 'gnus-group-visual | |
379 :type '(repeat (cons (sexp :tag "Form") face))) | |
380 | |
381 (defcustom gnus-new-mail-mark ?% | |
382 "Mark used for groups with new mail." | |
383 :group 'gnus-group-visual | |
384 :type 'character) | |
385 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
386 (defgroup gnus-group-icons nil |
63975
90e4b76eb90b
(gnus-group-icons): Fix typo in docstring.
Juanma Barranquero <lekktu@gmail.com>
parents:
63480
diff
changeset
|
387 "Add Icons to your group buffer." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
388 :group 'gnus-group-visual) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
389 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
390 (defcustom gnus-group-icon-list |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
391 nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
392 "*Controls the insertion of icons into group buffer lines. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
393 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
394 Below is a list of `Form'/`File' pairs. When deciding how a |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
395 particular group line should be displayed, each form is evaluated. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
396 The icon from the file field after the first true form is used. You |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
397 can change how those group lines are displayed by editing the file |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
398 field. The File will either be found in the |
49274
eb2699620e9c
* gnus-agent.el: Don't use `path'.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
48588
diff
changeset
|
399 `gnus-group-glyph-directory' or by designating absolute name of the |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
400 file. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
401 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
402 It is also possible to change and add form fields, but currently that |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
403 requires an understanding of Lisp expressions. Hopefully this will |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
404 change in a future release. For now, you can use the following |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
405 variables in the Lisp expression: |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
406 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
407 group: The name of the group. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
408 unread: The number of unread articles in the group. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
409 method: The select method used. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
410 mailp: Whether it's a mail group or not. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
411 newsp: Whether it's a news group or not |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
412 level: The level of the group. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
413 score: The score of the group. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
414 ticked: The number of ticked articles." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
415 :group 'gnus-group-icons |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
416 :type '(repeat (cons (sexp :tag "Form") file))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
417 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
418 (defcustom gnus-group-name-charset-method-alist nil |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
419 "Alist of method and the charset for group names. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
420 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
421 For example: |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
422 (((nntp \"news.com.cn\") . cn-gb-2312))" |
33395
83221012a4f7
(gnus-group-name-charset-method-alist): Add
Dave Love <fx@gnu.org>
parents:
33344
diff
changeset
|
423 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
424 :group 'gnus-charset |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
425 :type '(repeat (cons (sexp :tag "Method") (symbol :tag "Charset")))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
426 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
427 (defcustom gnus-group-name-charset-group-alist |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
428 (if (or (and (fboundp 'find-coding-system) (find-coding-system 'utf-8)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
429 (mm-coding-system-p 'utf-8)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
430 '((".*" . utf-8)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
431 nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
432 "Alist of group regexp and the charset for group names. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
433 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
434 For example: |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
435 ((\"\\.com\\.cn:\" . cn-gb-2312))" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
436 :group 'gnus-charset |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
437 :type '(repeat (cons (regexp :tag "Group") (symbol :tag "Charset")))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
438 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
439 (defcustom gnus-group-jump-to-group-prompt nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
440 "Default prompt for `gnus-group-jump-to-group'. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
441 If non-nil, the value should be a string, e.g. \"nnml:\", |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
442 in which case `gnus-group-jump-to-group' offers \"Group: nnml:\" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
443 in the minibuffer prompt." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59027
diff
changeset
|
444 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
445 :group 'gnus-group-various |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
446 :type '(choice (string :tag "Prompt string") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
447 (const :tag "Empty" nil))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
448 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
449 (defvar gnus-group-listing-limit 1000 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
450 "*A limit of the number of groups when listing. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
451 If the number of groups is larger than the limit, list them in a |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
452 simple manner.") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
453 |
17493 | 454 ;;; Internal variables |
455 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
456 (defvar gnus-group-is-exiting-p nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
457 (defvar gnus-group-is-exiting-without-update-p nil) |
17493 | 458 (defvar gnus-group-sort-alist-function 'gnus-group-sort-flat |
459 "Function for sorting the group buffer.") | |
460 | |
461 (defvar gnus-group-sort-selected-function 'gnus-group-sort-selected-flat | |
462 "Function for sorting the selected groups in the group buffer.") | |
463 | |
464 (defvar gnus-group-indentation-function nil) | |
465 (defvar gnus-goto-missing-group-function nil) | |
466 (defvar gnus-group-update-group-function nil) | |
467 (defvar gnus-group-goto-next-group-function nil | |
468 "Function to override finding the next group after listing groups.") | |
469 | |
470 (defvar gnus-group-edit-buffer nil) | |
471 | |
472 (defvar gnus-group-line-format-alist | |
473 `((?M gnus-tmp-marked-mark ?c) | |
474 (?S gnus-tmp-subscribed ?c) | |
475 (?L gnus-tmp-level ?d) | |
476 (?N (cond ((eq number t) "*" ) | |
477 ((numberp number) | |
478 (int-to-string | |
479 (+ number | |
480 (gnus-range-length (cdr (assq 'dormant gnus-tmp-marked))) | |
481 (gnus-range-length (cdr (assq 'tick gnus-tmp-marked)))))) | |
482 (t number)) ?s) | |
483 (?R gnus-tmp-number-of-read ?s) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
484 (?U (gnus-number-of-unseen-articles-in-group gnus-tmp-group) ?d) |
17493 | 485 (?t gnus-tmp-number-total ?d) |
486 (?y gnus-tmp-number-of-unread ?s) | |
487 (?I (gnus-range-length (cdr (assq 'dormant gnus-tmp-marked))) ?d) | |
488 (?T (gnus-range-length (cdr (assq 'tick gnus-tmp-marked))) ?d) | |
489 (?i (+ (gnus-range-length (cdr (assq 'dormant gnus-tmp-marked))) | |
490 (gnus-range-length (cdr (assq 'tick gnus-tmp-marked)))) ?d) | |
61424
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
491 (?g (if (boundp 'gnus-tmp-decoded-group) |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
492 gnus-tmp-decoded-group |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
493 gnus-tmp-group) |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
494 ?s) |
17493 | 495 (?G gnus-tmp-qualified-group ?s) |
61424
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
496 (?c (gnus-short-group-name (if (boundp 'gnus-tmp-decoded-group) |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
497 gnus-tmp-decoded-group |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
498 gnus-tmp-group)) |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
499 ?s) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
500 (?C gnus-tmp-comment ?s) |
17493 | 501 (?D gnus-tmp-newsgroup-description ?s) |
502 (?o gnus-tmp-moderated ?c) | |
503 (?O gnus-tmp-moderated-string ?s) | |
504 (?p gnus-tmp-process-marked ?c) | |
505 (?s gnus-tmp-news-server ?s) | |
57784
55829134ac17
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-650
Miles Bader <miles@gnu.org>
parents:
57617
diff
changeset
|
506 (?n ,(if (featurep 'xemacs) |
55829134ac17
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-650
Miles Bader <miles@gnu.org>
parents:
57617
diff
changeset
|
507 '(symbol-name gnus-tmp-news-method) |
55829134ac17
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-650
Miles Bader <miles@gnu.org>
parents:
57617
diff
changeset
|
508 'gnus-tmp-news-method) |
55829134ac17
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-650
Miles Bader <miles@gnu.org>
parents:
57617
diff
changeset
|
509 ?s) |
17493 | 510 (?P gnus-group-indentation ?s) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
511 (?E gnus-tmp-group-icon ?s) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
512 (?B gnus-tmp-summary-live ?c) |
17493 | 513 (?l gnus-tmp-grouplens ?s) |
514 (?z gnus-tmp-news-method-string ?s) | |
515 (?m (gnus-group-new-mail gnus-tmp-group) ?c) | |
516 (?d (gnus-group-timestamp-string gnus-tmp-group) ?s) | |
517 (?u gnus-tmp-user-defined ?s))) | |
518 | |
519 (defvar gnus-group-mode-line-format-alist | |
520 `((?S gnus-tmp-news-server ?s) | |
521 (?M gnus-tmp-news-method ?s) | |
522 (?u gnus-tmp-user-defined ?s) | |
523 (?: gnus-tmp-colon ?s))) | |
524 | |
525 (defvar gnus-topic-topology nil | |
526 "The complete topic hierarchy.") | |
527 | |
528 (defvar gnus-topic-alist nil | |
529 "The complete topic-group alist.") | |
530 | |
531 (defvar gnus-group-marked nil) | |
532 | |
533 (defvar gnus-group-list-mode nil) | |
534 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
535 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
536 (defvar gnus-group-icon-cache nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
537 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
538 (defvar gnus-group-listed-groups nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
539 (defvar gnus-group-list-option nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
540 |
17493 | 541 ;;; |
542 ;;; Gnus group mode | |
543 ;;; | |
544 | |
545 (put 'gnus-group-mode 'mode-class 'special) | |
546 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
547 (gnus-define-keys gnus-group-mode-map |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
548 " " gnus-group-read-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
549 "=" gnus-group-select-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
550 "\r" gnus-group-select-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
551 "\M-\r" gnus-group-quick-select-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
552 "\M- " gnus-group-visible-select-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
553 [(meta control return)] gnus-group-select-group-ephemerally |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
554 "j" gnus-group-jump-to-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
555 "n" gnus-group-next-unread-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
556 "p" gnus-group-prev-unread-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
557 "\177" gnus-group-prev-unread-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
558 [delete] gnus-group-prev-unread-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
559 [backspace] gnus-group-prev-unread-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
560 "N" gnus-group-next-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
561 "P" gnus-group-prev-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
562 "\M-n" gnus-group-next-unread-group-same-level |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
563 "\M-p" gnus-group-prev-unread-group-same-level |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
564 "," gnus-group-best-unread-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
565 "." gnus-group-first-unread-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
566 "u" gnus-group-unsubscribe-current-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
567 "U" gnus-group-unsubscribe-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
568 "c" gnus-group-catchup-current |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
569 "C" gnus-group-catchup-current-all |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
570 "\M-c" gnus-group-clear-data |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
571 "l" gnus-group-list-groups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
572 "L" gnus-group-list-all-groups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
573 "m" gnus-group-mail |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
574 "i" gnus-group-news |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
575 "g" gnus-group-get-new-news |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
576 "\M-g" gnus-group-get-new-news-this-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
577 "R" gnus-group-restart |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
578 "r" gnus-group-read-init-file |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
579 "B" gnus-group-browse-foreign-server |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
580 "b" gnus-group-check-bogus-groups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
581 "F" gnus-group-find-new-groups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
582 "\C-c\C-d" gnus-group-describe-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
583 "\M-d" gnus-group-describe-all-groups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
584 "\C-c\C-a" gnus-group-apropos |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
585 "\C-c\M-\C-a" gnus-group-description-apropos |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
586 "a" gnus-group-post-news |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
587 "\ek" gnus-group-edit-local-kill |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
588 "\eK" gnus-group-edit-global-kill |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
589 "\C-k" gnus-group-kill-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
590 "\C-y" gnus-group-yank-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
591 "\C-w" gnus-group-kill-region |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
592 "\C-x\C-t" gnus-group-transpose-groups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
593 "\C-c\C-l" gnus-group-list-killed |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
594 "\C-c\C-x" gnus-group-expire-articles |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
595 "\C-c\M-\C-x" gnus-group-expire-all-groups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
596 "V" gnus-version |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
597 "s" gnus-group-save-newsrc |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
598 "z" gnus-group-suspend |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
599 "q" gnus-group-exit |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
600 "Q" gnus-group-quit |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
601 "?" gnus-group-describe-briefly |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
602 "\C-c\C-i" gnus-info-find-node |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
603 "\M-e" gnus-group-edit-group-method |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
604 "^" gnus-group-enter-server-mode |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
605 gnus-mouse-2 gnus-mouse-pick-group |
59027
4154f5d4733b
(gnus-group-mode-map): Map follow-link to mouse-face.
Kim F. Storm <storm@cua.dk>
parents:
58959
diff
changeset
|
606 [follow-link] mouse-face |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
607 "<" beginning-of-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
608 ">" end-of-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
609 "\C-c\C-b" gnus-bug |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
610 "\C-c\C-s" gnus-group-sort-groups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
611 "t" gnus-topic-mode |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
612 "\C-c\M-g" gnus-activate-all-groups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
613 "\M-&" gnus-group-universal-argument |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
614 "#" gnus-group-mark-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
615 "\M-#" gnus-group-unmark-group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
616 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
617 (gnus-define-keys (gnus-group-mark-map "M" gnus-group-mode-map) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
618 "m" gnus-group-mark-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
619 "u" gnus-group-unmark-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
620 "w" gnus-group-mark-region |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
621 "b" gnus-group-mark-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
622 "r" gnus-group-mark-regexp |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
623 "U" gnus-group-unmark-all-groups) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
624 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
625 (gnus-define-keys (gnus-group-sieve-map "D" gnus-group-mode-map) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
626 "u" gnus-sieve-update |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
627 "g" gnus-sieve-generate) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
628 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
629 (gnus-define-keys (gnus-group-group-map "G" gnus-group-mode-map) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
630 "d" gnus-group-make-directory-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
631 "h" gnus-group-make-help-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
632 "u" gnus-group-make-useful-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
633 "a" gnus-group-make-archive-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
634 "k" gnus-group-make-kiboze-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
635 "l" gnus-group-nnimap-edit-acl |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
636 "m" gnus-group-make-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
637 "E" gnus-group-edit-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
638 "e" gnus-group-edit-group-method |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
639 "p" gnus-group-edit-group-parameters |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
640 "v" gnus-group-add-to-virtual |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
641 "V" gnus-group-make-empty-virtual |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
642 "D" gnus-group-enter-directory |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
643 "f" gnus-group-make-doc-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
644 "w" gnus-group-make-web-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
645 "M" gnus-group-read-ephemeral-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
646 "r" gnus-group-rename-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
647 "R" gnus-group-make-rss-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
648 "c" gnus-group-customize |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
649 "x" gnus-group-nnimap-expunge |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
650 "\177" gnus-group-delete-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
651 [delete] gnus-group-delete-group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
652 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
653 (gnus-define-keys (gnus-group-soup-map "s" gnus-group-group-map) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
654 "b" gnus-group-brew-soup |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
655 "w" gnus-soup-save-areas |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
656 "s" gnus-soup-send-replies |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
657 "p" gnus-soup-pack-packet |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
658 "r" nnsoup-pack-replies) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
659 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
660 (gnus-define-keys (gnus-group-sort-map "S" gnus-group-group-map) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
661 "s" gnus-group-sort-groups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
662 "a" gnus-group-sort-groups-by-alphabet |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
663 "u" gnus-group-sort-groups-by-unread |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
664 "l" gnus-group-sort-groups-by-level |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
665 "v" gnus-group-sort-groups-by-score |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
666 "r" gnus-group-sort-groups-by-rank |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
667 "m" gnus-group-sort-groups-by-method |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
668 "n" gnus-group-sort-groups-by-real-name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
669 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
670 (gnus-define-keys (gnus-group-sort-selected-map "P" gnus-group-group-map) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
671 "s" gnus-group-sort-selected-groups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
672 "a" gnus-group-sort-selected-groups-by-alphabet |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
673 "u" gnus-group-sort-selected-groups-by-unread |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
674 "l" gnus-group-sort-selected-groups-by-level |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
675 "v" gnus-group-sort-selected-groups-by-score |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
676 "r" gnus-group-sort-selected-groups-by-rank |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
677 "m" gnus-group-sort-selected-groups-by-method |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
678 "n" gnus-group-sort-selected-groups-by-real-name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
679 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
680 (gnus-define-keys (gnus-group-list-map "A" gnus-group-mode-map) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
681 "k" gnus-group-list-killed |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
682 "z" gnus-group-list-zombies |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
683 "s" gnus-group-list-groups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
684 "u" gnus-group-list-all-groups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
685 "A" gnus-group-list-active |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
686 "a" gnus-group-apropos |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
687 "d" gnus-group-description-apropos |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
688 "m" gnus-group-list-matching |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
689 "M" gnus-group-list-all-matching |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
690 "l" gnus-group-list-level |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
691 "c" gnus-group-list-cached |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
692 "?" gnus-group-list-dormant) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
693 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
694 (gnus-define-keys (gnus-group-list-limit-map "/" gnus-group-list-map) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
695 "k" gnus-group-list-limit |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
696 "z" gnus-group-list-limit |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
697 "s" gnus-group-list-limit |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
698 "u" gnus-group-list-limit |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
699 "A" gnus-group-list-limit |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
700 "m" gnus-group-list-limit |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
701 "M" gnus-group-list-limit |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
702 "l" gnus-group-list-limit |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
703 "c" gnus-group-list-limit |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
704 "?" gnus-group-list-limit) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
705 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
706 (gnus-define-keys (gnus-group-list-flush-map "f" gnus-group-list-map) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
707 "k" gnus-group-list-flush |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
708 "z" gnus-group-list-flush |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
709 "s" gnus-group-list-flush |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
710 "u" gnus-group-list-flush |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
711 "A" gnus-group-list-flush |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
712 "m" gnus-group-list-flush |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
713 "M" gnus-group-list-flush |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
714 "l" gnus-group-list-flush |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
715 "c" gnus-group-list-flush |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
716 "?" gnus-group-list-flush) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
717 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
718 (gnus-define-keys (gnus-group-list-plus-map "p" gnus-group-list-map) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
719 "k" gnus-group-list-plus |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
720 "z" gnus-group-list-plus |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
721 "s" gnus-group-list-plus |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
722 "u" gnus-group-list-plus |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
723 "A" gnus-group-list-plus |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
724 "m" gnus-group-list-plus |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
725 "M" gnus-group-list-plus |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
726 "l" gnus-group-list-plus |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
727 "c" gnus-group-list-plus |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
728 "?" gnus-group-list-plus) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
729 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
730 (gnus-define-keys (gnus-group-score-map "W" gnus-group-mode-map) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
731 "f" gnus-score-flush-cache) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
732 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
733 (gnus-define-keys (gnus-group-help-map "H" gnus-group-mode-map) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
734 "c" gnus-group-fetch-charter |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
735 "C" gnus-group-fetch-control |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
736 "d" gnus-group-describe-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
737 "f" gnus-group-fetch-faq |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
738 "v" gnus-version) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
739 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
740 (gnus-define-keys (gnus-group-sub-map "S" gnus-group-mode-map) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
741 "l" gnus-group-set-current-level |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
742 "t" gnus-group-unsubscribe-current-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
743 "s" gnus-group-unsubscribe-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
744 "k" gnus-group-kill-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
745 "y" gnus-group-yank-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
746 "w" gnus-group-kill-region |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
747 "\C-k" gnus-group-kill-level |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
748 "z" gnus-group-kill-all-zombies) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
749 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
750 (defun gnus-topic-mode-p () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
751 "Return non-nil in `gnus-topic-mode'." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
752 (and (boundp 'gnus-topic-mode) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
753 (symbol-value 'gnus-topic-mode))) |
17493 | 754 |
755 (defun gnus-group-make-menu-bar () | |
756 (gnus-turn-off-edit-menu 'group) | |
757 (unless (boundp 'gnus-group-reading-menu) | |
758 | |
759 (easy-menu-define | |
760 gnus-group-reading-menu gnus-group-mode-map "" | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
761 `("Group" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
762 ["Read" gnus-group-read-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
763 :included (not (gnus-topic-mode-p)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
764 :active (gnus-group-group-name)] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
765 ["Read " gnus-topic-read-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
766 :included (gnus-topic-mode-p)] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
767 ["Select" gnus-group-select-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
768 :included (not (gnus-topic-mode-p)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
769 :active (gnus-group-group-name)] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
770 ["Select " gnus-topic-select-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
771 :included (gnus-topic-mode-p)] |
17493 | 772 ["See old articles" (gnus-group-select-group 'all) |
773 :keys "C-u SPC" :active (gnus-group-group-name)] | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
774 ["Catch up" gnus-group-catchup-current |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
775 :included (not (gnus-topic-mode-p)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
776 :active (gnus-group-group-name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
777 ,@(if (featurep 'xemacs) nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
778 '(:help "Mark unread articles in the current group as read"))] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
779 ["Catch up " gnus-topic-catchup-articles |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
780 :included (gnus-topic-mode-p) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
781 ,@(if (featurep 'xemacs) nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
782 '(:help "Mark unread articles in the current group or topic as read"))] |
17493 | 783 ["Catch up all articles" gnus-group-catchup-current-all |
784 (gnus-group-group-name)] | |
785 ["Check for new articles" gnus-group-get-new-news-this-group | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
786 :included (not (gnus-topic-mode-p)) |
32965
13cbb629e3ce
(gnus-group-make-menu-bar): Add some :help
Dave Love <fx@gnu.org>
parents:
31785
diff
changeset
|
787 :active (gnus-group-group-name) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
788 ,@(if (featurep 'xemacs) nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
789 '(:help "Check for new messages in current group"))] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
790 ["Check for new articles " gnus-topic-get-new-news-this-topic |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
791 :included (gnus-topic-mode-p) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
792 ,@(if (featurep 'xemacs) nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
793 '(:help "Check for new messages in current group or topic"))] |
17493 | 794 ["Toggle subscription" gnus-group-unsubscribe-current-group |
795 (gnus-group-group-name)] | |
32965
13cbb629e3ce
(gnus-group-make-menu-bar): Add some :help
Dave Love <fx@gnu.org>
parents:
31785
diff
changeset
|
796 ["Kill" gnus-group-kill-group :active (gnus-group-group-name) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
797 ,@(if (featurep 'xemacs) nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
798 '(:help "Kill (remove) current group"))] |
17493 | 799 ["Yank" gnus-group-yank-group gnus-list-of-killed-groups] |
32965
13cbb629e3ce
(gnus-group-make-menu-bar): Add some :help
Dave Love <fx@gnu.org>
parents:
31785
diff
changeset
|
800 ["Describe" gnus-group-describe-group :active (gnus-group-group-name) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
801 ,@(if (featurep 'xemacs) nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
802 '(:help "Display description of the current group"))] |
17493 | 803 ["Fetch FAQ" gnus-group-fetch-faq (gnus-group-group-name)] |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
804 ["Fetch charter" gnus-group-fetch-charter |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
805 :active (gnus-group-group-name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
806 ,@(if (featurep 'xemacs) nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
807 '(:help "Display the charter of the current group"))] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
808 ["Fetch control message" gnus-group-fetch-control |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
809 :active (gnus-group-group-name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
810 ,@(if (featurep 'xemacs) nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
811 '(:help "Display the archived control message for the current group"))] |
17493 | 812 ;; Actually one should check, if any of the marked groups gives t for |
813 ;; (gnus-check-backend-function 'request-expire-articles ...) | |
814 ["Expire articles" gnus-group-expire-articles | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
815 :included (not (gnus-topic-mode-p)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
816 :active (or (and (gnus-group-group-name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
817 (gnus-check-backend-function |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
818 'request-expire-articles |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
819 (gnus-group-group-name))) gnus-group-marked)] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
820 ["Expire articles " gnus-topic-expire-articles |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
821 :included (gnus-topic-mode-p)] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
822 ["Set group level..." gnus-group-set-current-level |
17493 | 823 (gnus-group-group-name)] |
824 ["Select quick" gnus-group-quick-select-group (gnus-group-group-name)] | |
825 ["Customize" gnus-group-customize (gnus-group-group-name)] | |
826 ("Edit" | |
827 ["Parameters" gnus-group-edit-group-parameters | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
828 :included (not (gnus-topic-mode-p)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
829 :active (gnus-group-group-name)] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
830 ["Parameters " gnus-topic-edit-parameters |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
831 :included (gnus-topic-mode-p)] |
17493 | 832 ["Select method" gnus-group-edit-group-method |
833 (gnus-group-group-name)] | |
834 ["Info" gnus-group-edit-group (gnus-group-group-name)] | |
835 ["Local kill file" gnus-group-edit-local-kill (gnus-group-group-name)] | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
836 ["Global kill file" gnus-group-edit-global-kill t]))) |
17493 | 837 |
838 (easy-menu-define | |
839 gnus-group-group-menu gnus-group-mode-map "" | |
840 '("Groups" | |
841 ("Listing" | |
842 ["List unread subscribed groups" gnus-group-list-groups t] | |
843 ["List (un)subscribed groups" gnus-group-list-all-groups t] | |
844 ["List killed groups" gnus-group-list-killed gnus-killed-list] | |
845 ["List zombie groups" gnus-group-list-zombies gnus-zombie-list] | |
846 ["List level..." gnus-group-list-level t] | |
847 ["Describe all groups" gnus-group-describe-all-groups t] | |
848 ["Group apropos..." gnus-group-apropos t] | |
849 ["Group and description apropos..." gnus-group-description-apropos t] | |
850 ["List groups matching..." gnus-group-list-matching t] | |
851 ["List all groups matching..." gnus-group-list-all-matching t] | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
852 ["List active file" gnus-group-list-active t] |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
853 ["List groups with cached" gnus-group-list-cached t] |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
854 ["List groups with dormant" gnus-group-list-dormant t]) |
17493 | 855 ("Sort" |
856 ["Default sort" gnus-group-sort-groups t] | |
857 ["Sort by method" gnus-group-sort-groups-by-method t] | |
858 ["Sort by rank" gnus-group-sort-groups-by-rank t] | |
859 ["Sort by score" gnus-group-sort-groups-by-score t] | |
860 ["Sort by level" gnus-group-sort-groups-by-level t] | |
861 ["Sort by unread" gnus-group-sort-groups-by-unread t] | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
862 ["Sort by name" gnus-group-sort-groups-by-alphabet t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
863 ["Sort by real name" gnus-group-sort-groups-by-real-name t]) |
17493 | 864 ("Sort process/prefixed" |
865 ["Default sort" gnus-group-sort-selected-groups | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
866 (not (gnus-topic-mode-p))] |
17493 | 867 ["Sort by method" gnus-group-sort-selected-groups-by-method |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
868 (not (gnus-topic-mode-p))] |
17493 | 869 ["Sort by rank" gnus-group-sort-selected-groups-by-rank |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
870 (not (gnus-topic-mode-p))] |
17493 | 871 ["Sort by score" gnus-group-sort-selected-groups-by-score |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
872 (not (gnus-topic-mode-p))] |
17493 | 873 ["Sort by level" gnus-group-sort-selected-groups-by-level |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
874 (not (gnus-topic-mode-p))] |
17493 | 875 ["Sort by unread" gnus-group-sort-selected-groups-by-unread |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
876 (not (gnus-topic-mode-p))] |
17493 | 877 ["Sort by name" gnus-group-sort-selected-groups-by-alphabet |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
878 (not (gnus-topic-mode-p))] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
879 ["Sort by real name" gnus-group-sort-selected-groups-by-real-name |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
880 (not (gnus-topic-mode-p))]) |
17493 | 881 ("Mark" |
882 ["Mark group" gnus-group-mark-group | |
883 (and (gnus-group-group-name) | |
884 (not (memq (gnus-group-group-name) gnus-group-marked)))] | |
885 ["Unmark group" gnus-group-unmark-group | |
886 (and (gnus-group-group-name) | |
887 (memq (gnus-group-group-name) gnus-group-marked))] | |
888 ["Unmark all" gnus-group-unmark-all-groups gnus-group-marked] | |
889 ["Mark regexp..." gnus-group-mark-regexp t] | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
890 ["Mark region" gnus-group-mark-region :active (gnus-mark-active-p)] |
17493 | 891 ["Mark buffer" gnus-group-mark-buffer t] |
892 ["Execute command" gnus-group-universal-argument | |
893 (or gnus-group-marked (gnus-group-group-name))]) | |
894 ("Subscribe" | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
895 ["Subscribe to a group..." gnus-group-unsubscribe-group t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
896 ["Kill all newsgroups in region" gnus-group-kill-region |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
897 :active (gnus-mark-active-p)] |
17493 | 898 ["Kill all zombie groups" gnus-group-kill-all-zombies |
899 gnus-zombie-list] | |
900 ["Kill all groups on level..." gnus-group-kill-level t]) | |
901 ("Foreign groups" | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
902 ["Make a foreign group..." gnus-group-make-group t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
903 ["Add a directory group..." gnus-group-make-directory-group t] |
17493 | 904 ["Add the help group" gnus-group-make-help-group t] |
905 ["Add the archive group" gnus-group-make-archive-group t] | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
906 ["Make a doc group..." gnus-group-make-doc-group t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
907 ["Make a web group..." gnus-group-make-web-group t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
908 ["Make a kiboze group..." gnus-group-make-kiboze-group t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
909 ["Make a virtual group..." gnus-group-make-empty-virtual t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
910 ["Add a group to a virtual..." gnus-group-add-to-virtual t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
911 ["Make an ephemeral group..." gnus-group-read-ephemeral-group t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
912 ["Make an RSS group..." gnus-group-make-rss-group t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
913 ["Rename group..." gnus-group-rename-group |
17493 | 914 (gnus-check-backend-function |
915 'request-rename-group (gnus-group-group-name))] | |
916 ["Delete group" gnus-group-delete-group | |
917 (gnus-check-backend-function | |
918 'request-delete-group (gnus-group-group-name))]) | |
919 ("Move" | |
920 ["Next" gnus-group-next-group t] | |
921 ["Previous" gnus-group-prev-group t] | |
922 ["Next unread" gnus-group-next-unread-group t] | |
923 ["Previous unread" gnus-group-prev-unread-group t] | |
924 ["Next unread same level" gnus-group-next-unread-group-same-level t] | |
925 ["Previous unread same level" | |
926 gnus-group-prev-unread-group-same-level t] | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
927 ["Jump to group..." gnus-group-jump-to-group t] |
17493 | 928 ["First unread group" gnus-group-first-unread-group t] |
929 ["Best unread group" gnus-group-best-unread-group t]) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
930 ("Sieve" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
931 ["Generate" gnus-sieve-generate t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
932 ["Generate and update" gnus-sieve-update t]) |
17493 | 933 ["Delete bogus groups" gnus-group-check-bogus-groups t] |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
934 ["Find new newsgroups" gnus-group-find-new-groups t] |
17493 | 935 ["Transpose" gnus-group-transpose-groups |
936 (gnus-group-group-name)] | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
937 ["Read a directory as a group..." gnus-group-enter-directory t])) |
17493 | 938 |
939 (easy-menu-define | |
940 gnus-group-misc-menu gnus-group-mode-map "" | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
941 `("Gnus" |
17493 | 942 ("SOUP" |
943 ["Pack replies" nnsoup-pack-replies (fboundp 'nnsoup-request-group)] | |
944 ["Send replies" gnus-soup-send-replies | |
945 (fboundp 'gnus-soup-pack-packet)] | |
946 ["Pack packet" gnus-soup-pack-packet (fboundp 'gnus-soup-pack-packet)] | |
947 ["Save areas" gnus-soup-save-areas (fboundp 'gnus-soup-pack-packet)] | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
948 ["Brew SOUP" gnus-group-brew-soup (fboundp 'gnus-soup-pack-packet)]) |
17493 | 949 ["Send a mail" gnus-group-mail t] |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
950 ["Send a message (mail or news)" gnus-group-post-news t] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
951 ["Create a local message" gnus-group-news t] |
32965
13cbb629e3ce
(gnus-group-make-menu-bar): Add some :help
Dave Love <fx@gnu.org>
parents:
31785
diff
changeset
|
952 ["Check for new news" gnus-group-get-new-news |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
953 ,@(if (featurep 'xemacs) '(t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
954 '(:help "Get newly arrived articles")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
955 ] |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
956 ["Send queued messages" gnus-delay-send-queue |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
957 ,@(if (featurep 'xemacs) '(t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
958 '(:help "Send all messages that are scheduled to be sent now")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
959 ] |
17493 | 960 ["Activate all groups" gnus-activate-all-groups t] |
961 ["Restart Gnus" gnus-group-restart t] | |
962 ["Read init file" gnus-group-read-init-file t] | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
963 ["Browse foreign server..." gnus-group-browse-foreign-server t] |
17493 | 964 ["Enter server buffer" gnus-group-enter-server-mode t] |
965 ["Expire all expirable articles" gnus-group-expire-all-groups t] | |
966 ["Generate any kiboze groups" nnkiboze-generate-groups t] | |
967 ["Gnus version" gnus-version t] | |
968 ["Save .newsrc files" gnus-group-save-newsrc t] | |
969 ["Suspend Gnus" gnus-group-suspend t] | |
970 ["Clear dribble buffer" gnus-group-clear-dribble t] | |
971 ["Read manual" gnus-info-find-node t] | |
972 ["Flush score cache" gnus-score-flush-cache t] | |
973 ["Toggle topics" gnus-topic-mode t] | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
974 ["Send a bug report" gnus-bug t] |
32965
13cbb629e3ce
(gnus-group-make-menu-bar): Add some :help
Dave Love <fx@gnu.org>
parents:
31785
diff
changeset
|
975 ["Exit from Gnus" gnus-group-exit |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
976 ,@(if (featurep 'xemacs) '(t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
977 '(:help "Quit reading news"))] |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
978 ["Exit without saving" gnus-group-quit t])) |
17493 | 979 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
980 (gnus-run-hooks 'gnus-group-menu-hook))) |
17493 | 981 |
33311
fa5c3f22519c
(gnus-group-toolbar-map): New variable.
Dave Love <fx@gnu.org>
parents:
32969
diff
changeset
|
982 (defvar gnus-group-toolbar-map nil) |
fa5c3f22519c
(gnus-group-toolbar-map): New variable.
Dave Love <fx@gnu.org>
parents:
32969
diff
changeset
|
983 |
33316 | 984 ;; Emacs 21 tool bar. Should be no-op otherwise. |
32965
13cbb629e3ce
(gnus-group-make-menu-bar): Add some :help
Dave Love <fx@gnu.org>
parents:
31785
diff
changeset
|
985 (defun gnus-group-make-tool-bar () |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49274
diff
changeset
|
986 (if (and |
44344
37801f2191c3
* gnus-group.el (gnus-group-make-tool-bar): Load tool-bar first.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41819
diff
changeset
|
987 (condition-case nil (require 'tool-bar) (error nil)) |
37801f2191c3
* gnus-group.el (gnus-group-make-tool-bar): Load tool-bar first.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41819
diff
changeset
|
988 (fboundp 'tool-bar-add-item-from-menu) |
37801f2191c3
* gnus-group.el (gnus-group-make-tool-bar): Load tool-bar first.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41819
diff
changeset
|
989 (default-value 'tool-bar-mode) |
37801f2191c3
* gnus-group.el (gnus-group-make-tool-bar): Load tool-bar first.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
41819
diff
changeset
|
990 (not gnus-group-toolbar-map)) |
33311
fa5c3f22519c
(gnus-group-toolbar-map): New variable.
Dave Love <fx@gnu.org>
parents:
32969
diff
changeset
|
991 (setq gnus-group-toolbar-map |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
992 (let ((tool-bar-map (make-sparse-keymap)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
993 (load-path (mm-image-load-path))) |
33311
fa5c3f22519c
(gnus-group-toolbar-map): New variable.
Dave Love <fx@gnu.org>
parents:
32969
diff
changeset
|
994 (tool-bar-add-item-from-menu |
fa5c3f22519c
(gnus-group-toolbar-map): New variable.
Dave Love <fx@gnu.org>
parents:
32969
diff
changeset
|
995 'gnus-group-get-new-news "get-news" gnus-group-mode-map) |
fa5c3f22519c
(gnus-group-toolbar-map): New variable.
Dave Love <fx@gnu.org>
parents:
32969
diff
changeset
|
996 (tool-bar-add-item-from-menu |
fa5c3f22519c
(gnus-group-toolbar-map): New variable.
Dave Love <fx@gnu.org>
parents:
32969
diff
changeset
|
997 'gnus-group-get-new-news-this-group "gnntg" gnus-group-mode-map) |
fa5c3f22519c
(gnus-group-toolbar-map): New variable.
Dave Love <fx@gnu.org>
parents:
32969
diff
changeset
|
998 (tool-bar-add-item-from-menu |
fa5c3f22519c
(gnus-group-toolbar-map): New variable.
Dave Love <fx@gnu.org>
parents:
32969
diff
changeset
|
999 'gnus-group-catchup-current "catchup" gnus-group-mode-map) |
fa5c3f22519c
(gnus-group-toolbar-map): New variable.
Dave Love <fx@gnu.org>
parents:
32969
diff
changeset
|
1000 (tool-bar-add-item-from-menu |
fa5c3f22519c
(gnus-group-toolbar-map): New variable.
Dave Love <fx@gnu.org>
parents:
32969
diff
changeset
|
1001 'gnus-group-describe-group "describe-group" gnus-group-mode-map) |
fa5c3f22519c
(gnus-group-toolbar-map): New variable.
Dave Love <fx@gnu.org>
parents:
32969
diff
changeset
|
1002 (tool-bar-add-item "subscribe" 'gnus-group-subscribe 'subscribe |
fa5c3f22519c
(gnus-group-toolbar-map): New variable.
Dave Love <fx@gnu.org>
parents:
32969
diff
changeset
|
1003 :help "Subscribe to the current group") |
fa5c3f22519c
(gnus-group-toolbar-map): New variable.
Dave Love <fx@gnu.org>
parents:
32969
diff
changeset
|
1004 (tool-bar-add-item "unsubscribe" 'gnus-group-unsubscribe |
fa5c3f22519c
(gnus-group-toolbar-map): New variable.
Dave Love <fx@gnu.org>
parents:
32969
diff
changeset
|
1005 'unsubscribe |
fa5c3f22519c
(gnus-group-toolbar-map): New variable.
Dave Love <fx@gnu.org>
parents:
32969
diff
changeset
|
1006 :help "Unsubscribe from the current group") |
fa5c3f22519c
(gnus-group-toolbar-map): New variable.
Dave Love <fx@gnu.org>
parents:
32969
diff
changeset
|
1007 (tool-bar-add-item-from-menu |
fa5c3f22519c
(gnus-group-toolbar-map): New variable.
Dave Love <fx@gnu.org>
parents:
32969
diff
changeset
|
1008 'gnus-group-exit "exit-gnus" gnus-group-mode-map) |
33749
2cced032a4cc
(gnus-group-make-tool-bar): Fix a paren typo.
Gerd Moellmann <gerd@gnu.org>
parents:
33395
diff
changeset
|
1009 tool-bar-map))) |
2cced032a4cc
(gnus-group-make-tool-bar): Fix a paren typo.
Gerd Moellmann <gerd@gnu.org>
parents:
33395
diff
changeset
|
1010 (if gnus-group-toolbar-map |
2cced032a4cc
(gnus-group-make-tool-bar): Fix a paren typo.
Gerd Moellmann <gerd@gnu.org>
parents:
33395
diff
changeset
|
1011 (set (make-local-variable 'tool-bar-map) gnus-group-toolbar-map))) |
32965
13cbb629e3ce
(gnus-group-make-menu-bar): Add some :help
Dave Love <fx@gnu.org>
parents:
31785
diff
changeset
|
1012 |
17493 | 1013 (defun gnus-group-mode () |
1014 "Major mode for reading news. | |
1015 | |
1016 All normal editing commands are switched off. | |
1017 \\<gnus-group-mode-map> | |
1018 The group buffer lists (some of) the groups available. For instance, | |
1019 `\\[gnus-group-list-groups]' will list all subscribed groups with unread articles, while `\\[gnus-group-list-zombies]' | |
1020 lists all zombie groups. | |
1021 | |
1022 Groups that are displayed can be entered with `\\[gnus-group-read-group]'. To subscribe | |
1023 to a group not displayed, type `\\[gnus-group-unsubscribe-group]'. | |
1024 | |
1025 For more in-depth information on this mode, read the manual (`\\[gnus-info-find-node]'). | |
1026 | |
1027 The following commands are available: | |
1028 | |
1029 \\{gnus-group-mode-map}" | |
1030 (interactive) | |
33311
fa5c3f22519c
(gnus-group-toolbar-map): New variable.
Dave Love <fx@gnu.org>
parents:
32969
diff
changeset
|
1031 (kill-all-local-variables) |
17493 | 1032 (when (gnus-visual-p 'group-menu 'menu) |
32965
13cbb629e3ce
(gnus-group-make-menu-bar): Add some :help
Dave Love <fx@gnu.org>
parents:
31785
diff
changeset
|
1033 (gnus-group-make-menu-bar) |
13cbb629e3ce
(gnus-group-make-menu-bar): Add some :help
Dave Love <fx@gnu.org>
parents:
31785
diff
changeset
|
1034 (gnus-group-make-tool-bar)) |
17493 | 1035 (gnus-simplify-mode-line) |
1036 (setq major-mode 'gnus-group-mode) | |
1037 (setq mode-name "Group") | |
1038 (gnus-group-set-mode-line) | |
1039 (setq mode-line-process nil) | |
1040 (use-local-map gnus-group-mode-map) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1041 (buffer-disable-undo) |
17493 | 1042 (setq truncate-lines t) |
1043 (setq buffer-read-only t) | |
1044 (gnus-set-default-directory) | |
1045 (gnus-update-format-specifications nil 'group 'group-mode) | |
1046 (gnus-update-group-mark-positions) | |
1047 (when gnus-use-undo | |
1048 (gnus-undo-mode 1)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1049 (when gnus-slave |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1050 (gnus-slave-mode)) |
62890
4b7fa3ee8e9e
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-336
Miles Bader <miles@gnu.org>
parents:
61424
diff
changeset
|
1051 (gnus-run-mode-hooks 'gnus-group-mode-hook)) |
17493 | 1052 |
1053 (defun gnus-update-group-mark-positions () | |
1054 (save-excursion | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1055 (let ((gnus-process-mark ?\200) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1056 (gnus-group-update-hook nil) |
17493 | 1057 (gnus-group-marked '("dummy.group")) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1058 (gnus-active-hashtb (make-vector 10 0)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1059 (topic "")) |
17493 | 1060 (gnus-set-active "dummy.group" '(0 . 0)) |
1061 (gnus-set-work-buffer) | |
1062 (gnus-group-insert-group-line "dummy.group" 0 nil 0 nil) | |
1063 (goto-char (point-min)) | |
1064 (setq gnus-group-mark-positions | |
57321
3381cb76bac3
* gnus-group.el (gnus-update-group-mark-positions):
Juri Linkov <juri@jurta.org>
parents:
57153
diff
changeset
|
1065 (list (cons 'process (and (search-forward |
57363
ef5d2ed6459e
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-603
Miles Bader <miles@gnu.org>
parents:
57321
diff
changeset
|
1066 (mm-string-as-multibyte "\200") nil t) |
17493 | 1067 (- (point) 2)))))))) |
1068 | |
1069 (defun gnus-mouse-pick-group (e) | |
1070 "Enter the group under the mouse pointer." | |
1071 (interactive "e") | |
1072 (mouse-set-point e) | |
1073 (gnus-group-read-group nil)) | |
1074 | |
1075 ;; Look at LEVEL and find out what the level is really supposed to be. | |
1076 ;; If LEVEL is non-nil, LEVEL will be returned, if not, what happens | |
1077 ;; will depend on whether `gnus-group-use-permanent-levels' is used. | |
1078 (defun gnus-group-default-level (&optional level number-or-nil) | |
1079 (cond | |
1080 (gnus-group-use-permanent-levels | |
1081 (or (setq gnus-group-use-permanent-levels | |
1082 (or level (if (numberp gnus-group-use-permanent-levels) | |
1083 gnus-group-use-permanent-levels | |
1084 (or gnus-group-default-list-level | |
1085 gnus-level-subscribed)))) | |
1086 gnus-group-default-list-level gnus-level-subscribed)) | |
1087 (number-or-nil | |
1088 level) | |
1089 (t | |
1090 (or level gnus-group-default-list-level gnus-level-subscribed)))) | |
1091 | |
1092 (defun gnus-group-setup-buffer () | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1093 (set-buffer (gnus-get-buffer-create gnus-group-buffer)) |
17493 | 1094 (unless (eq major-mode 'gnus-group-mode) |
1095 (gnus-group-mode) | |
1096 (when gnus-carpal | |
1097 (gnus-carpal-setup-buffer 'group)))) | |
1098 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1099 (defun gnus-group-name-charset (method group) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1100 (if (null method) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1101 (setq method (gnus-find-method-for-group group))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1102 (let ((item (assoc method gnus-group-name-charset-method-alist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1103 (alist gnus-group-name-charset-group-alist) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1104 result) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49274
diff
changeset
|
1105 (if item |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1106 (cdr item) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1107 (while (setq item (pop alist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1108 (if (string-match (car item) group) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1109 (setq alist nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1110 result (cdr item)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1111 result))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1112 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1113 (defun gnus-group-name-decode (string charset) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1114 ;; Fixme: Don't decode in unibyte mode. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1115 (if (and string charset (featurep 'mule)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1116 (mm-decode-coding-string string charset) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1117 string)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1118 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1119 (defun gnus-group-decoded-name (string) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1120 (let ((charset (gnus-group-name-charset nil string))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1121 (gnus-group-name-decode string charset))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1122 |
17493 | 1123 (defun gnus-group-list-groups (&optional level unread lowest) |
1124 "List newsgroups with level LEVEL or lower that have unread articles. | |
1125 Default is all subscribed groups. | |
1126 If argument UNREAD is non-nil, groups with no unread articles are also | |
1127 listed. | |
1128 | |
1129 Also see the `gnus-group-use-permanent-levels' variable." | |
1130 (interactive | |
1131 (list (if current-prefix-arg | |
1132 (prefix-numeric-value current-prefix-arg) | |
1133 (or | |
1134 (gnus-group-default-level nil t) | |
1135 gnus-group-default-list-level | |
1136 gnus-level-subscribed)))) | |
1137 (unless level | |
1138 (setq level (car gnus-group-list-mode) | |
1139 unread (cdr gnus-group-list-mode))) | |
1140 (setq level (gnus-group-default-level level)) | |
1141 (gnus-group-setup-buffer) | |
1142 (gnus-update-format-specifications nil 'group 'group-mode) | |
1143 (let ((case-fold-search nil) | |
1144 (props (text-properties-at (gnus-point-at-bol))) | |
1145 (empty (= (point-min) (point-max))) | |
1146 (group (gnus-group-group-name)) | |
1147 number) | |
1148 (set-buffer gnus-group-buffer) | |
1149 (setq number (funcall gnus-group-prepare-function level unread lowest)) | |
1150 (when (or (and (numberp number) | |
1151 (zerop number)) | |
1152 (zerop (buffer-size))) | |
1153 ;; No groups in the buffer. | |
1154 (gnus-message 5 gnus-no-groups-message)) | |
1155 ;; We have some groups displayed. | |
1156 (goto-char (point-max)) | |
1157 (when (or (not gnus-group-goto-next-group-function) | |
1158 (not (funcall gnus-group-goto-next-group-function | |
1159 group props))) | |
1160 (cond | |
1161 (empty | |
1162 (goto-char (point-min))) | |
1163 ((not group) | |
1164 ;; Go to the first group with unread articles. | |
1165 (gnus-group-search-forward t)) | |
1166 (t | |
1167 ;; Find the right group to put point on. If the current group | |
1168 ;; has disappeared in the new listing, try to find the next | |
1169 ;; one. If no next one can be found, just leave point at the | |
1170 ;; first newsgroup in the buffer. | |
1171 (when (not (gnus-goto-char | |
1172 (text-property-any | |
1173 (point-min) (point-max) | |
1174 'gnus-group (gnus-intern-safe | |
1175 group gnus-active-hashtb)))) | |
1176 (let ((newsrc (cdddr (gnus-gethash group gnus-newsrc-hashtb)))) | |
1177 (while (and newsrc | |
1178 (not (gnus-goto-char | |
1179 (text-property-any | |
1180 (point-min) (point-max) 'gnus-group | |
1181 (gnus-intern-safe | |
1182 (caar newsrc) gnus-active-hashtb))))) | |
1183 (setq newsrc (cdr newsrc))) | |
1184 (unless newsrc | |
1185 (goto-char (point-max)) | |
1186 (forward-line -1))))))) | |
1187 ;; Adjust cursor point. | |
1188 (gnus-group-position-point))) | |
1189 | |
1190 (defun gnus-group-list-level (level &optional all) | |
1191 "List groups on LEVEL. | |
1192 If ALL (the prefix), also list groups that have no unread articles." | |
1193 (interactive "nList groups on level: \nP") | |
1194 (gnus-group-list-groups level all level)) | |
1195 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1196 (defun gnus-group-prepare-logic (group test) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1197 (or (and gnus-group-listed-groups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1198 (null gnus-group-list-option) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1199 (member group gnus-group-listed-groups)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1200 (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1201 ((null gnus-group-listed-groups) test) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1202 ((null gnus-group-list-option) test) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1203 (t (and (member group gnus-group-listed-groups) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1204 (if (eq gnus-group-list-option 'flush) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1205 (not test) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1206 test)))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1207 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1208 (defun gnus-group-prepare-flat (level &optional predicate lowest regexp) |
17493 | 1209 "List all newsgroups with unread articles of level LEVEL or lower. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1210 If PREDICATE is a function, list groups that the function returns non-nil; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1211 if it is t, list groups that have no unread articles. |
17493 | 1212 If LOWEST is non-nil, list all newsgroups of level LOWEST or higher. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1213 If REGEXP is a function, list dead groups that the function returns non-nil; |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1214 if it is a string, only list groups matching REGEXP." |
17493 | 1215 (set-buffer gnus-group-buffer) |
1216 (let ((buffer-read-only nil) | |
1217 (newsrc (cdr gnus-newsrc-alist)) | |
1218 (lowest (or lowest 1)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1219 (not-in-list (and gnus-group-listed-groups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1220 (copy-sequence gnus-group-listed-groups))) |
17493 | 1221 info clevel unread group params) |
1222 (erase-buffer) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1223 (when (or (< lowest gnus-level-zombie) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1224 gnus-group-listed-groups) |
17493 | 1225 ;; List living groups. |
1226 (while newsrc | |
1227 (setq info (car newsrc) | |
1228 group (gnus-info-group info) | |
1229 params (gnus-info-params info) | |
1230 newsrc (cdr newsrc) | |
1231 unread (car (gnus-gethash group gnus-newsrc-hashtb))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1232 (when not-in-list |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1233 (setq not-in-list (delete group not-in-list))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1234 (when (gnus-group-prepare-logic |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1235 group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1236 (and unread ; This group might be unchecked |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1237 (or (not (stringp regexp)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1238 (string-match regexp group)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1239 (<= (setq clevel (gnus-info-level info)) level) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1240 (>= clevel lowest) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1241 (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1242 ((functionp predicate) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1243 (funcall predicate info)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1244 (predicate t) ; We list all groups? |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1245 (t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1246 (or |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1247 (if (eq unread t) ; Unactivated? |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1248 gnus-group-list-inactive-groups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1249 ; We list unactivated |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1250 (> unread 0)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1251 ; We list groups with unread articles |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1252 (and gnus-list-groups-with-ticked-articles |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1253 (cdr (assq 'tick (gnus-info-marks info)))) |
17493 | 1254 ; And groups with tickeds |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1255 ;; Check for permanent visibility. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1256 (and gnus-permanently-visible-groups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1257 (string-match gnus-permanently-visible-groups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1258 group)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1259 (memq 'visible params) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1260 (cdr (assq 'visible params))))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1261 (gnus-group-insert-group-line |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1262 group (gnus-info-level info) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1263 (gnus-info-marks info) unread (gnus-info-method info))))) |
17493 | 1264 |
1265 ;; List dead groups. | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1266 (when (or gnus-group-listed-groups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1267 (and (>= level gnus-level-zombie) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1268 (<= lowest gnus-level-zombie))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1269 (gnus-group-prepare-flat-list-dead |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1270 (setq gnus-zombie-list (sort gnus-zombie-list 'string<)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1271 gnus-level-zombie ?Z |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1272 regexp)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1273 (when not-in-list |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1274 (dolist (group gnus-zombie-list) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1275 (setq not-in-list (delete group not-in-list)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1276 (when (or gnus-group-listed-groups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1277 (and (>= level gnus-level-killed) (<= lowest gnus-level-killed))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1278 (gnus-group-prepare-flat-list-dead |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1279 (gnus-union |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1280 not-in-list |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1281 (setq gnus-killed-list (sort gnus-killed-list 'string<))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1282 gnus-level-killed ?K regexp)) |
17493 | 1283 |
1284 (gnus-group-set-mode-line) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1285 (setq gnus-group-list-mode (cons level predicate)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1286 (gnus-run-hooks 'gnus-group-prepare-hook) |
17493 | 1287 t)) |
1288 | |
1289 (defun gnus-group-prepare-flat-list-dead (groups level mark regexp) | |
1290 ;; List zombies and killed lists somewhat faster, which was | |
1291 ;; suggested by Jack Vinson <vinson@unagi.cis.upenn.edu>. It does | |
1292 ;; this by ignoring the group format specification altogether. | |
1293 (let (group) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1294 (if (> (length groups) gnus-group-listing-limit) |
17493 | 1295 (while groups |
1296 (setq group (pop groups)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1297 (when (gnus-group-prepare-logic |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1298 group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1299 (or (not regexp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1300 (and (stringp regexp) (string-match regexp group)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1301 (and (functionp regexp) (funcall regexp group)))) |
17493 | 1302 (gnus-add-text-properties |
1303 (point) (prog1 (1+ (point)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1304 (insert " " mark " *: " |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1305 (gnus-group-decoded-name group) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1306 "\n")) |
17493 | 1307 (list 'gnus-group (gnus-intern-safe group gnus-active-hashtb) |
1308 'gnus-unread t | |
1309 'gnus-level level)))) | |
1310 (while groups | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1311 (setq group (pop groups)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1312 (when (gnus-group-prepare-logic |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1313 group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1314 (or (not regexp) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1315 (and (stringp regexp) (string-match regexp group)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1316 (and (functionp regexp) (funcall regexp group)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1317 (gnus-group-insert-group-line |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1318 group level nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1319 (let ((active (gnus-active group))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1320 (if active |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1321 (if (zerop (cdr active)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1322 0 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1323 (- (1+ (cdr active)) (car active))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1324 nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1325 (gnus-method-simplify (gnus-find-method-for-group group)))))))) |
17493 | 1326 |
1327 (defun gnus-group-update-group-line () | |
1328 "Update the current line in the group buffer." | |
1329 (let* ((buffer-read-only nil) | |
1330 (group (gnus-group-group-name)) | |
1331 (entry (and group (gnus-gethash group gnus-newsrc-hashtb))) | |
1332 gnus-group-indentation) | |
1333 (when group | |
1334 (and entry | |
1335 (not (gnus-ephemeral-group-p group)) | |
1336 (gnus-dribble-enter | |
1337 (concat "(gnus-group-set-info '" | |
1338 (gnus-prin1-to-string (nth 2 entry)) | |
1339 ")"))) | |
1340 (setq gnus-group-indentation (gnus-group-group-indentation)) | |
1341 (gnus-delete-line) | |
1342 (gnus-group-insert-group-line-info group) | |
1343 (forward-line -1) | |
1344 (gnus-group-position-point)))) | |
1345 | |
1346 (defun gnus-group-insert-group-line-info (group) | |
1347 "Insert GROUP on the current line." | |
1348 (let ((entry (gnus-gethash group gnus-newsrc-hashtb)) | |
1349 (gnus-group-indentation (gnus-group-group-indentation)) | |
1350 active info) | |
1351 (if entry | |
1352 (progn | |
1353 ;; (Un)subscribed group. | |
1354 (setq info (nth 2 entry)) | |
1355 (gnus-group-insert-group-line | |
1356 group (gnus-info-level info) (gnus-info-marks info) | |
1357 (or (car entry) t) (gnus-info-method info))) | |
1358 ;; This group is dead. | |
1359 (gnus-group-insert-group-line | |
1360 group | |
1361 (if (member group gnus-zombie-list) gnus-level-zombie gnus-level-killed) | |
1362 nil | |
1363 (if (setq active (gnus-active group)) | |
1364 (if (zerop (cdr active)) | |
1365 0 | |
1366 (- (1+ (cdr active)) (car active))) | |
1367 nil) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1368 (gnus-method-simplify (gnus-find-method-for-group group)))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1369 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1370 (defun gnus-number-of-unseen-articles-in-group (group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1371 (let* ((info (nth 2 (gnus-group-entry group))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1372 (marked (gnus-info-marks info)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1373 (seen (cdr (assq 'seen marked))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1374 (active (gnus-active group))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1375 (if (not active) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1376 0 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1377 (length (gnus-uncompress-range |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1378 (gnus-range-difference |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1379 (gnus-range-difference (list active) (gnus-info-read info)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1380 seen)))))) |
17493 | 1381 |
1382 (defun gnus-group-insert-group-line (gnus-tmp-group gnus-tmp-level | |
1383 gnus-tmp-marked number | |
1384 gnus-tmp-method) | |
1385 "Insert a group line in the group buffer." | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1386 (let* ((gnus-tmp-method |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49274
diff
changeset
|
1387 (gnus-server-get-method gnus-tmp-group gnus-tmp-method)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1388 (group-name-charset (gnus-group-name-charset gnus-tmp-method |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1389 gnus-tmp-group)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1390 (gnus-tmp-active (gnus-active gnus-tmp-group)) |
17493 | 1391 (gnus-tmp-number-total |
1392 (if gnus-tmp-active | |
1393 (1+ (- (cdr gnus-tmp-active) (car gnus-tmp-active))) | |
1394 0)) | |
1395 (gnus-tmp-number-of-unread | |
1396 (if (numberp number) (int-to-string (max 0 number)) | |
1397 "*")) | |
1398 (gnus-tmp-number-of-read | |
1399 (if (numberp number) | |
1400 (int-to-string (max 0 (- gnus-tmp-number-total number))) | |
1401 "*")) | |
1402 (gnus-tmp-subscribed | |
1403 (cond ((<= gnus-tmp-level gnus-level-subscribed) ? ) | |
1404 ((<= gnus-tmp-level gnus-level-unsubscribed) ?U) | |
1405 ((= gnus-tmp-level gnus-level-zombie) ?Z) | |
1406 (t ?K))) | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49274
diff
changeset
|
1407 (gnus-tmp-qualified-group |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1408 (gnus-group-name-decode (gnus-group-real-name gnus-tmp-group) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1409 group-name-charset)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1410 (gnus-tmp-comment |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1411 (or (gnus-group-get-parameter gnus-tmp-group 'comment t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1412 gnus-tmp-group)) |
17493 | 1413 (gnus-tmp-newsgroup-description |
1414 (if gnus-description-hashtb | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1415 (or (gnus-group-name-decode |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49274
diff
changeset
|
1416 (gnus-gethash gnus-tmp-group gnus-description-hashtb) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1417 group-name-charset) "") |
17493 | 1418 "")) |
1419 (gnus-tmp-moderated | |
1420 (if (and gnus-moderated-hashtb | |
1421 (gnus-gethash gnus-tmp-group gnus-moderated-hashtb)) | |
1422 ?m ? )) | |
1423 (gnus-tmp-moderated-string | |
1424 (if (eq gnus-tmp-moderated ?m) "(m)" "")) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1425 (gnus-tmp-group-icon "==&&==") |
17493 | 1426 (gnus-tmp-news-server (or (cadr gnus-tmp-method) "")) |
1427 (gnus-tmp-news-method (or (car gnus-tmp-method) "")) | |
1428 (gnus-tmp-news-method-string | |
1429 (if gnus-tmp-method | |
1430 (format "(%s:%s)" (car gnus-tmp-method) | |
1431 (cadr gnus-tmp-method)) "")) | |
1432 (gnus-tmp-marked-mark | |
1433 (if (and (numberp number) | |
1434 (zerop number) | |
1435 (cdr (assq 'tick gnus-tmp-marked))) | |
1436 ?* ? )) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1437 (gnus-tmp-summary-live |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1438 (if (and (not gnus-group-is-exiting-p) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1439 (gnus-buffer-live-p (gnus-summary-buffer-name |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1440 gnus-tmp-group))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1441 ?* ? )) |
17493 | 1442 (gnus-tmp-process-marked |
1443 (if (member gnus-tmp-group gnus-group-marked) | |
1444 gnus-process-mark ? )) | |
1445 (gnus-tmp-grouplens | |
1446 (or (and gnus-use-grouplens | |
1447 (bbb-grouplens-group-p gnus-tmp-group)) | |
1448 "")) | |
1449 (buffer-read-only nil) | |
1450 header gnus-tmp-header) ; passed as parameter to user-funcs. | |
1451 (beginning-of-line) | |
1452 (gnus-add-text-properties | |
1453 (point) | |
1454 (prog1 (1+ (point)) | |
1455 ;; Insert the text. | |
61424
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
1456 (let ((gnus-tmp-decoded-group (gnus-group-name-decode |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
1457 gnus-tmp-group group-name-charset))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1458 (eval gnus-group-line-format-spec))) |
17493 | 1459 `(gnus-group ,(gnus-intern-safe gnus-tmp-group gnus-active-hashtb) |
1460 gnus-unread ,(if (numberp number) | |
62907
88db2adda4b7
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-339
Miles Bader <miles@gnu.org>
parents:
62890
diff
changeset
|
1461 (string-to-number gnus-tmp-number-of-unread) |
17493 | 1462 t) |
1463 gnus-marked ,gnus-tmp-marked-mark | |
1464 gnus-indentation ,gnus-group-indentation | |
1465 gnus-level ,gnus-tmp-level)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1466 (forward-line -1) |
17493 | 1467 (when (inline (gnus-visual-p 'group-highlight 'highlight)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1468 (gnus-run-hooks 'gnus-group-update-hook)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1469 (forward-line) |
17493 | 1470 ;; Allow XEmacs to remove front-sticky text properties. |
1471 (gnus-group-remove-excess-properties))) | |
1472 | |
1473 (defun gnus-group-highlight-line () | |
1474 "Highlight the current line according to `gnus-group-highlight'." | |
1475 (let* ((list gnus-group-highlight) | |
1476 (p (point)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1477 (end (gnus-point-at-eol)) |
17493 | 1478 ;; now find out where the line starts and leave point there. |
1479 (beg (progn (beginning-of-line) (point))) | |
1480 (group (gnus-group-group-name)) | |
1481 (entry (gnus-group-entry group)) | |
1482 (unread (if (numberp (car entry)) (car entry) 0)) | |
1483 (active (gnus-active group)) | |
1484 (total (if active (1+ (- (cdr active) (car active))) 0)) | |
1485 (info (nth 2 entry)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1486 (method (inline (gnus-server-get-method group (gnus-info-method info)))) |
17493 | 1487 (marked (gnus-info-marks info)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1488 (mailp (apply 'append |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1489 (mapcar |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1490 (lambda (x) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1491 (memq x (assoc (symbol-name |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1492 (car (or method gnus-select-method))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1493 gnus-valid-select-methods))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1494 '(mail post-mail)))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1495 (level (or (gnus-info-level info) gnus-level-killed)) |
17493 | 1496 (score (or (gnus-info-score info) 0)) |
1497 (ticked (gnus-range-length (cdr (assq 'tick marked)))) | |
1498 (group-age (gnus-group-timestamp-delta group)) | |
1499 (inhibit-read-only t)) | |
1500 ;; Eval the cars of the lists until we find a match. | |
1501 (while (and list | |
1502 (not (eval (caar list)))) | |
1503 (setq list (cdr list))) | |
1504 (let ((face (cdar list))) | |
1505 (unless (eq face (get-text-property beg 'face)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1506 (gnus-put-text-property-excluding-characters-with-faces |
17493 | 1507 beg end 'face |
1508 (setq face (if (boundp face) (symbol-value face) face))) | |
1509 (gnus-extent-start-open beg))) | |
1510 (goto-char p))) | |
1511 | |
1512 (defun gnus-group-update-group (group &optional visible-only) | |
1513 "Update all lines where GROUP appear. | |
1514 If VISIBLE-ONLY is non-nil, the group won't be displayed if it isn't | |
1515 already." | |
1516 ;; Can't use `save-excursion' here, so we do it manually. | |
1517 (let ((buf (current-buffer)) | |
1518 mark) | |
1519 (set-buffer gnus-group-buffer) | |
1520 (setq mark (point-marker)) | |
1521 ;; The buffer may be narrowed. | |
1522 (save-restriction | |
1523 (widen) | |
1524 (let ((ident (gnus-intern-safe group gnus-active-hashtb)) | |
1525 (loc (point-min)) | |
1526 found buffer-read-only) | |
1527 ;; Enter the current status into the dribble buffer. | |
1528 (let ((entry (gnus-gethash group gnus-newsrc-hashtb))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1529 (when (and entry |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1530 (not (gnus-ephemeral-group-p group))) |
17493 | 1531 (gnus-dribble-enter |
1532 (concat "(gnus-group-set-info '" | |
1533 (gnus-prin1-to-string (nth 2 entry)) | |
1534 ")")))) | |
1535 ;; Find all group instances. If topics are in use, each group | |
1536 ;; may be listed in more than once. | |
1537 (while (setq loc (text-property-any | |
1538 loc (point-max) 'gnus-group ident)) | |
1539 (setq found t) | |
1540 (goto-char loc) | |
1541 (let ((gnus-group-indentation (gnus-group-group-indentation))) | |
1542 (gnus-delete-line) | |
1543 (gnus-group-insert-group-line-info group) | |
1544 (save-excursion | |
1545 (forward-line -1) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1546 (gnus-run-hooks 'gnus-group-update-group-hook))) |
17493 | 1547 (setq loc (1+ loc))) |
1548 (unless (or found visible-only) | |
1549 ;; No such line in the buffer, find out where it's supposed to | |
1550 ;; go, and insert it there (or at the end of the buffer). | |
1551 (if gnus-goto-missing-group-function | |
1552 (funcall gnus-goto-missing-group-function group) | |
1553 (let ((entry (cddr (gnus-gethash group gnus-newsrc-hashtb)))) | |
1554 (while (and entry (car entry) | |
1555 (not | |
1556 (gnus-goto-char | |
1557 (text-property-any | |
1558 (point-min) (point-max) | |
1559 'gnus-group (gnus-intern-safe | |
1560 (caar entry) gnus-active-hashtb))))) | |
1561 (setq entry (cdr entry))) | |
1562 (or entry (goto-char (point-max))))) | |
1563 ;; Finally insert the line. | |
1564 (let ((gnus-group-indentation (gnus-group-group-indentation))) | |
1565 (gnus-group-insert-group-line-info group) | |
1566 (save-excursion | |
1567 (forward-line -1) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1568 (gnus-run-hooks 'gnus-group-update-group-hook)))) |
17493 | 1569 (when gnus-group-update-group-function |
1570 (funcall gnus-group-update-group-function group)) | |
1571 (gnus-group-set-mode-line))) | |
1572 (goto-char mark) | |
1573 (set-marker mark nil) | |
1574 (set-buffer buf))) | |
1575 | |
1576 (defun gnus-group-set-mode-line () | |
1577 "Update the mode line in the group buffer." | |
1578 (when (memq 'group gnus-updated-mode-lines) | |
1579 ;; Yes, we want to keep this mode line updated. | |
1580 (save-excursion | |
1581 (set-buffer gnus-group-buffer) | |
1582 (let* ((gformat (or gnus-group-mode-line-format-spec | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1583 (gnus-set-format 'group-mode))) |
17493 | 1584 (gnus-tmp-news-server (cadr gnus-select-method)) |
1585 (gnus-tmp-news-method (car gnus-select-method)) | |
1586 (gnus-tmp-colon (if (equal gnus-tmp-news-server "") "" ":")) | |
1587 (max-len 60) | |
1588 gnus-tmp-header ;Dummy binding for user-defined formats | |
1589 ;; Get the resulting string. | |
1590 (modified | |
1591 (and gnus-dribble-buffer | |
1592 (buffer-name gnus-dribble-buffer) | |
1593 (buffer-modified-p gnus-dribble-buffer) | |
1594 (save-excursion | |
1595 (set-buffer gnus-dribble-buffer) | |
1596 (not (zerop (buffer-size)))))) | |
1597 (mode-string (eval gformat))) | |
1598 ;; Say whether the dribble buffer has been modified. | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
1599 (setq mode-line-modified |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
1600 (if modified (car gnus-mode-line-modified) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
1601 (cdr gnus-mode-line-modified))) |
17493 | 1602 ;; If the line is too long, we chop it off. |
1603 (when (> (length mode-string) max-len) | |
1604 (setq mode-string (substring mode-string 0 (- max-len 4)))) | |
1605 (prog1 | |
1606 (setq mode-line-buffer-identification | |
1607 (gnus-mode-line-buffer-identification | |
1608 (list mode-string))) | |
1609 (set-buffer-modified-p modified)))))) | |
1610 | |
1611 (defun gnus-group-group-name () | |
1612 "Get the name of the newsgroup on the current line." | |
1613 (let ((group (get-text-property (gnus-point-at-bol) 'gnus-group))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1614 (when group |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1615 (symbol-name group)))) |
17493 | 1616 |
1617 (defun gnus-group-group-level () | |
1618 "Get the level of the newsgroup on the current line." | |
1619 (get-text-property (gnus-point-at-bol) 'gnus-level)) | |
1620 | |
1621 (defun gnus-group-group-indentation () | |
1622 "Get the indentation of the newsgroup on the current line." | |
1623 (or (get-text-property (gnus-point-at-bol) 'gnus-indentation) | |
1624 (and gnus-group-indentation-function | |
1625 (funcall gnus-group-indentation-function)) | |
1626 "")) | |
1627 | |
1628 (defun gnus-group-group-unread () | |
1629 "Get the number of unread articles of the newsgroup on the current line." | |
1630 (get-text-property (gnus-point-at-bol) 'gnus-unread)) | |
1631 | |
1632 (defun gnus-group-new-mail (group) | |
1633 (if (nnmail-new-mail-p (gnus-group-real-name group)) | |
1634 gnus-new-mail-mark | |
1635 ? )) | |
1636 | |
1637 (defun gnus-group-level (group) | |
1638 "Return the estimated level of GROUP." | |
1639 (or (gnus-info-level (gnus-get-info group)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1640 (and (member group gnus-zombie-list) gnus-level-zombie) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1641 gnus-level-killed)) |
17493 | 1642 |
1643 (defun gnus-group-search-forward (&optional backward all level first-too) | |
1644 "Find the next newsgroup with unread articles. | |
1645 If BACKWARD is non-nil, find the previous newsgroup instead. | |
1646 If ALL is non-nil, just find any newsgroup. | |
1647 If LEVEL is non-nil, find group with level LEVEL, or higher if no such | |
1648 group exists. | |
1649 If FIRST-TOO, the current line is also eligible as a target." | |
1650 (let ((way (if backward -1 1)) | |
1651 (low gnus-level-killed) | |
1652 (beg (point)) | |
1653 pos found lev) | |
1654 (if (and backward (progn (beginning-of-line)) (bobp)) | |
1655 nil | |
1656 (unless first-too | |
1657 (forward-line way)) | |
1658 (while (and | |
1659 (not (eobp)) | |
1660 (not (setq | |
1661 found | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
1662 (and |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
1663 (get-text-property (point) 'gnus-group) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
1664 (or all |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
1665 (and |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
1666 (let ((unread |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
1667 (get-text-property (point) 'gnus-unread))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
1668 (and (numberp unread) (> unread 0))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
1669 (setq lev (get-text-property (point) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
1670 'gnus-level)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
1671 (<= lev gnus-level-subscribed))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
1672 (or (not level) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
1673 (and (setq lev (get-text-property (point) |
17493 | 1674 'gnus-level)) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
1675 (or (= lev level) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
1676 (and (< lev low) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
1677 (< level lev) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
1678 (progn |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
1679 (setq low lev) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
1680 (setq pos (point)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
1681 nil)))))))) |
17493 | 1682 (zerop (forward-line way))))) |
1683 (if found | |
1684 (progn (gnus-group-position-point) t) | |
1685 (goto-char (or pos beg)) | |
1686 (and pos t)))) | |
1687 | |
1688 ;;; Gnus group mode commands | |
1689 | |
1690 ;; Group marking. | |
1691 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1692 (defun gnus-group-mark-line-p () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1693 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1694 (beginning-of-line) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1695 (forward-char (or (cdr (assq 'process gnus-group-mark-positions)) 2)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1696 (eq (char-after) gnus-process-mark))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1697 |
17493 | 1698 (defun gnus-group-mark-group (n &optional unmark no-advance) |
1699 "Mark the current group." | |
1700 (interactive "p") | |
1701 (let ((buffer-read-only nil) | |
1702 group) | |
1703 (while (and (> n 0) | |
1704 (not (eobp))) | |
1705 (when (setq group (gnus-group-group-name)) | |
1706 ;; Go to the mark position. | |
1707 (beginning-of-line) | |
1708 (forward-char (or (cdr (assq 'process gnus-group-mark-positions)) 2)) | |
1709 (subst-char-in-region | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1710 (point) (1+ (point)) (char-after) |
17493 | 1711 (if unmark |
1712 (progn | |
1713 (setq gnus-group-marked (delete group gnus-group-marked)) | |
1714 ? ) | |
1715 (setq gnus-group-marked | |
1716 (cons group (delete group gnus-group-marked))) | |
1717 gnus-process-mark))) | |
1718 (unless no-advance | |
1719 (gnus-group-next-group 1)) | |
1720 (decf n)) | |
1721 (gnus-summary-position-point) | |
1722 n)) | |
1723 | |
1724 (defun gnus-group-unmark-group (n) | |
1725 "Remove the mark from the current group." | |
1726 (interactive "p") | |
1727 (gnus-group-mark-group n 'unmark) | |
1728 (gnus-group-position-point)) | |
1729 | |
1730 (defun gnus-group-unmark-all-groups () | |
1731 "Unmark all groups." | |
1732 (interactive) | |
1733 (let ((groups gnus-group-marked)) | |
1734 (save-excursion | |
1735 (while groups | |
1736 (gnus-group-remove-mark (pop groups))))) | |
1737 (gnus-group-position-point)) | |
1738 | |
1739 (defun gnus-group-mark-region (unmark beg end) | |
1740 "Mark all groups between point and mark. | |
1741 If UNMARK, remove the mark instead." | |
1742 (interactive "P\nr") | |
1743 (let ((num (count-lines beg end))) | |
1744 (save-excursion | |
1745 (goto-char beg) | |
1746 (- num (gnus-group-mark-group num unmark))))) | |
1747 | |
1748 (defun gnus-group-mark-buffer (&optional unmark) | |
1749 "Mark all groups in the buffer. | |
1750 If UNMARK, remove the mark instead." | |
1751 (interactive "P") | |
1752 (gnus-group-mark-region unmark (point-min) (point-max))) | |
1753 | |
1754 (defun gnus-group-mark-regexp (regexp) | |
1755 "Mark all groups that match some regexp." | |
1756 (interactive "sMark (regexp): ") | |
1757 (let ((alist (cdr gnus-newsrc-alist)) | |
1758 group) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1759 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1760 (while alist |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1761 (when (string-match regexp (setq group (gnus-info-group (pop alist)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1762 (gnus-group-jump-to-group group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1763 (gnus-group-set-mark group))))) |
17493 | 1764 (gnus-group-position-point)) |
1765 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1766 (defun gnus-group-remove-mark (group &optional test-marked) |
17493 | 1767 "Remove the process mark from GROUP and move point there. |
1768 Return nil if the group isn't displayed." | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1769 (if (gnus-group-goto-group group nil test-marked) |
17493 | 1770 (save-excursion |
1771 (gnus-group-mark-group 1 'unmark t) | |
1772 t) | |
1773 (setq gnus-group-marked | |
1774 (delete group gnus-group-marked)) | |
1775 nil)) | |
1776 | |
1777 (defun gnus-group-set-mark (group) | |
1778 "Set the process mark on GROUP." | |
1779 (if (gnus-group-goto-group group) | |
1780 (save-excursion | |
1781 (gnus-group-mark-group 1 nil t)) | |
1782 (setq gnus-group-marked (cons group (delete group gnus-group-marked))))) | |
1783 | |
1784 (defun gnus-group-universal-argument (arg &optional groups func) | |
1785 "Perform any command on all groups according to the process/prefix convention." | |
1786 (interactive "P") | |
1787 (if (eq (setq func (or func | |
1788 (key-binding | |
1789 (read-key-sequence | |
1790 (substitute-command-keys | |
1791 "\\<gnus-group-mode-map>\\[gnus-group-universal-argument]"))))) | |
1792 'undefined) | |
1793 (gnus-error 1 "Undefined key") | |
1794 (gnus-group-iterate arg | |
1795 (lambda (group) | |
1796 (command-execute func)))) | |
1797 (gnus-group-position-point)) | |
1798 | |
1799 (defun gnus-group-process-prefix (n) | |
1800 "Return a list of groups to work on. | |
1801 Take into consideration N (the prefix) and the list of marked groups." | |
1802 (cond | |
1803 (n | |
1804 (setq n (prefix-numeric-value n)) | |
1805 ;; There is a prefix, so we return a list of the N next | |
1806 ;; groups. | |
1807 (let ((way (if (< n 0) -1 1)) | |
1808 (n (abs n)) | |
1809 group groups) | |
1810 (save-excursion | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1811 (while (> n 0) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1812 (if (setq group (gnus-group-group-name)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1813 (push group groups)) |
17493 | 1814 (setq n (1- n)) |
1815 (gnus-group-next-group way))) | |
1816 (nreverse groups))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1817 ((and (gnus-region-active-p) (mark)) |
17493 | 1818 ;; Work on the region between point and mark. |
1819 (let ((max (max (point) (mark))) | |
1820 groups) | |
1821 (save-excursion | |
1822 (goto-char (min (point) (mark))) | |
1823 (while | |
1824 (and | |
1825 (push (gnus-group-group-name) groups) | |
1826 (zerop (gnus-group-next-group 1)) | |
1827 (< (point) max))) | |
1828 (nreverse groups)))) | |
1829 (gnus-group-marked | |
1830 ;; No prefix, but a list of marked articles. | |
1831 (reverse gnus-group-marked)) | |
1832 (t | |
1833 ;; Neither marked articles or a prefix, so we return the | |
1834 ;; current group. | |
1835 (let ((group (gnus-group-group-name))) | |
1836 (and group (list group)))))) | |
1837 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1838 ;;; !!!Surely gnus-group-iterate should be a macro instead? I can't |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1839 ;;; imagine why I went through these contortions... |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1840 (eval-and-compile |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1841 (let ((function (make-symbol "gnus-group-iterate-function")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1842 (window (make-symbol "gnus-group-iterate-window")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1843 (groups (make-symbol "gnus-group-iterate-groups")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1844 (group (make-symbol "gnus-group-iterate-group"))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1845 (eval |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1846 `(defun gnus-group-iterate (arg ,function) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1847 "Iterate FUNCTION over all process/prefixed groups. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1848 FUNCTION will be called with the group name as the parameter |
17493 | 1849 and with point over the group in question." |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1850 (let ((,groups (gnus-group-process-prefix arg)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1851 (,window (selected-window)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1852 ,group) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1853 (while ,groups |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1854 (setq ,group (car ,groups) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1855 ,groups (cdr ,groups)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1856 (select-window ,window) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1857 (gnus-group-remove-mark ,group) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1858 (save-selected-window |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1859 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1860 (funcall ,function ,group))))))))) |
17493 | 1861 |
1862 (put 'gnus-group-iterate 'lisp-indent-function 1) | |
1863 | |
1864 ;; Selecting groups. | |
1865 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1866 (defun gnus-group-read-group (&optional all no-article group select-articles) |
17493 | 1867 "Read news in this newsgroup. |
1868 If the prefix argument ALL is non-nil, already read articles become | |
1869 readable. IF ALL is a number, fetch this number of articles. If the | |
1870 optional argument NO-ARTICLE is non-nil, no article will be | |
1871 auto-selected upon group entry. If GROUP is non-nil, fetch that | |
1872 group." | |
1873 (interactive "P") | |
1874 (let ((no-display (eq all 0)) | |
1875 (group (or group (gnus-group-group-name))) | |
1876 number active marked entry) | |
1877 (when (eq all 0) | |
1878 (setq all nil)) | |
1879 (unless group | |
1880 (error "No group on current line")) | |
1881 (setq marked (gnus-info-marks | |
1882 (nth 2 (setq entry (gnus-gethash | |
1883 group gnus-newsrc-hashtb))))) | |
1884 ;; This group might be a dead group. In that case we have to get | |
1885 ;; the number of unread articles from `gnus-active-hashtb'. | |
1886 (setq number | |
1887 (cond ((numberp all) all) | |
1888 (entry (car entry)) | |
1889 ((setq active (gnus-active group)) | |
1890 (- (1+ (cdr active)) (car active))))) | |
1891 (gnus-summary-read-group | |
1892 group (or all (and (numberp number) | |
1893 (zerop (+ number (gnus-range-length | |
1894 (cdr (assq 'tick marked))) | |
1895 (gnus-range-length | |
1896 (cdr (assq 'dormant marked))))))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1897 no-article nil no-display nil select-articles))) |
17493 | 1898 |
1899 (defun gnus-group-select-group (&optional all) | |
1900 "Select this newsgroup. | |
1901 No article is selected automatically. | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1902 If the group is opened, just switch the summary buffer. |
17493 | 1903 If ALL is non-nil, already read articles become readable. |
1904 If ALL is a number, fetch this number of articles." | |
1905 (interactive "P") | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1906 (when (and (eobp) (not (gnus-group-group-name))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1907 (forward-line -1)) |
17493 | 1908 (gnus-group-read-group all t)) |
1909 | |
1910 (defun gnus-group-quick-select-group (&optional all) | |
1911 "Select the current group \"quickly\". | |
1912 This means that no highlighting or scoring will be performed. | |
1913 If ALL (the prefix argument) is 0, don't even generate the summary | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1914 buffer. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1915 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1916 This might be useful if you want to toggle threading |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1917 before entering the group." |
17493 | 1918 (interactive "P") |
1919 (require 'gnus-score) | |
1920 (let (gnus-visual | |
1921 gnus-score-find-score-files-function | |
1922 gnus-home-score-file | |
1923 gnus-apply-kill-hook | |
1924 gnus-summary-expunge-below) | |
1925 (gnus-group-read-group all t))) | |
1926 | |
1927 (defun gnus-group-visible-select-group (&optional all) | |
1928 "Select the current group without hiding any articles." | |
1929 (interactive "P") | |
1930 (let ((gnus-inhibit-limiting t)) | |
1931 (gnus-group-read-group all t))) | |
1932 | |
1933 (defun gnus-group-select-group-ephemerally () | |
1934 "Select the current group without doing any processing whatsoever. | |
1935 You will actually be entered into a group that's a copy of | |
1936 the current group; no changes you make while in this group will | |
1937 be permanent." | |
1938 (interactive) | |
1939 (require 'gnus-score) | |
1940 (let* (gnus-visual | |
1941 gnus-score-find-score-files-function gnus-apply-kill-hook | |
1942 gnus-summary-expunge-below gnus-show-threads gnus-suppress-duplicates | |
1943 gnus-summary-mode-hook gnus-select-group-hook | |
1944 (group (gnus-group-group-name)) | |
1945 (method (gnus-find-method-for-group group))) | |
1946 (gnus-group-read-ephemeral-group | |
1947 (gnus-group-prefixed-name group method) method))) | |
1948 | |
1949 ;;;###autoload | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1950 (defun gnus-fetch-group (group &optional articles) |
17493 | 1951 "Start Gnus if necessary and enter GROUP. |
1952 Returns whether the fetching was successful or not." | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
1953 (interactive (list (completing-read "Group name: " gnus-active-hashtb))) |
17493 | 1954 (unless (get-buffer gnus-group-buffer) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1955 (gnus-no-server)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1956 (gnus-group-read-group articles nil group)) |
17493 | 1957 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1958 ;;;###autoload |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1959 (defun gnus-fetch-group-other-frame (group) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1960 "Pop up a frame and enter GROUP." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1961 (interactive "P") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1962 (let ((window (get-buffer-window gnus-group-buffer))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1963 (cond (window |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1964 (select-frame (window-frame window))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1965 ((= (length (frame-list)) 1) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1966 (select-frame (make-frame))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1967 (t |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1968 (other-frame 1)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1969 (gnus-fetch-group group)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1970 |
17493 | 1971 (defvar gnus-ephemeral-group-server 0) |
1972 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1973 (defcustom gnus-large-ephemeral-newsgroup 200 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1974 "The number of articles which indicates a large ephemeral newsgroup. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1975 Same as `gnus-large-newsgroup', but only used for ephemeral newsgroups. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1976 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1977 If the number of articles in a newsgroup is greater than this value, |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1978 confirmation is required for selecting the newsgroup. If it is nil, no |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1979 confirmation is required." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59027
diff
changeset
|
1980 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1981 :group 'gnus-group-select |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1982 :type '(choice (const :tag "No limit" nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1983 integer)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1984 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1985 (defcustom gnus-fetch-old-ephemeral-headers nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1986 "Same as `gnus-fetch-old-headers', but only used for ephemeral newsgroups." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
59027
diff
changeset
|
1987 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1988 :group 'gnus-thread |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1989 :type '(choice (const :tag "off" nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1990 (const some) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1991 number |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1992 (sexp :menu-tag "other" t))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1993 |
17493 | 1994 ;; Enter a group that is not in the group buffer. Non-nil is returned |
1995 ;; if selection was successful. | |
1996 (defun gnus-group-read-ephemeral-group (group method &optional activate | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
1997 quit-config request-only |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1998 select-articles |
61126
c0aa521e0ca7
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-220
Miles Bader <miles@gnu.org>
parents:
60239
diff
changeset
|
1999 parameters |
c0aa521e0ca7
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-220
Miles Bader <miles@gnu.org>
parents:
60239
diff
changeset
|
2000 number) |
17493 | 2001 "Read GROUP from METHOD as an ephemeral group. |
2002 If ACTIVATE, request the group first. | |
2003 If QUIT-CONFIG, use that window configuration when exiting from the | |
2004 ephemeral group. | |
2005 If REQUEST-ONLY, don't actually read the group; just request it. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
2006 If SELECT-ARTICLES, only select those articles. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2007 If PARAMETERS, use those as the group parameters. |
61126
c0aa521e0ca7
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-220
Miles Bader <miles@gnu.org>
parents:
60239
diff
changeset
|
2008 If NUMBER, fetch this number of articles. |
17493 | 2009 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2010 Return the name of the group if selection was successful." |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2011 (interactive |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2012 (list |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2013 ;; (gnus-read-group "Group name: ") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2014 (completing-read |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2015 "Group: " gnus-active-hashtb |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2016 nil nil nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2017 'gnus-group-history) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2018 (gnus-read-method "From method: "))) |
17493 | 2019 ;; Transform the select method into a unique server. |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
2020 (when (stringp method) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
2021 (setq method (gnus-server-to-method method))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
2022 (setq method |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
2023 `(,(car method) ,(concat (cadr method) "-ephemeral") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
2024 (,(intern (format "%s-address" (car method))) ,(cadr method)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
2025 ,@(cddr method))) |
17493 | 2026 (let ((group (if (gnus-group-foreign-p group) group |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2027 (gnus-group-prefixed-name (gnus-group-real-name group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2028 method)))) |
17493 | 2029 (gnus-sethash |
2030 group | |
2031 `(-1 nil (,group | |
2032 ,gnus-level-default-subscribed nil nil ,method | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2033 ,(cons |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2034 (if quit-config |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2035 (cons 'quit-config quit-config) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2036 (cons 'quit-config |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2037 (cons gnus-summary-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2038 gnus-current-window-configuration))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2039 parameters))) |
17493 | 2040 gnus-newsrc-hashtb) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
2041 (push method gnus-ephemeral-servers) |
17493 | 2042 (set-buffer gnus-group-buffer) |
2043 (unless (gnus-check-server method) | |
2044 (error "Unable to contact server: %s" (gnus-status-message method))) | |
2045 (when activate | |
2046 (gnus-activate-group group 'scan) | |
2047 (unless (gnus-request-group group) | |
2048 (error "Couldn't request group: %s" | |
2049 (nnheader-get-report (car method))))) | |
2050 (if request-only | |
2051 group | |
2052 (condition-case () | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2053 (when (let ((gnus-large-newsgroup gnus-large-ephemeral-newsgroup) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2054 (gnus-fetch-old-headers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2055 gnus-fetch-old-ephemeral-headers)) |
61126
c0aa521e0ca7
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-220
Miles Bader <miles@gnu.org>
parents:
60239
diff
changeset
|
2056 (gnus-group-read-group (or number t) t group select-articles)) |
17493 | 2057 group) |
2058 ;;(error nil) | |
32969
899478c14a26
2000-09-24 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32965
diff
changeset
|
2059 (quit |
899478c14a26
2000-09-24 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32965
diff
changeset
|
2060 (message "Quit reading the ephemeral group") |
899478c14a26
2000-09-24 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32965
diff
changeset
|
2061 nil))))) |
17493 | 2062 |
2063 (defun gnus-group-jump-to-group (group) | |
2064 "Jump to newsgroup GROUP." | |
2065 (interactive | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2066 (list (mm-string-make-unibyte |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2067 (completing-read |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2068 "Group: " gnus-active-hashtb nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2069 (gnus-read-active-file-p) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2070 gnus-group-jump-to-group-prompt |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2071 'gnus-group-history)))) |
17493 | 2072 |
2073 (when (equal group "") | |
2074 (error "Empty group name")) | |
2075 | |
2076 (unless (gnus-ephemeral-group-p group) | |
2077 ;; Either go to the line in the group buffer... | |
2078 (unless (gnus-group-goto-group group) | |
2079 ;; ... or insert the line. | |
2080 (gnus-group-update-group group) | |
2081 (gnus-group-goto-group group))) | |
2082 ;; Adjust cursor point. | |
2083 (gnus-group-position-point)) | |
2084 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2085 (defun gnus-group-goto-group (group &optional far test-marked) |
17493 | 2086 "Goto to newsgroup GROUP. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2087 If FAR, it is likely that the group is not on the current line. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2088 If TEST-MARKED, the line must be marked." |
17493 | 2089 (when group |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2090 (beginning-of-line) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2091 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2092 ;; It's quite likely that we are on the right line, so |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2093 ;; we check the current line first. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2094 ((and (not far) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2095 (eq (get-text-property (point) 'gnus-group) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2096 (gnus-intern-safe group gnus-active-hashtb)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2097 (or (not test-marked) (gnus-group-mark-line-p))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2098 (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2099 ;; Previous and next line are also likely, so we check them as well. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2100 ((and (not far) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2101 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2102 (forward-line -1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2103 (and (eq (get-text-property (point) 'gnus-group) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2104 (gnus-intern-safe group gnus-active-hashtb)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2105 (or (not test-marked) (gnus-group-mark-line-p))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2106 (forward-line -1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2107 (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2108 ((and (not far) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2109 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2110 (forward-line 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2111 (and (eq (get-text-property (point) 'gnus-group) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2112 (gnus-intern-safe group gnus-active-hashtb)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2113 (or (not test-marked) (gnus-group-mark-line-p))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2114 (forward-line 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2115 (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2116 (test-marked |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2117 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2118 (let (found) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49274
diff
changeset
|
2119 (while (and (not found) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2120 (gnus-goto-char |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2121 (text-property-any |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2122 (point) (point-max) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49274
diff
changeset
|
2123 'gnus-group |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2124 (gnus-intern-safe group gnus-active-hashtb)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2125 (if (gnus-group-mark-line-p) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2126 (setq found t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2127 (forward-line 1))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2128 found)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2129 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2130 ;; Search through the entire buffer. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2131 (gnus-goto-char |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2132 (text-property-any |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2133 (point-min) (point-max) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2134 'gnus-group (gnus-intern-safe group gnus-active-hashtb))))))) |
17493 | 2135 |
2136 (defun gnus-group-next-group (n &optional silent) | |
2137 "Go to next N'th newsgroup. | |
2138 If N is negative, search backward instead. | |
2139 Returns the difference between N and the number of skips actually | |
2140 done." | |
2141 (interactive "p") | |
2142 (gnus-group-next-unread-group n t nil silent)) | |
2143 | |
2144 (defun gnus-group-next-unread-group (n &optional all level silent) | |
2145 "Go to next N'th unread newsgroup. | |
2146 If N is negative, search backward instead. | |
2147 If ALL is non-nil, choose any newsgroup, unread or not. | |
2148 If LEVEL is non-nil, choose the next group with level LEVEL, or, if no | |
2149 such group can be found, the next group with a level higher than | |
2150 LEVEL. | |
2151 Returns the difference between N and the number of skips actually | |
2152 made." | |
2153 (interactive "p") | |
2154 (let ((backward (< n 0)) | |
2155 (n (abs n))) | |
2156 (while (and (> n 0) | |
2157 (gnus-group-search-forward | |
2158 backward (or (not gnus-group-goto-unread) all) level)) | |
2159 (setq n (1- n))) | |
2160 (when (and (/= 0 n) | |
2161 (not silent)) | |
2162 (gnus-message 7 "No more%s newsgroups%s" (if all "" " unread") | |
2163 (if level " on this level or higher" ""))) | |
2164 n)) | |
2165 | |
2166 (defun gnus-group-prev-group (n) | |
2167 "Go to previous N'th newsgroup. | |
2168 Returns the difference between N and the number of skips actually | |
2169 done." | |
2170 (interactive "p") | |
2171 (gnus-group-next-unread-group (- n) t)) | |
2172 | |
2173 (defun gnus-group-prev-unread-group (n) | |
2174 "Go to previous N'th unread newsgroup. | |
2175 Returns the difference between N and the number of skips actually | |
2176 done." | |
2177 (interactive "p") | |
2178 (gnus-group-next-unread-group (- n))) | |
2179 | |
2180 (defun gnus-group-next-unread-group-same-level (n) | |
2181 "Go to next N'th unread newsgroup on the same level. | |
2182 If N is negative, search backward instead. | |
2183 Returns the difference between N and the number of skips actually | |
2184 done." | |
2185 (interactive "p") | |
2186 (gnus-group-next-unread-group n t (gnus-group-group-level)) | |
2187 (gnus-group-position-point)) | |
2188 | |
2189 (defun gnus-group-prev-unread-group-same-level (n) | |
2190 "Go to next N'th unread newsgroup on the same level. | |
2191 Returns the difference between N and the number of skips actually | |
2192 done." | |
2193 (interactive "p") | |
2194 (gnus-group-next-unread-group (- n) t (gnus-group-group-level)) | |
2195 (gnus-group-position-point)) | |
2196 | |
2197 (defun gnus-group-best-unread-group (&optional exclude-group) | |
2198 "Go to the group with the highest level. | |
2199 If EXCLUDE-GROUP, do not go to that group." | |
2200 (interactive) | |
2201 (goto-char (point-min)) | |
2202 (let ((best 100000) | |
2203 unread best-point) | |
2204 (while (not (eobp)) | |
2205 (setq unread (get-text-property (point) 'gnus-unread)) | |
2206 (when (and (numberp unread) (> unread 0)) | |
2207 (when (and (get-text-property (point) 'gnus-level) | |
2208 (< (get-text-property (point) 'gnus-level) best) | |
2209 (or (not exclude-group) | |
2210 (not (equal exclude-group (gnus-group-group-name))))) | |
2211 (setq best (get-text-property (point) 'gnus-level)) | |
2212 (setq best-point (point)))) | |
2213 (forward-line 1)) | |
2214 (when best-point | |
2215 (goto-char best-point)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2216 (gnus-group-position-point) |
17493 | 2217 (and best-point (gnus-group-group-name)))) |
2218 | |
2219 (defun gnus-group-first-unread-group () | |
2220 "Go to the first group with unread articles." | |
2221 (interactive) | |
2222 (prog1 | |
2223 (let ((opoint (point)) | |
2224 unread) | |
2225 (goto-char (point-min)) | |
2226 (if (or (eq (setq unread (gnus-group-group-unread)) t) ; Not active. | |
2227 (and (numberp unread) ; Not a topic. | |
2228 (not (zerop unread))) ; Has unread articles. | |
2229 (zerop (gnus-group-next-unread-group 1))) ; Next unread group. | |
2230 (point) ; Success. | |
2231 (goto-char opoint) | |
2232 nil)) ; Not success. | |
2233 (gnus-group-position-point))) | |
2234 | |
2235 (defun gnus-group-enter-server-mode () | |
2236 "Jump to the server buffer." | |
2237 (interactive) | |
2238 (gnus-enter-server-buffer)) | |
2239 | |
2240 (defun gnus-group-make-group (name &optional method address args) | |
2241 "Add a new newsgroup. | |
2242 The user will be prompted for a NAME, for a select METHOD, and an | |
2243 ADDRESS." | |
2244 (interactive | |
2245 (list | |
2246 (gnus-read-group "Group name: ") | |
2247 (gnus-read-method "From method: "))) | |
2248 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
2249 (when (stringp method) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2250 (setq method (or (gnus-server-to-method method) method))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2251 (let* ((meth (gnus-method-simplify |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2252 (when (and method |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2253 (not (gnus-server-equal method gnus-select-method))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2254 (if address (list (intern method) address) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2255 method)))) |
17493 | 2256 (nname (if method (gnus-group-prefixed-name name meth) name)) |
2257 backend info) | |
2258 (when (gnus-gethash nname gnus-newsrc-hashtb) | |
61424
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2259 (error "Group %s already exists" (gnus-group-decoded-name nname))) |
17493 | 2260 ;; Subscribe to the new group. |
2261 (gnus-group-change-level | |
2262 (setq info (list t nname gnus-level-default-subscribed nil nil meth)) | |
2263 gnus-level-default-subscribed gnus-level-killed | |
2264 (and (gnus-group-group-name) | |
2265 (gnus-gethash (gnus-group-group-name) | |
2266 gnus-newsrc-hashtb)) | |
2267 t) | |
2268 ;; Make it active. | |
2269 (gnus-set-active nname (cons 1 0)) | |
2270 (unless (gnus-ephemeral-group-p name) | |
2271 (gnus-dribble-enter | |
2272 (concat "(gnus-group-set-info '" | |
2273 (gnus-prin1-to-string (cdr info)) ")"))) | |
2274 ;; Insert the line. | |
2275 (gnus-group-insert-group-line-info nname) | |
2276 (forward-line -1) | |
2277 (gnus-group-position-point) | |
2278 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2279 ;; Load the back end and try to make the back end create |
17493 | 2280 ;; the group as well. |
2281 (when (assoc (symbol-name (setq backend (car (gnus-server-get-method | |
2282 nil meth)))) | |
2283 gnus-valid-select-methods) | |
2284 (require backend)) | |
2285 (gnus-check-server meth) | |
2286 (when (gnus-check-backend-function 'request-create-group nname) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2287 (unless (gnus-request-create-group nname nil args) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2288 (error "Could not create group on server: %s" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2289 (nnheader-get-report backend)))) |
17493 | 2290 t)) |
2291 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2292 (defun gnus-group-delete-groups (&optional arg) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2293 "Delete the current group. Only meaningful with editable groups." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2294 (interactive "P") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2295 (let ((n (length (gnus-group-process-prefix arg)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2296 (when (gnus-yes-or-no-p |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2297 (if (= n 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2298 "Delete this 1 group? " |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2299 (format "Delete these %d groups? " n))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2300 (gnus-group-iterate arg |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2301 (lambda (group) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2302 (gnus-group-delete-group group nil t)))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2303 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2304 (defun gnus-group-delete-group (group &optional force no-prompt) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2305 "Delete the current group. Only meaningful with editable groups. |
17493 | 2306 If FORCE (the prefix) is non-nil, all the articles in the group will |
2307 be deleted. This is \"deleted\" as in \"removed forever from the face | |
2308 of the Earth\". There is no undo. The user will be prompted before | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2309 doing the deletion. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2310 Note that you also have to specify FORCE if you want the group to |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2311 be removed from the server, even when it's empty." |
17493 | 2312 (interactive |
2313 (list (gnus-group-group-name) | |
2314 current-prefix-arg)) | |
2315 (unless group | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2316 (error "No group to delete")) |
17493 | 2317 (unless (gnus-check-backend-function 'request-delete-group group) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2318 (error "This back end does not support group deletion")) |
17493 | 2319 (prog1 |
61424
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2320 (let ((group-decoded (gnus-group-decoded-name group))) |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2321 (if (and (not no-prompt) |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2322 (not (gnus-yes-or-no-p |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2323 (format |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2324 "Do you really want to delete %s%s? " |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2325 group-decoded (if force " and all its contents" ""))))) |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2326 () ; Whew! |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2327 (gnus-message 6 "Deleting group %s..." group-decoded) |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2328 (if (not (gnus-request-delete-group group force)) |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2329 (gnus-error 3 "Couldn't delete group %s" group-decoded) |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2330 (gnus-message 6 "Deleting group %s...done" group-decoded) |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2331 (gnus-group-goto-group group) |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2332 (gnus-group-kill-group 1 t) |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2333 (gnus-sethash group nil gnus-active-hashtb) |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2334 t))) |
17493 | 2335 (gnus-group-position-point))) |
2336 | |
2337 (defun gnus-group-rename-group (group new-name) | |
2338 "Rename group from GROUP to NEW-NAME. | |
2339 When used interactively, GROUP is the group under point | |
2340 and NEW-NAME will be prompted for." | |
2341 (interactive | |
2342 (list | |
2343 (gnus-group-group-name) | |
2344 (progn | |
2345 (unless (gnus-check-backend-function | |
2346 'request-rename-group (gnus-group-group-name)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2347 (error "This back end does not support renaming groups")) |
17493 | 2348 (gnus-read-group "Rename group to: " |
2349 (gnus-group-real-name (gnus-group-group-name)))))) | |
2350 | |
2351 (unless (gnus-check-backend-function 'request-rename-group group) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2352 (error "This back end does not support renaming groups")) |
17493 | 2353 (unless group |
2354 (error "No group to rename")) | |
2355 (when (equal (gnus-group-real-name group) new-name) | |
2356 (error "Can't rename to the same name")) | |
2357 | |
2358 ;; We find the proper prefixed name. | |
2359 (setq new-name | |
2360 (if (gnus-group-native-p group) | |
2361 ;; Native group. | |
2362 new-name | |
2363 ;; Foreign group. | |
2364 (gnus-group-prefixed-name | |
2365 (gnus-group-real-name new-name) | |
2366 (gnus-info-method (gnus-get-info group))))) | |
2367 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2368 (when (gnus-active new-name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2369 (error "The group %s already exists" new-name)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2370 |
17493 | 2371 (gnus-message 6 "Renaming group %s to %s..." group new-name) |
2372 (prog1 | |
31785 | 2373 (if (progn |
2374 (gnus-group-goto-group group) | |
2375 (not (when (< (gnus-group-group-level) gnus-level-zombie) | |
2376 (gnus-request-rename-group group new-name)))) | |
17493 | 2377 (gnus-error 3 "Couldn't rename group %s to %s" group new-name) |
2378 ;; We rename the group internally by killing it... | |
2379 (gnus-group-kill-group) | |
2380 ;; ... changing its name ... | |
2381 (setcar (cdar gnus-list-of-killed-groups) new-name) | |
2382 ;; ... and then yanking it. Magic! | |
2383 (gnus-group-yank-group) | |
2384 (gnus-set-active new-name (gnus-active group)) | |
2385 (gnus-message 6 "Renaming group %s to %s...done" group new-name) | |
2386 new-name) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
2387 (setq gnus-killed-list (delete group gnus-killed-list)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
2388 (gnus-set-active group nil) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
2389 (gnus-dribble-touch) |
17493 | 2390 (gnus-group-position-point))) |
2391 | |
2392 (defun gnus-group-edit-group (group &optional part) | |
2393 "Edit the group on the current line." | |
2394 (interactive (list (gnus-group-group-name))) | |
2395 (let ((part (or part 'info)) | |
2396 info) | |
2397 (unless group | |
2398 (error "No group on current line")) | |
2399 (unless (setq info (gnus-get-info group)) | |
2400 (error "Killed group; can't be edited")) | |
2401 (ignore-errors | |
2402 (gnus-close-group group)) | |
2403 (gnus-edit-form | |
2404 ;; Find the proper form to edit. | |
2405 (cond ((eq part 'method) | |
2406 (or (gnus-info-method info) "native")) | |
2407 ((eq part 'params) | |
2408 (gnus-info-params info)) | |
2409 (t info)) | |
2410 ;; The proper documentation. | |
2411 (format | |
2412 "Editing the %s for `%s'." | |
2413 (cond | |
2414 ((eq part 'method) "select method") | |
2415 ((eq part 'params) "group parameters") | |
2416 (t "group info")) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2417 (gnus-group-decoded-name group)) |
17493 | 2418 `(lambda (form) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2419 (gnus-group-edit-group-done ',part ,group form))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2420 (local-set-key |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2421 "\C-c\C-i" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2422 (gnus-create-info-command |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2423 (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2424 ((eq part 'method) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2425 "(gnus)Select Methods") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2426 ((eq part 'params) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2427 "(gnus)Group Parameters") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2428 (t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2429 "(gnus)Group Info")))))) |
17493 | 2430 |
2431 (defun gnus-group-edit-group-method (group) | |
2432 "Edit the select method of GROUP." | |
2433 (interactive (list (gnus-group-group-name))) | |
2434 (gnus-group-edit-group group 'method)) | |
2435 | |
2436 (defun gnus-group-edit-group-parameters (group) | |
2437 "Edit the group parameters of GROUP." | |
2438 (interactive (list (gnus-group-group-name))) | |
2439 (gnus-group-edit-group group 'params)) | |
2440 | |
2441 (defun gnus-group-edit-group-done (part group form) | |
2442 "Update variables." | |
2443 (let* ((method (cond ((eq part 'info) (nth 4 form)) | |
2444 ((eq part 'method) form) | |
2445 (t nil))) | |
2446 (info (cond ((eq part 'info) form) | |
2447 ((eq part 'method) (gnus-get-info group)) | |
2448 (t nil))) | |
2449 (new-group (if info | |
2450 (if (or (not method) | |
2451 (gnus-server-equal | |
2452 gnus-select-method method)) | |
2453 (gnus-group-real-name (car info)) | |
2454 (gnus-group-prefixed-name | |
2455 (gnus-group-real-name (car info)) method)) | |
2456 nil))) | |
2457 (when (and new-group | |
2458 (not (equal new-group group))) | |
2459 (when (gnus-group-goto-group group) | |
2460 (gnus-group-kill-group 1)) | |
2461 (gnus-activate-group new-group)) | |
2462 ;; Set the info. | |
2463 (if (not (and info new-group)) | |
2464 (gnus-group-set-info form (or new-group group) part) | |
2465 (setq info (gnus-copy-sequence info)) | |
2466 (setcar info new-group) | |
2467 (unless (gnus-server-equal method "native") | |
2468 (unless (nthcdr 3 info) | |
2469 (nconc info (list nil nil))) | |
2470 (unless (nthcdr 4 info) | |
2471 (nconc info (list nil))) | |
2472 (gnus-info-set-method info method)) | |
2473 (gnus-group-set-info info)) | |
2474 (gnus-group-update-group (or new-group group)) | |
2475 (gnus-group-position-point))) | |
2476 | |
2477 (defun gnus-group-make-useful-group (group method) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
2478 "Create one of the groups described in `gnus-useful-groups'." |
17493 | 2479 (interactive |
2480 (let ((entry (assoc (completing-read "Create group: " gnus-useful-groups | |
2481 nil t) | |
2482 gnus-useful-groups))) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
2483 (list (cadr entry) (caddr entry)))) |
17493 | 2484 (setq method (gnus-copy-sequence method)) |
2485 (let (entry) | |
2486 (while (setq entry (memq (assq 'eval method) method)) | |
2487 (setcar entry (eval (cadar entry))))) | |
2488 (gnus-group-make-group group method)) | |
2489 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2490 (defun gnus-group-make-help-group (&optional noerror) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2491 "Create the Gnus documentation group. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2492 Optional argument NOERROR modifies the behavior of this function when the |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2493 group already exists: |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2494 - if not given, and error is signaled, |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2495 - if t, stay silent, |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2496 - if anything else, just print a message." |
17493 | 2497 (interactive) |
2498 (let ((name (gnus-group-prefixed-name "gnus-help" '(nndoc "gnus-help"))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
2499 (file (nnheader-find-etc-directory "gnus-tut.txt" t))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2500 (if (gnus-gethash name gnus-newsrc-hashtb) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2501 (cond ((eq noerror nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2502 (error "Documentation group already exists")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2503 ((eq noerror t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2504 ;; stay silent |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2505 ) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2506 (t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2507 (gnus-message 1 "Documentation group already exists"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2508 ;; else: |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2509 (if (not file) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2510 (gnus-message 1 "Couldn't find doc group") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2511 (gnus-group-make-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2512 (gnus-group-real-name name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2513 (list 'nndoc "gnus-help" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2514 (list 'nndoc-address file) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2515 (list 'nndoc-article-type 'mbox)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2516 )) |
17493 | 2517 (gnus-group-position-point)) |
2518 | |
2519 (defun gnus-group-make-doc-group (file type) | |
60161
b070535d2416
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-111
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
2520 "Create a group that uses a single file as the source. |
b070535d2416
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-111
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
2521 |
b070535d2416
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-111
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
2522 If called with a prefix argument, ask for the file type." |
17493 | 2523 (interactive |
2524 (list (read-file-name "File name: ") | |
2525 (and current-prefix-arg 'ask))) | |
2526 (when (eq type 'ask) | |
2527 (let ((err "") | |
2528 char found) | |
2529 (while (not found) | |
2530 (message | |
60161
b070535d2416
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-111
Miles Bader <miles@gnu.org>
parents:
59996
diff
changeset
|
2531 "%sFile type (mbox, babyl, digest, forward, mmdf, guess) [m, b, d, f, a, g]: " |
17493 | 2532 err) |
2533 (setq found (cond ((= (setq char (read-char)) ?m) 'mbox) | |
2534 ((= char ?b) 'babyl) | |
2535 ((= char ?d) 'digest) | |
2536 ((= char ?f) 'forward) | |
2537 ((= char ?a) 'mmfd) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2538 ((= char ?g) 'guess) |
17493 | 2539 (t (setq err (format "%c unknown. " char)) |
2540 nil)))) | |
2541 (setq type found))) | |
2542 (let* ((file (expand-file-name file)) | |
2543 (name (gnus-generate-new-group-name | |
2544 (gnus-group-prefixed-name | |
2545 (file-name-nondirectory file) '(nndoc ""))))) | |
2546 (gnus-group-make-group | |
2547 (gnus-group-real-name name) | |
2548 (list 'nndoc file | |
2549 (list 'nndoc-address file) | |
2550 (list 'nndoc-article-type (or type 'guess)))))) | |
2551 | |
2552 (defvar nnweb-type-definition) | |
2553 (defvar gnus-group-web-type-history nil) | |
2554 (defvar gnus-group-web-search-history nil) | |
2555 (defun gnus-group-make-web-group (&optional solid) | |
2556 "Create an ephemeral nnweb group. | |
2557 If SOLID (the prefix), create a solid group." | |
2558 (interactive "P") | |
2559 (require 'nnweb) | |
2560 (let* ((group | |
2561 (if solid (gnus-read-group "Group name: ") | |
2562 (message-unique-id))) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
2563 (default-type (or (car gnus-group-web-type-history) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
2564 (symbol-name (caar nnweb-type-definition)))) |
17493 | 2565 (type |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
2566 (gnus-string-or |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
2567 (completing-read |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
2568 (format "Search engine type (default %s): " default-type) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
2569 (mapcar (lambda (elem) (list (symbol-name (car elem)))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
2570 nnweb-type-definition) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
2571 nil t nil 'gnus-group-web-type-history) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
2572 default-type)) |
17493 | 2573 (search |
2574 (read-string | |
2575 "Search string: " | |
2576 (cons (or (car gnus-group-web-search-history) "") 0) | |
2577 'gnus-group-web-search-history)) | |
2578 (method | |
2579 `(nnweb ,group (nnweb-search ,search) | |
2580 (nnweb-type ,(intern type)) | |
2581 (nnweb-ephemeral-p t)))) | |
2582 (if solid | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2583 (progn |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2584 (gnus-pull 'nnweb-ephemeral-p method) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2585 (gnus-group-make-group group method)) |
17493 | 2586 (gnus-group-read-ephemeral-group |
2587 group method t | |
2588 (cons (current-buffer) | |
2589 (if (eq major-mode 'gnus-summary-mode) 'summary 'group)))))) | |
2590 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2591 (eval-when-compile |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2592 (defvar nnrss-group-alist) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2593 (defun nnrss-discover-feed (arg)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2594 (defun nnrss-save-server-data (arg))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2595 (defun gnus-group-make-rss-group (&optional url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2596 "Given a URL, discover if there is an RSS feed. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2597 If there is, use Gnus to create an nnrss group" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2598 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2599 (require 'nnrss) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2600 (if (not url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2601 (setq url (read-from-minibuffer "URL to Search for RSS: "))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2602 (let ((feedinfo (nnrss-discover-feed url))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2603 (if feedinfo |
61424
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2604 (let ((title (gnus-newsgroup-savable-name |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2605 (read-from-minibuffer "Title: " |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2606 (gnus-newsgroup-savable-name |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2607 (or (cdr (assoc 'title |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2608 feedinfo)) |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2609 ""))))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2610 (desc (read-from-minibuffer "Description: " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2611 (cdr (assoc 'description |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2612 feedinfo)))) |
61424
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2613 (href (cdr (assoc 'href feedinfo))) |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2614 (encodable (mm-coding-system-p 'utf-8))) |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2615 (when encodable |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2616 ;; Unify non-ASCII text. |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2617 (setq title (mm-decode-coding-string |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2618 (mm-encode-coding-string title 'utf-8) 'utf-8))) |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2619 (gnus-group-make-group (if encodable |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2620 (mm-encode-coding-string title 'utf-8) |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2621 title) |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2622 '(nnrss "")) |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
2623 (push (list title href desc) nnrss-group-alist) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2624 (nnrss-save-server-data nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2625 (error "No feeds found for %s" url)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2626 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2627 (defvar nnwarchive-type-definition) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2628 (defvar gnus-group-warchive-type-history nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2629 (defvar gnus-group-warchive-login-history nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2630 (defvar gnus-group-warchive-address-history nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2631 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2632 (defun gnus-group-make-warchive-group () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2633 "Create a nnwarchive group." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2634 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2635 (require 'nnwarchive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2636 (let* ((group (gnus-read-group "Group name: ")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2637 (default-type (or (car gnus-group-warchive-type-history) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2638 (symbol-name (caar nnwarchive-type-definition)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2639 (type |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2640 (gnus-string-or |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2641 (completing-read |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2642 (format "Warchive type (default %s): " default-type) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2643 (mapcar (lambda (elem) (list (symbol-name (car elem)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2644 nnwarchive-type-definition) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2645 nil t nil 'gnus-group-warchive-type-history) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2646 default-type)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2647 (address (read-string "Warchive address: " |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2648 nil 'gnus-group-warchive-address-history)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2649 (default-login (or (car gnus-group-warchive-login-history) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2650 user-mail-address)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2651 (login |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2652 (gnus-string-or |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2653 (read-string |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2654 (format "Warchive login (default %s): " user-mail-address) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2655 default-login 'gnus-group-warchive-login-history) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2656 user-mail-address)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2657 (method |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49274
diff
changeset
|
2658 `(nnwarchive ,address |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2659 (nnwarchive-type ,(intern type)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2660 (nnwarchive-login ,login)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2661 (gnus-group-make-group group method))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2662 |
17493 | 2663 (defun gnus-group-make-archive-group (&optional all) |
2664 "Create the (ding) Gnus archive group of the most recent articles. | |
2665 Given a prefix, create a full group." | |
2666 (interactive "P") | |
2667 (let ((group (gnus-group-prefixed-name | |
2668 (if all "ding.archives" "ding.recent") '(nndir "")))) | |
2669 (when (gnus-gethash group gnus-newsrc-hashtb) | |
2670 (error "Archive group already exists")) | |
2671 (gnus-group-make-group | |
2672 (gnus-group-real-name group) | |
2673 (list 'nndir (if all "hpc" "edu") | |
2674 (list 'nndir-directory | |
2675 (if all gnus-group-archive-directory | |
2676 gnus-group-recent-archive-directory)))) | |
2677 (gnus-group-add-parameter group (cons 'to-address "ding@gnus.org")))) | |
2678 | |
2679 (defun gnus-group-make-directory-group (dir) | |
2680 "Create an nndir group. | |
2681 The user will be prompted for a directory. The contents of this | |
2682 directory will be used as a newsgroup. The directory should contain | |
2683 mail messages or news articles in files that have numeric names." | |
2684 (interactive | |
2685 (list (read-file-name "Create group from directory: "))) | |
2686 (unless (file-exists-p dir) | |
2687 (error "No such directory")) | |
2688 (unless (file-directory-p dir) | |
2689 (error "Not a directory")) | |
2690 (let ((ext "") | |
2691 (i 0) | |
2692 group) | |
2693 (while (or (not group) (gnus-gethash group gnus-newsrc-hashtb)) | |
2694 (setq group | |
2695 (gnus-group-prefixed-name | |
33344 | 2696 (expand-file-name ext dir) |
17493 | 2697 '(nndir ""))) |
2698 (setq ext (format "<%d>" (setq i (1+ i))))) | |
2699 (gnus-group-make-group | |
2700 (gnus-group-real-name group) | |
2701 (list 'nndir (gnus-group-real-name group) (list 'nndir-directory dir))))) | |
2702 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2703 (defvar nnkiboze-score-file) |
17493 | 2704 (defun gnus-group-make-kiboze-group (group address scores) |
2705 "Create an nnkiboze group. | |
2706 The user will be prompted for a name, a regexp to match groups, and | |
2707 score file entries for articles to include in the group." | |
2708 (interactive | |
2709 (list | |
2710 (read-string "nnkiboze group name: ") | |
2711 (read-string "Source groups (regexp): ") | |
2712 (let ((headers (mapcar (lambda (group) (list group)) | |
2713 '("subject" "from" "number" "date" "message-id" | |
2714 "references" "chars" "lines" "xref" | |
2715 "followup" "all" "body" "head"))) | |
2716 scores header regexp regexps) | |
2717 (while (not (equal "" (setq header (completing-read | |
2718 "Match on header: " headers nil t)))) | |
2719 (setq regexps nil) | |
2720 (while (not (equal "" (setq regexp (read-string | |
32969
899478c14a26
2000-09-24 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32965
diff
changeset
|
2721 (format "Match on %s (regexp): " |
17493 | 2722 header))))) |
2723 (push (list regexp nil nil 'r) regexps)) | |
2724 (push (cons header regexps) scores)) | |
2725 scores))) | |
2726 (gnus-group-make-group group "nnkiboze" address) | |
32969
899478c14a26
2000-09-24 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32965
diff
changeset
|
2727 (let* ((nnkiboze-current-group group) |
899478c14a26
2000-09-24 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32965
diff
changeset
|
2728 (score-file (car (nnkiboze-score-file ""))) |
31785 | 2729 (score-dir (file-name-directory score-file))) |
2730 (unless (file-exists-p score-dir) | |
2731 (make-directory score-dir)) | |
2732 (with-temp-file score-file | |
2733 (let (emacs-lisp-mode-hook) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2734 (gnus-pp scores))))) |
17493 | 2735 |
2736 (defun gnus-group-add-to-virtual (n vgroup) | |
2737 "Add the current group to a virtual group." | |
2738 (interactive | |
2739 (list current-prefix-arg | |
2740 (completing-read "Add to virtual group: " gnus-newsrc-hashtb nil t | |
2741 "nnvirtual:"))) | |
2742 (unless (eq (car (gnus-find-method-for-group vgroup)) 'nnvirtual) | |
2743 (error "%s is not an nnvirtual group" vgroup)) | |
2744 (gnus-close-group vgroup) | |
2745 (let* ((groups (gnus-group-process-prefix n)) | |
2746 (method (gnus-info-method (gnus-get-info vgroup)))) | |
2747 (setcar (cdr method) | |
2748 (concat | |
2749 (nth 1 method) "\\|" | |
2750 (mapconcat | |
2751 (lambda (s) | |
2752 (gnus-group-remove-mark s) | |
2753 (concat "\\(^" (regexp-quote s) "$\\)")) | |
2754 groups "\\|")))) | |
2755 (gnus-group-position-point)) | |
2756 | |
2757 (defun gnus-group-make-empty-virtual (group) | |
2758 "Create a new, fresh, empty virtual group." | |
2759 (interactive "sCreate new, empty virtual group: ") | |
2760 (let* ((method (list 'nnvirtual "^$")) | |
2761 (pgroup (gnus-group-prefixed-name group method))) | |
2762 ;; Check whether it exists already. | |
2763 (when (gnus-gethash pgroup gnus-newsrc-hashtb) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
2764 (error "Group %s already exists" pgroup)) |
17493 | 2765 ;; Subscribe the new group after the group on the current line. |
2766 (gnus-subscribe-group pgroup (gnus-group-group-name) method) | |
2767 (gnus-group-update-group pgroup) | |
2768 (forward-line -1) | |
2769 (gnus-group-position-point))) | |
2770 | |
2771 (defun gnus-group-enter-directory (dir) | |
2772 "Enter an ephemeral nneething group." | |
2773 (interactive "DDirectory to read: ") | |
2774 (let* ((method (list 'nneething dir '(nneething-read-only t))) | |
2775 (leaf (gnus-group-prefixed-name | |
2776 (file-name-nondirectory (directory-file-name dir)) | |
2777 method)) | |
2778 (name (gnus-generate-new-group-name leaf))) | |
2779 (unless (gnus-group-read-ephemeral-group | |
2780 name method t | |
2781 (cons (current-buffer) | |
2782 (if (eq major-mode 'gnus-summary-mode) | |
2783 'summary 'group))) | |
2784 (error "Couldn't enter %s" dir)))) | |
2785 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2786 (eval-and-compile |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2787 (autoload 'nnimap-expunge "nnimap") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2788 (autoload 'nnimap-acl-get "nnimap") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2789 (autoload 'nnimap-acl-edit "nnimap")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2790 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2791 (defun gnus-group-nnimap-expunge (group) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2792 "Expunge deleted articles in current nnimap GROUP." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2793 (interactive (list (gnus-group-group-name))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2794 (let ((mailbox (gnus-group-real-name group)) method) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2795 (unless group |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2796 (error "No group on current line")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2797 (unless (gnus-get-info group) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2798 (error "Killed group; can't be edited")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2799 (unless (eq 'nnimap (car (setq method (gnus-find-method-for-group group)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2800 (error "%s is not an nnimap group" group)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2801 (nnimap-expunge mailbox (cadr method)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2802 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2803 (defun gnus-group-nnimap-edit-acl (group) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2804 "Edit the Access Control List of current nnimap GROUP." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2805 (interactive (list (gnus-group-group-name))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2806 (let ((mailbox (gnus-group-real-name group)) method acl) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2807 (unless group |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2808 (error "No group on current line")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2809 (unless (gnus-get-info group) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2810 (error "Killed group; can't be edited")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2811 (unless (eq (car (setq method (gnus-find-method-for-group group))) 'nnimap) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2812 (error "%s is not an nnimap group" group)) |
32969
899478c14a26
2000-09-24 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32965
diff
changeset
|
2813 (unless (setq acl (nnimap-acl-get mailbox (cadr method))) |
899478c14a26
2000-09-24 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32965
diff
changeset
|
2814 (error "Server does not support ACL's")) |
899478c14a26
2000-09-24 Simon Josefsson <simon@josefsson.org>
Dave Love <fx@gnu.org>
parents:
32965
diff
changeset
|
2815 (gnus-edit-form acl (format "Editing the access control list for `%s'. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2816 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2817 An access control list is a list of (identifier . rights) elements. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2818 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2819 The identifier string specifies the corresponding user. The |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2820 identifier \"anyone\" is reserved to refer to the universal identity. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2821 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2822 Rights is a string listing a (possibly empty) set of alphanumeric |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2823 characters, each character listing a set of operations which is being |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2824 controlled. Letters are reserved for ``standard'' rights, listed |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2825 below. Digits are reserved for implementation or site defined rights. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2826 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2827 l - lookup (mailbox is visible to LIST/LSUB commands) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2828 r - read (SELECT the mailbox, perform CHECK, FETCH, PARTIAL, |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2829 SEARCH, COPY from mailbox) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2830 s - keep seen/unseen information across sessions (STORE \\SEEN flag) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2831 w - write (STORE flags other than \\SEEN and \\DELETED) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2832 i - insert (perform APPEND, COPY into mailbox) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2833 p - post (send mail to submission address for mailbox, |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2834 not enforced by IMAP4 itself) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2835 c - create and delete mailbox (CREATE new sub-mailboxes in any |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2836 implementation-defined hierarchy, RENAME or DELETE mailbox) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2837 d - delete messages (STORE \\DELETED flag, perform EXPUNGE) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2838 a - administer (perform SETACL)" group) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2839 `(lambda (form) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2840 (nnimap-acl-edit |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2841 ,mailbox ',method ',acl form))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2842 |
17493 | 2843 ;; Group sorting commands |
2844 ;; Suggested by Joe Hildebrand <hildjj@idaho.fuentez.com>. | |
2845 | |
2846 (defun gnus-group-sort-groups (func &optional reverse) | |
2847 "Sort the group buffer according to FUNC. | |
2848 When used interactively, the sorting function used will be | |
2849 determined by the `gnus-group-sort-function' variable. | |
2850 If REVERSE (the prefix), reverse the sorting order." | |
2851 (interactive (list gnus-group-sort-function current-prefix-arg)) | |
2852 (funcall gnus-group-sort-alist-function | |
2853 (gnus-make-sort-function func) reverse) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2854 (gnus-group-unmark-all-groups) |
17493 | 2855 (gnus-group-list-groups) |
2856 (gnus-dribble-touch)) | |
2857 | |
2858 (defun gnus-group-sort-flat (func reverse) | |
2859 ;; We peel off the dummy group from the alist. | |
2860 (when func | |
2861 (when (equal (gnus-info-group (car gnus-newsrc-alist)) "dummy.group") | |
2862 (pop gnus-newsrc-alist)) | |
2863 ;; Do the sorting. | |
2864 (setq gnus-newsrc-alist | |
2865 (sort gnus-newsrc-alist func)) | |
2866 (when reverse | |
2867 (setq gnus-newsrc-alist (nreverse gnus-newsrc-alist))) | |
2868 ;; Regenerate the hash table. | |
2869 (gnus-make-hashtable-from-newsrc-alist))) | |
2870 | |
2871 (defun gnus-group-sort-groups-by-alphabet (&optional reverse) | |
2872 "Sort the group buffer alphabetically by group name. | |
2873 If REVERSE, sort in reverse order." | |
2874 (interactive "P") | |
2875 (gnus-group-sort-groups 'gnus-group-sort-by-alphabet reverse)) | |
2876 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2877 (defun gnus-group-sort-groups-by-real-name (&optional reverse) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2878 "Sort the group buffer alphabetically by real (unprefixed) group name. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2879 If REVERSE, sort in reverse order." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2880 (interactive "P") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2881 (gnus-group-sort-groups 'gnus-group-sort-by-real-name reverse)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2882 |
17493 | 2883 (defun gnus-group-sort-groups-by-unread (&optional reverse) |
2884 "Sort the group buffer by number of unread articles. | |
2885 If REVERSE, sort in reverse order." | |
2886 (interactive "P") | |
2887 (gnus-group-sort-groups 'gnus-group-sort-by-unread reverse)) | |
2888 | |
2889 (defun gnus-group-sort-groups-by-level (&optional reverse) | |
2890 "Sort the group buffer by group level. | |
2891 If REVERSE, sort in reverse order." | |
2892 (interactive "P") | |
2893 (gnus-group-sort-groups 'gnus-group-sort-by-level reverse)) | |
2894 | |
2895 (defun gnus-group-sort-groups-by-score (&optional reverse) | |
2896 "Sort the group buffer by group score. | |
2897 If REVERSE, sort in reverse order." | |
2898 (interactive "P") | |
2899 (gnus-group-sort-groups 'gnus-group-sort-by-score reverse)) | |
2900 | |
2901 (defun gnus-group-sort-groups-by-rank (&optional reverse) | |
2902 "Sort the group buffer by group rank. | |
2903 If REVERSE, sort in reverse order." | |
2904 (interactive "P") | |
2905 (gnus-group-sort-groups 'gnus-group-sort-by-rank reverse)) | |
2906 | |
2907 (defun gnus-group-sort-groups-by-method (&optional reverse) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2908 "Sort the group buffer alphabetically by back end name. |
17493 | 2909 If REVERSE, sort in reverse order." |
2910 (interactive "P") | |
2911 (gnus-group-sort-groups 'gnus-group-sort-by-method reverse)) | |
2912 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2913 (defun gnus-group-sort-groups-by-server (&optional reverse) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2914 "Sort the group buffer alphabetically by server name. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2915 If REVERSE, sort in reverse order." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2916 (interactive "P") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2917 (gnus-group-sort-groups 'gnus-group-sort-by-server reverse)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2918 |
17493 | 2919 ;;; Selected group sorting. |
2920 | |
2921 (defun gnus-group-sort-selected-groups (n func &optional reverse) | |
2922 "Sort the process/prefixed groups." | |
2923 (interactive (list current-prefix-arg gnus-group-sort-function)) | |
2924 (let ((groups (gnus-group-process-prefix n))) | |
2925 (funcall gnus-group-sort-selected-function | |
2926 groups (gnus-make-sort-function func) reverse) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2927 (gnus-group-unmark-all-groups) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2928 (gnus-group-list-groups) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2929 (gnus-dribble-touch))) |
17493 | 2930 |
2931 (defun gnus-group-sort-selected-flat (groups func reverse) | |
2932 (let (entries infos) | |
2933 ;; First find all the group entries for these groups. | |
2934 (while groups | |
2935 (push (nthcdr 2 (gnus-gethash (pop groups) gnus-newsrc-hashtb)) | |
2936 entries)) | |
2937 ;; Then sort the infos. | |
2938 (setq infos | |
2939 (sort | |
2940 (mapcar | |
2941 (lambda (entry) (car entry)) | |
2942 (setq entries (nreverse entries))) | |
2943 func)) | |
2944 (when reverse | |
2945 (setq infos (nreverse infos))) | |
2946 ;; Go through all the infos and replace the old entries | |
2947 ;; with the new infos. | |
2948 (while infos | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2949 (setcar (car entries) (pop infos)) |
17493 | 2950 (pop entries)) |
2951 ;; Update the hashtable. | |
2952 (gnus-make-hashtable-from-newsrc-alist))) | |
2953 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2954 (defun gnus-group-sort-selected-groups-by-alphabet (&optional n reverse) |
17493 | 2955 "Sort the group buffer alphabetically by group name. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2956 Obeys the process/prefix convention. If REVERSE (the symbolic prefix), |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2957 sort in reverse order." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2958 (interactive (gnus-interactive "P\ny")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2959 (gnus-group-sort-selected-groups n 'gnus-group-sort-by-alphabet reverse)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2960 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2961 (defun gnus-group-sort-selected-groups-by-real-name (&optional n reverse) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2962 "Sort the group buffer alphabetically by real group name. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2963 Obeys the process/prefix convention. If REVERSE (the symbolic prefix), |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2964 sort in reverse order." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2965 (interactive (gnus-interactive "P\ny")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2966 (gnus-group-sort-selected-groups n 'gnus-group-sort-by-real-name reverse)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2967 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2968 (defun gnus-group-sort-selected-groups-by-unread (&optional n reverse) |
17493 | 2969 "Sort the group buffer by number of unread articles. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2970 Obeys the process/prefix convention. If REVERSE (the symbolic prefix), |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2971 sort in reverse order." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2972 (interactive (gnus-interactive "P\ny")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2973 (gnus-group-sort-selected-groups n 'gnus-group-sort-by-unread reverse)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2974 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2975 (defun gnus-group-sort-selected-groups-by-level (&optional n reverse) |
17493 | 2976 "Sort the group buffer by group level. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2977 Obeys the process/prefix convention. If REVERSE (the symbolic prefix), |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2978 sort in reverse order." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2979 (interactive (gnus-interactive "P\ny")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2980 (gnus-group-sort-selected-groups n 'gnus-group-sort-by-level reverse)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2981 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2982 (defun gnus-group-sort-selected-groups-by-score (&optional n reverse) |
17493 | 2983 "Sort the group buffer by group score. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2984 Obeys the process/prefix convention. If REVERSE (the symbolic prefix), |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2985 sort in reverse order." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2986 (interactive (gnus-interactive "P\ny")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2987 (gnus-group-sort-selected-groups n 'gnus-group-sort-by-score reverse)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2988 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2989 (defun gnus-group-sort-selected-groups-by-rank (&optional n reverse) |
17493 | 2990 "Sort the group buffer by group rank. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2991 Obeys the process/prefix convention. If REVERSE (the symbolic prefix), |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2992 sort in reverse order." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2993 (interactive (gnus-interactive "P\ny")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2994 (gnus-group-sort-selected-groups n 'gnus-group-sort-by-rank reverse)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2995 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2996 (defun gnus-group-sort-selected-groups-by-method (&optional n reverse) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2997 "Sort the group buffer alphabetically by back end name. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2998 Obeys the process/prefix convention. If REVERSE (the symbolic prefix), |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
2999 sort in reverse order." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3000 (interactive (gnus-interactive "P\ny")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3001 (gnus-group-sort-selected-groups n 'gnus-group-sort-by-method reverse)) |
17493 | 3002 |
3003 ;;; Sorting predicates. | |
3004 | |
3005 (defun gnus-group-sort-by-alphabet (info1 info2) | |
3006 "Sort alphabetically." | |
3007 (string< (gnus-info-group info1) (gnus-info-group info2))) | |
3008 | |
3009 (defun gnus-group-sort-by-real-name (info1 info2) | |
3010 "Sort alphabetically on real (unprefixed) names." | |
3011 (string< (gnus-group-real-name (gnus-info-group info1)) | |
3012 (gnus-group-real-name (gnus-info-group info2)))) | |
3013 | |
3014 (defun gnus-group-sort-by-unread (info1 info2) | |
3015 "Sort by number of unread articles." | |
3016 (let ((n1 (car (gnus-gethash (gnus-info-group info1) gnus-newsrc-hashtb))) | |
3017 (n2 (car (gnus-gethash (gnus-info-group info2) gnus-newsrc-hashtb)))) | |
3018 (< (or (and (numberp n1) n1) 0) | |
3019 (or (and (numberp n2) n2) 0)))) | |
3020 | |
3021 (defun gnus-group-sort-by-level (info1 info2) | |
3022 "Sort by level." | |
3023 (< (gnus-info-level info1) (gnus-info-level info2))) | |
3024 | |
3025 (defun gnus-group-sort-by-method (info1 info2) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3026 "Sort alphabetically by back end name." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3027 (string< (car (gnus-find-method-for-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3028 (gnus-info-group info1) info1)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3029 (car (gnus-find-method-for-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3030 (gnus-info-group info2) info2)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3031 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3032 (defun gnus-group-sort-by-server (info1 info2) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3033 "Sort alphabetically by server name." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3034 (string< (gnus-method-to-full-server-name |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3035 (gnus-find-method-for-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3036 (gnus-info-group info1) info1)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3037 (gnus-method-to-full-server-name |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3038 (gnus-find-method-for-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3039 (gnus-info-group info2) info2)))) |
17493 | 3040 |
3041 (defun gnus-group-sort-by-score (info1 info2) | |
3042 "Sort by group score." | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3043 (> (gnus-info-score info1) (gnus-info-score info2))) |
17493 | 3044 |
3045 (defun gnus-group-sort-by-rank (info1 info2) | |
3046 "Sort by level and score." | |
3047 (let ((level1 (gnus-info-level info1)) | |
3048 (level2 (gnus-info-level info2))) | |
3049 (or (< level1 level2) | |
3050 (and (= level1 level2) | |
3051 (> (gnus-info-score info1) (gnus-info-score info2)))))) | |
3052 | |
3053 ;;; Clearing data | |
3054 | |
3055 (defun gnus-group-clear-data (&optional arg) | |
60239
bbe4bd573f0c
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-128
Miles Bader <miles@gnu.org>
parents:
60161
diff
changeset
|
3056 "Clear all marks and read ranges from the current group. |
bbe4bd573f0c
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-128
Miles Bader <miles@gnu.org>
parents:
60161
diff
changeset
|
3057 Obeys the process/prefix convention." |
17493 | 3058 (interactive "P") |
3059 (gnus-group-iterate arg | |
3060 (lambda (group) | |
3061 (let (info) | |
3062 (gnus-info-clear-data (setq info (gnus-get-info group))) | |
3063 (gnus-get-unread-articles-in-group info (gnus-active group) t) | |
3064 (when (gnus-group-goto-group group) | |
3065 (gnus-group-update-group-line)))))) | |
3066 | |
3067 (defun gnus-group-clear-data-on-native-groups () | |
3068 "Clear all marks and read ranges from all native groups." | |
3069 (interactive) | |
3070 (when (gnus-yes-or-no-p "Really clear all data from almost all groups? ") | |
3071 (let ((alist (cdr gnus-newsrc-alist)) | |
3072 info) | |
3073 (while (setq info (pop alist)) | |
3074 (when (gnus-group-native-p (gnus-info-group info)) | |
3075 (gnus-info-clear-data info))) | |
3076 (gnus-get-unread-articles) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
3077 (gnus-dribble-touch) |
17493 | 3078 (when (gnus-y-or-n-p |
3079 "Move the cache away to avoid problems in the future? ") | |
3080 (call-interactively 'gnus-cache-move-cache))))) | |
3081 | |
3082 (defun gnus-info-clear-data (info) | |
3083 "Clear all marks and read ranges from INFO." | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3084 (let ((group (gnus-info-group info)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3085 action) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3086 (dolist (el (gnus-info-marks info)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3087 (push `(,(cdr el) add (,(car el))) action)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3088 (push `(,(gnus-info-read info) add (read)) action) |
17493 | 3089 (gnus-undo-register |
3090 `(progn | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3091 (gnus-request-set-mark ,group ',action) |
17493 | 3092 (gnus-info-set-marks ',info ',(gnus-info-marks info) t) |
3093 (gnus-info-set-read ',info ',(gnus-info-read info)) | |
3094 (when (gnus-group-goto-group ,group) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3095 (gnus-get-unread-articles-in-group ',info ',(gnus-active group) t) |
17493 | 3096 (gnus-group-update-group-line)))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3097 (setq action (mapcar (lambda (el) (list (nth 0 el) 'del (nth 2 el))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3098 action)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3099 (gnus-request-set-mark group action) |
17493 | 3100 (gnus-info-set-read info nil) |
3101 (when (gnus-info-marks info) | |
3102 (gnus-info-set-marks info nil)))) | |
3103 | |
3104 ;; Group catching up. | |
3105 | |
3106 (defun gnus-group-catchup-current (&optional n all) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3107 "Mark all unread articles in the current newsgroup as read. |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
3108 If prefix argument N is numeric, the next N newsgroups will be |
17493 | 3109 caught up. If ALL is non-nil, marked articles will also be marked as |
3110 read. Cross references (Xref: header) of articles are ignored. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
3111 The number of newsgroups that this function was unable to catch |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
3112 up is returned." |
17493 | 3113 (interactive "P") |
3114 (let ((groups (gnus-group-process-prefix n)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3115 (ret 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3116 group) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
3117 (unless groups (error "No groups selected")) |
17493 | 3118 (if (not |
3119 (or (not gnus-interactive-catchup) ;Without confirmation? | |
3120 gnus-expert-user | |
3121 (gnus-y-or-n-p | |
3122 (format | |
3123 (if all | |
3124 "Do you really want to mark all articles in %s as read? " | |
3125 "Mark all unread articles in %s as read? ") | |
3126 (if (= (length groups) 1) | |
61424
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
3127 (gnus-group-decoded-name (car groups)) |
17493 | 3128 (format "these %d groups" (length groups))))))) |
3129 n | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3130 (while (setq group (pop groups)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3131 (gnus-group-remove-mark group) |
17493 | 3132 ;; Virtual groups have to be given special treatment. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3133 (let ((method (gnus-find-method-for-group group))) |
17493 | 3134 (when (eq 'nnvirtual (car method)) |
3135 (nnvirtual-catchup-group | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3136 (gnus-group-real-name group) (nth 1 method) all))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3137 (if (>= (gnus-group-level group) gnus-level-zombie) |
17493 | 3138 (gnus-message 2 "Dead groups can't be caught up") |
3139 (if (prog1 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3140 (gnus-group-goto-group group) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3141 (gnus-group-catchup group all)) |
17493 | 3142 (gnus-group-update-group-line) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3143 (setq ret (1+ ret))))) |
17493 | 3144 (gnus-group-next-unread-group 1) |
3145 ret))) | |
3146 | |
3147 (defun gnus-group-catchup-current-all (&optional n) | |
3148 "Mark all articles in current newsgroup as read. | |
3149 Cross references (Xref: header) of articles are ignored." | |
3150 (interactive "P") | |
3151 (gnus-group-catchup-current n 'all)) | |
3152 | |
3153 (defun gnus-group-catchup (group &optional all) | |
3154 "Mark all articles in GROUP as read. | |
3155 If ALL is non-nil, all articles are marked as read. | |
3156 The return value is the number of articles that were marked as read, | |
3157 or nil if no action could be taken." | |
3158 (let* ((entry (gnus-gethash group gnus-newsrc-hashtb)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3159 (num (car entry)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3160 (marks (nth 3 (nth 2 entry))) |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
3161 (unread (gnus-sequence-of-unread-articles group))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3162 ;; Remove entries for this group. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3163 (nnmail-purge-split-history (gnus-group-real-name group)) |
17493 | 3164 ;; Do the updating only if the newsgroup isn't killed. |
3165 (if (not (numberp (car entry))) | |
3166 (gnus-message 1 "Can't catch up %s; non-active group" group) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3167 (gnus-update-read-articles group nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3168 (when all |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3169 ;; Nix out the lists of marks and dormants. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3170 (gnus-request-set-mark group (list (list (cdr (assq 'tick marks)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3171 'del '(tick)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3172 (list (cdr (assq 'dormant marks)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3173 'del '(dormant)))) |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
3174 (setq unread (gnus-range-add (gnus-range-add |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
3175 unread (cdr (assq 'dormant marks))) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
3176 (cdr (assq 'tick marks)))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3177 (gnus-add-marked-articles group 'tick nil nil 'force) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3178 (gnus-add-marked-articles group 'dormant nil nil 'force)) |
17493 | 3179 ;; Do auto-expirable marks if that's required. |
3180 (when (gnus-group-auto-expirable-p group) | |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
3181 (gnus-range-map (lambda (article) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
3182 (gnus-add-marked-articles group 'expire (list article)) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
3183 (gnus-request-set-mark group (list (list (list article) 'add '(expire))))) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
3184 unread)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3185 (let ((gnus-newsgroup-name group)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3186 (gnus-run-hooks 'gnus-group-catchup-group-hook)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3187 num))) |
17493 | 3188 |
3189 (defun gnus-group-expire-articles (&optional n) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3190 "Expire all expirable articles in the current newsgroup. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3191 Uses the process/prefix convention." |
17493 | 3192 (interactive "P") |
3193 (let ((groups (gnus-group-process-prefix n)) | |
3194 group) | |
3195 (unless groups | |
3196 (error "No groups to expire")) | |
3197 (while (setq group (pop groups)) | |
3198 (gnus-group-remove-mark group) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3199 (gnus-group-expire-articles-1 group) |
17493 | 3200 (gnus-dribble-touch) |
3201 (gnus-group-position-point)))) | |
3202 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3203 (defun gnus-group-expire-articles-1 (group) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3204 (when (gnus-check-backend-function 'request-expire-articles group) |
61424
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
3205 (gnus-message 6 "Expiring articles in %s..." |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
3206 (gnus-group-decoded-name group)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3207 (let* ((info (gnus-get-info group)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3208 (expirable (if (gnus-group-total-expirable-p group) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3209 (cons nil (gnus-list-of-read-articles group)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3210 (assq 'expire (gnus-info-marks info)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3211 (expiry-wait (gnus-group-find-parameter group 'expiry-wait)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3212 (nnmail-expiry-target |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3213 (or (gnus-group-find-parameter group 'expiry-target) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3214 nnmail-expiry-target))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3215 (when expirable |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3216 (gnus-check-group group) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3217 (setcdr |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3218 expirable |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3219 (gnus-compress-sequence |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3220 (if expiry-wait |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3221 ;; We set the expiry variables to the group |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3222 ;; parameter. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3223 (let ((nnmail-expiry-wait-function nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3224 (nnmail-expiry-wait expiry-wait)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3225 (gnus-request-expire-articles |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3226 (gnus-uncompress-sequence (cdr expirable)) group)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3227 ;; Just expire using the normal expiry values. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3228 (gnus-request-expire-articles |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3229 (gnus-uncompress-sequence (cdr expirable)) group)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3230 (gnus-close-group group)) |
61424
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
3231 (gnus-message 6 "Expiring articles in %s...done" |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
3232 (gnus-group-decoded-name group)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3233 ;; Return the list of un-expired articles. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3234 (cdr expirable)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3235 |
17493 | 3236 (defun gnus-group-expire-all-groups () |
3237 "Expire all expirable articles in all newsgroups." | |
3238 (interactive) | |
3239 (save-excursion | |
3240 (gnus-message 5 "Expiring...") | |
3241 (let ((gnus-group-marked (mapcar (lambda (info) (gnus-info-group info)) | |
3242 (cdr gnus-newsrc-alist)))) | |
3243 (gnus-group-expire-articles nil))) | |
3244 (gnus-group-position-point) | |
3245 (gnus-message 5 "Expiring...done")) | |
3246 | |
3247 (defun gnus-group-set-current-level (n level) | |
3248 "Set the level of the next N groups to LEVEL." | |
3249 (interactive | |
3250 (list | |
3251 current-prefix-arg | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3252 (progn |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3253 (unless (gnus-group-process-prefix current-prefix-arg) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3254 (error "No group on the current line")) |
62907
88db2adda4b7
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-339
Miles Bader <miles@gnu.org>
parents:
62890
diff
changeset
|
3255 (string-to-number |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3256 (let ((s (read-string |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3257 (format "Level (default %s): " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3258 (or (gnus-group-group-level) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3259 gnus-level-default-subscribed))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3260 (if (string-match "^\\s-*$" s) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3261 (int-to-string (or (gnus-group-group-level) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3262 gnus-level-default-subscribed)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3263 s)))))) |
17493 | 3264 (unless (and (>= level 1) (<= level gnus-level-killed)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3265 (error "Invalid level: %d" level)) |
17493 | 3266 (let ((groups (gnus-group-process-prefix n)) |
3267 group) | |
3268 (while (setq group (pop groups)) | |
3269 (gnus-group-remove-mark group) | |
3270 (gnus-message 6 "Changed level of %s from %d to %d" | |
61424
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
3271 (gnus-group-decoded-name group) |
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
3272 (or (gnus-group-group-level) gnus-level-killed) |
17493 | 3273 level) |
3274 (gnus-group-change-level | |
3275 group level (or (gnus-group-group-level) gnus-level-killed)) | |
3276 (gnus-group-update-group-line))) | |
3277 (gnus-group-position-point)) | |
3278 | |
3279 (defun gnus-group-unsubscribe (&optional n) | |
3280 "Unsubscribe the current group." | |
3281 (interactive "P") | |
3282 (gnus-group-unsubscribe-current-group n 'unsubscribe)) | |
3283 | |
3284 (defun gnus-group-subscribe (&optional n) | |
3285 "Subscribe the current group." | |
3286 (interactive "P") | |
3287 (gnus-group-unsubscribe-current-group n 'subscribe)) | |
3288 | |
3289 (defun gnus-group-unsubscribe-current-group (&optional n do-sub) | |
3290 "Toggle subscription of the current group. | |
3291 If given numerical prefix, toggle the N next groups." | |
3292 (interactive "P") | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3293 (dolist (group (gnus-group-process-prefix n)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3294 (gnus-group-remove-mark group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3295 (gnus-group-unsubscribe-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3296 group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3297 (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3298 ((eq do-sub 'unsubscribe) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3299 gnus-level-default-unsubscribed) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3300 ((eq do-sub 'subscribe) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3301 gnus-level-default-subscribed) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3302 ((<= (gnus-group-group-level) gnus-level-subscribed) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3303 gnus-level-default-unsubscribed) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3304 (t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3305 gnus-level-default-subscribed)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3306 t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3307 (gnus-group-update-group-line)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3308 (gnus-group-next-group 1)) |
17493 | 3309 |
3310 (defun gnus-group-unsubscribe-group (group &optional level silent) | |
3311 "Toggle subscription to GROUP. | |
3312 Killed newsgroups are subscribed. If SILENT, don't try to update the | |
3313 group line." | |
3314 (interactive | |
3315 (list (completing-read | |
3316 "Group: " gnus-active-hashtb nil | |
3317 (gnus-read-active-file-p) | |
3318 nil | |
3319 'gnus-group-history))) | |
3320 (let ((newsrc (gnus-gethash group gnus-newsrc-hashtb))) | |
3321 (cond | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
3322 ((string-match "^[ \t]*$" group) |
17493 | 3323 (error "Empty group name")) |
3324 (newsrc | |
3325 ;; Toggle subscription flag. | |
3326 (gnus-group-change-level | |
3327 newsrc (if level level (if (<= (gnus-info-level (nth 2 newsrc)) | |
3328 gnus-level-subscribed) | |
3329 (1+ gnus-level-subscribed) | |
3330 gnus-level-default-subscribed))) | |
3331 (unless silent | |
3332 (gnus-group-update-group group))) | |
3333 ((and (stringp group) | |
3334 (or (not (gnus-read-active-file-p)) | |
3335 (gnus-active group))) | |
3336 ;; Add new newsgroup. | |
3337 (gnus-group-change-level | |
3338 group | |
3339 (if level level gnus-level-default-subscribed) | |
3340 (or (and (member group gnus-zombie-list) | |
3341 gnus-level-zombie) | |
3342 gnus-level-killed) | |
3343 (when (gnus-group-group-name) | |
3344 (gnus-gethash (gnus-group-group-name) gnus-newsrc-hashtb))) | |
3345 (unless silent | |
3346 (gnus-group-update-group group))) | |
3347 (t (error "No such newsgroup: %s" group))) | |
3348 (gnus-group-position-point))) | |
3349 | |
3350 (defun gnus-group-transpose-groups (n) | |
3351 "Move the current newsgroup up N places. | |
3352 If given a negative prefix, move down instead. The difference between | |
3353 N and the number of steps taken is returned." | |
3354 (interactive "p") | |
3355 (unless (gnus-group-group-name) | |
3356 (error "No group on current line")) | |
3357 (gnus-group-kill-group 1) | |
3358 (prog1 | |
3359 (forward-line (- n)) | |
3360 (gnus-group-yank-group) | |
3361 (gnus-group-position-point))) | |
3362 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3363 (defun gnus-group-kill-all-zombies (&optional dummy) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3364 "Kill all zombie newsgroups. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3365 The optional DUMMY should always be nil." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3366 (interactive (list (not (gnus-yes-or-no-p "Really kill all zombies? ")))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3367 (unless dummy |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3368 (setq gnus-killed-list (nconc gnus-zombie-list gnus-killed-list)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3369 (setq gnus-zombie-list nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3370 (gnus-dribble-touch) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3371 (gnus-group-list-groups))) |
17493 | 3372 |
3373 (defun gnus-group-kill-region (begin end) | |
3374 "Kill newsgroups in current region (excluding current point). | |
3375 The killed newsgroups can be yanked by using \\[gnus-group-yank-group]." | |
3376 (interactive "r") | |
3377 (let ((lines | |
3378 ;; Count lines. | |
3379 (save-excursion | |
3380 (count-lines | |
3381 (progn | |
3382 (goto-char begin) | |
3383 (beginning-of-line) | |
3384 (point)) | |
3385 (progn | |
3386 (goto-char end) | |
3387 (beginning-of-line) | |
3388 (point)))))) | |
3389 (goto-char begin) | |
3390 (beginning-of-line) ;Important when LINES < 1 | |
3391 (gnus-group-kill-group lines))) | |
3392 | |
3393 (defun gnus-group-kill-group (&optional n discard) | |
3394 "Kill the next N groups. | |
3395 The killed newsgroups can be yanked by using \\[gnus-group-yank-group]. | |
3396 However, only groups that were alive can be yanked; already killed | |
3397 groups or zombie groups can't be yanked. | |
3398 The return value is the name of the group that was killed, or a list | |
3399 of groups killed." | |
3400 (interactive "P") | |
3401 (let ((buffer-read-only nil) | |
3402 (groups (gnus-group-process-prefix n)) | |
3403 group entry level out) | |
3404 (if (< (length groups) 10) | |
3405 ;; This is faster when there are few groups. | |
3406 (while groups | |
3407 (push (setq group (pop groups)) out) | |
3408 (gnus-group-remove-mark group) | |
3409 (setq level (gnus-group-group-level)) | |
3410 (gnus-delete-line) | |
3411 (when (and (not discard) | |
3412 (setq entry (gnus-gethash group gnus-newsrc-hashtb))) | |
3413 (gnus-undo-register | |
3414 `(progn | |
3415 (gnus-group-goto-group ,(gnus-group-group-name)) | |
3416 (gnus-group-yank-group))) | |
3417 (push (cons (car entry) (nth 2 entry)) | |
3418 gnus-list-of-killed-groups)) | |
3419 (gnus-group-change-level | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3420 (if entry entry group) gnus-level-killed (if entry nil level)) |
61424
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
61126
diff
changeset
|
3421 (message "Killed group %s" (gnus-group-decoded-name group))) |
17493 | 3422 ;; If there are lots and lots of groups to be killed, we use |
3423 ;; this thing instead. | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3424 (dolist (group (nreverse groups)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3425 (gnus-group-remove-mark group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3426 (gnus-delete-line) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3427 (push group gnus-killed-list) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3428 (setq gnus-newsrc-alist |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3429 (delq (assoc group gnus-newsrc-alist) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3430 gnus-newsrc-alist)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3431 (when gnus-group-change-level-function |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3432 (funcall gnus-group-change-level-function |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3433 group gnus-level-killed 3)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3434 (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3435 ((setq entry (gnus-gethash group gnus-newsrc-hashtb)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3436 (push (cons (car entry) (nth 2 entry)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3437 gnus-list-of-killed-groups) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3438 (setcdr (cdr entry) (cdddr entry))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3439 ((member group gnus-zombie-list) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3440 (setq gnus-zombie-list (delete group gnus-zombie-list)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3441 ;; There may be more than one instance displayed. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3442 (while (gnus-group-goto-group group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3443 (gnus-delete-line))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3444 (gnus-make-hashtable-from-newsrc-alist)) |
17493 | 3445 |
3446 (gnus-group-position-point) | |
3447 (if (< (length out) 2) (car out) (nreverse out)))) | |
3448 | |
3449 (defun gnus-group-yank-group (&optional arg) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
3450 "Yank the last newsgroups killed with \\[gnus-group-kill-group], inserting it before the current newsgroup. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
3451 The numeric ARG specifies how many newsgroups are to be yanked. The |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
3452 name of the newsgroup yanked is returned, or (if several groups are |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
3453 yanked) a list of yanked groups is returned." |
17493 | 3454 (interactive "p") |
3455 (setq arg (or arg 1)) | |
3456 (let (info group prev out) | |
3457 (while (>= (decf arg) 0) | |
3458 (when (not (setq info (pop gnus-list-of-killed-groups))) | |
3459 (error "No more newsgroups to yank")) | |
3460 (push (setq group (nth 1 info)) out) | |
3461 ;; Find which newsgroup to insert this one before - search | |
3462 ;; backward until something suitable is found. If there are no | |
3463 ;; other newsgroups in this buffer, just make this newsgroup the | |
3464 ;; first newsgroup. | |
3465 (setq prev (gnus-group-group-name)) | |
3466 (gnus-group-change-level | |
3467 info (gnus-info-level (cdr info)) gnus-level-killed | |
3468 (and prev (gnus-gethash prev gnus-newsrc-hashtb)) | |
3469 t) | |
3470 (gnus-group-insert-group-line-info group) | |
3471 (gnus-undo-register | |
3472 `(when (gnus-group-goto-group ,group) | |
3473 (gnus-group-kill-group 1)))) | |
3474 (forward-line -1) | |
3475 (gnus-group-position-point) | |
3476 (if (< (length out) 2) (car out) (nreverse out)))) | |
3477 | |
3478 (defun gnus-group-kill-level (level) | |
3479 "Kill all groups that is on a certain LEVEL." | |
3480 (interactive "nKill all groups on level: ") | |
3481 (cond | |
3482 ((= level gnus-level-zombie) | |
3483 (setq gnus-killed-list | |
3484 (nconc gnus-zombie-list gnus-killed-list)) | |
3485 (setq gnus-zombie-list nil)) | |
3486 ((and (< level gnus-level-zombie) | |
3487 (> level 0) | |
3488 (or gnus-expert-user | |
3489 (gnus-yes-or-no-p | |
3490 (format | |
3491 "Do you really want to kill all groups on level %d? " | |
3492 level)))) | |
3493 (let* ((prev gnus-newsrc-alist) | |
3494 (alist (cdr prev))) | |
3495 (while alist | |
3496 (if (= (gnus-info-level (car alist)) level) | |
3497 (progn | |
3498 (push (gnus-info-group (car alist)) gnus-killed-list) | |
3499 (setcdr prev (cdr alist))) | |
3500 (setq prev alist)) | |
3501 (setq alist (cdr alist))) | |
3502 (gnus-make-hashtable-from-newsrc-alist) | |
3503 (gnus-group-list-groups))) | |
3504 (t | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3505 (error "Can't kill; invalid level: %d" level)))) |
17493 | 3506 |
3507 (defun gnus-group-list-all-groups (&optional arg) | |
3508 "List all newsgroups with level ARG or lower. | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3509 Default is `gnus-level-unsubscribed', which lists all subscribed and most |
17493 | 3510 unsubscribed groups." |
3511 (interactive "P") | |
3512 (gnus-group-list-groups (or arg gnus-level-unsubscribed) t)) | |
3513 | |
3514 ;; Redefine this to list ALL killed groups if prefix arg used. | |
3515 ;; Rewritten by engstrom@src.honeywell.com (Eric Engstrom). | |
3516 (defun gnus-group-list-killed (&optional arg) | |
3517 "List all killed newsgroups in the group buffer. | |
3518 If ARG is non-nil, list ALL killed groups known to Gnus. This may | |
3519 entail asking the server for the groups." | |
3520 (interactive "P") | |
3521 ;; Find all possible killed newsgroups if arg. | |
3522 (when arg | |
3523 (gnus-get-killed-groups)) | |
3524 (if (not gnus-killed-list) | |
3525 (gnus-message 6 "No killed groups") | |
3526 (let (gnus-group-list-mode) | |
3527 (funcall gnus-group-prepare-function | |
3528 gnus-level-killed t gnus-level-killed)) | |
3529 (goto-char (point-min))) | |
3530 (gnus-group-position-point)) | |
3531 | |
3532 (defun gnus-group-list-zombies () | |
3533 "List all zombie newsgroups in the group buffer." | |
3534 (interactive) | |
3535 (if (not gnus-zombie-list) | |
3536 (gnus-message 6 "No zombie groups") | |
3537 (let (gnus-group-list-mode) | |
3538 (funcall gnus-group-prepare-function | |
3539 gnus-level-zombie t gnus-level-zombie)) | |
3540 (goto-char (point-min))) | |
3541 (gnus-group-position-point)) | |
3542 | |
3543 (defun gnus-group-list-active () | |
3544 "List all groups that are available from the server(s)." | |
3545 (interactive) | |
3546 ;; First we make sure that we have really read the active file. | |
3547 (unless (gnus-read-active-file-p) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3548 (let ((gnus-read-active-file t) |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
3549 (gnus-agent gnus-plugged)); If we're actually plugged, store the active file in the agent. |
17493 | 3550 (gnus-read-active-file))) |
3551 ;; Find all groups and sort them. | |
3552 (let ((groups | |
3553 (sort | |
3554 (let (list) | |
3555 (mapatoms | |
3556 (lambda (sym) | |
3557 (and (boundp sym) | |
3558 (symbol-value sym) | |
3559 (push (symbol-name sym) list))) | |
3560 gnus-active-hashtb) | |
3561 list) | |
3562 'string<)) | |
3563 (buffer-read-only nil) | |
3564 group) | |
3565 (erase-buffer) | |
3566 (while groups | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3567 (setq group (pop groups)) |
17493 | 3568 (gnus-add-text-properties |
3569 (point) (prog1 (1+ (point)) | |
3570 (insert " *: " | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3571 (gnus-group-decoded-name group) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3572 "\n")) |
17493 | 3573 (list 'gnus-group (gnus-intern-safe group gnus-active-hashtb) |
3574 'gnus-unread t | |
3575 'gnus-level (inline (gnus-group-level group))))) | |
3576 (goto-char (point-min)))) | |
3577 | |
3578 (defun gnus-activate-all-groups (level) | |
3579 "Activate absolutely all groups." | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
3580 (interactive (list gnus-level-unsubscribed)) |
17493 | 3581 (let ((gnus-activate-level level) |
3582 (gnus-activate-foreign-newsgroups level)) | |
3583 (gnus-group-get-new-news))) | |
3584 | |
3585 (defun gnus-group-get-new-news (&optional arg) | |
3586 "Get newly arrived articles. | |
3587 If ARG is a number, it specifies which levels you are interested in | |
3588 re-scanning. If ARG is non-nil and not a number, this will force | |
3589 \"hard\" re-reading of the active files from all servers." | |
3590 (interactive "P") | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3591 (require 'nnmail) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3592 (let ((gnus-inhibit-demon t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3593 ;; Binding this variable will inhibit multiple fetchings |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3594 ;; of the same mail source. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3595 (nnmail-fetched-sources (list t))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3596 (gnus-run-hooks 'gnus-get-top-new-news-hook) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
3597 (gnus-run-hooks 'gnus-get-new-news-hook) |
17493 | 3598 |
3599 ;; Read any slave files. | |
3600 (unless gnus-slave | |
3601 (gnus-master-read-slave-newsrc)) | |
3602 | |
3603 ;; We might read in new NoCeM messages here. | |
3604 (when (and gnus-use-nocem | |
3605 (null arg)) | |
3606 (gnus-nocem-scan-groups)) | |
3607 ;; If ARG is not a number, then we read the active file. | |
3608 (when (and arg (not (numberp arg))) | |
3609 (let ((gnus-read-active-file t)) | |
3610 (gnus-read-active-file)) | |
3611 (setq arg nil) | |
3612 | |
3613 ;; If the user wants it, we scan for new groups. | |
3614 (when (eq gnus-check-new-newsgroups 'always) | |
3615 (gnus-find-new-newsgroups))) | |
3616 | |
3617 (setq arg (gnus-group-default-level arg t)) | |
3618 (if (and gnus-read-active-file (not arg)) | |
3619 (progn | |
3620 (gnus-read-active-file) | |
3621 (gnus-get-unread-articles arg)) | |
3622 (let ((gnus-read-active-file (if arg nil gnus-read-active-file))) | |
3623 (gnus-get-unread-articles arg))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
3624 (gnus-run-hooks 'gnus-after-getting-new-news-hook) |
17493 | 3625 (gnus-group-list-groups (and (numberp arg) |
3626 (max (car gnus-group-list-mode) arg))))) | |
3627 | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
3628 (defun gnus-group-get-new-news-this-group (&optional n dont-scan) |
17493 | 3629 "Check for newly arrived news in the current group (and the N-1 next groups). |
3630 The difference between N and the number of newsgroup checked is returned. | |
57581
645f020dcc8a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-626
Miles Bader <miles@gnu.org>
parents:
57363
diff
changeset
|
3631 If N is negative, this group and the N-1 previous groups will be checked. |
645f020dcc8a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-626
Miles Bader <miles@gnu.org>
parents:
57363
diff
changeset
|
3632 If DONT-SCAN is non-nil, scan non-activated groups as well." |
17493 | 3633 (interactive "P") |
3634 (let* ((groups (gnus-group-process-prefix n)) | |
3635 (ret (if (numberp n) (- n (length groups)) 0)) | |
3636 (beg (unless n | |
3637 (point))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3638 group method |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3639 (gnus-inhibit-demon t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3640 ;; Binding this variable will inhibit multiple fetchings |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3641 ;; of the same mail source. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3642 (nnmail-fetched-sources (list t))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3643 (gnus-run-hooks 'gnus-get-new-news-hook) |
17493 | 3644 (while (setq group (pop groups)) |
3645 (gnus-group-remove-mark group) | |
3646 ;; Bypass any previous denials from the server. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
3647 (gnus-remove-denial (setq method (gnus-find-method-for-group group))) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
3648 (if (gnus-activate-group group (if dont-scan nil 'scan)) |
17493 | 3649 (progn |
3650 (gnus-get-unread-articles-in-group | |
3651 (gnus-get-info group) (gnus-active group) t) | |
3652 (unless (gnus-virtual-group-p group) | |
3653 (gnus-close-group group)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3654 (when gnus-agent |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3655 (gnus-agent-save-group-info |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3656 method (gnus-group-real-name group) (gnus-active group))) |
17493 | 3657 (gnus-group-update-group group)) |
3658 (if (eq (gnus-server-status (gnus-find-method-for-group group)) | |
3659 'denied) | |
3660 (gnus-error 3 "Server denied access") | |
3661 (gnus-error 3 "%s error: %s" group (gnus-status-message group))))) | |
3662 (when beg | |
3663 (goto-char beg)) | |
3664 (when gnus-goto-next-group-when-activating | |
3665 (gnus-group-next-unread-group 1 t)) | |
3666 (gnus-summary-position-point) | |
3667 ret)) | |
3668 | |
3669 (defun gnus-group-fetch-faq (group &optional faq-dir) | |
3670 "Fetch the FAQ for the current group. | |
3671 If given a prefix argument, prompt for the FAQ dir | |
3672 to use." | |
3673 (interactive | |
3674 (list | |
3675 (gnus-group-group-name) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
3676 (when current-prefix-arg |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
3677 (completing-read |
48588 | 3678 "FAQ dir: " (and (listp gnus-group-faq-directory) |
33344 | 3679 (mapcar #'list |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
3680 gnus-group-faq-directory)))))) |
17493 | 3681 (unless group |
3682 (error "No group name given")) | |
3683 (let ((dirs (or faq-dir gnus-group-faq-directory)) | |
3684 dir found file) | |
3685 (unless (listp dirs) | |
3686 (setq dirs (list dirs))) | |
3687 (while (and (not found) | |
3688 (setq dir (pop dirs))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
3689 (let ((name (gnus-group-real-name group))) |
33344 | 3690 (setq file (expand-file-name name dir))) |
17493 | 3691 (if (not (file-exists-p file)) |
3692 (gnus-message 1 "No such file: %s" file) | |
3693 (let ((enable-local-variables nil)) | |
3694 (find-file file) | |
3695 (setq found t)))))) | |
3696 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3697 (defun gnus-group-fetch-charter (group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3698 "Fetch the charter for the current group. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3699 If given a prefix argument, prompt for a group." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3700 (interactive |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3701 (list (or (when current-prefix-arg |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3702 (completing-read "Group: " gnus-active-hashtb)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3703 (gnus-group-group-name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3704 gnus-newsgroup-name))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3705 (unless group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3706 (error "No group name given")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3707 (require 'mm-url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3708 (condition-case nil (require 'url-http) (error nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3709 (let ((name (mm-url-form-encode-xwfu (gnus-group-real-name group))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3710 url hierarchy) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3711 (when (string-match "\\(^[^\\.]+\\)\\..*" name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3712 (setq hierarchy (match-string 1 name)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3713 (if (and (setq url (cdr (assoc hierarchy gnus-group-charter-alist))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3714 (if (fboundp 'url-http-file-exists-p) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3715 (url-http-file-exists-p (eval url)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3716 t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3717 (browse-url (eval url)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3718 (setq url (concat "http://" hierarchy |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3719 ".news-admin.org/charters/" name)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3720 (if (and (fboundp 'url-http-file-exists-p) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3721 (url-http-file-exists-p url)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3722 (browse-url url) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3723 (gnus-group-fetch-control group)))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3724 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3725 (defun gnus-group-fetch-control (group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3726 "Fetch the archived control messages for the current group. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3727 If given a prefix argument, prompt for a group." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3728 (interactive |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3729 (list (or (when current-prefix-arg |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3730 (completing-read "Group: " gnus-active-hashtb)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3731 (gnus-group-group-name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3732 gnus-newsgroup-name))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3733 (unless group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3734 (error "No group name given")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3735 (let ((name (gnus-group-real-name group)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3736 hierarchy) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3737 (when (string-match "\\(^[^\\.]+\\)\\..*" name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3738 (setq hierarchy (match-string 1 name)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3739 (if gnus-group-fetch-control-use-browse-url |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3740 (browse-url (concat "ftp://ftp.isc.org/usenet/control/" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3741 hierarchy "/" name ".gz")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3742 (let ((enable-local-variables nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3743 (gnus-group-read-ephemeral-group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3744 group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3745 `(nndoc ,group (nndoc-address |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3746 ,(find-file-noselect |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3747 (concat "/ftp@ftp.isc.org:/usenet/control/" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3748 hierarchy "/" name ".gz"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3749 (nndoc-article-type mbox)) t nil nil)))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3750 |
17493 | 3751 (defun gnus-group-describe-group (force &optional group) |
3752 "Display a description of the current newsgroup." | |
3753 (interactive (list current-prefix-arg (gnus-group-group-name))) | |
3754 (let* ((method (gnus-find-method-for-group group)) | |
3755 (mname (gnus-group-prefixed-name "" method)) | |
3756 desc) | |
3757 (when (and force | |
3758 gnus-description-hashtb) | |
3759 (gnus-sethash mname nil gnus-description-hashtb)) | |
3760 (unless group | |
3761 (error "No group name given")) | |
3762 (when (or (and gnus-description-hashtb | |
3763 ;; We check whether this group's method has been | |
3764 ;; queried for a description file. | |
3765 (gnus-gethash mname gnus-description-hashtb)) | |
3766 (setq desc (gnus-group-get-description group)) | |
3767 (gnus-read-descriptions-file method)) | |
3768 (gnus-message 1 | |
3769 (or desc (gnus-gethash group gnus-description-hashtb) | |
3770 "No description available"))))) | |
3771 | |
3772 ;; Suggested by Per Abrahamsen <amanda@iesd.auc.dk>. | |
3773 (defun gnus-group-describe-all-groups (&optional force) | |
3774 "Pop up a buffer with descriptions of all newsgroups." | |
3775 (interactive "P") | |
3776 (when force | |
3777 (setq gnus-description-hashtb nil)) | |
3778 (when (not (or gnus-description-hashtb | |
3779 (gnus-read-all-descriptions-files))) | |
3780 (error "Couldn't request descriptions file")) | |
3781 (let ((buffer-read-only nil) | |
3782 b) | |
3783 (erase-buffer) | |
3784 (mapatoms | |
3785 (lambda (group) | |
3786 (setq b (point)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3787 (let ((charset (gnus-group-name-charset nil (symbol-name group)))) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49274
diff
changeset
|
3788 (insert (format " *: %-20s %s\n" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3789 (gnus-group-name-decode |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3790 (symbol-name group) charset) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3791 (gnus-group-name-decode |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3792 (symbol-value group) charset)))) |
17493 | 3793 (gnus-add-text-properties |
3794 b (1+ b) (list 'gnus-group group | |
3795 'gnus-unread t 'gnus-marked nil | |
3796 'gnus-level (1+ gnus-level-subscribed)))) | |
3797 gnus-description-hashtb) | |
3798 (goto-char (point-min)) | |
3799 (gnus-group-position-point))) | |
3800 | |
3801 ;; Suggested by Daniel Quinlan <quinlan@best.com>. | |
3802 (defun gnus-group-apropos (regexp &optional search-description) | |
3803 "List all newsgroups that have names that match a regexp." | |
3804 (interactive "sGnus apropos (regexp): ") | |
3805 (let ((prev "") | |
3806 (obuf (current-buffer)) | |
3807 groups des) | |
3808 ;; Go through all newsgroups that are known to Gnus. | |
3809 (mapatoms | |
3810 (lambda (group) | |
3811 (and (symbol-name group) | |
3812 (string-match regexp (symbol-name group)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
3813 (symbol-value group) |
17493 | 3814 (push (symbol-name group) groups))) |
3815 gnus-active-hashtb) | |
3816 ;; Also go through all descriptions that are known to Gnus. | |
3817 (when search-description | |
3818 (mapatoms | |
3819 (lambda (group) | |
3820 (and (string-match regexp (symbol-value group)) | |
3821 (push (symbol-name group) groups))) | |
3822 gnus-description-hashtb)) | |
3823 (if (not groups) | |
3824 (gnus-message 3 "No groups matched \"%s\"." regexp) | |
3825 ;; Print out all the groups. | |
3826 (save-excursion | |
3827 (pop-to-buffer "*Gnus Help*") | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3828 (buffer-disable-undo) |
17493 | 3829 (erase-buffer) |
3830 (setq groups (sort groups 'string<)) | |
3831 (while groups | |
3832 ;; Groups may be entered twice into the list of groups. | |
3833 (when (not (string= (car groups) prev)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3834 (setq prev (car groups)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3835 (let ((charset (gnus-group-name-charset nil prev))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3836 (insert (gnus-group-name-decode prev charset) "\n") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3837 (when (and gnus-description-hashtb |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3838 (setq des (gnus-gethash (car groups) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3839 gnus-description-hashtb))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
3840 (insert " " (gnus-group-name-decode des charset) "\n")))) |
17493 | 3841 (setq groups (cdr groups))) |
3842 (goto-char (point-min)))) | |
3843 (pop-to-buffer obuf))) | |
3844 | |
3845 (defun gnus-group-description-apropos (regexp) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3846 "List all newsgroups that have names or descriptions that match REGEXP." |
17493 | 3847 (interactive "sGnus description apropos (regexp): ") |
3848 (when (not (or gnus-description-hashtb | |
3849 (gnus-read-all-descriptions-files))) | |
3850 (error "Couldn't request descriptions file")) | |
3851 (gnus-group-apropos regexp t)) | |
3852 | |
3853 ;; Suggested by Per Abrahamsen <amanda@iesd.auc.dk>. | |
3854 (defun gnus-group-list-matching (level regexp &optional all lowest) | |
3855 "List all groups with unread articles that match REGEXP. | |
3856 If the prefix LEVEL is non-nil, it should be a number that says which | |
3857 level to cut off listing groups. | |
3858 If ALL, also list groups with no unread articles. | |
3859 If LOWEST, don't list groups with level lower than LOWEST. | |
3860 | |
3861 This command may read the active file." | |
3862 (interactive "P\nsList newsgroups matching: ") | |
3863 ;; First make sure active file has been read. | |
3864 (when (and level | |
3865 (> (prefix-numeric-value level) gnus-level-killed)) | |
3866 (gnus-get-killed-groups)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3867 (funcall gnus-group-prepare-function |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3868 (or level gnus-level-subscribed) (and all t) (or lowest 1) regexp) |
17493 | 3869 (goto-char (point-min)) |
3870 (gnus-group-position-point)) | |
3871 | |
3872 (defun gnus-group-list-all-matching (level regexp &optional lowest) | |
3873 "List all groups that match REGEXP. | |
3874 If the prefix LEVEL is non-nil, it should be a number that says which | |
3875 level to cut off listing groups. | |
3876 If LOWEST, don't list groups with level lower than LOWEST." | |
3877 (interactive "P\nsList newsgroups matching: ") | |
3878 (when level | |
3879 (setq level (prefix-numeric-value level))) | |
3880 (gnus-group-list-matching (or level gnus-level-killed) regexp t lowest)) | |
3881 | |
3882 ;; Suggested by Jack Vinson <vinson@unagi.cis.upenn.edu>. | |
3883 (defun gnus-group-save-newsrc (&optional force) | |
3884 "Save the Gnus startup files. | |
3885 If FORCE, force saving whether it is necessary or not." | |
3886 (interactive "P") | |
3887 (gnus-save-newsrc-file force)) | |
3888 | |
3889 (defun gnus-group-restart (&optional arg) | |
3890 "Force Gnus to read the .newsrc file." | |
3891 (interactive "P") | |
3892 (when (gnus-yes-or-no-p | |
3893 (format "Are you sure you want to restart Gnus? ")) | |
3894 (gnus-save-newsrc-file) | |
3895 (gnus-clear-system) | |
3896 (gnus))) | |
3897 | |
3898 (defun gnus-group-read-init-file () | |
3899 "Read the Gnus elisp init file." | |
3900 (interactive) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
3901 (gnus-read-init-file) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
3902 (gnus-message 5 "Read %s" gnus-init-file)) |
17493 | 3903 |
3904 (defun gnus-group-check-bogus-groups (&optional silent) | |
3905 "Check bogus newsgroups. | |
3906 If given a prefix, don't ask for confirmation before removing a bogus | |
3907 group." | |
3908 (interactive "P") | |
3909 (gnus-check-bogus-newsgroups (and (not silent) (not gnus-expert-user))) | |
3910 (gnus-group-list-groups)) | |
3911 | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
3912 (defun gnus-group-find-new-groups (&optional arg) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
3913 "Search for new groups and add them. |
41819 | 3914 Each new group will be treated with `gnus-subscribe-newsgroup-method'. |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
3915 With 1 C-u, use the `ask-server' method to query the server for new |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
3916 groups. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
3917 With 2 C-u's, use most complete method possible to query the server |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
3918 for new groups, and subscribe the new groups as zombies." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
3919 (interactive "p") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
3920 (gnus-find-new-newsgroups (or arg 1)) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19911
diff
changeset
|
3921 (gnus-group-list-groups)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
3922 |
17493 | 3923 (defun gnus-group-edit-global-kill (&optional article group) |
3924 "Edit the global kill file. | |
3925 If GROUP, edit that local kill file instead." | |
3926 (interactive "P") | |
3927 (setq gnus-current-kill-article article) | |
3928 (gnus-kill-file-edit-file group) | |
3929 (gnus-message | |
3930 6 | |
3931 (substitute-command-keys | |
3932 (format "Editing a %s kill file (Type \\[gnus-kill-file-exit] to exit)" | |
3933 (if group "local" "global"))))) | |
3934 | |
3935 (defun gnus-group-edit-local-kill (article group) | |
3936 "Edit a local kill file." | |
3937 (interactive (list nil (gnus-group-group-name))) | |
3938 (gnus-group-edit-global-kill article group)) | |
3939 | |
3940 (defun gnus-group-force-update () | |
3941 "Update `.newsrc' file." | |
3942 (interactive) | |
3943 (gnus-save-newsrc-file)) | |
3944 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3945 (defvar gnus-backlog-articles) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3946 |
17493 | 3947 (defun gnus-group-suspend () |
3948 "Suspend the current Gnus session. | |
3949 In fact, cleanup buffers except for group mode buffer. | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3950 The hook `gnus-suspend-gnus-hook' is called before actually suspending." |
17493 | 3951 (interactive) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
3952 (gnus-run-hooks 'gnus-suspend-gnus-hook) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3953 (gnus-offer-save-summaries) |
17493 | 3954 ;; Kill Gnus buffers except for group mode buffer. |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
3955 (let ((group-buf (get-buffer gnus-group-buffer))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3956 (mapcar (lambda (buf) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3957 (unless (or (member buf (list group-buf gnus-dribble-buffer)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3958 (progn |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3959 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3960 (set-buffer buf) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3961 (eq major-mode 'message-mode)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3962 (gnus-kill-buffer buf))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3963 (gnus-buffers)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3964 (setq gnus-backlog-articles nil) |
17493 | 3965 (gnus-kill-gnus-frames) |
3966 (when group-buf | |
3967 (bury-buffer group-buf) | |
3968 (delete-windows-on group-buf t)))) | |
3969 | |
3970 (defun gnus-group-clear-dribble () | |
3971 "Clear all information from the dribble buffer." | |
3972 (interactive) | |
3973 (gnus-dribble-clear) | |
3974 (gnus-message 7 "Cleared dribble buffer")) | |
3975 | |
3976 (defun gnus-group-exit () | |
3977 "Quit reading news after updating .newsrc.eld and .newsrc. | |
3978 The hook `gnus-exit-gnus-hook' is called before actually exiting." | |
3979 (interactive) | |
3980 (when | |
3981 (or noninteractive ;For gnus-batch-kill | |
3982 (not gnus-interactive-exit) ;Without confirmation | |
3983 gnus-expert-user | |
3984 (gnus-y-or-n-p "Are you sure you want to quit reading news? ")) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
3985 (gnus-run-hooks 'gnus-exit-gnus-hook) |
17493 | 3986 ;; Offer to save data from non-quitted summary buffers. |
3987 (gnus-offer-save-summaries) | |
3988 ;; Save the newsrc file(s). | |
3989 (gnus-save-newsrc-file) | |
3990 ;; Kill-em-all. | |
3991 (gnus-close-backends) | |
3992 ;; Reset everything. | |
3993 (gnus-clear-system) | |
3994 ;; Allow the user to do things after cleaning up. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
3995 (gnus-run-hooks 'gnus-after-exiting-gnus-hook))) |
17493 | 3996 |
3997 (defun gnus-group-quit () | |
3998 "Quit reading news without updating .newsrc.eld or .newsrc. | |
3999 The hook `gnus-exit-gnus-hook' is called before actually exiting." | |
4000 (interactive) | |
4001 (when (or noninteractive ;For gnus-batch-kill | |
4002 (zerop (buffer-size)) | |
4003 (not (gnus-server-opened gnus-select-method)) | |
4004 gnus-expert-user | |
4005 (not gnus-current-startup-file) | |
4006 (gnus-yes-or-no-p | |
4007 (format "Quit reading news without saving %s? " | |
4008 (file-name-nondirectory gnus-current-startup-file)))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
4009 (gnus-run-hooks 'gnus-exit-gnus-hook) |
17493 | 4010 (gnus-configure-windows 'group t) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4011 (when (and (gnus-buffer-live-p gnus-dribble-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4012 (not (zerop (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4013 (set-buffer gnus-dribble-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4014 (buffer-size))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4015 (gnus-dribble-enter |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4016 ";;; Gnus was exited on purpose without saving the .newsrc files.")) |
17493 | 4017 (gnus-dribble-save) |
4018 (gnus-close-backends) | |
4019 (gnus-clear-system) | |
4020 (gnus-kill-buffer gnus-group-buffer) | |
4021 ;; Allow the user to do things after cleaning up. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
4022 (gnus-run-hooks 'gnus-after-exiting-gnus-hook))) |
17493 | 4023 |
4024 (defun gnus-group-describe-briefly () | |
4025 "Give a one line description of the group mode commands." | |
4026 (interactive) | |
4027 (gnus-message 7 (substitute-command-keys "\\<gnus-group-mode-map>\\[gnus-group-read-group]:Select \\[gnus-group-next-unread-group]:Forward \\[gnus-group-prev-unread-group]:Backward \\[gnus-group-exit]:Exit \\[gnus-info-find-node]:Run Info \\[gnus-group-describe-briefly]:This help"))) | |
4028 | |
4029 (defun gnus-group-browse-foreign-server (method) | |
4030 "Browse a foreign news server. | |
4031 If called interactively, this function will ask for a select method | |
4032 (nntp, nnspool, etc.) and a server address (eg. nntp.some.where). | |
4033 If not, METHOD should be a list where the first element is the method | |
4034 and the second element is the address." | |
4035 (interactive | |
4036 (list (let ((how (completing-read | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4037 "Which back end: " |
17493 | 4038 (append gnus-valid-select-methods gnus-server-alist) |
4039 nil t (cons "nntp" 0) 'gnus-method-history))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4040 ;; We either got a back end name or a virtual server name. |
17493 | 4041 ;; If the first, we also need an address. |
4042 (if (assoc how gnus-valid-select-methods) | |
4043 (list (intern how) | |
4044 ;; Suggested by mapjph@bath.ac.uk. | |
4045 (completing-read | |
4046 "Address: " | |
4047 (mapcar (lambda (server) (list server)) | |
4048 gnus-secondary-servers))) | |
4049 ;; We got a server name. | |
4050 how)))) | |
4051 (gnus-browse-foreign-server method)) | |
4052 | |
4053 (defun gnus-group-set-info (info &optional method-only-group part) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4054 (when (or info part) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4055 (let* ((entry (gnus-gethash |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4056 (or method-only-group (gnus-info-group info)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4057 gnus-newsrc-hashtb)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4058 (part-info info) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4059 (info (if method-only-group (nth 2 entry) info)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4060 method) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4061 (when method-only-group |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4062 (unless entry |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4063 (error "Trying to change non-existent group %s" method-only-group)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4064 ;; We have received parts of the actual group info - either the |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4065 ;; select method or the group parameters. We first check |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4066 ;; whether we have to extend the info, and if so, do that. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4067 (let ((len (length info)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4068 (total (if (eq part 'method) 5 6))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4069 (when (< len total) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4070 (setcdr (nthcdr (1- len) info) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4071 (make-list (- total len) nil))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4072 ;; Then we enter the new info. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4073 (setcar (nthcdr (1- total) info) part-info))) |
17493 | 4074 (unless entry |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4075 ;; This is a new group, so we just create it. |
17493 | 4076 (save-excursion |
4077 (set-buffer gnus-group-buffer) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4078 (setq method (gnus-info-method info)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4079 (when (gnus-server-equal method "native") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4080 (setq method nil)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4081 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4082 (set-buffer gnus-group-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4083 (if method |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4084 ;; It's a foreign group... |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4085 (gnus-group-make-group |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4086 (gnus-group-real-name (gnus-info-group info)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4087 (if (stringp method) method |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4088 (prin1-to-string (car method))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4089 (and (consp method) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4090 (nth 1 (gnus-info-method info)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4091 ;; It's a native group. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4092 (gnus-group-make-group (gnus-info-group info)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4093 (gnus-message 6 "Note: New group created") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4094 (setq entry |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4095 (gnus-gethash (gnus-group-prefixed-name |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4096 (gnus-group-real-name (gnus-info-group info)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4097 (or (gnus-info-method info) gnus-select-method)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4098 gnus-newsrc-hashtb)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4099 ;; Whether it was a new group or not, we now have the entry, so we |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4100 ;; can do the update. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4101 (if entry |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4102 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4103 (setcar (nthcdr 2 entry) info) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4104 (when (and (not (eq (car entry) t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4105 (gnus-active (gnus-info-group info))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4106 (setcar entry (length |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4107 (gnus-list-of-unread-articles (car info)))))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4108 (error "No such group: %s" (gnus-info-group info)))))) |
17493 | 4109 |
4110 (defun gnus-group-set-method-info (group select-method) | |
4111 (gnus-group-set-info select-method group 'method)) | |
4112 | |
4113 (defun gnus-group-set-params-info (group params) | |
4114 (gnus-group-set-info params group 'params)) | |
4115 | |
4116 (defun gnus-add-marked-articles (group type articles &optional info force) | |
4117 ;; Add ARTICLES of TYPE to the info of GROUP. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4118 ;; If INFO is non-nil, use that info. If FORCE is non-nil, don't |
17493 | 4119 ;; add, but replace marked articles of TYPE with ARTICLES. |
4120 (let ((info (or info (gnus-get-info group))) | |
4121 marked m) | |
4122 (or (not info) | |
4123 (and (not (setq marked (nthcdr 3 info))) | |
4124 (or (null articles) | |
4125 (setcdr (nthcdr 2 info) | |
4126 (list (list (cons type (gnus-compress-sequence | |
4127 articles t))))))) | |
4128 (and (not (setq m (assq type (car marked)))) | |
4129 (or (null articles) | |
4130 (setcar marked | |
4131 (cons (cons type (gnus-compress-sequence articles t) ) | |
4132 (car marked))))) | |
4133 (if force | |
4134 (if (null articles) | |
4135 (setcar (nthcdr 3 info) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
4136 (gnus-delete-alist type (car marked))) |
17493 | 4137 (setcdr m (gnus-compress-sequence articles t))) |
4138 (setcdr m (gnus-compress-sequence | |
4139 (sort (nconc (gnus-uncompress-range (cdr m)) | |
4140 (copy-sequence articles)) '<) t)))))) | |
4141 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4142 (defun gnus-add-mark (group mark article) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4143 "Mark ARTICLE in GROUP with MARK, whether the group is displayed or not." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4144 (let ((buffer (gnus-summary-buffer-name group))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4145 (if (gnus-buffer-live-p buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4146 (save-excursion |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4147 (set-buffer (get-buffer buffer)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4148 (gnus-summary-add-mark article mark)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4149 (gnus-add-marked-articles group (cdr (assq mark gnus-article-mark-lists)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4150 (list article))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4151 |
17493 | 4152 ;;; |
4153 ;;; Group timestamps | |
4154 ;;; | |
4155 | |
4156 (defun gnus-group-set-timestamp () | |
4157 "Change the timestamp of the current group to the current time. | |
4158 This function can be used in hooks like `gnus-select-group-hook' | |
4159 or `gnus-group-catchup-group-hook'." | |
4160 (when gnus-newsgroup-name | |
4161 (let ((time (current-time))) | |
4162 (setcdr (cdr time) nil) | |
4163 (gnus-group-set-parameter gnus-newsgroup-name 'timestamp time)))) | |
4164 | |
4165 (defsubst gnus-group-timestamp (group) | |
4166 "Return the timestamp for GROUP." | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
4167 (gnus-group-get-parameter group 'timestamp t)) |
17493 | 4168 |
4169 (defun gnus-group-timestamp-delta (group) | |
4170 "Return the offset in seconds from the timestamp for GROUP to the current time, as a floating point number." | |
4171 (let* ((time (or (gnus-group-timestamp group) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4172 (list 0 0))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4173 (delta (subtract-time (current-time) time))) |
17493 | 4174 (+ (* (nth 0 delta) 65536.0) |
4175 (nth 1 delta)))) | |
4176 | |
4177 (defun gnus-group-timestamp-string (group) | |
4178 "Return a string of the timestamp for GROUP." | |
4179 (let ((time (gnus-group-timestamp group))) | |
4180 (if (not time) | |
4181 "" | |
4182 (gnus-time-iso8601 time)))) | |
4183 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4184 (defun gnus-group-list-cached (level &optional lowest) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4185 "List all groups with cached articles. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4186 If the prefix LEVEL is non-nil, it should be a number that says which |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4187 level to cut off listing groups. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4188 If LOWEST, don't list groups with level lower than LOWEST. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4189 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4190 This command may read the active file." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4191 (interactive "P") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4192 (when level |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4193 (setq level (prefix-numeric-value level))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4194 (when (or (not level) (>= level gnus-level-zombie)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4195 (gnus-cache-open)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4196 (funcall gnus-group-prepare-function |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4197 (or level gnus-level-subscribed) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4198 #'(lambda (info) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4199 (let ((marks (gnus-info-marks info))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4200 (assq 'cache marks))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4201 lowest |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4202 #'(lambda (group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4203 (or (gnus-gethash group |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4204 gnus-cache-active-hashtb) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4205 ;; Cache active file might use "." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4206 ;; instead of ":". |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4207 (gnus-gethash |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4208 (mapconcat 'identity |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4209 (split-string group ":") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4210 ".") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4211 gnus-cache-active-hashtb)))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4212 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4213 (gnus-group-position-point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4214 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4215 (defun gnus-group-list-dormant (level &optional lowest) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4216 "List all groups with dormant articles. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4217 If the prefix LEVEL is non-nil, it should be a number that says which |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4218 level to cut off listing groups. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4219 If LOWEST, don't list groups with level lower than LOWEST. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4220 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4221 This command may read the active file." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4222 (interactive "P") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4223 (when level |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4224 (setq level (prefix-numeric-value level))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4225 (when (or (not level) (>= level gnus-level-zombie)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4226 (gnus-cache-open)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4227 (funcall gnus-group-prepare-function |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4228 (or level gnus-level-subscribed) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4229 #'(lambda (info) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4230 (let ((marks (gnus-info-marks info))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4231 (assq 'dormant marks))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4232 lowest |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4233 'ignore) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4234 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4235 (gnus-group-position-point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24834
diff
changeset
|
4236 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4237 (defun gnus-group-listed-groups () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4238 "Return a list of listed groups." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4239 (let (point groups) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4240 (goto-char (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4241 (while (setq point (text-property-not-all (point) (point-max) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4242 'gnus-group nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4243 (goto-char point) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4244 (push (symbol-name (get-text-property point 'gnus-group)) groups) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4245 (forward-char 1)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4246 groups)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4247 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4248 (defun gnus-group-list-plus (&optional args) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4249 "List groups plus the current selection." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4250 (interactive "P") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4251 (let ((gnus-group-listed-groups (gnus-group-listed-groups)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4252 (gnus-group-list-mode gnus-group-list-mode) ;; Save it. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4253 func) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4254 (push last-command-event unread-command-events) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4255 (if (featurep 'xemacs) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4256 (push (make-event 'key-press '(key ?A)) unread-command-events) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4257 (push ?A unread-command-events)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4258 (let (gnus-pick-mode keys) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4259 (setq keys (if (featurep 'xemacs) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4260 (events-to-keys (read-key-sequence nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4261 (read-key-sequence nil))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4262 (setq func (lookup-key (current-local-map) keys))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4263 (if (or (not func) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4264 (numberp func)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4265 (ding) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4266 (call-interactively func)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4267 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4268 (defun gnus-group-list-flush (&optional args) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4269 "Flush groups from the current selection." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4270 (interactive "P") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4271 (let ((gnus-group-list-option 'flush)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4272 (gnus-group-list-plus args))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4273 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4274 (defun gnus-group-list-limit (&optional args) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4275 "List groups limited within the current selection." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4276 (interactive "P") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4277 (let ((gnus-group-list-option 'limit)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4278 (gnus-group-list-plus args))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4279 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4280 (defun gnus-group-mark-article-read (group article) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4281 "Mark ARTICLE read." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4282 (let ((buffer (gnus-summary-buffer-name group)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4283 (mark gnus-read-mark) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4284 active n) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4285 (if (get-buffer buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4286 (with-current-buffer buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4287 (setq active gnus-newsgroup-active) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4288 (gnus-activate-group group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4289 (when gnus-newsgroup-prepared |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4290 (when (and gnus-newsgroup-auto-expire |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4291 (memq mark gnus-auto-expirable-marks)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4292 (setq mark gnus-expirable-mark)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4293 (setq mark (gnus-request-update-mark |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4294 group article mark)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4295 (gnus-mark-article-as-read article mark) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4296 (setq gnus-newsgroup-active (gnus-active group)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4297 (when active |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4298 (setq n (1+ (cdr active))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4299 (while (<= n (cdr gnus-newsgroup-active)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4300 (unless (eq n article) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4301 (push n gnus-newsgroup-unselected)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4302 (setq n (1+ n))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4303 (setq gnus-newsgroup-unselected |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4304 (nreverse gnus-newsgroup-unselected))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4305 (gnus-activate-group group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4306 (gnus-group-make-articles-read group (list article)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4307 (when (gnus-group-auto-expirable-p group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4308 (gnus-add-marked-articles |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4309 group 'expire (list article)))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
4310 |
17493 | 4311 (provide 'gnus-group) |
4312 | |
52401 | 4313 ;;; arch-tag: 2eb5440f-0bca-4091-814c-e37817536af6 |
17493 | 4314 ;;; gnus-group.el ends here |