Mercurial > emacs
annotate lisp/gnus/gnus-sum.el @ 31756:095cc7f7e024
(mode-line, tool-bar): Merge entries for `x' and `w32'.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Wed, 20 Sep 2000 08:45:34 +0000 |
parents | 9968f55ad26e |
children | 51cea22fd2aa |
rev | line source |
---|---|
17493 | 1 ;;; gnus-sum.el --- summary mode commands for Gnus |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3 ;; Free Software Foundation, Inc. |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> |
17493 | 6 ;; Keywords: news |
7 | |
8 ;; This file is part of GNU Emacs. | |
9 | |
10 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
11 ;; it under the terms of the GNU General Public License as published by | |
12 ;; the Free Software Foundation; either version 2, or (at your option) | |
13 ;; any later version. | |
14 | |
15 ;; GNU Emacs is distributed in the hope that it will be useful, | |
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 ;; GNU General Public License for more details. | |
19 | |
20 ;; You should have received a copy of the GNU General Public License | |
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
23 ;; Boston, MA 02111-1307, USA. | |
24 | |
25 ;;; Commentary: | |
26 | |
27 ;;; Code: | |
28 | |
19521
6f6cf9184e93
Require cl at compile time.
Richard M. Stallman <rms@gnu.org>
parents:
17493
diff
changeset
|
29 (eval-when-compile (require 'cl)) |
6f6cf9184e93
Require cl at compile time.
Richard M. Stallman <rms@gnu.org>
parents:
17493
diff
changeset
|
30 |
17493 | 31 (require 'gnus) |
32 (require 'gnus-group) | |
33 (require 'gnus-spec) | |
34 (require 'gnus-range) | |
35 (require 'gnus-int) | |
36 (require 'gnus-undo) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
37 (require 'gnus-util) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
38 (require 'mm-decode) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
39 (autoload 'gnus-summary-limit-include-cached "gnus-cache" nil t) |
17493 | 40 |
41 (defcustom gnus-kill-summary-on-exit t | |
42 "*If non-nil, kill the summary buffer when you exit from it. | |
43 If nil, the summary will become a \"*Dead Summary*\" buffer, and | |
44 it will be killed sometime later." | |
45 :group 'gnus-summary-exit | |
46 :type 'boolean) | |
47 | |
48 (defcustom gnus-fetch-old-headers nil | |
49 "*Non-nil means that Gnus will try to build threads by grabbing old headers. | |
50 If an unread article in the group refers to an older, already read (or | |
51 just marked as read) article, the old article will not normally be | |
52 displayed in the Summary buffer. If this variable is non-nil, Gnus | |
53 will attempt to grab the headers to the old articles, and thereby | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
54 build complete threads. If it has the value `some', only enough |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
55 headers to connect otherwise loose threads will be displayed. This |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
56 variable can also be a number. In that case, no more than that number |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
57 of old headers will be fetched. If it has the value `invisible', all |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
58 old headers will be fetched, but none will be displayed. |
17493 | 59 |
60 The server has to support NOV for any of this to work." | |
61 :group 'gnus-thread | |
62 :type '(choice (const :tag "off" nil) | |
63 (const some) | |
64 number | |
65 (sexp :menu-tag "other" t))) | |
66 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
67 (defcustom gnus-refer-thread-limit 200 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
68 "*The number of old headers to fetch when doing \\<gnus-summary-mode-map>\\[gnus-summary-refer-thread]. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
69 If t, fetch all the available old headers." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
70 :group 'gnus-thread |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
71 :type '(choice number |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
72 (sexp :menu-tag "other" t))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
73 |
17493 | 74 (defcustom gnus-summary-make-false-root 'adopt |
75 "*nil means that Gnus won't gather loose threads. | |
76 If the root of a thread has expired or been read in a previous | |
77 session, the information necessary to build a complete thread has been | |
78 lost. Instead of having many small sub-threads from this original thread | |
79 scattered all over the summary buffer, Gnus can gather them. | |
80 | |
81 If non-nil, Gnus will try to gather all loose sub-threads from an | |
82 original thread into one large thread. | |
83 | |
84 If this variable is non-nil, it should be one of `none', `adopt', | |
85 `dummy' or `empty'. | |
86 | |
87 If this variable is `none', Gnus will not make a false root, but just | |
88 present the sub-threads after another. | |
89 If this variable is `dummy', Gnus will create a dummy root that will | |
90 have all the sub-threads as children. | |
91 If this variable is `adopt', Gnus will make one of the \"children\" | |
92 the parent and mark all the step-children as such. | |
93 If this variable is `empty', the \"children\" are printed with empty | |
94 subject fields. (Or rather, they will be printed with a string | |
95 given by the `gnus-summary-same-subject' variable.)" | |
96 :group 'gnus-thread | |
97 :type '(choice (const :tag "off" nil) | |
98 (const none) | |
99 (const dummy) | |
100 (const adopt) | |
101 (const empty))) | |
102 | |
103 (defcustom gnus-summary-gather-exclude-subject "^ *$\\|^(none)$" | |
104 "*A regexp to match subjects to be excluded from loose thread gathering. | |
105 As loose thread gathering is done on subjects only, that means that | |
106 there can be many false gatherings performed. By rooting out certain | |
107 common subjects, gathering might become saner." | |
108 :group 'gnus-thread | |
109 :type 'regexp) | |
110 | |
111 (defcustom gnus-summary-gather-subject-limit nil | |
112 "*Maximum length of subject comparisons when gathering loose threads. | |
113 Use nil to compare full subjects. Setting this variable to a low | |
114 number will help gather threads that have been corrupted by | |
115 newsreaders chopping off subject lines, but it might also mean that | |
116 unrelated articles that have subject that happen to begin with the | |
117 same few characters will be incorrectly gathered. | |
118 | |
119 If this variable is `fuzzy', Gnus will use a fuzzy algorithm when | |
120 comparing subjects." | |
121 :group 'gnus-thread | |
122 :type '(choice (const :tag "off" nil) | |
123 (const fuzzy) | |
124 (sexp :menu-tag "on" t))) | |
125 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
126 (defcustom gnus-simplify-subject-functions nil |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
127 "List of functions taking a string argument that simplify subjects. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
128 The functions are applied recursively. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
129 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
130 Useful functions to put in this list include: `gnus-simplify-subject-re', |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
131 `gnus-simplify-subject-fuzzy' and `gnus-simplify-whitespace'." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
132 :group 'gnus-thread |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
133 :type '(repeat function)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
134 |
17493 | 135 (defcustom gnus-simplify-ignored-prefixes nil |
136 "*Regexp, matches for which are removed from subject lines when simplifying fuzzily." | |
137 :group 'gnus-thread | |
138 :type '(choice (const :tag "off" nil) | |
139 regexp)) | |
140 | |
141 (defcustom gnus-build-sparse-threads nil | |
142 "*If non-nil, fill in the gaps in threads. | |
143 If `some', only fill in the gaps that are needed to tie loose threads | |
144 together. If `more', fill in all leaf nodes that Gnus can find. If | |
145 non-nil and non-`some', fill in all gaps that Gnus manages to guess." | |
146 :group 'gnus-thread | |
147 :type '(choice (const :tag "off" nil) | |
148 (const some) | |
149 (const more) | |
150 (sexp :menu-tag "all" t))) | |
151 | |
152 (defcustom gnus-summary-thread-gathering-function | |
153 'gnus-gather-threads-by-subject | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
154 "*Function used for gathering loose threads. |
17493 | 155 There are two pre-defined functions: `gnus-gather-threads-by-subject', |
156 which only takes Subjects into consideration; and | |
157 `gnus-gather-threads-by-references', which compared the References | |
158 headers of the articles to find matches." | |
159 :group 'gnus-thread | |
19912
4355457d9749
(gnus-summary-thread-gathering-function): Fix customize type.
Richard M. Stallman <rms@gnu.org>
parents:
19594
diff
changeset
|
160 :type '(radio (function-item gnus-gather-threads-by-subject) |
4355457d9749
(gnus-summary-thread-gathering-function): Fix customize type.
Richard M. Stallman <rms@gnu.org>
parents:
19594
diff
changeset
|
161 (function-item gnus-gather-threads-by-references) |
4355457d9749
(gnus-summary-thread-gathering-function): Fix customize type.
Richard M. Stallman <rms@gnu.org>
parents:
19594
diff
changeset
|
162 (function :tag "other"))) |
17493 | 163 |
164 (defcustom gnus-summary-same-subject "" | |
165 "*String indicating that the current article has the same subject as the previous. | |
166 This variable will only be used if the value of | |
167 `gnus-summary-make-false-root' is `empty'." | |
168 :group 'gnus-summary-format | |
169 :type 'string) | |
170 | |
171 (defcustom gnus-summary-goto-unread t | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
172 "*If t, many commands will go to the next unread article. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
173 This applies to marking commands as well as other commands that |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
174 \"naturally\" select the next article, like, for instance, `SPC' at |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
175 the end of an article. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
176 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
177 If nil, the marking commands do NOT go to the next unread article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
178 (they go to the next article instead). If `never', commands that |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
179 usually go to the next unread article, will go to the next article, |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
180 whether it is read or not." |
17493 | 181 :group 'gnus-summary-marks |
182 :link '(custom-manual "(gnus)Setting Marks") | |
183 :type '(choice (const :tag "off" nil) | |
184 (const never) | |
185 (sexp :menu-tag "on" t))) | |
186 | |
187 (defcustom gnus-summary-default-score 0 | |
188 "*Default article score level. | |
189 All scores generated by the score files will be added to this score. | |
190 If this variable is nil, scoring will be disabled." | |
191 :group 'gnus-score-default | |
192 :type '(choice (const :tag "disable") | |
193 integer)) | |
194 | |
195 (defcustom gnus-summary-zcore-fuzz 0 | |
196 "*Fuzziness factor for the zcore in the summary buffer. | |
197 Articles with scores closer than this to `gnus-summary-default-score' | |
198 will not be marked." | |
199 :group 'gnus-summary-format | |
200 :type 'integer) | |
201 | |
202 (defcustom gnus-simplify-subject-fuzzy-regexp nil | |
203 "*Strings to be removed when doing fuzzy matches. | |
204 This can either be a regular expression or list of regular expressions | |
205 that will be removed from subject strings if fuzzy subject | |
206 simplification is selected." | |
207 :group 'gnus-thread | |
208 :type '(repeat regexp)) | |
209 | |
210 (defcustom gnus-show-threads t | |
211 "*If non-nil, display threads in summary mode." | |
212 :group 'gnus-thread | |
213 :type 'boolean) | |
214 | |
215 (defcustom gnus-thread-hide-subtree nil | |
216 "*If non-nil, hide all threads initially. | |
217 If threads are hidden, you have to run the command | |
218 `gnus-summary-show-thread' by hand or use `gnus-select-article-hook' | |
219 to expose hidden threads." | |
220 :group 'gnus-thread | |
221 :type 'boolean) | |
222 | |
223 (defcustom gnus-thread-hide-killed t | |
224 "*If non-nil, hide killed threads automatically." | |
225 :group 'gnus-thread | |
226 :type 'boolean) | |
227 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
228 (defcustom gnus-thread-ignore-subject t |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
229 "*If non-nil, which is the default, ignore subjects and do all threading based on the Reference header. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
230 If nil, articles that have different subjects from their parents will |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
231 start separate threads." |
17493 | 232 :group 'gnus-thread |
233 :type 'boolean) | |
234 | |
235 (defcustom gnus-thread-operation-ignore-subject t | |
236 "*If non-nil, subjects will be ignored when doing thread commands. | |
237 This affects commands like `gnus-summary-kill-thread' and | |
238 `gnus-summary-lower-thread'. | |
239 | |
240 If this variable is nil, articles in the same thread with different | |
241 subjects will not be included in the operation in question. If this | |
242 variable is `fuzzy', only articles that have subjects that are fuzzily | |
243 equal will be included." | |
244 :group 'gnus-thread | |
245 :type '(choice (const :tag "off" nil) | |
246 (const fuzzy) | |
247 (sexp :tag "on" t))) | |
248 | |
249 (defcustom gnus-thread-indent-level 4 | |
250 "*Number that says how much each sub-thread should be indented." | |
251 :group 'gnus-thread | |
252 :type 'integer) | |
253 | |
254 (defcustom gnus-auto-extend-newsgroup t | |
255 "*If non-nil, extend newsgroup forward and backward when requested." | |
256 :group 'gnus-summary-choose | |
257 :type 'boolean) | |
258 | |
259 (defcustom gnus-auto-select-first t | |
260 "*If nil, don't select the first unread article when entering a group. | |
261 If this variable is `best', select the highest-scored unread article | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
262 in the group. If t, select the first unread article. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
263 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
264 This variable can also be a function to place point on a likely |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
265 subject line. Useful values include `gnus-summary-first-unread-subject', |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
266 `gnus-summary-first-unread-article' and |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
267 `gnus-summary-best-unread-article'. |
17493 | 268 |
269 If you want to prevent automatic selection of the first unread article | |
270 in some newsgroups, set the variable to nil in | |
271 `gnus-select-group-hook'." | |
272 :group 'gnus-group-select | |
273 :type '(choice (const :tag "none" nil) | |
274 (const best) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
275 (sexp :menu-tag "first" t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
276 (function-item gnus-summary-first-unread-subject) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
277 (function-item gnus-summary-first-unread-article) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
278 (function-item gnus-summary-best-unread-article))) |
17493 | 279 |
280 (defcustom gnus-auto-select-next t | |
281 "*If non-nil, offer to go to the next group from the end of the previous. | |
282 If the value is t and the next newsgroup is empty, Gnus will exit | |
283 summary mode and go back to group mode. If the value is neither nil | |
284 nor t, Gnus will select the following unread newsgroup. In | |
285 particular, if the value is the symbol `quietly', the next unread | |
286 newsgroup will be selected without any confirmation, and if it is | |
287 `almost-quietly', the next group will be selected without any | |
288 confirmation if you are located on the last article in the group. | |
289 Finally, if this variable is `slightly-quietly', the `Z n' command | |
290 will go to the next group without confirmation." | |
291 :group 'gnus-summary-maneuvering | |
292 :type '(choice (const :tag "off" nil) | |
293 (const quietly) | |
294 (const almost-quietly) | |
295 (const slightly-quietly) | |
296 (sexp :menu-tag "on" t))) | |
297 | |
298 (defcustom gnus-auto-select-same nil | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
299 "*If non-nil, select the next article with the same subject. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
300 If there are no more articles with the same subject, go to |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
301 the first unread article." |
17493 | 302 :group 'gnus-summary-maneuvering |
303 :type 'boolean) | |
304 | |
305 (defcustom gnus-summary-check-current nil | |
306 "*If non-nil, consider the current article when moving. | |
307 The \"unread\" movement commands will stay on the same line if the | |
308 current article is unread." | |
309 :group 'gnus-summary-maneuvering | |
310 :type 'boolean) | |
311 | |
312 (defcustom gnus-auto-center-summary t | |
313 "*If non-nil, always center the current summary buffer. | |
314 In particular, if `vertical' do only vertical recentering. If non-nil | |
315 and non-`vertical', do both horizontal and vertical recentering." | |
316 :group 'gnus-summary-maneuvering | |
317 :type '(choice (const :tag "none" nil) | |
318 (const vertical) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
319 (integer :tag "height") |
17493 | 320 (sexp :menu-tag "both" t))) |
321 | |
322 (defcustom gnus-show-all-headers nil | |
323 "*If non-nil, don't hide any headers." | |
324 :group 'gnus-article-hiding | |
325 :group 'gnus-article-headers | |
326 :type 'boolean) | |
327 | |
328 (defcustom gnus-summary-ignore-duplicates nil | |
329 "*If non-nil, ignore articles with identical Message-ID headers." | |
330 :group 'gnus-summary | |
331 :type 'boolean) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
332 |
17493 | 333 (defcustom gnus-single-article-buffer t |
334 "*If non-nil, display all articles in the same buffer. | |
335 If nil, each group will get its own article buffer." | |
336 :group 'gnus-article-various | |
337 :type 'boolean) | |
338 | |
339 (defcustom gnus-break-pages t | |
340 "*If non-nil, do page breaking on articles. | |
341 The page delimiter is specified by the `gnus-page-delimiter' | |
342 variable." | |
343 :group 'gnus-article-various | |
344 :type 'boolean) | |
345 | |
346 (defcustom gnus-move-split-methods nil | |
347 "*Variable used to suggest where articles are to be moved to. | |
348 It uses the same syntax as the `gnus-split-methods' variable." | |
349 :group 'gnus-summary-mail | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
350 :type '(repeat (choice (list :value (fun) function) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
351 (cons :value ("" "") regexp (repeat string)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
352 (sexp :value nil)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
353 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
354 (defcustom gnus-unread-mark ? ;Whitespace |
17493 | 355 "*Mark used for unread articles." |
356 :group 'gnus-summary-marks | |
357 :type 'character) | |
358 | |
359 (defcustom gnus-ticked-mark ?! | |
360 "*Mark used for ticked articles." | |
361 :group 'gnus-summary-marks | |
362 :type 'character) | |
363 | |
364 (defcustom gnus-dormant-mark ?? | |
365 "*Mark used for dormant articles." | |
366 :group 'gnus-summary-marks | |
367 :type 'character) | |
368 | |
369 (defcustom gnus-del-mark ?r | |
370 "*Mark used for del'd articles." | |
371 :group 'gnus-summary-marks | |
372 :type 'character) | |
373 | |
374 (defcustom gnus-read-mark ?R | |
375 "*Mark used for read articles." | |
376 :group 'gnus-summary-marks | |
377 :type 'character) | |
378 | |
379 (defcustom gnus-expirable-mark ?E | |
380 "*Mark used for expirable articles." | |
381 :group 'gnus-summary-marks | |
382 :type 'character) | |
383 | |
384 (defcustom gnus-killed-mark ?K | |
385 "*Mark used for killed articles." | |
386 :group 'gnus-summary-marks | |
387 :type 'character) | |
388 | |
389 (defcustom gnus-souped-mark ?F | |
390 "*Mark used for killed articles." | |
391 :group 'gnus-summary-marks | |
392 :type 'character) | |
393 | |
394 (defcustom gnus-kill-file-mark ?X | |
395 "*Mark used for articles killed by kill files." | |
396 :group 'gnus-summary-marks | |
397 :type 'character) | |
398 | |
399 (defcustom gnus-low-score-mark ?Y | |
400 "*Mark used for articles with a low score." | |
401 :group 'gnus-summary-marks | |
402 :type 'character) | |
403 | |
404 (defcustom gnus-catchup-mark ?C | |
405 "*Mark used for articles that are caught up." | |
406 :group 'gnus-summary-marks | |
407 :type 'character) | |
408 | |
409 (defcustom gnus-replied-mark ?A | |
410 "*Mark used for articles that have been replied to." | |
411 :group 'gnus-summary-marks | |
412 :type 'character) | |
413 | |
414 (defcustom gnus-cached-mark ?* | |
415 "*Mark used for articles that are in the cache." | |
416 :group 'gnus-summary-marks | |
417 :type 'character) | |
418 | |
419 (defcustom gnus-saved-mark ?S | |
420 "*Mark used for articles that have been saved to." | |
421 :group 'gnus-summary-marks | |
422 :type 'character) | |
423 | |
424 (defcustom gnus-ancient-mark ?O | |
425 "*Mark used for ancient articles." | |
426 :group 'gnus-summary-marks | |
427 :type 'character) | |
428 | |
429 (defcustom gnus-sparse-mark ?Q | |
430 "*Mark used for sparsely reffed articles." | |
431 :group 'gnus-summary-marks | |
432 :type 'character) | |
433 | |
434 (defcustom gnus-canceled-mark ?G | |
435 "*Mark used for canceled articles." | |
436 :group 'gnus-summary-marks | |
437 :type 'character) | |
438 | |
439 (defcustom gnus-duplicate-mark ?M | |
440 "*Mark used for duplicate articles." | |
441 :group 'gnus-summary-marks | |
442 :type 'character) | |
443 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
444 (defcustom gnus-undownloaded-mark ?@ |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
445 "*Mark used for articles that weren't downloaded." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
446 :group 'gnus-summary-marks |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
447 :type 'character) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
448 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
449 (defcustom gnus-downloadable-mark ?% |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
450 "*Mark used for articles that are to be downloaded." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
451 :group 'gnus-summary-marks |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
452 :type 'character) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
453 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
454 (defcustom gnus-unsendable-mark ?= |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
455 "*Mark used for articles that won't be sent." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
456 :group 'gnus-summary-marks |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
457 :type 'character) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
458 |
17493 | 459 (defcustom gnus-score-over-mark ?+ |
460 "*Score mark used for articles with high scores." | |
461 :group 'gnus-summary-marks | |
462 :type 'character) | |
463 | |
464 (defcustom gnus-score-below-mark ?- | |
465 "*Score mark used for articles with low scores." | |
466 :group 'gnus-summary-marks | |
467 :type 'character) | |
468 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
469 (defcustom gnus-empty-thread-mark ? ;Whitespace |
17493 | 470 "*There is no thread under the article." |
471 :group 'gnus-summary-marks | |
472 :type 'character) | |
473 | |
474 (defcustom gnus-not-empty-thread-mark ?= | |
475 "*There is a thread under the article." | |
476 :group 'gnus-summary-marks | |
477 :type 'character) | |
478 | |
479 (defcustom gnus-view-pseudo-asynchronously nil | |
480 "*If non-nil, Gnus will view pseudo-articles asynchronously." | |
481 :group 'gnus-extract-view | |
482 :type 'boolean) | |
483 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
484 (defcustom gnus-auto-expirable-marks |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
485 (list gnus-killed-mark gnus-del-mark gnus-catchup-mark |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
486 gnus-low-score-mark gnus-ancient-mark gnus-read-mark |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
487 gnus-souped-mark gnus-duplicate-mark) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
488 "*The list of marks converted into expiration if a group is auto-expirable." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
489 :group 'gnus-summary |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
490 :type '(repeat character)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
491 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
492 (defcustom gnus-inhibit-user-auto-expire t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
493 "*If non-nil, user marking commands will not mark an article as expirable, even if the group has auto-expire turned on." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
494 :group 'gnus-summary |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
495 :type 'boolean) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
496 |
17493 | 497 (defcustom gnus-view-pseudos nil |
498 "*If `automatic', pseudo-articles will be viewed automatically. | |
499 If `not-confirm', pseudos will be viewed automatically, and the user | |
500 will not be asked to confirm the command." | |
501 :group 'gnus-extract-view | |
502 :type '(choice (const :tag "off" nil) | |
503 (const automatic) | |
504 (const not-confirm))) | |
505 | |
506 (defcustom gnus-view-pseudos-separately t | |
507 "*If non-nil, one pseudo-article will be created for each file to be viewed. | |
508 If nil, all files that use the same viewing command will be given as a | |
509 list of parameters to that command." | |
510 :group 'gnus-extract-view | |
511 :type 'boolean) | |
512 | |
513 (defcustom gnus-insert-pseudo-articles t | |
514 "*If non-nil, insert pseudo-articles when decoding articles." | |
515 :group 'gnus-extract-view | |
516 :type 'boolean) | |
517 | |
518 (defcustom gnus-summary-dummy-line-format | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
519 " %(: :%) %S\n" |
17493 | 520 "*The format specification for the dummy roots in the summary buffer. |
521 It works along the same lines as a normal formatting string, | |
522 with some simple extensions. | |
523 | |
524 %S The subject" | |
525 :group 'gnus-threading | |
526 :type 'string) | |
527 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
528 (defcustom gnus-summary-mode-line-format "Gnus: %g [%A] %Z" |
17493 | 529 "*The format specification for the summary mode line. |
530 It works along the same lines as a normal formatting string, | |
531 with some simple extensions: | |
532 | |
533 %G Group name | |
534 %p Unprefixed group name | |
535 %A Current article number | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
536 %z Current article score |
17493 | 537 %V Gnus version |
538 %U Number of unread articles in the group | |
539 %e Number of unselected articles in the group | |
540 %Z A string with unread/unselected article counts | |
541 %g Shortish group name | |
542 %S Subject of the current article | |
543 %u User-defined spec | |
544 %s Current score file name | |
545 %d Number of dormant articles | |
546 %r Number of articles that have been marked as read in this session | |
547 %E Number of articles expunged by the score files" | |
548 :group 'gnus-summary-format | |
549 :type 'string) | |
550 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
551 (defcustom gnus-list-identifiers nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
552 "Regexp that matches list identifiers to be removed from subject. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
553 This can also be a list of regexps." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
554 :group 'gnus-summary-format |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
555 :group 'gnus-article-hiding |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
556 :type '(choice (const :tag "none" nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
557 (regexp :value ".*") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
558 (repeat :value (".*") regexp))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
559 |
17493 | 560 (defcustom gnus-summary-mark-below 0 |
561 "*Mark all articles with a score below this variable as read. | |
562 This variable is local to each summary buffer and usually set by the | |
563 score file." | |
564 :group 'gnus-score-default | |
565 :type 'integer) | |
566 | |
567 (defcustom gnus-article-sort-functions '(gnus-article-sort-by-number) | |
568 "*List of functions used for sorting articles in the summary buffer. | |
569 This variable is only used when not using a threaded display." | |
570 :group 'gnus-summary-sort | |
571 :type '(repeat (choice (function-item gnus-article-sort-by-number) | |
572 (function-item gnus-article-sort-by-author) | |
573 (function-item gnus-article-sort-by-subject) | |
574 (function-item gnus-article-sort-by-date) | |
575 (function-item gnus-article-sort-by-score) | |
576 (function :tag "other")))) | |
577 | |
578 (defcustom gnus-thread-sort-functions '(gnus-thread-sort-by-number) | |
579 "*List of functions used for sorting threads in the summary buffer. | |
580 By default, threads are sorted by article number. | |
581 | |
582 Each function takes two threads and return non-nil if the first thread | |
583 should be sorted before the other. If you use more than one function, | |
584 the primary sort function should be the last. You should probably | |
585 always include `gnus-thread-sort-by-number' in the list of sorting | |
586 functions -- preferably first. | |
587 | |
588 Ready-made functions include `gnus-thread-sort-by-number', | |
589 `gnus-thread-sort-by-author', `gnus-thread-sort-by-subject', | |
590 `gnus-thread-sort-by-date', `gnus-thread-sort-by-score' and | |
591 `gnus-thread-sort-by-total-score' (see `gnus-thread-score-function')." | |
592 :group 'gnus-summary-sort | |
593 :type '(repeat (choice (function-item gnus-thread-sort-by-number) | |
594 (function-item gnus-thread-sort-by-author) | |
595 (function-item gnus-thread-sort-by-subject) | |
596 (function-item gnus-thread-sort-by-date) | |
597 (function-item gnus-thread-sort-by-score) | |
598 (function-item gnus-thread-sort-by-total-score) | |
599 (function :tag "other")))) | |
600 | |
601 (defcustom gnus-thread-score-function '+ | |
602 "*Function used for calculating the total score of a thread. | |
603 | |
604 The function is called with the scores of the article and each | |
605 subthread and should then return the score of the thread. | |
606 | |
607 Some functions you can use are `+', `max', or `min'." | |
608 :group 'gnus-summary-sort | |
609 :type 'function) | |
610 | |
611 (defcustom gnus-summary-expunge-below nil | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
612 "All articles that have a score less than this variable will be expunged. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
613 This variable is local to the summary buffers." |
17493 | 614 :group 'gnus-score-default |
615 :type '(choice (const :tag "off" nil) | |
616 integer)) | |
617 | |
618 (defcustom gnus-thread-expunge-below nil | |
619 "All threads that have a total score less than this variable will be expunged. | |
620 See `gnus-thread-score-function' for en explanation of what a | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
621 \"thread score\" is. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
622 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
623 This variable is local to the summary buffers." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
624 :group 'gnus-threading |
17493 | 625 :group 'gnus-score-default |
626 :type '(choice (const :tag "off" nil) | |
627 integer)) | |
628 | |
629 (defcustom gnus-summary-mode-hook nil | |
630 "*A hook for Gnus summary mode. | |
631 This hook is run before any variables are set in the summary buffer." | |
632 :group 'gnus-summary-various | |
633 :type 'hook) | |
634 | |
635 (defcustom gnus-summary-menu-hook nil | |
636 "*Hook run after the creation of the summary mode menu." | |
637 :group 'gnus-summary-visual | |
638 :type 'hook) | |
639 | |
640 (defcustom gnus-summary-exit-hook nil | |
641 "*A hook called on exit from the summary buffer. | |
642 It will be called with point in the group buffer." | |
643 :group 'gnus-summary-exit | |
644 :type 'hook) | |
645 | |
646 (defcustom gnus-summary-prepare-hook nil | |
647 "*A hook called after the summary buffer has been generated. | |
648 If you want to modify the summary buffer, you can use this hook." | |
649 :group 'gnus-summary-various | |
650 :type 'hook) | |
651 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
652 (defcustom gnus-summary-prepared-hook nil |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
653 "*A hook called as the last thing after the summary buffer has been generated." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
654 :group 'gnus-summary-various |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
655 :type 'hook) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
656 |
17493 | 657 (defcustom gnus-summary-generate-hook nil |
658 "*A hook run just before generating the summary buffer. | |
659 This hook is commonly used to customize threading variables and the | |
660 like." | |
661 :group 'gnus-summary-various | |
662 :type 'hook) | |
663 | |
664 (defcustom gnus-select-group-hook nil | |
665 "*A hook called when a newsgroup is selected. | |
666 | |
667 If you'd like to simplify subjects like the | |
668 `gnus-summary-next-same-subject' command does, you can use the | |
669 following hook: | |
670 | |
671 (setq gnus-select-group-hook | |
672 (list | |
673 (lambda () | |
674 (mapcar (lambda (header) | |
675 (mail-header-set-subject | |
676 header | |
677 (gnus-simplify-subject | |
678 (mail-header-subject header) 're-only))) | |
679 gnus-newsgroup-headers))))" | |
680 :group 'gnus-group-select | |
681 :type 'hook) | |
682 | |
683 (defcustom gnus-select-article-hook nil | |
684 "*A hook called when an article is selected." | |
685 :group 'gnus-summary-choose | |
686 :type 'hook) | |
687 | |
688 (defcustom gnus-visual-mark-article-hook | |
689 (list 'gnus-highlight-selected-summary) | |
690 "*Hook run after selecting an article in the summary buffer. | |
691 It is meant to be used for highlighting the article in some way. It | |
692 is not run if `gnus-visual' is nil." | |
693 :group 'gnus-summary-visual | |
694 :type 'hook) | |
695 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
696 (defcustom gnus-parse-headers-hook nil |
17493 | 697 "*A hook called before parsing the headers." |
698 :group 'gnus-various | |
699 :type 'hook) | |
700 | |
701 (defcustom gnus-exit-group-hook nil | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
702 "*A hook called when exiting summary mode. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
703 This hook is not called from the non-updating exit commands like `Q'." |
17493 | 704 :group 'gnus-various |
705 :type 'hook) | |
706 | |
707 (defcustom gnus-summary-update-hook | |
708 (list 'gnus-summary-highlight-line) | |
709 "*A hook called when a summary line is changed. | |
710 The hook will not be called if `gnus-visual' is nil. | |
711 | |
712 The default function `gnus-summary-highlight-line' will | |
713 highlight the line according to the `gnus-summary-highlight' | |
714 variable." | |
715 :group 'gnus-summary-visual | |
716 :type 'hook) | |
717 | |
718 (defcustom gnus-mark-article-hook '(gnus-summary-mark-read-and-unread-as-read) | |
719 "*A hook called when an article is selected for the first time. | |
720 The hook is intended to mark an article as read (or unread) | |
721 automatically when it is selected." | |
722 :group 'gnus-summary-choose | |
723 :type 'hook) | |
724 | |
725 (defcustom gnus-group-no-more-groups-hook nil | |
726 "*A hook run when returning to group mode having no more (unread) groups." | |
727 :group 'gnus-group-select | |
728 :type 'hook) | |
729 | |
730 (defcustom gnus-ps-print-hook nil | |
731 "*A hook run before ps-printing something from Gnus." | |
732 :group 'gnus-summary | |
733 :type 'hook) | |
734 | |
735 (defcustom gnus-summary-selected-face 'gnus-summary-selected-face | |
736 "Face used for highlighting the current article in the summary buffer." | |
737 :group 'gnus-summary-visual | |
738 :type 'face) | |
739 | |
740 (defcustom gnus-summary-highlight | |
741 '(((= mark gnus-canceled-mark) | |
742 . gnus-summary-cancelled-face) | |
743 ((and (> score default) | |
744 (or (= mark gnus-dormant-mark) | |
745 (= mark gnus-ticked-mark))) | |
746 . gnus-summary-high-ticked-face) | |
747 ((and (< score default) | |
748 (or (= mark gnus-dormant-mark) | |
749 (= mark gnus-ticked-mark))) | |
750 . gnus-summary-low-ticked-face) | |
751 ((or (= mark gnus-dormant-mark) | |
752 (= mark gnus-ticked-mark)) | |
753 . gnus-summary-normal-ticked-face) | |
754 ((and (> score default) (= mark gnus-ancient-mark)) | |
755 . gnus-summary-high-ancient-face) | |
756 ((and (< score default) (= mark gnus-ancient-mark)) | |
757 . gnus-summary-low-ancient-face) | |
758 ((= mark gnus-ancient-mark) | |
759 . gnus-summary-normal-ancient-face) | |
760 ((and (> score default) (= mark gnus-unread-mark)) | |
761 . gnus-summary-high-unread-face) | |
762 ((and (< score default) (= mark gnus-unread-mark)) | |
763 . gnus-summary-low-unread-face) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
764 ((= mark gnus-unread-mark) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
765 . gnus-summary-normal-unread-face) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
766 ((and (> score default) (memq mark (list gnus-downloadable-mark |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
767 gnus-undownloaded-mark))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
768 . gnus-summary-high-unread-face) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
769 ((and (< score default) (memq mark (list gnus-downloadable-mark |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
770 gnus-undownloaded-mark))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
771 . gnus-summary-low-unread-face) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
772 ((memq mark (list gnus-downloadable-mark gnus-undownloaded-mark)) |
17493 | 773 . gnus-summary-normal-unread-face) |
774 ((> score default) | |
775 . gnus-summary-high-read-face) | |
776 ((< score default) | |
777 . gnus-summary-low-read-face) | |
778 (t | |
779 . gnus-summary-normal-read-face)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
780 "*Controls the highlighting of summary buffer lines. |
17493 | 781 |
782 A list of (FORM . FACE) pairs. When deciding how a a particular | |
783 summary line should be displayed, each form is evaluated. The content | |
784 of the face field after the first true form is used. You can change | |
785 how those summary lines are displayed, by editing the face field. | |
786 | |
787 You can use the following variables in the FORM field. | |
788 | |
789 score: The articles score | |
790 default: The default article score. | |
791 below: The score below which articles are automatically marked as read. | |
792 mark: The articles mark." | |
793 :group 'gnus-summary-visual | |
794 :type '(repeat (cons (sexp :tag "Form" nil) | |
795 face))) | |
796 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
797 (defcustom gnus-alter-header-function nil |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
798 "Function called to allow alteration of article header structures. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
799 The function is called with one parameter, the article header vector, |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
800 which it may alter in any way.") |
17493 | 801 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
802 (defvar gnus-decode-encoded-word-function 'mail-decode-encoded-word-string |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
803 "Variable that says which function should be used to decode a string with encoded words.") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
804 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
805 (defcustom gnus-extra-headers nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
806 "*Extra headers to parse." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
807 :group 'gnus-summary |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
808 :type '(repeat symbol)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
809 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
810 (defcustom gnus-ignored-from-addresses |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
811 (and user-mail-address (regexp-quote user-mail-address)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
812 "*Regexp of From headers that may be suppressed in favor of To headers." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
813 :group 'gnus-summary |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
814 :type 'regexp) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
815 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
816 (defcustom gnus-group-charset-alist |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
817 '(("^hk\\>\\|^tw\\>\\|\\<big5\\>" cn-big5) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
818 ("^cn\\>\\|\\<chinese\\>" cn-gb-2312) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
819 ("^fj\\>\\|^japan\\>" iso-2022-jp-2) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
820 ("^tnn\\>\\|^pin\\>\\|^sci.lang.japan" iso-2022-7bit) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
821 ("^relcom\\>" koi8-r) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
822 ("^fido7\\>" koi8-r) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
823 ("^\\(cz\\|hun\\|pl\\|sk\\|hr\\)\\>" iso-8859-2) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
824 ("^israel\\>" iso-8859-1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
825 ("^han\\>" euc-kr) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
826 ("^alt.chinese.text.big5\\>" chinese-big5) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
827 ("^soc.culture.vietnamese\\>" vietnamese-viqr) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
828 ("^\\(comp\\|rec\\|alt\\|sci\\|soc\\|news\\|gnu\\|bofh\\)\\>" iso-8859-1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
829 (".*" iso-8859-1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
830 "Alist of regexps (to match group names) and default charsets to be used when reading." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
831 :type '(repeat (list (regexp :tag "Group") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
832 (symbol :tag "Charset"))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
833 :group 'gnus-charset) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
834 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
835 (defcustom gnus-newsgroup-ignored-charsets '(unknown-8bit x-unknown) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
836 "List of charsets that should be ignored. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
837 When these charsets are used in the \"charset\" parameter, the |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
838 default charset will be used instead." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
839 :type '(repeat symbol) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
840 :group 'gnus-charset) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
841 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
842 (defcustom gnus-group-ignored-charsets-alist |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
843 '(("alt\\.chinese\\.text" iso-8859-1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
844 "Alist of regexps (to match group names) and charsets that should be ignored. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
845 When these charsets are used in the \"charset\" parameter, the |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
846 default charset will be used instead." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
847 :type '(repeat (cons (regexp :tag "Group") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
848 (repeat symbol))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
849 :group 'gnus-charset) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
850 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
851 (defcustom gnus-group-highlight-words-alist nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
852 "Alist of group regexps and highlight regexps. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
853 This variable uses the same syntax as `gnus-emphasis-alist'." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
854 :type '(repeat (cons (regexp :tag "Group") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
855 (repeat (list (regexp :tag "Highlight regexp") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
856 (number :tag "Group for entire word" 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
857 (number :tag "Group for displayed part" 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
858 (symbol :tag "Face" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
859 gnus-emphasis-highlight-words))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
860 :group 'gnus-summary-visual) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
861 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
862 (defcustom gnus-summary-show-article-charset-alist |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
863 nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
864 "Alist of number and charset. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
865 The article will be shown with the charset corresponding to the |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
866 numbered argument. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
867 For example: ((1 . cn-gb-2312) (2 . big5))." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
868 :type '(repeat (cons (number :tag "Argument" 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
869 (symbol :tag "Charset"))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
870 :group 'gnus-charset) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
871 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
872 (defcustom gnus-preserve-marks t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
873 "Whether marks are preserved when moving, copying and respooling messages." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
874 :type 'boolean |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
875 :group 'gnus-summary-marks) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
876 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
877 (defcustom gnus-alter-articles-to-read-function nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
878 "Function to be called to alter the list of articles to be selected." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
879 :type 'function |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
880 :group 'gnus-summary) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
881 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
882 (defcustom gnus-orphan-score nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
883 "*All orphans get this score added. Set in the score file." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
884 :group 'gnus-score-default |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
885 :type '(choice (const nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
886 integer)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
887 |
17493 | 888 ;;; Internal variables |
889 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
890 (defvar gnus-article-mime-handles nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
891 (defvar gnus-article-decoded-p nil) |
17493 | 892 (defvar gnus-scores-exclude-files nil) |
893 (defvar gnus-page-broken nil) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
894 (defvar gnus-inhibit-mime-unbuttonizing nil) |
17493 | 895 |
896 (defvar gnus-original-article nil) | |
897 (defvar gnus-article-internal-prepare-hook nil) | |
898 (defvar gnus-newsgroup-process-stack nil) | |
899 | |
900 (defvar gnus-thread-indent-array nil) | |
901 (defvar gnus-thread-indent-array-level gnus-thread-indent-level) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
902 (defvar gnus-sort-gathered-threads-function 'gnus-thread-sort-by-number |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
903 "Function called to sort the articles within a thread after it has been gathered together.") |
17493 | 904 |
905 ;; Avoid highlighting in kill files. | |
906 (defvar gnus-summary-inhibit-highlight nil) | |
907 (defvar gnus-newsgroup-selected-overlay nil) | |
908 (defvar gnus-inhibit-limiting nil) | |
909 (defvar gnus-newsgroup-adaptive-score-file nil) | |
910 (defvar gnus-current-score-file nil) | |
911 (defvar gnus-current-move-group nil) | |
912 (defvar gnus-current-copy-group nil) | |
913 (defvar gnus-current-crosspost-group nil) | |
914 | |
915 (defvar gnus-newsgroup-dependencies nil) | |
916 (defvar gnus-newsgroup-adaptive nil) | |
917 (defvar gnus-summary-display-article-function nil) | |
918 (defvar gnus-summary-highlight-line-function nil | |
919 "Function called after highlighting a summary line.") | |
920 | |
921 (defvar gnus-summary-line-format-alist | |
922 `((?N ,(macroexpand '(mail-header-number gnus-tmp-header)) ?d) | |
923 (?S ,(macroexpand '(mail-header-subject gnus-tmp-header)) ?s) | |
924 (?s gnus-tmp-subject-or-nil ?s) | |
925 (?n gnus-tmp-name ?s) | |
926 (?A (car (cdr (funcall gnus-extract-address-components gnus-tmp-from))) | |
927 ?s) | |
928 (?a (or (car (funcall gnus-extract-address-components gnus-tmp-from)) | |
929 gnus-tmp-from) ?s) | |
930 (?F gnus-tmp-from ?s) | |
931 (?x ,(macroexpand '(mail-header-xref gnus-tmp-header)) ?s) | |
932 (?D ,(macroexpand '(mail-header-date gnus-tmp-header)) ?s) | |
933 (?d (gnus-dd-mmm (mail-header-date gnus-tmp-header)) ?s) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
934 (?o (gnus-date-iso8601 (mail-header-date gnus-tmp-header)) ?s) |
17493 | 935 (?M ,(macroexpand '(mail-header-id gnus-tmp-header)) ?s) |
936 (?r ,(macroexpand '(mail-header-references gnus-tmp-header)) ?s) | |
937 (?c (or (mail-header-chars gnus-tmp-header) 0) ?d) | |
938 (?L gnus-tmp-lines ?d) | |
939 (?I gnus-tmp-indentation ?s) | |
940 (?T (if (= gnus-tmp-level 0) "" (make-string (frame-width) ? )) ?s) | |
941 (?R gnus-tmp-replied ?c) | |
942 (?\[ gnus-tmp-opening-bracket ?c) | |
943 (?\] gnus-tmp-closing-bracket ?c) | |
944 (?\> (make-string gnus-tmp-level ? ) ?s) | |
945 (?\< (make-string (max 0 (- 20 gnus-tmp-level)) ? ) ?s) | |
946 (?i gnus-tmp-score ?d) | |
947 (?z gnus-tmp-score-char ?c) | |
948 (?l (bbb-grouplens-score gnus-tmp-header) ?s) | |
949 (?V (gnus-thread-total-score (and (boundp 'thread) (car thread))) ?d) | |
950 (?U gnus-tmp-unread ?c) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
951 (?f (gnus-summary-from-or-to-or-newsgroups gnus-tmp-header) ?s) |
17493 | 952 (?t (gnus-summary-number-of-articles-in-thread |
953 (and (boundp 'thread) (car thread)) gnus-tmp-level) | |
954 ?d) | |
955 (?e (gnus-summary-number-of-articles-in-thread | |
956 (and (boundp 'thread) (car thread)) gnus-tmp-level t) | |
957 ?c) | |
958 (?u gnus-tmp-user-defined ?s) | |
959 (?P (gnus-pick-line-number) ?d)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
960 "An alist of format specifications that can appear in summary lines. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
961 These are paired with what variables they correspond with, along with |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
962 the type of the variable (string, integer, character, etc).") |
17493 | 963 |
964 (defvar gnus-summary-dummy-line-format-alist | |
965 `((?S gnus-tmp-subject ?s) | |
966 (?N gnus-tmp-number ?d) | |
967 (?u gnus-tmp-user-defined ?s))) | |
968 | |
969 (defvar gnus-summary-mode-line-format-alist | |
970 `((?G gnus-tmp-group-name ?s) | |
971 (?g (gnus-short-group-name gnus-tmp-group-name) ?s) | |
972 (?p (gnus-group-real-name gnus-tmp-group-name) ?s) | |
973 (?A gnus-tmp-article-number ?d) | |
974 (?Z gnus-tmp-unread-and-unselected ?s) | |
975 (?V gnus-version ?s) | |
976 (?U gnus-tmp-unread-and-unticked ?d) | |
977 (?S gnus-tmp-subject ?s) | |
978 (?e gnus-tmp-unselected ?d) | |
979 (?u gnus-tmp-user-defined ?s) | |
980 (?d (length gnus-newsgroup-dormant) ?d) | |
981 (?t (length gnus-newsgroup-marked) ?d) | |
982 (?r (length gnus-newsgroup-reads) ?d) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
983 (?z (gnus-summary-article-score gnus-tmp-article-number) ?d) |
17493 | 984 (?E gnus-newsgroup-expunged-tally ?d) |
985 (?s (gnus-current-score-file-nondirectory) ?s))) | |
986 | |
987 (defvar gnus-last-search-regexp nil | |
988 "Default regexp for article search command.") | |
989 | |
990 (defvar gnus-last-shell-command nil | |
991 "Default shell command on article.") | |
992 | |
993 (defvar gnus-newsgroup-begin nil) | |
994 (defvar gnus-newsgroup-end nil) | |
995 (defvar gnus-newsgroup-last-rmail nil) | |
996 (defvar gnus-newsgroup-last-mail nil) | |
997 (defvar gnus-newsgroup-last-folder nil) | |
998 (defvar gnus-newsgroup-last-file nil) | |
999 (defvar gnus-newsgroup-auto-expire nil) | |
1000 (defvar gnus-newsgroup-active nil) | |
1001 | |
1002 (defvar gnus-newsgroup-data nil) | |
1003 (defvar gnus-newsgroup-data-reverse nil) | |
1004 (defvar gnus-newsgroup-limit nil) | |
1005 (defvar gnus-newsgroup-limits nil) | |
1006 | |
1007 (defvar gnus-newsgroup-unreads nil | |
1008 "List of unread articles in the current newsgroup.") | |
1009 | |
1010 (defvar gnus-newsgroup-unselected nil | |
1011 "List of unselected unread articles in the current newsgroup.") | |
1012 | |
1013 (defvar gnus-newsgroup-reads nil | |
1014 "Alist of read articles and article marks in the current newsgroup.") | |
1015 | |
1016 (defvar gnus-newsgroup-expunged-tally nil) | |
1017 | |
1018 (defvar gnus-newsgroup-marked nil | |
1019 "List of ticked articles in the current newsgroup (a subset of unread art).") | |
1020 | |
1021 (defvar gnus-newsgroup-killed nil | |
1022 "List of ranges of articles that have been through the scoring process.") | |
1023 | |
1024 (defvar gnus-newsgroup-cached nil | |
1025 "List of articles that come from the article cache.") | |
1026 | |
1027 (defvar gnus-newsgroup-saved nil | |
1028 "List of articles that have been saved.") | |
1029 | |
1030 (defvar gnus-newsgroup-kill-headers nil) | |
1031 | |
1032 (defvar gnus-newsgroup-replied nil | |
1033 "List of articles that have been replied to in the current newsgroup.") | |
1034 | |
1035 (defvar gnus-newsgroup-expirable nil | |
1036 "List of articles in the current newsgroup that can be expired.") | |
1037 | |
1038 (defvar gnus-newsgroup-processable nil | |
1039 "List of articles in the current newsgroup that can be processed.") | |
1040 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1041 (defvar gnus-newsgroup-downloadable nil |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1042 "List of articles in the current newsgroup that can be processed.") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1043 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1044 (defvar gnus-newsgroup-undownloaded nil |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1045 "List of articles in the current newsgroup that haven't been downloaded..") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1046 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1047 (defvar gnus-newsgroup-unsendable nil |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1048 "List of articles in the current newsgroup that won't be sent.") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1049 |
17493 | 1050 (defvar gnus-newsgroup-bookmarks nil |
1051 "List of articles in the current newsgroup that have bookmarks.") | |
1052 | |
1053 (defvar gnus-newsgroup-dormant nil | |
1054 "List of dormant articles in the current newsgroup.") | |
1055 | |
1056 (defvar gnus-newsgroup-scored nil | |
1057 "List of scored articles in the current newsgroup.") | |
1058 | |
1059 (defvar gnus-newsgroup-headers nil | |
1060 "List of article headers in the current newsgroup.") | |
1061 | |
1062 (defvar gnus-newsgroup-threads nil) | |
1063 | |
1064 (defvar gnus-newsgroup-prepared nil | |
1065 "Whether the current group has been prepared properly.") | |
1066 | |
1067 (defvar gnus-newsgroup-ancient nil | |
1068 "List of `gnus-fetch-old-headers' articles in the current newsgroup.") | |
1069 | |
1070 (defvar gnus-newsgroup-sparse nil) | |
1071 | |
1072 (defvar gnus-current-article nil) | |
1073 (defvar gnus-article-current nil) | |
1074 (defvar gnus-current-headers nil) | |
1075 (defvar gnus-have-all-headers nil) | |
1076 (defvar gnus-last-article nil) | |
1077 (defvar gnus-newsgroup-history nil) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1078 (defvar gnus-newsgroup-charset nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1079 (defvar gnus-newsgroup-ephemeral-charset nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1080 (defvar gnus-newsgroup-ephemeral-ignored-charsets nil) |
17493 | 1081 |
1082 (defconst gnus-summary-local-variables | |
1083 '(gnus-newsgroup-name | |
1084 gnus-newsgroup-begin gnus-newsgroup-end | |
1085 gnus-newsgroup-last-rmail gnus-newsgroup-last-mail | |
1086 gnus-newsgroup-last-folder gnus-newsgroup-last-file | |
1087 gnus-newsgroup-auto-expire gnus-newsgroup-unreads | |
1088 gnus-newsgroup-unselected gnus-newsgroup-marked | |
1089 gnus-newsgroup-reads gnus-newsgroup-saved | |
1090 gnus-newsgroup-replied gnus-newsgroup-expirable | |
1091 gnus-newsgroup-processable gnus-newsgroup-killed | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1092 gnus-newsgroup-downloadable gnus-newsgroup-undownloaded |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1093 gnus-newsgroup-unsendable |
17493 | 1094 gnus-newsgroup-bookmarks gnus-newsgroup-dormant |
1095 gnus-newsgroup-headers gnus-newsgroup-threads | |
1096 gnus-newsgroup-prepared gnus-summary-highlight-line-function | |
1097 gnus-current-article gnus-current-headers gnus-have-all-headers | |
1098 gnus-last-article gnus-article-internal-prepare-hook | |
1099 gnus-newsgroup-dependencies gnus-newsgroup-selected-overlay | |
1100 gnus-newsgroup-scored gnus-newsgroup-kill-headers | |
1101 gnus-thread-expunge-below | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1102 gnus-score-alist gnus-current-score-file |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1103 (gnus-summary-expunge-below . global) |
17493 | 1104 (gnus-summary-mark-below . global) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1105 (gnus-orphan-score . global) |
17493 | 1106 gnus-newsgroup-active gnus-scores-exclude-files |
1107 gnus-newsgroup-history gnus-newsgroup-ancient | |
1108 gnus-newsgroup-sparse gnus-newsgroup-process-stack | |
1109 (gnus-newsgroup-adaptive . gnus-use-adaptive-scoring) | |
1110 gnus-newsgroup-adaptive-score-file (gnus-reffed-article-number . -1) | |
1111 (gnus-newsgroup-expunged-tally . 0) | |
1112 gnus-cache-removable-articles gnus-newsgroup-cached | |
1113 gnus-newsgroup-data gnus-newsgroup-data-reverse | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1114 gnus-newsgroup-limit gnus-newsgroup-limits |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1115 gnus-newsgroup-charset) |
17493 | 1116 "Variables that are buffer-local to the summary buffers.") |
1117 | |
1118 ;; Byte-compiler warning. | |
1119 (defvar gnus-article-mode-map) | |
1120 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1121 ;; MIME stuff. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1122 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1123 (defvar gnus-decode-encoded-word-methods |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1124 '(mail-decode-encoded-word-string) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1125 "List of methods used to decode encoded words. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1126 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1127 This variable is a list of FUNCTION or (REGEXP . FUNCTION). If item is |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1128 FUNCTION, FUNCTION will be apply to all newsgroups. If item is a |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1129 (REGEXP . FUNCTION), FUNCTION will be only apply to thes newsgroups |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1130 whose names match REGEXP. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1131 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1132 For example: |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1133 ((\"chinese\" . gnus-decode-encoded-word-string-by-guess) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1134 mail-decode-encoded-word-string |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1135 (\"chinese\" . rfc1843-decode-string))") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1136 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1137 (defvar gnus-decode-encoded-word-methods-cache nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1138 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1139 (defun gnus-multi-decode-encoded-word-string (string) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1140 "Apply the functions from `gnus-encoded-word-methods' that match." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1141 (unless (and gnus-decode-encoded-word-methods-cache |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1142 (eq gnus-newsgroup-name |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1143 (car gnus-decode-encoded-word-methods-cache))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1144 (setq gnus-decode-encoded-word-methods-cache (list gnus-newsgroup-name)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1145 (mapcar (lambda (x) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1146 (if (symbolp x) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1147 (nconc gnus-decode-encoded-word-methods-cache (list x)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1148 (if (and gnus-newsgroup-name |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1149 (string-match (car x) gnus-newsgroup-name)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1150 (nconc gnus-decode-encoded-word-methods-cache |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1151 (list (cdr x)))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1152 gnus-decode-encoded-word-methods)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1153 (let ((xlist gnus-decode-encoded-word-methods-cache)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1154 (pop xlist) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1155 (while xlist |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1156 (setq string (funcall (pop xlist) string)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1157 string) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1158 |
17493 | 1159 ;; Subject simplification. |
1160 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1161 (defun gnus-simplify-whitespace (str) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1162 "Remove excessive whitespace from STR." |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1163 (let ((mystr str)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1164 ;; Multiple spaces. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1165 (while (string-match "[ \t][ \t]+" mystr) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1166 (setq mystr (concat (substring mystr 0 (match-beginning 0)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1167 " " |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1168 (substring mystr (match-end 0))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1169 ;; Leading spaces. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1170 (when (string-match "^[ \t]+" mystr) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1171 (setq mystr (substring mystr (match-end 0)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1172 ;; Trailing spaces. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1173 (when (string-match "[ \t]+$" mystr) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1174 (setq mystr (substring mystr 0 (match-beginning 0)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1175 mystr)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1176 |
17493 | 1177 (defsubst gnus-simplify-subject-re (subject) |
1178 "Remove \"Re:\" from subject lines." | |
1179 (if (string-match "^[Rr][Ee]: *" subject) | |
1180 (substring subject (match-end 0)) | |
1181 subject)) | |
1182 | |
1183 (defun gnus-simplify-subject (subject &optional re-only) | |
1184 "Remove `Re:' and words in parentheses. | |
1185 If RE-ONLY is non-nil, strip leading `Re:'s only." | |
1186 (let ((case-fold-search t)) ;Ignore case. | |
1187 ;; Remove `Re:', `Re^N:', `Re(n)', and `Re[n]:'. | |
1188 (when (string-match "\\`\\(re\\([[(^][0-9]+[])]?\\)?:[ \t]*\\)+" subject) | |
1189 (setq subject (substring subject (match-end 0)))) | |
1190 ;; Remove uninteresting prefixes. | |
1191 (when (and (not re-only) | |
1192 gnus-simplify-ignored-prefixes | |
1193 (string-match gnus-simplify-ignored-prefixes subject)) | |
1194 (setq subject (substring subject (match-end 0)))) | |
1195 ;; Remove words in parentheses from end. | |
1196 (unless re-only | |
1197 (while (string-match "[ \t\n]*([^()]*)[ \t\n]*\\'" subject) | |
1198 (setq subject (substring subject 0 (match-beginning 0))))) | |
1199 ;; Return subject string. | |
1200 subject)) | |
1201 | |
1202 ;; Remove any leading "re:"s, any trailing paren phrases, and simplify | |
1203 ;; all whitespace. | |
1204 (defsubst gnus-simplify-buffer-fuzzy-step (regexp &optional newtext) | |
1205 (goto-char (point-min)) | |
1206 (while (re-search-forward regexp nil t) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1207 (replace-match (or newtext "")))) |
17493 | 1208 |
1209 (defun gnus-simplify-buffer-fuzzy () | |
1210 "Simplify string in the buffer fuzzily. | |
1211 The string in the accessible portion of the current buffer is simplified. | |
1212 It is assumed to be a single-line subject. | |
1213 Whitespace is generally cleaned up, and miscellaneous leading/trailing | |
1214 matter is removed. Additional things can be deleted by setting | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1215 `gnus-simplify-subject-fuzzy-regexp'." |
17493 | 1216 (let ((case-fold-search t) |
1217 (modified-tick)) | |
1218 (gnus-simplify-buffer-fuzzy-step "\t" " ") | |
1219 | |
1220 (while (not (eq modified-tick (buffer-modified-tick))) | |
1221 (setq modified-tick (buffer-modified-tick)) | |
1222 (cond | |
1223 ((listp gnus-simplify-subject-fuzzy-regexp) | |
1224 (mapcar 'gnus-simplify-buffer-fuzzy-step | |
1225 gnus-simplify-subject-fuzzy-regexp)) | |
1226 (gnus-simplify-subject-fuzzy-regexp | |
1227 (gnus-simplify-buffer-fuzzy-step gnus-simplify-subject-fuzzy-regexp))) | |
1228 (gnus-simplify-buffer-fuzzy-step "^ *\\[[-+?*!][-+?*!]\\] *") | |
1229 (gnus-simplify-buffer-fuzzy-step | |
1230 "^ *\\(re\\|fw\\|fwd\\)[[{(^0-9]*[])}]?[:;] *") | |
1231 (gnus-simplify-buffer-fuzzy-step "^[[].*:\\( .*\\)[]]$" "\\1")) | |
1232 | |
1233 (gnus-simplify-buffer-fuzzy-step " *[[{(][^()\n]*[]})] *$") | |
1234 (gnus-simplify-buffer-fuzzy-step " +" " ") | |
1235 (gnus-simplify-buffer-fuzzy-step " $") | |
1236 (gnus-simplify-buffer-fuzzy-step "^ +"))) | |
1237 | |
1238 (defun gnus-simplify-subject-fuzzy (subject) | |
1239 "Simplify a subject string fuzzily. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1240 See `gnus-simplify-buffer-fuzzy' for details." |
17493 | 1241 (save-excursion |
1242 (gnus-set-work-buffer) | |
1243 (let ((case-fold-search t)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1244 ;; Remove uninteresting prefixes. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1245 (when (and gnus-simplify-ignored-prefixes |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1246 (string-match gnus-simplify-ignored-prefixes subject)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1247 (setq subject (substring subject (match-end 0)))) |
17493 | 1248 (insert subject) |
1249 (inline (gnus-simplify-buffer-fuzzy)) | |
1250 (buffer-string)))) | |
1251 | |
1252 (defsubst gnus-simplify-subject-fully (subject) | |
1253 "Simplify a subject string according to gnus-summary-gather-subject-limit." | |
1254 (cond | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1255 (gnus-simplify-subject-functions |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1256 (gnus-map-function gnus-simplify-subject-functions subject)) |
17493 | 1257 ((null gnus-summary-gather-subject-limit) |
1258 (gnus-simplify-subject-re subject)) | |
1259 ((eq gnus-summary-gather-subject-limit 'fuzzy) | |
1260 (gnus-simplify-subject-fuzzy subject)) | |
1261 ((numberp gnus-summary-gather-subject-limit) | |
1262 (gnus-limit-string (gnus-simplify-subject-re subject) | |
1263 gnus-summary-gather-subject-limit)) | |
1264 (t | |
1265 subject))) | |
1266 | |
1267 (defsubst gnus-subject-equal (s1 s2 &optional simple-first) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1268 "Check whether two subjects are equal. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1269 If optional argument simple-first is t, first argument is already |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1270 simplified." |
17493 | 1271 (cond |
1272 ((null simple-first) | |
1273 (equal (gnus-simplify-subject-fully s1) | |
1274 (gnus-simplify-subject-fully s2))) | |
1275 (t | |
1276 (equal s1 | |
1277 (gnus-simplify-subject-fully s2))))) | |
1278 | |
1279 (defun gnus-summary-bubble-group () | |
1280 "Increase the score of the current group. | |
1281 This is a handy function to add to `gnus-summary-exit-hook' to | |
1282 increase the score of each group you read." | |
1283 (gnus-group-add-score gnus-newsgroup-name)) | |
1284 | |
1285 | |
1286 ;;; | |
1287 ;;; Gnus summary mode | |
1288 ;;; | |
1289 | |
1290 (put 'gnus-summary-mode 'mode-class 'special) | |
1291 | |
1292 (when t | |
1293 ;; Non-orthogonal keys | |
1294 | |
1295 (gnus-define-keys gnus-summary-mode-map | |
1296 " " gnus-summary-next-page | |
1297 "\177" gnus-summary-prev-page | |
1298 [delete] gnus-summary-prev-page | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1299 [backspace] gnus-summary-prev-page |
17493 | 1300 "\r" gnus-summary-scroll-up |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1301 "\M-\r" gnus-summary-scroll-down |
17493 | 1302 "n" gnus-summary-next-unread-article |
1303 "p" gnus-summary-prev-unread-article | |
1304 "N" gnus-summary-next-article | |
1305 "P" gnus-summary-prev-article | |
1306 "\M-\C-n" gnus-summary-next-same-subject | |
1307 "\M-\C-p" gnus-summary-prev-same-subject | |
1308 "\M-n" gnus-summary-next-unread-subject | |
1309 "\M-p" gnus-summary-prev-unread-subject | |
1310 "." gnus-summary-first-unread-article | |
1311 "," gnus-summary-best-unread-article | |
1312 "\M-s" gnus-summary-search-article-forward | |
1313 "\M-r" gnus-summary-search-article-backward | |
1314 "<" gnus-summary-beginning-of-article | |
1315 ">" gnus-summary-end-of-article | |
1316 "j" gnus-summary-goto-article | |
1317 "^" gnus-summary-refer-parent-article | |
1318 "\M-^" gnus-summary-refer-article | |
1319 "u" gnus-summary-tick-article-forward | |
1320 "!" gnus-summary-tick-article-forward | |
1321 "U" gnus-summary-tick-article-backward | |
1322 "d" gnus-summary-mark-as-read-forward | |
1323 "D" gnus-summary-mark-as-read-backward | |
1324 "E" gnus-summary-mark-as-expirable | |
1325 "\M-u" gnus-summary-clear-mark-forward | |
1326 "\M-U" gnus-summary-clear-mark-backward | |
1327 "k" gnus-summary-kill-same-subject-and-select | |
1328 "\C-k" gnus-summary-kill-same-subject | |
1329 "\M-\C-k" gnus-summary-kill-thread | |
1330 "\M-\C-l" gnus-summary-lower-thread | |
1331 "e" gnus-summary-edit-article | |
1332 "#" gnus-summary-mark-as-processable | |
1333 "\M-#" gnus-summary-unmark-as-processable | |
1334 "\M-\C-t" gnus-summary-toggle-threads | |
1335 "\M-\C-s" gnus-summary-show-thread | |
1336 "\M-\C-h" gnus-summary-hide-thread | |
1337 "\M-\C-f" gnus-summary-next-thread | |
1338 "\M-\C-b" gnus-summary-prev-thread | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1339 [(meta down)] gnus-summary-next-thread |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1340 [(meta up)] gnus-summary-prev-thread |
17493 | 1341 "\M-\C-u" gnus-summary-up-thread |
1342 "\M-\C-d" gnus-summary-down-thread | |
1343 "&" gnus-summary-execute-command | |
1344 "c" gnus-summary-catchup-and-exit | |
1345 "\C-w" gnus-summary-mark-region-as-read | |
1346 "\C-t" gnus-summary-toggle-truncation | |
1347 "?" gnus-summary-mark-as-dormant | |
1348 "\C-c\M-\C-s" gnus-summary-limit-include-expunged | |
1349 "\C-c\C-s\C-n" gnus-summary-sort-by-number | |
1350 "\C-c\C-s\C-l" gnus-summary-sort-by-lines | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1351 "\C-c\C-s\C-c" gnus-summary-sort-by-chars |
17493 | 1352 "\C-c\C-s\C-a" gnus-summary-sort-by-author |
1353 "\C-c\C-s\C-s" gnus-summary-sort-by-subject | |
1354 "\C-c\C-s\C-d" gnus-summary-sort-by-date | |
1355 "\C-c\C-s\C-i" gnus-summary-sort-by-score | |
1356 "=" gnus-summary-expand-window | |
1357 "\C-x\C-s" gnus-summary-reselect-current-group | |
1358 "\M-g" gnus-summary-rescan-group | |
1359 "w" gnus-summary-stop-page-breaking | |
1360 "\C-c\C-r" gnus-summary-caesar-message | |
1361 "f" gnus-summary-followup | |
1362 "F" gnus-summary-followup-with-original | |
1363 "C" gnus-summary-cancel-article | |
1364 "r" gnus-summary-reply | |
1365 "R" gnus-summary-reply-with-original | |
1366 "\C-c\C-f" gnus-summary-mail-forward | |
1367 "o" gnus-summary-save-article | |
1368 "\C-o" gnus-summary-save-article-mail | |
1369 "|" gnus-summary-pipe-output | |
1370 "\M-k" gnus-summary-edit-local-kill | |
1371 "\M-K" gnus-summary-edit-global-kill | |
1372 ;; "V" gnus-version | |
1373 "\C-c\C-d" gnus-summary-describe-group | |
1374 "q" gnus-summary-exit | |
1375 "Q" gnus-summary-exit-no-update | |
1376 "\C-c\C-i" gnus-info-find-node | |
1377 gnus-mouse-2 gnus-mouse-pick-article | |
1378 "m" gnus-summary-mail-other-window | |
1379 "a" gnus-summary-post-news | |
1380 "x" gnus-summary-limit-to-unread | |
1381 "s" gnus-summary-isearch-article | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1382 "t" gnus-summary-toggle-header |
17493 | 1383 "g" gnus-summary-show-article |
1384 "l" gnus-summary-goto-last-article | |
1385 "\C-c\C-v\C-v" gnus-uu-decode-uu-view | |
1386 "\C-d" gnus-summary-enter-digest-group | |
1387 "\M-\C-d" gnus-summary-read-document | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1388 "\M-\C-e" gnus-summary-edit-parameters |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1389 "\M-\C-a" gnus-summary-customize-parameters |
17493 | 1390 "\C-c\C-b" gnus-bug |
1391 "*" gnus-cache-enter-article | |
1392 "\M-*" gnus-cache-remove-article | |
1393 "\M-&" gnus-summary-universal-argument | |
1394 "\C-l" gnus-recenter | |
1395 "I" gnus-summary-increase-score | |
1396 "L" gnus-summary-lower-score | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1397 "\M-i" gnus-symbolic-argument |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1398 "h" gnus-summary-select-article-buffer |
17493 | 1399 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1400 "b" gnus-article-view-part |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1401 "\M-t" gnus-summary-toggle-display-buttonized |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1402 |
17493 | 1403 "V" gnus-summary-score-map |
1404 "X" gnus-uu-extract-map | |
1405 "S" gnus-summary-send-map) | |
1406 | |
1407 ;; Sort of orthogonal keymap | |
1408 (gnus-define-keys (gnus-summary-mark-map "M" gnus-summary-mode-map) | |
1409 "t" gnus-summary-tick-article-forward | |
1410 "!" gnus-summary-tick-article-forward | |
1411 "d" gnus-summary-mark-as-read-forward | |
1412 "r" gnus-summary-mark-as-read-forward | |
1413 "c" gnus-summary-clear-mark-forward | |
1414 " " gnus-summary-clear-mark-forward | |
1415 "e" gnus-summary-mark-as-expirable | |
1416 "x" gnus-summary-mark-as-expirable | |
1417 "?" gnus-summary-mark-as-dormant | |
1418 "b" gnus-summary-set-bookmark | |
1419 "B" gnus-summary-remove-bookmark | |
1420 "#" gnus-summary-mark-as-processable | |
1421 "\M-#" gnus-summary-unmark-as-processable | |
1422 "S" gnus-summary-limit-include-expunged | |
1423 "C" gnus-summary-catchup | |
1424 "H" gnus-summary-catchup-to-here | |
1425 "\C-c" gnus-summary-catchup-all | |
1426 "k" gnus-summary-kill-same-subject-and-select | |
1427 "K" gnus-summary-kill-same-subject | |
1428 "P" gnus-uu-mark-map) | |
1429 | |
1430 (gnus-define-keys (gnus-summary-mscore-map "V" gnus-summary-mark-map) | |
1431 "c" gnus-summary-clear-above | |
1432 "u" gnus-summary-tick-above | |
1433 "m" gnus-summary-mark-above | |
1434 "k" gnus-summary-kill-below) | |
1435 | |
1436 (gnus-define-keys (gnus-summary-limit-map "/" gnus-summary-mode-map) | |
1437 "/" gnus-summary-limit-to-subject | |
1438 "n" gnus-summary-limit-to-articles | |
1439 "w" gnus-summary-pop-limit | |
1440 "s" gnus-summary-limit-to-subject | |
1441 "a" gnus-summary-limit-to-author | |
1442 "u" gnus-summary-limit-to-unread | |
1443 "m" gnus-summary-limit-to-marks | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1444 "M" gnus-summary-limit-exclude-marks |
17493 | 1445 "v" gnus-summary-limit-to-score |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1446 "*" gnus-summary-limit-include-cached |
17493 | 1447 "D" gnus-summary-limit-include-dormant |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1448 "T" gnus-summary-limit-include-thread |
17493 | 1449 "d" gnus-summary-limit-exclude-dormant |
1450 "t" gnus-summary-limit-to-age | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1451 "x" gnus-summary-limit-to-extra |
17493 | 1452 "E" gnus-summary-limit-include-expunged |
1453 "c" gnus-summary-limit-exclude-childless-dormant | |
1454 "C" gnus-summary-limit-mark-excluded-as-read) | |
1455 | |
1456 (gnus-define-keys (gnus-summary-goto-map "G" gnus-summary-mode-map) | |
1457 "n" gnus-summary-next-unread-article | |
1458 "p" gnus-summary-prev-unread-article | |
1459 "N" gnus-summary-next-article | |
1460 "P" gnus-summary-prev-article | |
1461 "\C-n" gnus-summary-next-same-subject | |
1462 "\C-p" gnus-summary-prev-same-subject | |
1463 "\M-n" gnus-summary-next-unread-subject | |
1464 "\M-p" gnus-summary-prev-unread-subject | |
1465 "f" gnus-summary-first-unread-article | |
1466 "b" gnus-summary-best-unread-article | |
1467 "j" gnus-summary-goto-article | |
1468 "g" gnus-summary-goto-subject | |
1469 "l" gnus-summary-goto-last-article | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
1470 "o" gnus-summary-pop-article) |
17493 | 1471 |
1472 (gnus-define-keys (gnus-summary-thread-map "T" gnus-summary-mode-map) | |
1473 "k" gnus-summary-kill-thread | |
1474 "l" gnus-summary-lower-thread | |
1475 "i" gnus-summary-raise-thread | |
1476 "T" gnus-summary-toggle-threads | |
1477 "t" gnus-summary-rethread-current | |
1478 "^" gnus-summary-reparent-thread | |
1479 "s" gnus-summary-show-thread | |
1480 "S" gnus-summary-show-all-threads | |
1481 "h" gnus-summary-hide-thread | |
1482 "H" gnus-summary-hide-all-threads | |
1483 "n" gnus-summary-next-thread | |
1484 "p" gnus-summary-prev-thread | |
1485 "u" gnus-summary-up-thread | |
1486 "o" gnus-summary-top-thread | |
1487 "d" gnus-summary-down-thread | |
1488 "#" gnus-uu-mark-thread | |
1489 "\M-#" gnus-uu-unmark-thread) | |
1490 | |
1491 (gnus-define-keys (gnus-summary-buffer-map "Y" gnus-summary-mode-map) | |
1492 "g" gnus-summary-prepare | |
1493 "c" gnus-summary-insert-cached-articles) | |
1494 | |
1495 (gnus-define-keys (gnus-summary-exit-map "Z" gnus-summary-mode-map) | |
1496 "c" gnus-summary-catchup-and-exit | |
1497 "C" gnus-summary-catchup-all-and-exit | |
1498 "E" gnus-summary-exit-no-update | |
1499 "Q" gnus-summary-exit | |
1500 "Z" gnus-summary-exit | |
1501 "n" gnus-summary-catchup-and-goto-next-group | |
1502 "R" gnus-summary-reselect-current-group | |
1503 "G" gnus-summary-rescan-group | |
1504 "N" gnus-summary-next-group | |
1505 "s" gnus-summary-save-newsrc | |
1506 "P" gnus-summary-prev-group) | |
1507 | |
1508 (gnus-define-keys (gnus-summary-article-map "A" gnus-summary-mode-map) | |
1509 " " gnus-summary-next-page | |
1510 "n" gnus-summary-next-page | |
1511 "\177" gnus-summary-prev-page | |
1512 [delete] gnus-summary-prev-page | |
1513 "p" gnus-summary-prev-page | |
1514 "\r" gnus-summary-scroll-up | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1515 "\M-\r" gnus-summary-scroll-down |
17493 | 1516 "<" gnus-summary-beginning-of-article |
1517 ">" gnus-summary-end-of-article | |
1518 "b" gnus-summary-beginning-of-article | |
1519 "e" gnus-summary-end-of-article | |
1520 "^" gnus-summary-refer-parent-article | |
1521 "r" gnus-summary-refer-parent-article | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1522 "D" gnus-summary-enter-digest-group |
17493 | 1523 "R" gnus-summary-refer-references |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1524 "T" gnus-summary-refer-thread |
17493 | 1525 "g" gnus-summary-show-article |
1526 "s" gnus-summary-isearch-article | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1527 "P" gnus-summary-print-article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1528 "t" gnus-article-babel) |
17493 | 1529 |
1530 (gnus-define-keys (gnus-summary-wash-map "W" gnus-summary-mode-map) | |
1531 "b" gnus-article-add-buttons | |
1532 "B" gnus-article-add-buttons-to-head | |
1533 "o" gnus-article-treat-overstrike | |
1534 "e" gnus-article-emphasize | |
1535 "w" gnus-article-fill-cited-article | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1536 "Q" gnus-article-fill-long-lines |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1537 "C" gnus-article-capitalize-sentences |
17493 | 1538 "c" gnus-article-remove-cr |
1539 "q" gnus-article-de-quoted-unreadable | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1540 "6" gnus-article-de-base64-unreadable |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1541 "Z" gnus-article-decode-HZ |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1542 "h" gnus-article-wash-html |
17493 | 1543 "f" gnus-article-display-x-face |
1544 "l" gnus-summary-stop-page-breaking | |
1545 "r" gnus-summary-caesar-message | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1546 "t" gnus-summary-toggle-header |
17493 | 1547 "v" gnus-summary-verbose-headers |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1548 "H" gnus-article-strip-headers-in-body |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1549 "d" gnus-article-treat-dumbquotes) |
17493 | 1550 |
1551 (gnus-define-keys (gnus-summary-wash-hide-map "W" gnus-summary-wash-map) | |
1552 "a" gnus-article-hide | |
1553 "h" gnus-article-hide-headers | |
1554 "b" gnus-article-hide-boring-headers | |
1555 "s" gnus-article-hide-signature | |
1556 "c" gnus-article-hide-citation | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1557 "C" gnus-article-hide-citation-in-followups |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1558 "l" gnus-article-hide-list-identifiers |
17493 | 1559 "p" gnus-article-hide-pgp |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1560 "B" gnus-article-strip-banner |
17493 | 1561 "P" gnus-article-hide-pem |
1562 "\C-c" gnus-article-hide-citation-maybe) | |
1563 | |
1564 (gnus-define-keys (gnus-summary-wash-highlight-map "H" gnus-summary-wash-map) | |
1565 "a" gnus-article-highlight | |
1566 "h" gnus-article-highlight-headers | |
1567 "c" gnus-article-highlight-citation | |
1568 "s" gnus-article-highlight-signature) | |
1569 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1570 (gnus-define-keys (gnus-summary-wash-mime-map "M" gnus-summary-wash-map) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1571 "w" gnus-article-decode-mime-words |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1572 "c" gnus-article-decode-charset |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1573 "v" gnus-mime-view-all-parts |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1574 "b" gnus-article-view-part) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1575 |
17493 | 1576 (gnus-define-keys (gnus-summary-wash-time-map "T" gnus-summary-wash-map) |
1577 "z" gnus-article-date-ut | |
1578 "u" gnus-article-date-ut | |
1579 "l" gnus-article-date-local | |
1580 "e" gnus-article-date-lapsed | |
1581 "o" gnus-article-date-original | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1582 "i" gnus-article-date-iso8601 |
17493 | 1583 "s" gnus-article-date-user) |
1584 | |
1585 (gnus-define-keys (gnus-summary-wash-empty-map "E" gnus-summary-wash-map) | |
1586 "t" gnus-article-remove-trailing-blank-lines | |
1587 "l" gnus-article-strip-leading-blank-lines | |
1588 "m" gnus-article-strip-multiple-blank-lines | |
1589 "a" gnus-article-strip-blank-lines | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1590 "A" gnus-article-strip-all-blank-lines |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1591 "s" gnus-article-strip-leading-space |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1592 "e" gnus-article-strip-trailing-space) |
17493 | 1593 |
1594 (gnus-define-keys (gnus-summary-help-map "H" gnus-summary-mode-map) | |
1595 "v" gnus-version | |
1596 "f" gnus-summary-fetch-faq | |
1597 "d" gnus-summary-describe-group | |
1598 "h" gnus-summary-describe-briefly | |
1599 "i" gnus-info-find-node) | |
1600 | |
1601 (gnus-define-keys (gnus-summary-backend-map "B" gnus-summary-mode-map) | |
1602 "e" gnus-summary-expire-articles | |
1603 "\M-\C-e" gnus-summary-expire-articles-now | |
1604 "\177" gnus-summary-delete-article | |
1605 [delete] gnus-summary-delete-article | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1606 [backspace] gnus-summary-delete-article |
17493 | 1607 "m" gnus-summary-move-article |
1608 "r" gnus-summary-respool-article | |
1609 "w" gnus-summary-edit-article | |
1610 "c" gnus-summary-copy-article | |
1611 "B" gnus-summary-crosspost-article | |
1612 "q" gnus-summary-respool-query | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1613 "t" gnus-summary-respool-trace |
17493 | 1614 "i" gnus-summary-import-article |
1615 "p" gnus-summary-article-posted-p) | |
1616 | |
1617 (gnus-define-keys (gnus-summary-save-map "O" gnus-summary-mode-map) | |
1618 "o" gnus-summary-save-article | |
1619 "m" gnus-summary-save-article-mail | |
1620 "F" gnus-summary-write-article-file | |
1621 "r" gnus-summary-save-article-rmail | |
1622 "f" gnus-summary-save-article-file | |
1623 "b" gnus-summary-save-article-body-file | |
1624 "h" gnus-summary-save-article-folder | |
1625 "v" gnus-summary-save-article-vm | |
1626 "p" gnus-summary-pipe-output | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1627 "s" gnus-soup-add-article) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1628 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1629 (gnus-define-keys (gnus-summary-mime-map "K" gnus-summary-mode-map) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1630 "b" gnus-summary-display-buttonized |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1631 "m" gnus-summary-repair-multipart |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1632 "v" gnus-article-view-part |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1633 "o" gnus-article-save-part |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1634 "c" gnus-article-copy-part |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1635 "e" gnus-article-externalize-part |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1636 "i" gnus-article-inline-part |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1637 "|" gnus-article-pipe-part)) |
17493 | 1638 |
1639 (defun gnus-summary-make-menu-bar () | |
1640 (gnus-turn-off-edit-menu 'summary) | |
1641 | |
1642 (unless (boundp 'gnus-summary-misc-menu) | |
1643 | |
1644 (easy-menu-define | |
1645 gnus-summary-kill-menu gnus-summary-mode-map "" | |
1646 (cons | |
1647 "Score" | |
1648 (nconc | |
1649 (list | |
1650 ["Enter score..." gnus-summary-score-entry t] | |
1651 ["Customize" gnus-score-customize t]) | |
1652 (gnus-make-score-map 'increase) | |
1653 (gnus-make-score-map 'lower) | |
1654 '(("Mark" | |
1655 ["Kill below" gnus-summary-kill-below t] | |
1656 ["Mark above" gnus-summary-mark-above t] | |
1657 ["Tick above" gnus-summary-tick-above t] | |
1658 ["Clear above" gnus-summary-clear-above t]) | |
1659 ["Current score" gnus-summary-current-score t] | |
1660 ["Set score" gnus-summary-set-score t] | |
1661 ["Switch current score file..." gnus-score-change-score-file t] | |
1662 ["Set mark below..." gnus-score-set-mark-below t] | |
1663 ["Set expunge below..." gnus-score-set-expunge-below t] | |
1664 ["Edit current score file" gnus-score-edit-current-scores t] | |
1665 ["Edit score file" gnus-score-edit-file t] | |
1666 ["Trace score" gnus-score-find-trace t] | |
1667 ["Find words" gnus-score-find-favourite-words t] | |
1668 ["Rescore buffer" gnus-summary-rescore t] | |
1669 ["Increase score..." gnus-summary-increase-score t] | |
1670 ["Lower score..." gnus-summary-lower-score t])))) | |
1671 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1672 ;; Define both the Article menu in the summary buffer and the equivalent |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1673 ;; Commands menu in the article buffer here for consistency. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1674 (let ((innards |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1675 '(("Hide" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1676 ["All" gnus-article-hide t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1677 ["Headers" gnus-article-hide-headers t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1678 ["Signature" gnus-article-hide-signature t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1679 ["Citation" gnus-article-hide-citation t] |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1680 ["List identifiers" gnus-article-hide-list-identifiers t] |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1681 ["PGP" gnus-article-hide-pgp t] |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1682 ["Banner" gnus-article-strip-banner t] |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1683 ["Boring headers" gnus-article-hide-boring-headers t]) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1684 ("Highlight" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1685 ["All" gnus-article-highlight t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1686 ["Headers" gnus-article-highlight-headers t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1687 ["Signature" gnus-article-highlight-signature t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1688 ["Citation" gnus-article-highlight-citation t]) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1689 ("MIME" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1690 ["Words" gnus-article-decode-mime-words t] |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1691 ["Charset" gnus-article-decode-charset t] |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1692 ["QP" gnus-article-de-quoted-unreadable t] |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1693 ["Base64" gnus-article-de-base64-unreadable t] |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1694 ["View all" gnus-mime-view-all-parts t]) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1695 ("Date" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1696 ["Local" gnus-article-date-local t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1697 ["ISO8601" gnus-article-date-iso8601 t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1698 ["UT" gnus-article-date-ut t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1699 ["Original" gnus-article-date-original t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1700 ["Lapsed" gnus-article-date-lapsed t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1701 ["User-defined" gnus-article-date-user t]) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1702 ("Washing" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1703 ("Remove Blanks" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1704 ["Leading" gnus-article-strip-leading-blank-lines t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1705 ["Multiple" gnus-article-strip-multiple-blank-lines t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1706 ["Trailing" gnus-article-remove-trailing-blank-lines t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1707 ["All of the above" gnus-article-strip-blank-lines t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1708 ["All" gnus-article-strip-all-blank-lines t] |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1709 ["Leading space" gnus-article-strip-leading-space t] |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1710 ["Trailing space" gnus-article-strip-trailing-space t]) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1711 ["Overstrike" gnus-article-treat-overstrike t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1712 ["Dumb quotes" gnus-article-treat-dumbquotes t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1713 ["Emphasis" gnus-article-emphasize t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1714 ["Word wrap" gnus-article-fill-cited-article t] |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1715 ["Fill long lines" gnus-article-fill-long-lines t] |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1716 ["Capitalize sentences" gnus-article-capitalize-sentences t] |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1717 ["CR" gnus-article-remove-cr t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1718 ["Show X-Face" gnus-article-display-x-face t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1719 ["Quoted-Printable" gnus-article-de-quoted-unreadable t] |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1720 ["Base64" gnus-article-de-base64-unreadable t] |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1721 ["Rot 13" gnus-summary-caesar-message t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1722 ["Unix pipe" gnus-summary-pipe-message t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1723 ["Add buttons" gnus-article-add-buttons t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1724 ["Add buttons to head" gnus-article-add-buttons-to-head t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1725 ["Stop page breaking" gnus-summary-stop-page-breaking t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1726 ["Verbose header" gnus-summary-verbose-headers t] |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1727 ["Toggle header" gnus-summary-toggle-header t] |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1728 ["Html" gnus-article-wash-html t] |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1729 ["HZ" gnus-article-decode-HZ t]) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1730 ("Output" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1731 ["Save in default format" gnus-summary-save-article t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1732 ["Save in file" gnus-summary-save-article-file t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1733 ["Save in Unix mail format" gnus-summary-save-article-mail t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1734 ["Save in MH folder" gnus-summary-save-article-folder t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1735 ["Save in VM folder" gnus-summary-save-article-vm t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1736 ["Save in RMAIL mbox" gnus-summary-save-article-rmail t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1737 ["Save body in file" gnus-summary-save-article-body-file t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1738 ["Pipe through a filter" gnus-summary-pipe-output t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1739 ["Add to SOUP packet" gnus-soup-add-article t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1740 ["Print" gnus-summary-print-article t]) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1741 ("Backend" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1742 ["Respool article..." gnus-summary-respool-article t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1743 ["Move article..." gnus-summary-move-article |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1744 (gnus-check-backend-function |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1745 'request-move-article gnus-newsgroup-name)] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1746 ["Copy article..." gnus-summary-copy-article t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1747 ["Crosspost article..." gnus-summary-crosspost-article |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1748 (gnus-check-backend-function |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1749 'request-replace-article gnus-newsgroup-name)] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1750 ["Import file..." gnus-summary-import-article t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1751 ["Check if posted" gnus-summary-article-posted-p t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1752 ["Edit article" gnus-summary-edit-article |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1753 (not (gnus-group-read-only-p))] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1754 ["Delete article" gnus-summary-delete-article |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1755 (gnus-check-backend-function |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1756 'request-expire-articles gnus-newsgroup-name)] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1757 ["Query respool" gnus-summary-respool-query t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1758 ["Trace respool" gnus-summary-respool-trace t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1759 ["Delete expirable articles" gnus-summary-expire-articles-now |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1760 (gnus-check-backend-function |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1761 'request-expire-articles gnus-newsgroup-name)]) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1762 ("Extract" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1763 ["Uudecode" gnus-uu-decode-uu t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1764 ["Uudecode and save" gnus-uu-decode-uu-and-save t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1765 ["Unshar" gnus-uu-decode-unshar t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1766 ["Unshar and save" gnus-uu-decode-unshar-and-save t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1767 ["Save" gnus-uu-decode-save t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1768 ["Binhex" gnus-uu-decode-binhex t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1769 ["Postscript" gnus-uu-decode-postscript t]) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1770 ("Cache" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1771 ["Enter article" gnus-cache-enter-article t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1772 ["Remove article" gnus-cache-remove-article t]) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1773 ["Translate" gnus-article-babel t] |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1774 ["Select article buffer" gnus-summary-select-article-buffer t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1775 ["Enter digest buffer" gnus-summary-enter-digest-group t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1776 ["Isearch article..." gnus-summary-isearch-article t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1777 ["Beginning of the article" gnus-summary-beginning-of-article t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1778 ["End of the article" gnus-summary-end-of-article t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1779 ["Fetch parent of article" gnus-summary-refer-parent-article t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1780 ["Fetch referenced articles" gnus-summary-refer-references t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1781 ["Fetch current thread" gnus-summary-refer-thread t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1782 ["Fetch article with id..." gnus-summary-refer-article t] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1783 ["Redisplay" gnus-summary-show-article t]))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1784 (easy-menu-define |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1785 gnus-summary-article-menu gnus-summary-mode-map "" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1786 (cons "Article" innards)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1787 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1788 (easy-menu-define |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1789 gnus-article-commands-menu gnus-article-mode-map "" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1790 (cons "Commands" innards))) |
17493 | 1791 |
1792 (easy-menu-define | |
1793 gnus-summary-thread-menu gnus-summary-mode-map "" | |
1794 '("Threads" | |
1795 ["Toggle threading" gnus-summary-toggle-threads t] | |
1796 ["Hide threads" gnus-summary-hide-all-threads t] | |
1797 ["Show threads" gnus-summary-show-all-threads t] | |
1798 ["Hide thread" gnus-summary-hide-thread t] | |
1799 ["Show thread" gnus-summary-show-thread t] | |
1800 ["Go to next thread" gnus-summary-next-thread t] | |
1801 ["Go to previous thread" gnus-summary-prev-thread t] | |
1802 ["Go down thread" gnus-summary-down-thread t] | |
1803 ["Go up thread" gnus-summary-up-thread t] | |
1804 ["Top of thread" gnus-summary-top-thread t] | |
1805 ["Mark thread as read" gnus-summary-kill-thread t] | |
1806 ["Lower thread score" gnus-summary-lower-thread t] | |
1807 ["Raise thread score" gnus-summary-raise-thread t] | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1808 ["Rethread current" gnus-summary-rethread-current t])) |
17493 | 1809 |
1810 (easy-menu-define | |
1811 gnus-summary-post-menu gnus-summary-mode-map "" | |
1812 '("Post" | |
1813 ["Post an article" gnus-summary-post-news t] | |
1814 ["Followup" gnus-summary-followup t] | |
1815 ["Followup and yank" gnus-summary-followup-with-original t] | |
1816 ["Supersede article" gnus-summary-supersede-article t] | |
1817 ["Cancel article" gnus-summary-cancel-article t] | |
1818 ["Reply" gnus-summary-reply t] | |
1819 ["Reply and yank" gnus-summary-reply-with-original t] | |
1820 ["Wide reply" gnus-summary-wide-reply t] | |
1821 ["Wide reply and yank" gnus-summary-wide-reply-with-original t] | |
1822 ["Mail forward" gnus-summary-mail-forward t] | |
1823 ["Post forward" gnus-summary-post-forward t] | |
1824 ["Digest and mail" gnus-uu-digest-mail-forward t] | |
1825 ["Digest and post" gnus-uu-digest-post-forward t] | |
1826 ["Resend message" gnus-summary-resend-message t] | |
1827 ["Send bounced mail" gnus-summary-resend-bounced-mail t] | |
1828 ["Send a mail" gnus-summary-mail-other-window t] | |
1829 ["Uuencode and post" gnus-uu-post-news t] | |
1830 ["Followup via news" gnus-summary-followup-to-mail t] | |
1831 ["Followup via news and yank" | |
1832 gnus-summary-followup-to-mail-with-original t] | |
1833 ;;("Draft" | |
1834 ;;["Send" gnus-summary-send-draft t] | |
1835 ;;["Send bounced" gnus-resend-bounced-mail t]) | |
1836 )) | |
1837 | |
1838 (easy-menu-define | |
1839 gnus-summary-misc-menu gnus-summary-mode-map "" | |
1840 '("Misc" | |
1841 ("Mark Read" | |
1842 ["Mark as read" gnus-summary-mark-as-read-forward t] | |
1843 ["Mark same subject and select" | |
1844 gnus-summary-kill-same-subject-and-select t] | |
1845 ["Mark same subject" gnus-summary-kill-same-subject t] | |
1846 ["Catchup" gnus-summary-catchup t] | |
1847 ["Catchup all" gnus-summary-catchup-all t] | |
1848 ["Catchup to here" gnus-summary-catchup-to-here t] | |
1849 ["Catchup region" gnus-summary-mark-region-as-read t] | |
1850 ["Mark excluded" gnus-summary-limit-mark-excluded-as-read t]) | |
1851 ("Mark Various" | |
1852 ["Tick" gnus-summary-tick-article-forward t] | |
1853 ["Mark as dormant" gnus-summary-mark-as-dormant t] | |
1854 ["Remove marks" gnus-summary-clear-mark-forward t] | |
1855 ["Set expirable mark" gnus-summary-mark-as-expirable t] | |
1856 ["Set bookmark" gnus-summary-set-bookmark t] | |
1857 ["Remove bookmark" gnus-summary-remove-bookmark t]) | |
1858 ("Mark Limit" | |
1859 ["Marks..." gnus-summary-limit-to-marks t] | |
1860 ["Subject..." gnus-summary-limit-to-subject t] | |
1861 ["Author..." gnus-summary-limit-to-author t] | |
1862 ["Age..." gnus-summary-limit-to-age t] | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1863 ["Extra..." gnus-summary-limit-to-extra t] |
17493 | 1864 ["Score" gnus-summary-limit-to-score t] |
1865 ["Unread" gnus-summary-limit-to-unread t] | |
1866 ["Non-dormant" gnus-summary-limit-exclude-dormant t] | |
1867 ["Articles" gnus-summary-limit-to-articles t] | |
1868 ["Pop limit" gnus-summary-pop-limit t] | |
1869 ["Show dormant" gnus-summary-limit-include-dormant t] | |
1870 ["Hide childless dormant" | |
1871 gnus-summary-limit-exclude-childless-dormant t] | |
1872 ;;["Hide thread" gnus-summary-limit-exclude-thread t] | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1873 ["Hide marked" gnus-summary-limit-exclude-marks t] |
17493 | 1874 ["Show expunged" gnus-summary-show-all-expunged t]) |
1875 ("Process Mark" | |
1876 ["Set mark" gnus-summary-mark-as-processable t] | |
1877 ["Remove mark" gnus-summary-unmark-as-processable t] | |
1878 ["Remove all marks" gnus-summary-unmark-all-processable t] | |
1879 ["Mark above" gnus-uu-mark-over t] | |
1880 ["Mark series" gnus-uu-mark-series t] | |
1881 ["Mark region" gnus-uu-mark-region t] | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1882 ["Unmark region" gnus-uu-unmark-region t] |
17493 | 1883 ["Mark by regexp..." gnus-uu-mark-by-regexp t] |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1884 ["Unmark by regexp..." gnus-uu-unmark-by-regexp t] |
17493 | 1885 ["Mark all" gnus-uu-mark-all t] |
1886 ["Mark buffer" gnus-uu-mark-buffer t] | |
1887 ["Mark sparse" gnus-uu-mark-sparse t] | |
1888 ["Mark thread" gnus-uu-mark-thread t] | |
1889 ["Unmark thread" gnus-uu-unmark-thread t] | |
1890 ("Process Mark Sets" | |
1891 ["Kill" gnus-summary-kill-process-mark t] | |
1892 ["Yank" gnus-summary-yank-process-mark | |
1893 gnus-newsgroup-process-stack] | |
1894 ["Save" gnus-summary-save-process-mark t])) | |
1895 ("Scroll article" | |
1896 ["Page forward" gnus-summary-next-page t] | |
1897 ["Page backward" gnus-summary-prev-page t] | |
1898 ["Line forward" gnus-summary-scroll-up t]) | |
1899 ("Move" | |
1900 ["Next unread article" gnus-summary-next-unread-article t] | |
1901 ["Previous unread article" gnus-summary-prev-unread-article t] | |
1902 ["Next article" gnus-summary-next-article t] | |
1903 ["Previous article" gnus-summary-prev-article t] | |
1904 ["Next unread subject" gnus-summary-next-unread-subject t] | |
1905 ["Previous unread subject" gnus-summary-prev-unread-subject t] | |
1906 ["Next article same subject" gnus-summary-next-same-subject t] | |
1907 ["Previous article same subject" gnus-summary-prev-same-subject t] | |
1908 ["First unread article" gnus-summary-first-unread-article t] | |
1909 ["Best unread article" gnus-summary-best-unread-article t] | |
1910 ["Go to subject number..." gnus-summary-goto-subject t] | |
1911 ["Go to article number..." gnus-summary-goto-article t] | |
1912 ["Go to the last article" gnus-summary-goto-last-article t] | |
1913 ["Pop article off history" gnus-summary-pop-article t]) | |
1914 ("Sort" | |
1915 ["Sort by number" gnus-summary-sort-by-number t] | |
1916 ["Sort by author" gnus-summary-sort-by-author t] | |
1917 ["Sort by subject" gnus-summary-sort-by-subject t] | |
1918 ["Sort by date" gnus-summary-sort-by-date t] | |
1919 ["Sort by score" gnus-summary-sort-by-score t] | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1920 ["Sort by lines" gnus-summary-sort-by-lines t] |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1921 ["Sort by characters" gnus-summary-sort-by-chars t]) |
17493 | 1922 ("Help" |
1923 ["Fetch group FAQ" gnus-summary-fetch-faq t] | |
1924 ["Describe group" gnus-summary-describe-group t] | |
1925 ["Read manual" gnus-info-find-node t]) | |
1926 ("Modes" | |
1927 ["Pick and read" gnus-pick-mode t] | |
1928 ["Binary" gnus-binary-mode t]) | |
1929 ("Regeneration" | |
1930 ["Regenerate" gnus-summary-prepare t] | |
1931 ["Insert cached articles" gnus-summary-insert-cached-articles t] | |
1932 ["Toggle threading" gnus-summary-toggle-threads t]) | |
1933 ["Filter articles..." gnus-summary-execute-command t] | |
1934 ["Run command on subjects..." gnus-summary-universal-argument t] | |
1935 ["Search articles forward..." gnus-summary-search-article-forward t] | |
1936 ["Search articles backward..." gnus-summary-search-article-backward t] | |
1937 ["Toggle line truncation" gnus-summary-toggle-truncation t] | |
1938 ["Expand window" gnus-summary-expand-window t] | |
1939 ["Expire expirable articles" gnus-summary-expire-articles | |
1940 (gnus-check-backend-function | |
1941 'request-expire-articles gnus-newsgroup-name)] | |
1942 ["Edit local kill file" gnus-summary-edit-local-kill t] | |
1943 ["Edit main kill file" gnus-summary-edit-global-kill t] | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1944 ["Edit group parameters" gnus-summary-edit-parameters t] |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1945 ["Customize group parameters" gnus-summary-customize-parameters t] |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1946 ["Send a bug report" gnus-bug t] |
17493 | 1947 ("Exit" |
1948 ["Catchup and exit" gnus-summary-catchup-and-exit t] | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1949 ["Catchup all and exit" gnus-summary-catchup-all-and-exit t] |
17493 | 1950 ["Catchup and goto next" gnus-summary-catchup-and-goto-next-group t] |
1951 ["Exit group" gnus-summary-exit t] | |
1952 ["Exit group without updating" gnus-summary-exit-no-update t] | |
1953 ["Exit and goto next group" gnus-summary-next-group t] | |
1954 ["Exit and goto prev group" gnus-summary-prev-group t] | |
1955 ["Reselect group" gnus-summary-reselect-current-group t] | |
1956 ["Rescan group" gnus-summary-rescan-group t] | |
1957 ["Update dribble" gnus-summary-save-newsrc t]))) | |
1958 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
1959 (gnus-run-hooks 'gnus-summary-menu-hook))) |
17493 | 1960 |
1961 (defun gnus-score-set-default (var value) | |
1962 "A version of set that updates the GNU Emacs menu-bar." | |
1963 (set var value) | |
1964 ;; It is the message that forces the active status to be updated. | |
1965 (message "")) | |
1966 | |
1967 (defun gnus-make-score-map (type) | |
1968 "Make a summary score map of type TYPE." | |
1969 (if t | |
1970 nil | |
1971 (let ((headers '(("author" "from" string) | |
1972 ("subject" "subject" string) | |
1973 ("article body" "body" string) | |
1974 ("article head" "head" string) | |
1975 ("xref" "xref" string) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
1976 ("extra header" "extra" string) |
17493 | 1977 ("lines" "lines" number) |
1978 ("followups to author" "followup" string))) | |
1979 (types '((number ("less than" <) | |
1980 ("greater than" >) | |
1981 ("equal" =)) | |
1982 (string ("substring" s) | |
1983 ("exact string" e) | |
1984 ("fuzzy string" f) | |
1985 ("regexp" r)))) | |
1986 (perms '(("temporary" (current-time-string)) | |
1987 ("permanent" nil) | |
1988 ("immediate" now))) | |
1989 header) | |
1990 (list | |
1991 (apply | |
1992 'nconc | |
1993 (list | |
1994 (if (eq type 'lower) | |
1995 "Lower score" | |
1996 "Increase score")) | |
1997 (let (outh) | |
1998 (while headers | |
1999 (setq header (car headers)) | |
2000 (setq outh | |
2001 (cons | |
2002 (apply | |
2003 'nconc | |
2004 (list (car header)) | |
2005 (let ((ts (cdr (assoc (nth 2 header) types))) | |
2006 outt) | |
2007 (while ts | |
2008 (setq outt | |
2009 (cons | |
2010 (apply | |
2011 'nconc | |
2012 (list (caar ts)) | |
2013 (let ((ps perms) | |
2014 outp) | |
2015 (while ps | |
2016 (setq outp | |
2017 (cons | |
2018 (vector | |
2019 (caar ps) | |
2020 (list | |
2021 'gnus-summary-score-entry | |
2022 (nth 1 header) | |
2023 (if (or (string= (nth 1 header) | |
2024 "head") | |
2025 (string= (nth 1 header) | |
2026 "body")) | |
2027 "" | |
2028 (list 'gnus-summary-header | |
2029 (nth 1 header))) | |
2030 (list 'quote (nth 1 (car ts))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2031 (list 'gnus-score-delta-default |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2032 nil) |
17493 | 2033 (nth 1 (car ps)) |
2034 t) | |
2035 t) | |
2036 outp)) | |
2037 (setq ps (cdr ps))) | |
2038 (list (nreverse outp)))) | |
2039 outt)) | |
2040 (setq ts (cdr ts))) | |
2041 (list (nreverse outt)))) | |
2042 outh)) | |
2043 (setq headers (cdr headers))) | |
2044 (list (nreverse outh)))))))) | |
2045 | |
2046 | |
2047 | |
2048 (defun gnus-summary-mode (&optional group) | |
2049 "Major mode for reading articles. | |
2050 | |
2051 All normal editing commands are switched off. | |
2052 \\<gnus-summary-mode-map> | |
2053 Each line in this buffer represents one article. To read an | |
2054 article, you can, for instance, type `\\[gnus-summary-next-page]'. To move forwards | |
2055 and backwards while displaying articles, type `\\[gnus-summary-next-unread-article]' and `\\[gnus-summary-prev-unread-article]', | |
2056 respectively. | |
2057 | |
2058 You can also post articles and send mail from this buffer. To | |
2059 follow up an article, type `\\[gnus-summary-followup]'. To mail a reply to the author | |
2060 of an article, type `\\[gnus-summary-reply]'. | |
2061 | |
2062 There are approx. one gazillion commands you can execute in this | |
2063 buffer; read the info pages for more information (`\\[gnus-info-find-node]'). | |
2064 | |
2065 The following commands are available: | |
2066 | |
2067 \\{gnus-summary-mode-map}" | |
2068 (interactive) | |
2069 (when (gnus-visual-p 'summary-menu 'menu) | |
2070 (gnus-summary-make-menu-bar)) | |
2071 (kill-all-local-variables) | |
2072 (gnus-summary-make-local-variables) | |
2073 (gnus-make-thread-indent-array) | |
2074 (gnus-simplify-mode-line) | |
2075 (setq major-mode 'gnus-summary-mode) | |
2076 (setq mode-name "Summary") | |
2077 (make-local-variable 'minor-mode-alist) | |
2078 (use-local-map gnus-summary-mode-map) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2079 (buffer-disable-undo) |
17493 | 2080 (setq buffer-read-only t) ;Disable modification |
2081 (setq truncate-lines t) | |
2082 (setq selective-display t) | |
2083 (setq selective-display-ellipses t) ;Display `...' | |
2084 (gnus-summary-set-display-table) | |
2085 (gnus-set-default-directory) | |
2086 (setq gnus-newsgroup-name group) | |
2087 (make-local-variable 'gnus-summary-line-format) | |
2088 (make-local-variable 'gnus-summary-line-format-spec) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2089 (make-local-variable 'gnus-summary-dummy-line-format) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2090 (make-local-variable 'gnus-summary-dummy-line-format-spec) |
17493 | 2091 (make-local-variable 'gnus-summary-mark-positions) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2092 (make-local-hook 'pre-command-hook) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2093 (add-hook 'pre-command-hook 'gnus-set-global-variables nil t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2094 (gnus-run-hooks 'gnus-summary-mode-hook) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2095 (mm-enable-multibyte) |
17493 | 2096 (gnus-update-format-specifications nil 'summary 'summary-mode 'summary-dummy) |
2097 (gnus-update-summary-mark-positions)) | |
2098 | |
2099 (defun gnus-summary-make-local-variables () | |
2100 "Make all the local summary buffer variables." | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2101 (let (global) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2102 (dolist (local gnus-summary-local-variables) |
17493 | 2103 (if (consp local) |
2104 (progn | |
2105 (if (eq (cdr local) 'global) | |
2106 ;; Copy the global value of the variable. | |
2107 (setq global (symbol-value (car local))) | |
2108 ;; Use the value from the list. | |
2109 (setq global (eval (cdr local)))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2110 (set (make-local-variable (car local)) global)) |
17493 | 2111 ;; Simple nil-valued local variable. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2112 (set (make-local-variable local) nil))))) |
17493 | 2113 |
2114 (defun gnus-summary-clear-local-variables () | |
2115 (let ((locals gnus-summary-local-variables)) | |
2116 (while locals | |
2117 (if (consp (car locals)) | |
2118 (and (vectorp (caar locals)) | |
2119 (set (caar locals) nil)) | |
2120 (and (vectorp (car locals)) | |
2121 (set (car locals) nil))) | |
2122 (setq locals (cdr locals))))) | |
2123 | |
2124 ;; Summary data functions. | |
2125 | |
2126 (defmacro gnus-data-number (data) | |
2127 `(car ,data)) | |
2128 | |
2129 (defmacro gnus-data-set-number (data number) | |
2130 `(setcar ,data ,number)) | |
2131 | |
2132 (defmacro gnus-data-mark (data) | |
2133 `(nth 1 ,data)) | |
2134 | |
2135 (defmacro gnus-data-set-mark (data mark) | |
2136 `(setcar (nthcdr 1 ,data) ,mark)) | |
2137 | |
2138 (defmacro gnus-data-pos (data) | |
2139 `(nth 2 ,data)) | |
2140 | |
2141 (defmacro gnus-data-set-pos (data pos) | |
2142 `(setcar (nthcdr 2 ,data) ,pos)) | |
2143 | |
2144 (defmacro gnus-data-header (data) | |
2145 `(nth 3 ,data)) | |
2146 | |
2147 (defmacro gnus-data-set-header (data header) | |
2148 `(setf (nth 3 ,data) ,header)) | |
2149 | |
2150 (defmacro gnus-data-level (data) | |
2151 `(nth 4 ,data)) | |
2152 | |
2153 (defmacro gnus-data-unread-p (data) | |
2154 `(= (nth 1 ,data) gnus-unread-mark)) | |
2155 | |
2156 (defmacro gnus-data-read-p (data) | |
2157 `(/= (nth 1 ,data) gnus-unread-mark)) | |
2158 | |
2159 (defmacro gnus-data-pseudo-p (data) | |
2160 `(consp (nth 3 ,data))) | |
2161 | |
2162 (defmacro gnus-data-find (number) | |
2163 `(assq ,number gnus-newsgroup-data)) | |
2164 | |
2165 (defmacro gnus-data-find-list (number &optional data) | |
2166 `(let ((bdata ,(or data 'gnus-newsgroup-data))) | |
2167 (memq (assq ,number bdata) | |
2168 bdata))) | |
2169 | |
2170 (defmacro gnus-data-make (number mark pos header level) | |
2171 `(list ,number ,mark ,pos ,header ,level)) | |
2172 | |
2173 (defun gnus-data-enter (after-article number mark pos header level offset) | |
2174 (let ((data (gnus-data-find-list after-article))) | |
2175 (unless data | |
2176 (error "No such article: %d" after-article)) | |
2177 (setcdr data (cons (gnus-data-make number mark pos header level) | |
2178 (cdr data))) | |
2179 (setq gnus-newsgroup-data-reverse nil) | |
2180 (gnus-data-update-list (cddr data) offset))) | |
2181 | |
2182 (defun gnus-data-enter-list (after-article list &optional offset) | |
2183 (when list | |
2184 (let ((data (and after-article (gnus-data-find-list after-article))) | |
2185 (ilist list)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2186 (if (not (or data |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2187 after-article)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2188 (let ((odata gnus-newsgroup-data)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2189 (setq gnus-newsgroup-data (nconc list gnus-newsgroup-data)) |
17493 | 2190 (when offset |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2191 (gnus-data-update-list odata offset))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2192 ;; Find the last element in the list to be spliced into the main |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2193 ;; list. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2194 (while (cdr list) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2195 (setq list (cdr list))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2196 (if (not data) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2197 (progn |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2198 (setcdr list gnus-newsgroup-data) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2199 (setq gnus-newsgroup-data ilist) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2200 (when offset |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2201 (gnus-data-update-list (cdr list) offset))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2202 (setcdr list (cdr data)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2203 (setcdr data ilist) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2204 (when offset |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2205 (gnus-data-update-list (cdr list) offset)))) |
17493 | 2206 (setq gnus-newsgroup-data-reverse nil)))) |
2207 | |
2208 (defun gnus-data-remove (article &optional offset) | |
2209 (let ((data gnus-newsgroup-data)) | |
2210 (if (= (gnus-data-number (car data)) article) | |
2211 (progn | |
2212 (setq gnus-newsgroup-data (cdr gnus-newsgroup-data) | |
2213 gnus-newsgroup-data-reverse nil) | |
2214 (when offset | |
2215 (gnus-data-update-list gnus-newsgroup-data offset))) | |
2216 (while (cdr data) | |
2217 (when (= (gnus-data-number (cadr data)) article) | |
2218 (setcdr data (cddr data)) | |
2219 (when offset | |
2220 (gnus-data-update-list (cdr data) offset)) | |
2221 (setq data nil | |
2222 gnus-newsgroup-data-reverse nil)) | |
2223 (setq data (cdr data)))))) | |
2224 | |
2225 (defmacro gnus-data-list (backward) | |
2226 `(if ,backward | |
2227 (or gnus-newsgroup-data-reverse | |
2228 (setq gnus-newsgroup-data-reverse | |
2229 (reverse gnus-newsgroup-data))) | |
2230 gnus-newsgroup-data)) | |
2231 | |
2232 (defun gnus-data-update-list (data offset) | |
2233 "Add OFFSET to the POS of all data entries in DATA." | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2234 (setq gnus-newsgroup-data-reverse nil) |
17493 | 2235 (while data |
2236 (setcar (nthcdr 2 (car data)) (+ offset (nth 2 (car data)))) | |
2237 (setq data (cdr data)))) | |
2238 | |
2239 (defun gnus-summary-article-pseudo-p (article) | |
2240 "Say whether this article is a pseudo article or not." | |
2241 (not (vectorp (gnus-data-header (gnus-data-find article))))) | |
2242 | |
2243 (defmacro gnus-summary-article-sparse-p (article) | |
2244 "Say whether this article is a sparse article or not." | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
2245 `(memq ,article gnus-newsgroup-sparse)) |
17493 | 2246 |
2247 (defmacro gnus-summary-article-ancient-p (article) | |
2248 "Say whether this article is a sparse article or not." | |
2249 `(memq ,article gnus-newsgroup-ancient)) | |
2250 | |
2251 (defun gnus-article-parent-p (number) | |
2252 "Say whether this article is a parent or not." | |
2253 (let ((data (gnus-data-find-list number))) | |
2254 (and (cdr data) ; There has to be an article after... | |
2255 (< (gnus-data-level (car data)) ; And it has to have a higher level. | |
2256 (gnus-data-level (nth 1 data)))))) | |
2257 | |
2258 (defun gnus-article-children (number) | |
2259 "Return a list of all children to NUMBER." | |
2260 (let* ((data (gnus-data-find-list number)) | |
2261 (level (gnus-data-level (car data))) | |
2262 children) | |
2263 (setq data (cdr data)) | |
2264 (while (and data | |
2265 (= (gnus-data-level (car data)) (1+ level))) | |
2266 (push (gnus-data-number (car data)) children) | |
2267 (setq data (cdr data))) | |
2268 children)) | |
2269 | |
2270 (defmacro gnus-summary-skip-intangible () | |
2271 "If the current article is intangible, then jump to a different article." | |
2272 '(let ((to (get-text-property (point) 'gnus-intangible))) | |
2273 (and to (gnus-summary-goto-subject to)))) | |
2274 | |
2275 (defmacro gnus-summary-article-intangible-p () | |
2276 "Say whether this article is intangible or not." | |
2277 '(get-text-property (point) 'gnus-intangible)) | |
2278 | |
2279 (defun gnus-article-read-p (article) | |
2280 "Say whether ARTICLE is read or not." | |
2281 (not (or (memq article gnus-newsgroup-marked) | |
2282 (memq article gnus-newsgroup-unreads) | |
2283 (memq article gnus-newsgroup-unselected) | |
2284 (memq article gnus-newsgroup-dormant)))) | |
2285 | |
2286 ;; Some summary mode macros. | |
2287 | |
2288 (defmacro gnus-summary-article-number () | |
2289 "The article number of the article on the current line. | |
2290 If there isn's an article number here, then we return the current | |
2291 article number." | |
2292 '(progn | |
2293 (gnus-summary-skip-intangible) | |
2294 (or (get-text-property (point) 'gnus-number) | |
2295 (gnus-summary-last-subject)))) | |
2296 | |
2297 (defmacro gnus-summary-article-header (&optional number) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2298 "Return the header of article NUMBER." |
17493 | 2299 `(gnus-data-header (gnus-data-find |
2300 ,(or number '(gnus-summary-article-number))))) | |
2301 | |
2302 (defmacro gnus-summary-thread-level (&optional number) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2303 "Return the level of thread that starts with article NUMBER." |
17493 | 2304 `(if (and (eq gnus-summary-make-false-root 'dummy) |
2305 (get-text-property (point) 'gnus-intangible)) | |
2306 0 | |
2307 (gnus-data-level (gnus-data-find | |
2308 ,(or number '(gnus-summary-article-number)))))) | |
2309 | |
2310 (defmacro gnus-summary-article-mark (&optional number) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2311 "Return the mark of article NUMBER." |
17493 | 2312 `(gnus-data-mark (gnus-data-find |
2313 ,(or number '(gnus-summary-article-number))))) | |
2314 | |
2315 (defmacro gnus-summary-article-pos (&optional number) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2316 "Return the position of the line of article NUMBER." |
17493 | 2317 `(gnus-data-pos (gnus-data-find |
2318 ,(or number '(gnus-summary-article-number))))) | |
2319 | |
2320 (defalias 'gnus-summary-subject-string 'gnus-summary-article-subject) | |
2321 (defmacro gnus-summary-article-subject (&optional number) | |
2322 "Return current subject string or nil if nothing." | |
2323 `(let ((headers | |
2324 ,(if number | |
2325 `(gnus-data-header (assq ,number gnus-newsgroup-data)) | |
2326 '(gnus-data-header (assq (gnus-summary-article-number) | |
2327 gnus-newsgroup-data))))) | |
2328 (and headers | |
2329 (vectorp headers) | |
2330 (mail-header-subject headers)))) | |
2331 | |
2332 (defmacro gnus-summary-article-score (&optional number) | |
2333 "Return current article score." | |
2334 `(or (cdr (assq ,(or number '(gnus-summary-article-number)) | |
2335 gnus-newsgroup-scored)) | |
2336 gnus-summary-default-score 0)) | |
2337 | |
2338 (defun gnus-summary-article-children (&optional number) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2339 "Return a list of article numbers that are children of article NUMBER." |
17493 | 2340 (let* ((data (gnus-data-find-list (or number (gnus-summary-article-number)))) |
2341 (level (gnus-data-level (car data))) | |
2342 l children) | |
2343 (while (and (setq data (cdr data)) | |
2344 (> (setq l (gnus-data-level (car data))) level)) | |
2345 (and (= (1+ level) l) | |
2346 (push (gnus-data-number (car data)) | |
2347 children))) | |
2348 (nreverse children))) | |
2349 | |
2350 (defun gnus-summary-article-parent (&optional number) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2351 "Return the article number of the parent of article NUMBER." |
17493 | 2352 (let* ((data (gnus-data-find-list (or number (gnus-summary-article-number)) |
2353 (gnus-data-list t))) | |
2354 (level (gnus-data-level (car data)))) | |
2355 (if (zerop level) | |
2356 () ; This is a root. | |
2357 ;; We search until we find an article with a level less than | |
2358 ;; this one. That function has to be the parent. | |
2359 (while (and (setq data (cdr data)) | |
2360 (not (< (gnus-data-level (car data)) level)))) | |
2361 (and data (gnus-data-number (car data)))))) | |
2362 | |
2363 (defun gnus-unread-mark-p (mark) | |
2364 "Say whether MARK is the unread mark." | |
2365 (= mark gnus-unread-mark)) | |
2366 | |
2367 (defun gnus-read-mark-p (mark) | |
2368 "Say whether MARK is one of the marks that mark as read. | |
2369 This is all marks except unread, ticked, dormant, and expirable." | |
2370 (not (or (= mark gnus-unread-mark) | |
2371 (= mark gnus-ticked-mark) | |
2372 (= mark gnus-dormant-mark) | |
2373 (= mark gnus-expirable-mark)))) | |
2374 | |
2375 (defmacro gnus-article-mark (number) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2376 "Return the MARK of article NUMBER. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2377 This macro should only be used when computing the mark the \"first\" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2378 time; i.e., when generating the summary lines. After that, |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2379 `gnus-summary-article-mark' should be used to examine the |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2380 marks of articles." |
17493 | 2381 `(cond |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2382 ((memq ,number gnus-newsgroup-unsendable) gnus-unsendable-mark) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2383 ((memq ,number gnus-newsgroup-undownloaded) gnus-undownloaded-mark) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2384 ((memq ,number gnus-newsgroup-downloadable) gnus-downloadable-mark) |
17493 | 2385 ((memq ,number gnus-newsgroup-unreads) gnus-unread-mark) |
2386 ((memq ,number gnus-newsgroup-marked) gnus-ticked-mark) | |
2387 ((memq ,number gnus-newsgroup-dormant) gnus-dormant-mark) | |
2388 ((memq ,number gnus-newsgroup-expirable) gnus-expirable-mark) | |
2389 (t (or (cdr (assq ,number gnus-newsgroup-reads)) | |
2390 gnus-ancient-mark)))) | |
2391 | |
2392 ;; Saving hidden threads. | |
2393 | |
2394 (put 'gnus-save-hidden-threads 'lisp-indent-function 0) | |
2395 (put 'gnus-save-hidden-threads 'edebug-form-spec '(body)) | |
2396 | |
2397 (defmacro gnus-save-hidden-threads (&rest forms) | |
2398 "Save hidden threads, eval FORMS, and restore the hidden threads." | |
2399 (let ((config (make-symbol "config"))) | |
2400 `(let ((,config (gnus-hidden-threads-configuration))) | |
2401 (unwind-protect | |
2402 (save-excursion | |
2403 ,@forms) | |
2404 (gnus-restore-hidden-threads-configuration ,config))))) | |
2405 | |
24552
ccf2939fc5ec
(gnus-data-compute-positions): Move down after
Andreas Schwab <schwab@suse.de>
parents:
24357
diff
changeset
|
2406 (defun gnus-data-compute-positions () |
ccf2939fc5ec
(gnus-data-compute-positions): Move down after
Andreas Schwab <schwab@suse.de>
parents:
24357
diff
changeset
|
2407 "Compute the positions of all articles." |
ccf2939fc5ec
(gnus-data-compute-positions): Move down after
Andreas Schwab <schwab@suse.de>
parents:
24357
diff
changeset
|
2408 (setq gnus-newsgroup-data-reverse nil) |
ccf2939fc5ec
(gnus-data-compute-positions): Move down after
Andreas Schwab <schwab@suse.de>
parents:
24357
diff
changeset
|
2409 (let ((data gnus-newsgroup-data)) |
ccf2939fc5ec
(gnus-data-compute-positions): Move down after
Andreas Schwab <schwab@suse.de>
parents:
24357
diff
changeset
|
2410 (save-excursion |
ccf2939fc5ec
(gnus-data-compute-positions): Move down after
Andreas Schwab <schwab@suse.de>
parents:
24357
diff
changeset
|
2411 (gnus-save-hidden-threads |
ccf2939fc5ec
(gnus-data-compute-positions): Move down after
Andreas Schwab <schwab@suse.de>
parents:
24357
diff
changeset
|
2412 (gnus-summary-show-all-threads) |
ccf2939fc5ec
(gnus-data-compute-positions): Move down after
Andreas Schwab <schwab@suse.de>
parents:
24357
diff
changeset
|
2413 (goto-char (point-min)) |
ccf2939fc5ec
(gnus-data-compute-positions): Move down after
Andreas Schwab <schwab@suse.de>
parents:
24357
diff
changeset
|
2414 (while data |
ccf2939fc5ec
(gnus-data-compute-positions): Move down after
Andreas Schwab <schwab@suse.de>
parents:
24357
diff
changeset
|
2415 (while (get-text-property (point) 'gnus-intangible) |
ccf2939fc5ec
(gnus-data-compute-positions): Move down after
Andreas Schwab <schwab@suse.de>
parents:
24357
diff
changeset
|
2416 (forward-line 1)) |
ccf2939fc5ec
(gnus-data-compute-positions): Move down after
Andreas Schwab <schwab@suse.de>
parents:
24357
diff
changeset
|
2417 (gnus-data-set-pos (car data) (+ (point) 3)) |
ccf2939fc5ec
(gnus-data-compute-positions): Move down after
Andreas Schwab <schwab@suse.de>
parents:
24357
diff
changeset
|
2418 (setq data (cdr data)) |
ccf2939fc5ec
(gnus-data-compute-positions): Move down after
Andreas Schwab <schwab@suse.de>
parents:
24357
diff
changeset
|
2419 (forward-line 1)))))) |
ccf2939fc5ec
(gnus-data-compute-positions): Move down after
Andreas Schwab <schwab@suse.de>
parents:
24357
diff
changeset
|
2420 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2421 (defun gnus-hidden-threads-configuration () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2422 "Return the current hidden threads configuration." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2423 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2424 (let (config) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2425 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2426 (while (search-forward "\r" nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2427 (push (1- (point)) config)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2428 config))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2429 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2430 (defun gnus-restore-hidden-threads-configuration (config) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2431 "Restore hidden threads configuration from CONFIG." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2432 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2433 (let (point buffer-read-only) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2434 (while (setq point (pop config)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2435 (when (and (< point (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2436 (goto-char point) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2437 (eq (char-after) ?\n)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2438 (subst-char-in-region point (1+ point) ?\n ?\r)))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2439 |
17493 | 2440 ;; Various summary mode internalish functions. |
2441 | |
2442 (defun gnus-mouse-pick-article (e) | |
2443 (interactive "e") | |
2444 (mouse-set-point e) | |
2445 (gnus-summary-next-page nil t)) | |
2446 | |
2447 (defun gnus-summary-set-display-table () | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2448 "Change the display table. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2449 Odd characters have a tendency to mess |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2450 up nicely formatted displays - we make all possible glyphs |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2451 display only a single character." |
17493 | 2452 |
2453 ;; We start from the standard display table, if any. | |
2454 (let ((table (or (copy-sequence standard-display-table) | |
2455 (make-display-table))) | |
2456 (i 32)) | |
2457 ;; Nix out all the control chars... | |
2458 (while (>= (setq i (1- i)) 0) | |
2459 (aset table i [??])) | |
2460 ;; ... but not newline and cr, of course. (cr is necessary for the | |
2461 ;; selective display). | |
2462 (aset table ?\n nil) | |
2463 (aset table ?\r nil) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2464 ;; We keep TAB as well. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2465 (aset table ?\t nil) |
17493 | 2466 ;; We nix out any glyphs over 126 that are not set already. |
2467 (let ((i 256)) | |
2468 (while (>= (setq i (1- i)) 127) | |
2469 ;; Only modify if the entry is nil. | |
2470 (unless (aref table i) | |
2471 (aset table i [??])))) | |
2472 (setq buffer-display-table table))) | |
2473 | |
2474 (defun gnus-summary-setup-buffer (group) | |
2475 "Initialize summary buffer." | |
2476 (let ((buffer (concat "*Summary " group "*"))) | |
2477 (if (get-buffer buffer) | |
2478 (progn | |
2479 (set-buffer buffer) | |
2480 (setq gnus-summary-buffer (current-buffer)) | |
2481 (not gnus-newsgroup-prepared)) | |
2482 ;; Fix by Sudish Joseph <joseph@cis.ohio-state.edu> | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2483 (setq gnus-summary-buffer (set-buffer (gnus-get-buffer-create buffer))) |
17493 | 2484 (gnus-summary-mode group) |
2485 (when gnus-carpal | |
2486 (gnus-carpal-setup-buffer 'summary)) | |
2487 (unless gnus-single-article-buffer | |
2488 (make-local-variable 'gnus-article-buffer) | |
2489 (make-local-variable 'gnus-article-current) | |
2490 (make-local-variable 'gnus-original-article-buffer)) | |
2491 (setq gnus-newsgroup-name group) | |
2492 t))) | |
2493 | |
2494 (defun gnus-set-global-variables () | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2495 "Set the global equivalents of the buffer-local variables. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2496 They are set to the latest values they had. These reflect the summary |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2497 buffer that was in action when the last article was fetched." |
17493 | 2498 (when (eq major-mode 'gnus-summary-mode) |
2499 (setq gnus-summary-buffer (current-buffer)) | |
2500 (let ((name gnus-newsgroup-name) | |
2501 (marked gnus-newsgroup-marked) | |
2502 (unread gnus-newsgroup-unreads) | |
2503 (headers gnus-current-headers) | |
2504 (data gnus-newsgroup-data) | |
2505 (summary gnus-summary-buffer) | |
2506 (article-buffer gnus-article-buffer) | |
2507 (original gnus-original-article-buffer) | |
2508 (gac gnus-article-current) | |
2509 (reffed gnus-reffed-article-number) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2510 (score-file gnus-current-score-file) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2511 (default-charset gnus-newsgroup-charset)) |
17493 | 2512 (save-excursion |
2513 (set-buffer gnus-group-buffer) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2514 (setq gnus-newsgroup-name name |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2515 gnus-newsgroup-marked marked |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2516 gnus-newsgroup-unreads unread |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2517 gnus-current-headers headers |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2518 gnus-newsgroup-data data |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2519 gnus-article-current gac |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2520 gnus-summary-buffer summary |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2521 gnus-article-buffer article-buffer |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2522 gnus-original-article-buffer original |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2523 gnus-reffed-article-number reffed |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2524 gnus-current-score-file score-file |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2525 gnus-newsgroup-charset default-charset) |
17493 | 2526 ;; The article buffer also has local variables. |
2527 (when (gnus-buffer-live-p gnus-article-buffer) | |
2528 (set-buffer gnus-article-buffer) | |
2529 (setq gnus-summary-buffer summary)))))) | |
2530 | |
2531 (defun gnus-summary-article-unread-p (article) | |
2532 "Say whether ARTICLE is unread or not." | |
2533 (memq article gnus-newsgroup-unreads)) | |
2534 | |
2535 (defun gnus-summary-first-article-p (&optional article) | |
2536 "Return whether ARTICLE is the first article in the buffer." | |
2537 (if (not (setq article (or article (gnus-summary-article-number)))) | |
2538 nil | |
2539 (eq article (caar gnus-newsgroup-data)))) | |
2540 | |
2541 (defun gnus-summary-last-article-p (&optional article) | |
2542 "Return whether ARTICLE is the last article in the buffer." | |
2543 (if (not (setq article (or article (gnus-summary-article-number)))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2544 ;; All non-existent numbers are the last article. :-) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2545 t |
17493 | 2546 (not (cdr (gnus-data-find-list article))))) |
2547 | |
2548 (defun gnus-make-thread-indent-array () | |
2549 (let ((n 200)) | |
2550 (unless (and gnus-thread-indent-array | |
2551 (= gnus-thread-indent-level gnus-thread-indent-array-level)) | |
2552 (setq gnus-thread-indent-array (make-vector 201 "") | |
2553 gnus-thread-indent-array-level gnus-thread-indent-level) | |
2554 (while (>= n 0) | |
2555 (aset gnus-thread-indent-array n | |
2556 (make-string (* n gnus-thread-indent-level) ? )) | |
2557 (setq n (1- n)))))) | |
2558 | |
2559 (defun gnus-update-summary-mark-positions () | |
2560 "Compute where the summary marks are to go." | |
2561 (save-excursion | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2562 (when (gnus-buffer-exists-p gnus-summary-buffer) |
17493 | 2563 (set-buffer gnus-summary-buffer)) |
2564 (let ((gnus-replied-mark 129) | |
2565 (gnus-score-below-mark 130) | |
2566 (gnus-score-over-mark 130) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2567 (gnus-download-mark 131) |
17493 | 2568 (spec gnus-summary-line-format-spec) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2569 gnus-visual pos) |
17493 | 2570 (save-excursion |
2571 (gnus-set-work-buffer) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2572 (let ((gnus-summary-line-format-spec spec) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2573 (gnus-newsgroup-downloadable '((0 . t)))) |
17493 | 2574 (gnus-summary-insert-line |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2575 [0 "" "" "" "" "" 0 0 "" nil] 0 nil 128 t nil "" nil 1) |
17493 | 2576 (goto-char (point-min)) |
2577 (setq pos (list (cons 'unread (and (search-forward "\200" nil t) | |
2578 (- (point) 2))))) | |
2579 (goto-char (point-min)) | |
2580 (push (cons 'replied (and (search-forward "\201" nil t) | |
2581 (- (point) 2))) | |
2582 pos) | |
2583 (goto-char (point-min)) | |
2584 (push (cons 'score (and (search-forward "\202" nil t) (- (point) 2))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2585 pos) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2586 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2587 (push (cons 'download |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2588 (and (search-forward "\203" nil t) (- (point) 2))) |
17493 | 2589 pos))) |
2590 (setq gnus-summary-mark-positions pos)))) | |
2591 | |
2592 (defun gnus-summary-insert-dummy-line (gnus-tmp-subject gnus-tmp-number) | |
2593 "Insert a dummy root in the summary buffer." | |
2594 (beginning-of-line) | |
2595 (gnus-add-text-properties | |
2596 (point) (progn (eval gnus-summary-dummy-line-format-spec) (point)) | |
2597 (list 'gnus-number gnus-tmp-number 'gnus-intangible gnus-tmp-number))) | |
2598 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2599 (defun gnus-summary-from-or-to-or-newsgroups (header) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2600 (let ((to (cdr (assq 'To (mail-header-extra header)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2601 (newsgroups (cdr (assq 'Newsgroups (mail-header-extra header)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2602 (mail-parse-charset gnus-newsgroup-charset) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2603 (mail-parse-ignored-charsets |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2604 (save-excursion (set-buffer gnus-summary-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2605 gnus-newsgroup-ignored-charsets))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2606 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2607 ((and to |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2608 gnus-ignored-from-addresses |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2609 (string-match gnus-ignored-from-addresses |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2610 (mail-header-from header))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2611 (concat "-> " |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2612 (or (car (funcall gnus-extract-address-components |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2613 (funcall |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2614 gnus-decode-encoded-word-function to))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2615 (funcall gnus-decode-encoded-word-function to)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2616 ((and newsgroups |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2617 gnus-ignored-from-addresses |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2618 (string-match gnus-ignored-from-addresses |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2619 (mail-header-from header))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2620 (concat "=> " newsgroups)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2621 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2622 (or (car (funcall gnus-extract-address-components |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2623 (mail-header-from header))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2624 (mail-header-from header)))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2625 |
17493 | 2626 (defun gnus-summary-insert-line (gnus-tmp-header |
2627 gnus-tmp-level gnus-tmp-current | |
2628 gnus-tmp-unread gnus-tmp-replied | |
2629 gnus-tmp-expirable gnus-tmp-subject-or-nil | |
2630 &optional gnus-tmp-dummy gnus-tmp-score | |
2631 gnus-tmp-process) | |
2632 (let* ((gnus-tmp-indentation (aref gnus-thread-indent-array gnus-tmp-level)) | |
2633 (gnus-tmp-lines (mail-header-lines gnus-tmp-header)) | |
2634 (gnus-tmp-score (or gnus-tmp-score gnus-summary-default-score 0)) | |
2635 (gnus-tmp-score-char | |
2636 (if (or (null gnus-summary-default-score) | |
2637 (<= (abs (- gnus-tmp-score gnus-summary-default-score)) | |
2638 gnus-summary-zcore-fuzz)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2639 ? ;Whitespace |
17493 | 2640 (if (< gnus-tmp-score gnus-summary-default-score) |
2641 gnus-score-below-mark gnus-score-over-mark))) | |
2642 (gnus-tmp-replied | |
2643 (cond (gnus-tmp-process gnus-process-mark) | |
2644 ((memq gnus-tmp-current gnus-newsgroup-cached) | |
2645 gnus-cached-mark) | |
2646 (gnus-tmp-replied gnus-replied-mark) | |
2647 ((memq gnus-tmp-current gnus-newsgroup-saved) | |
2648 gnus-saved-mark) | |
2649 (t gnus-unread-mark))) | |
2650 (gnus-tmp-from (mail-header-from gnus-tmp-header)) | |
2651 (gnus-tmp-name | |
2652 (cond | |
2653 ((string-match "<[^>]+> *$" gnus-tmp-from) | |
2654 (let ((beg (match-beginning 0))) | |
2655 (or (and (string-match "^\"[^\"]*\"" gnus-tmp-from) | |
2656 (substring gnus-tmp-from (1+ (match-beginning 0)) | |
2657 (1- (match-end 0)))) | |
2658 (substring gnus-tmp-from 0 beg)))) | |
2659 ((string-match "(.+)" gnus-tmp-from) | |
2660 (substring gnus-tmp-from | |
2661 (1+ (match-beginning 0)) (1- (match-end 0)))) | |
2662 (t gnus-tmp-from))) | |
2663 (gnus-tmp-subject (mail-header-subject gnus-tmp-header)) | |
2664 (gnus-tmp-number (mail-header-number gnus-tmp-header)) | |
2665 (gnus-tmp-opening-bracket (if gnus-tmp-dummy ?\< ?\[)) | |
2666 (gnus-tmp-closing-bracket (if gnus-tmp-dummy ?\> ?\])) | |
2667 (buffer-read-only nil)) | |
2668 (when (string= gnus-tmp-name "") | |
2669 (setq gnus-tmp-name gnus-tmp-from)) | |
2670 (unless (numberp gnus-tmp-lines) | |
2671 (setq gnus-tmp-lines 0)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2672 (gnus-put-text-property |
17493 | 2673 (point) |
2674 (progn (eval gnus-summary-line-format-spec) (point)) | |
2675 'gnus-number gnus-tmp-number) | |
2676 (when (gnus-visual-p 'summary-highlight 'highlight) | |
2677 (forward-line -1) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2678 (gnus-run-hooks 'gnus-summary-update-hook) |
17493 | 2679 (forward-line 1)))) |
2680 | |
2681 (defun gnus-summary-update-line (&optional dont-update) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2682 "Update summary line after change." |
17493 | 2683 (when (and gnus-summary-default-score |
2684 (not gnus-summary-inhibit-highlight)) | |
2685 (let* ((gnus-summary-inhibit-highlight t) ; Prevent recursion. | |
2686 (article (gnus-summary-article-number)) | |
2687 (score (gnus-summary-article-score article))) | |
2688 (unless dont-update | |
2689 (if (and gnus-summary-mark-below | |
2690 (< (gnus-summary-article-score) | |
2691 gnus-summary-mark-below)) | |
2692 ;; This article has a low score, so we mark it as read. | |
2693 (when (memq article gnus-newsgroup-unreads) | |
2694 (gnus-summary-mark-article-as-read gnus-low-score-mark)) | |
2695 (when (eq (gnus-summary-article-mark) gnus-low-score-mark) | |
2696 ;; This article was previously marked as read on account | |
2697 ;; of a low score, but now it has risen, so we mark it as | |
2698 ;; unread. | |
2699 (gnus-summary-mark-article-as-unread gnus-unread-mark))) | |
2700 (gnus-summary-update-mark | |
2701 (if (or (null gnus-summary-default-score) | |
2702 (<= (abs (- score gnus-summary-default-score)) | |
2703 gnus-summary-zcore-fuzz)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2704 ? ;Whitespace |
17493 | 2705 (if (< score gnus-summary-default-score) |
2706 gnus-score-below-mark gnus-score-over-mark)) | |
2707 'score)) | |
2708 ;; Do visual highlighting. | |
2709 (when (gnus-visual-p 'summary-highlight 'highlight) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2710 (gnus-run-hooks 'gnus-summary-update-hook))))) |
17493 | 2711 |
2712 (defvar gnus-tmp-new-adopts nil) | |
2713 | |
2714 (defun gnus-summary-number-of-articles-in-thread (thread &optional level char) | |
2715 "Return the number of articles in THREAD. | |
2716 This may be 0 in some cases -- if none of the articles in | |
2717 the thread are to be displayed." | |
2718 (let* ((number | |
2719 ;; Fix by Luc Van Eycken <Luc.VanEycken@esat.kuleuven.ac.be>. | |
2720 (cond | |
2721 ((not (listp thread)) | |
2722 1) | |
2723 ((and (consp thread) (cdr thread)) | |
2724 (apply | |
2725 '+ 1 (mapcar | |
2726 'gnus-summary-number-of-articles-in-thread (cdr thread)))) | |
2727 ((null thread) | |
2728 1) | |
2729 ((memq (mail-header-number (car thread)) gnus-newsgroup-limit) | |
2730 1) | |
2731 (t 0)))) | |
2732 (when (and level (zerop level) gnus-tmp-new-adopts) | |
2733 (incf number | |
2734 (apply '+ (mapcar | |
2735 'gnus-summary-number-of-articles-in-thread | |
2736 gnus-tmp-new-adopts)))) | |
2737 (if char | |
2738 (if (> number 1) gnus-not-empty-thread-mark | |
2739 gnus-empty-thread-mark) | |
2740 number))) | |
2741 | |
2742 (defun gnus-summary-set-local-parameters (group) | |
2743 "Go through the local params of GROUP and set all variable specs in that list." | |
2744 (let ((params (gnus-group-find-parameter group)) | |
2745 elem) | |
2746 (while params | |
2747 (setq elem (car params) | |
2748 params (cdr params)) | |
2749 (and (consp elem) ; Has to be a cons. | |
2750 (consp (cdr elem)) ; The cdr has to be a list. | |
2751 (symbolp (car elem)) ; Has to be a symbol in there. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2752 (not (memq (car elem) '(quit-config))) ; Ignore quit-config. |
17493 | 2753 (ignore-errors ; So we set it. |
2754 (make-local-variable (car elem)) | |
2755 (set (car elem) (eval (nth 1 elem)))))))) | |
2756 | |
2757 (defun gnus-summary-read-group (group &optional show-all no-article | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2758 kill-buffer no-display backward |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2759 select-articles) |
17493 | 2760 "Start reading news in newsgroup GROUP. |
2761 If SHOW-ALL is non-nil, already read articles are also listed. | |
2762 If NO-ARTICLE is non-nil, no article is selected initially. | |
2763 If NO-DISPLAY, don't generate a summary buffer." | |
2764 (let (result) | |
2765 (while (and group | |
2766 (null (setq result | |
2767 (let ((gnus-auto-select-next nil)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2768 (or (gnus-summary-read-group-1 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2769 group show-all no-article |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2770 kill-buffer no-display |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2771 select-articles) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2772 (setq show-all nil |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2773 select-articles nil))))) |
17493 | 2774 (eq gnus-auto-select-next 'quietly)) |
2775 (set-buffer gnus-group-buffer) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2776 ;; The entry function called above goes to the next |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2777 ;; group automatically, so we go two groups back |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2778 ;; if we are searching for the previous group. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2779 (when backward |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2780 (gnus-group-prev-unread-group 2)) |
17493 | 2781 (if (not (equal group (gnus-group-group-name))) |
2782 (setq group (gnus-group-group-name)) | |
2783 (setq group nil))) | |
2784 result)) | |
2785 | |
2786 (defun gnus-summary-read-group-1 (group show-all no-article | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2787 kill-buffer no-display |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2788 &optional select-articles) |
17493 | 2789 ;; Killed foreign groups can't be entered. |
2790 (when (and (not (gnus-group-native-p group)) | |
2791 (not (gnus-gethash group gnus-newsrc-hashtb))) | |
2792 (error "Dead non-native groups can't be entered")) | |
2793 (gnus-message 5 "Retrieving newsgroup: %s..." group) | |
2794 (let* ((new-group (gnus-summary-setup-buffer group)) | |
2795 (quit-config (gnus-group-quit-config group)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2796 (did-select (and new-group (gnus-select-newsgroup |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2797 group show-all select-articles)))) |
17493 | 2798 (cond |
2799 ;; This summary buffer exists already, so we just select it. | |
2800 ((not new-group) | |
2801 (gnus-set-global-variables) | |
2802 (when kill-buffer | |
2803 (gnus-kill-or-deaden-summary kill-buffer)) | |
2804 (gnus-configure-windows 'summary 'force) | |
2805 (gnus-set-mode-line 'summary) | |
2806 (gnus-summary-position-point) | |
2807 (message "") | |
2808 t) | |
2809 ;; We couldn't select this group. | |
2810 ((null did-select) | |
2811 (when (and (eq major-mode 'gnus-summary-mode) | |
2812 (not (equal (current-buffer) kill-buffer))) | |
2813 (kill-buffer (current-buffer)) | |
2814 (if (not quit-config) | |
2815 (progn | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2816 ;; Update the info -- marks might need to be removed, |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2817 ;; for instance. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2818 (gnus-summary-update-info) |
17493 | 2819 (set-buffer gnus-group-buffer) |
2820 (gnus-group-jump-to-group group) | |
2821 (gnus-group-next-unread-group 1)) | |
2822 (gnus-handle-ephemeral-exit quit-config))) | |
2823 (gnus-message 3 "Can't select group") | |
2824 nil) | |
2825 ;; The user did a `C-g' while prompting for number of articles, | |
2826 ;; so we exit this group. | |
2827 ((eq did-select 'quit) | |
2828 (and (eq major-mode 'gnus-summary-mode) | |
2829 (not (equal (current-buffer) kill-buffer)) | |
2830 (kill-buffer (current-buffer))) | |
2831 (when kill-buffer | |
2832 (gnus-kill-or-deaden-summary kill-buffer)) | |
2833 (if (not quit-config) | |
2834 (progn | |
2835 (set-buffer gnus-group-buffer) | |
2836 (gnus-group-jump-to-group group) | |
2837 (gnus-group-next-unread-group 1) | |
2838 (gnus-configure-windows 'group 'force)) | |
2839 (gnus-handle-ephemeral-exit quit-config)) | |
2840 ;; Finally signal the quit. | |
2841 (signal 'quit nil)) | |
2842 ;; The group was successfully selected. | |
2843 (t | |
2844 (gnus-set-global-variables) | |
2845 ;; Save the active value in effect when the group was entered. | |
2846 (setq gnus-newsgroup-active | |
2847 (gnus-copy-sequence | |
2848 (gnus-active gnus-newsgroup-name))) | |
2849 ;; You can change the summary buffer in some way with this hook. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2850 (gnus-run-hooks 'gnus-select-group-hook) |
17493 | 2851 ;; Set any local variables in the group parameters. |
2852 (gnus-summary-set-local-parameters gnus-newsgroup-name) | |
2853 (gnus-update-format-specifications | |
2854 nil 'summary 'summary-mode 'summary-dummy) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2855 (gnus-update-summary-mark-positions) |
17493 | 2856 ;; Do score processing. |
2857 (when gnus-use-scoring | |
2858 (gnus-possibly-score-headers)) | |
2859 ;; Check whether to fill in the gaps in the threads. | |
2860 (when gnus-build-sparse-threads | |
2861 (gnus-build-sparse-threads)) | |
2862 ;; Find the initial limit. | |
2863 (if gnus-show-threads | |
2864 (if show-all | |
2865 (let ((gnus-newsgroup-dormant nil)) | |
2866 (gnus-summary-initial-limit show-all)) | |
2867 (gnus-summary-initial-limit show-all)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2868 ;; When untreaded, all articles are always shown. |
17493 | 2869 (setq gnus-newsgroup-limit |
2870 (mapcar | |
2871 (lambda (header) (mail-header-number header)) | |
2872 gnus-newsgroup-headers))) | |
2873 ;; Generate the summary buffer. | |
2874 (unless no-display | |
2875 (gnus-summary-prepare)) | |
2876 (when gnus-use-trees | |
2877 (gnus-tree-open group) | |
2878 (setq gnus-summary-highlight-line-function | |
2879 'gnus-tree-highlight-article)) | |
2880 ;; If the summary buffer is empty, but there are some low-scored | |
2881 ;; articles or some excluded dormants, we include these in the | |
2882 ;; buffer. | |
2883 (when (and (zerop (buffer-size)) | |
2884 (not no-display)) | |
2885 (cond (gnus-newsgroup-dormant | |
2886 (gnus-summary-limit-include-dormant)) | |
2887 ((and gnus-newsgroup-scored show-all) | |
2888 (gnus-summary-limit-include-expunged t)))) | |
2889 ;; Function `gnus-apply-kill-file' must be called in this hook. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2890 (gnus-run-hooks 'gnus-apply-kill-hook) |
17493 | 2891 (if (and (zerop (buffer-size)) |
2892 (not no-display)) | |
2893 (progn | |
2894 ;; This newsgroup is empty. | |
2895 (gnus-summary-catchup-and-exit nil t) | |
2896 (gnus-message 6 "No unread news") | |
2897 (when kill-buffer | |
2898 (gnus-kill-or-deaden-summary kill-buffer)) | |
2899 ;; Return nil from this function. | |
2900 nil) | |
2901 ;; Hide conversation thread subtrees. We cannot do this in | |
2902 ;; gnus-summary-prepare-hook since kill processing may not | |
2903 ;; work with hidden articles. | |
2904 (and gnus-show-threads | |
2905 gnus-thread-hide-subtree | |
2906 (gnus-summary-hide-all-threads)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2907 (when kill-buffer |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2908 (gnus-kill-or-deaden-summary kill-buffer)) |
17493 | 2909 ;; Show first unread article if requested. |
2910 (if (and (not no-article) | |
2911 (not no-display) | |
2912 gnus-newsgroup-unreads | |
2913 gnus-auto-select-first) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2914 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2915 (gnus-configure-windows 'summary) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2916 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2917 ((eq gnus-auto-select-first 'best) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2918 (gnus-summary-best-unread-article)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2919 ((eq gnus-auto-select-first t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2920 (gnus-summary-first-unread-article)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2921 ((gnus-functionp gnus-auto-select-first) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
2922 (funcall gnus-auto-select-first)))) |
17493 | 2923 ;; Don't select any articles, just move point to the first |
2924 ;; article in the group. | |
2925 (goto-char (point-min)) | |
2926 (gnus-summary-position-point) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2927 (gnus-configure-windows 'summary 'force) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2928 (gnus-set-mode-line 'summary)) |
17493 | 2929 (when (get-buffer-window gnus-group-buffer t) |
2930 ;; Gotta use windows, because recenter does weird stuff if | |
2931 ;; the current buffer ain't the displayed window. | |
2932 (let ((owin (selected-window))) | |
2933 (select-window (get-buffer-window gnus-group-buffer t)) | |
2934 (when (gnus-group-goto-group group) | |
2935 (recenter)) | |
2936 (select-window owin))) | |
2937 ;; Mark this buffer as "prepared". | |
2938 (setq gnus-newsgroup-prepared t) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2939 (gnus-run-hooks 'gnus-summary-prepared-hook) |
17493 | 2940 t))))) |
2941 | |
2942 (defun gnus-summary-prepare () | |
2943 "Generate the summary buffer." | |
2944 (interactive) | |
2945 (let ((buffer-read-only nil)) | |
2946 (erase-buffer) | |
2947 (setq gnus-newsgroup-data nil | |
2948 gnus-newsgroup-data-reverse nil) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2949 (gnus-run-hooks 'gnus-summary-generate-hook) |
17493 | 2950 ;; Generate the buffer, either with threads or without. |
2951 (when gnus-newsgroup-headers | |
2952 (gnus-summary-prepare-threads | |
2953 (if gnus-show-threads | |
2954 (gnus-sort-gathered-threads | |
2955 (funcall gnus-summary-thread-gathering-function | |
2956 (gnus-sort-threads | |
2957 (gnus-cut-threads (gnus-make-threads))))) | |
2958 ;; Unthreaded display. | |
2959 (gnus-sort-articles gnus-newsgroup-headers)))) | |
2960 (setq gnus-newsgroup-data (nreverse gnus-newsgroup-data)) | |
2961 ;; Call hooks for modifying summary buffer. | |
2962 (goto-char (point-min)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2963 (gnus-run-hooks 'gnus-summary-prepare-hook))) |
17493 | 2964 |
2965 (defsubst gnus-general-simplify-subject (subject) | |
2966 "Simply subject by the same rules as gnus-gather-threads-by-subject." | |
2967 (setq subject | |
2968 (cond | |
2969 ;; Truncate the subject. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2970 (gnus-simplify-subject-functions |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
2971 (gnus-map-function gnus-simplify-subject-functions subject)) |
17493 | 2972 ((numberp gnus-summary-gather-subject-limit) |
2973 (setq subject (gnus-simplify-subject-re subject)) | |
2974 (if (> (length subject) gnus-summary-gather-subject-limit) | |
2975 (substring subject 0 gnus-summary-gather-subject-limit) | |
2976 subject)) | |
2977 ;; Fuzzily simplify it. | |
2978 ((eq 'fuzzy gnus-summary-gather-subject-limit) | |
2979 (gnus-simplify-subject-fuzzy subject)) | |
2980 ;; Just remove the leading "Re:". | |
2981 (t | |
2982 (gnus-simplify-subject-re subject)))) | |
2983 | |
2984 (if (and gnus-summary-gather-exclude-subject | |
2985 (string-match gnus-summary-gather-exclude-subject subject)) | |
2986 nil ; This article shouldn't be gathered | |
2987 subject)) | |
2988 | |
2989 (defun gnus-summary-simplify-subject-query () | |
2990 "Query where the respool algorithm would put this article." | |
2991 (interactive) | |
2992 (gnus-summary-select-article) | |
2993 (message (gnus-general-simplify-subject (gnus-summary-article-subject)))) | |
2994 | |
2995 (defun gnus-gather-threads-by-subject (threads) | |
2996 "Gather threads by looking at Subject headers." | |
2997 (if (not gnus-summary-make-false-root) | |
2998 threads | |
2999 (let ((hashtb (gnus-make-hashtable 1024)) | |
3000 (prev threads) | |
3001 (result threads) | |
3002 subject hthread whole-subject) | |
3003 (while threads | |
3004 (setq subject (gnus-general-simplify-subject | |
3005 (setq whole-subject (mail-header-subject | |
3006 (caar threads))))) | |
3007 (when subject | |
3008 (if (setq hthread (gnus-gethash subject hashtb)) | |
3009 (progn | |
3010 ;; We enter a dummy root into the thread, if we | |
3011 ;; haven't done that already. | |
3012 (unless (stringp (caar hthread)) | |
3013 (setcar hthread (list whole-subject (car hthread)))) | |
3014 ;; We add this new gathered thread to this gathered | |
3015 ;; thread. | |
3016 (setcdr (car hthread) | |
3017 (nconc (cdar hthread) (list (car threads)))) | |
3018 ;; Remove it from the list of threads. | |
3019 (setcdr prev (cdr threads)) | |
3020 (setq threads prev)) | |
3021 ;; Enter this thread into the hash table. | |
3022 (gnus-sethash subject threads hashtb))) | |
3023 (setq prev threads) | |
3024 (setq threads (cdr threads))) | |
3025 result))) | |
3026 | |
3027 (defun gnus-gather-threads-by-references (threads) | |
3028 "Gather threads by looking at References headers." | |
3029 (let ((idhashtb (gnus-make-hashtable 1024)) | |
3030 (thhashtb (gnus-make-hashtable 1024)) | |
3031 (prev threads) | |
3032 (result threads) | |
3033 ids references id gthread gid entered ref) | |
3034 (while threads | |
3035 (when (setq references (mail-header-references (caar threads))) | |
3036 (setq id (mail-header-id (caar threads)) | |
3037 ids (gnus-split-references references) | |
3038 entered nil) | |
3039 (while (setq ref (pop ids)) | |
3040 (setq ids (delete ref ids)) | |
3041 (if (not (setq gid (gnus-gethash ref idhashtb))) | |
3042 (progn | |
3043 (gnus-sethash ref id idhashtb) | |
3044 (gnus-sethash id threads thhashtb)) | |
3045 (setq gthread (gnus-gethash gid thhashtb)) | |
3046 (unless entered | |
3047 ;; We enter a dummy root into the thread, if we | |
3048 ;; haven't done that already. | |
3049 (unless (stringp (caar gthread)) | |
3050 (setcar gthread (list (mail-header-subject (caar gthread)) | |
3051 (car gthread)))) | |
3052 ;; We add this new gathered thread to this gathered | |
3053 ;; thread. | |
3054 (setcdr (car gthread) | |
3055 (nconc (cdar gthread) (list (car threads))))) | |
3056 ;; Add it into the thread hash table. | |
3057 (gnus-sethash id gthread thhashtb) | |
3058 (setq entered t) | |
3059 ;; Remove it from the list of threads. | |
3060 (setcdr prev (cdr threads)) | |
3061 (setq threads prev)))) | |
3062 (setq prev threads) | |
3063 (setq threads (cdr threads))) | |
3064 result)) | |
3065 | |
3066 (defun gnus-sort-gathered-threads (threads) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3067 "Sort subtreads inside each gathered thread by `gnus-sort-gathered-threads-function'." |
17493 | 3068 (let ((result threads)) |
3069 (while threads | |
3070 (when (stringp (caar threads)) | |
3071 (setcdr (car threads) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3072 (sort (cdar threads) gnus-sort-gathered-threads-function))) |
17493 | 3073 (setq threads (cdr threads))) |
3074 result)) | |
3075 | |
3076 (defun gnus-thread-loop-p (root thread) | |
3077 "Say whether ROOT is in THREAD." | |
3078 (let ((stack (list thread)) | |
3079 (infloop 0) | |
3080 th) | |
3081 (while (setq thread (pop stack)) | |
3082 (setq th (cdr thread)) | |
3083 (while (and th | |
3084 (not (eq (caar th) root))) | |
3085 (pop th)) | |
3086 (if th | |
3087 ;; We have found a loop. | |
3088 (let (ref-dep) | |
3089 (setcdr thread (delq (car th) (cdr thread))) | |
3090 (if (boundp (setq ref-dep (intern "none" | |
3091 gnus-newsgroup-dependencies))) | |
3092 (setcdr (symbol-value ref-dep) | |
3093 (nconc (cdr (symbol-value ref-dep)) | |
3094 (list (car th)))) | |
3095 (set ref-dep (list nil (car th)))) | |
3096 (setq infloop 1 | |
3097 stack nil)) | |
3098 ;; Push all the subthreads onto the stack. | |
3099 (push (cdr thread) stack))) | |
3100 infloop)) | |
3101 | |
3102 (defun gnus-make-threads () | |
3103 "Go through the dependency hashtb and find the roots. Return all threads." | |
3104 (let (threads) | |
3105 (while (catch 'infloop | |
3106 (mapatoms | |
3107 (lambda (refs) | |
3108 ;; Deal with self-referencing References loops. | |
3109 (when (and (car (symbol-value refs)) | |
3110 (not (zerop | |
3111 (apply | |
3112 '+ | |
3113 (mapcar | |
3114 (lambda (thread) | |
3115 (gnus-thread-loop-p | |
3116 (car (symbol-value refs)) thread)) | |
3117 (cdr (symbol-value refs))))))) | |
3118 (setq threads nil) | |
3119 (throw 'infloop t)) | |
3120 (unless (car (symbol-value refs)) | |
3121 ;; These threads do not refer back to any other articles, | |
3122 ;; so they're roots. | |
3123 (setq threads (append (cdr (symbol-value refs)) threads)))) | |
3124 gnus-newsgroup-dependencies))) | |
3125 threads)) | |
3126 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3127 ;; Build the thread tree. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3128 (defsubst gnus-dependencies-add-header (header dependencies force-new) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3129 "Enter HEADER into the DEPENDENCIES table if it is not already there. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3130 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3131 If FORCE-NEW is not nil, enter HEADER into the DEPENDENCIES table even |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3132 if it was already present. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3133 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3134 If `gnus-summary-ignore-duplicates' is nil then duplicate Message-IDs |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3135 will not be entered in the DEPENDENCIES table. Otherwise duplicate |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3136 Message-IDs will be renamed be renamed to a unique Message-ID before |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3137 being entered. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3138 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3139 Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3140 (let* ((id (mail-header-id header)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3141 (id-dep (and id (intern id dependencies))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3142 ref ref-dep ref-header) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3143 ;; Enter this `header' in the `dependencies' table. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3144 (cond |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3145 ((not id-dep) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3146 (setq header nil)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3147 ;; The first two cases do the normal part: enter a new `header' |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3148 ;; in the `dependencies' table. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3149 ((not (boundp id-dep)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3150 (set id-dep (list header))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3151 ((null (car (symbol-value id-dep))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3152 (setcar (symbol-value id-dep) header)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3153 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3154 ;; From here the `header' was already present in the |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3155 ;; `dependencies' table. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3156 (force-new |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3157 ;; Overrides an existing entry; |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3158 ;; just set the header part of the entry. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3159 (setcar (symbol-value id-dep) header)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3160 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3161 ;; Renames the existing `header' to a unique Message-ID. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3162 ((not gnus-summary-ignore-duplicates) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3163 ;; An article with this Message-ID has already been seen. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3164 ;; We rename the Message-ID. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3165 (set (setq id-dep (intern (setq id (nnmail-message-id)) dependencies)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3166 (list header)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3167 (mail-header-set-id header id)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3168 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3169 ;; The last case ignores an existing entry, except it adds any |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3170 ;; additional Xrefs (in case the two articles came from different |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3171 ;; servers. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3172 ;; Also sets `header' to `nil' meaning that the `dependencies' |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3173 ;; table was *not* modified. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3174 (t |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3175 (mail-header-set-xref |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3176 (car (symbol-value id-dep)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3177 (concat (or (mail-header-xref (car (symbol-value id-dep))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3178 "") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3179 (or (mail-header-xref header) ""))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3180 (setq header nil))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3181 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3182 (when header |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3183 ;; First check if that we are not creating a References loop. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3184 (setq ref (gnus-parent-id (mail-header-references header))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3185 (while (and ref |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3186 (setq ref-dep (intern-soft ref dependencies)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3187 (boundp ref-dep) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3188 (setq ref-header (car (symbol-value ref-dep)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3189 (if (string= id ref) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3190 ;; Yuk! This is a reference loop. Make the article be a |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3191 ;; root article. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3192 (progn |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3193 (mail-header-set-references (car (symbol-value id-dep)) "none") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3194 (setq ref nil)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3195 (setq ref (gnus-parent-id (mail-header-references ref-header))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3196 (setq ref (gnus-parent-id (mail-header-references header))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3197 (setq ref-dep (intern (or ref "none") dependencies)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3198 (if (boundp ref-dep) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3199 (setcdr (symbol-value ref-dep) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3200 (nconc (cdr (symbol-value ref-dep)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3201 (list (symbol-value id-dep)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3202 (set ref-dep (list nil (symbol-value id-dep))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3203 header)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3204 |
17493 | 3205 (defun gnus-build-sparse-threads () |
3206 (let ((headers gnus-newsgroup-headers) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3207 (mail-parse-charset gnus-newsgroup-charset) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3208 (gnus-summary-ignore-duplicates t) |
17493 | 3209 header references generation relations |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3210 subject child end new-child date) |
17493 | 3211 ;; First we create an alist of generations/relations, where |
3212 ;; generations is how much we trust the relation, and the relation | |
3213 ;; is parent/child. | |
3214 (gnus-message 7 "Making sparse threads...") | |
3215 (save-excursion | |
3216 (nnheader-set-temp-buffer " *gnus sparse threads*") | |
3217 (while (setq header (pop headers)) | |
3218 (when (and (setq references (mail-header-references header)) | |
3219 (not (string= references ""))) | |
3220 (insert references) | |
3221 (setq child (mail-header-id header) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3222 subject (mail-header-subject header) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3223 date (mail-header-date header) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3224 generation 0) |
17493 | 3225 (while (search-backward ">" nil t) |
3226 (setq end (1+ (point))) | |
3227 (when (search-backward "<" nil t) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3228 (setq new-child (buffer-substring (point) end)) |
17493 | 3229 (push (list (incf generation) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3230 child (setq child new-child) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3231 subject date) |
17493 | 3232 relations))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3233 (when child |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3234 (push (list (1+ generation) child nil subject) relations)) |
17493 | 3235 (erase-buffer))) |
3236 (kill-buffer (current-buffer))) | |
3237 ;; Sort over trustworthiness. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3238 (mapcar |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3239 (lambda (relation) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3240 (when (gnus-dependencies-add-header |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3241 (make-full-mail-header |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3242 gnus-reffed-article-number |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3243 (nth 3 relation) "" (or (nth 4 relation) "") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3244 (nth 1 relation) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3245 (or (nth 2 relation) "") 0 0 "") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3246 gnus-newsgroup-dependencies nil) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3247 (push gnus-reffed-article-number gnus-newsgroup-limit) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3248 (push gnus-reffed-article-number gnus-newsgroup-sparse) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3249 (push (cons gnus-reffed-article-number gnus-sparse-mark) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3250 gnus-newsgroup-reads) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3251 (decf gnus-reffed-article-number))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3252 (sort relations 'car-less-than-car)) |
17493 | 3253 (gnus-message 7 "Making sparse threads...done"))) |
3254 | |
3255 (defun gnus-build-old-threads () | |
3256 ;; Look at all the articles that refer back to old articles, and | |
3257 ;; fetch the headers for the articles that aren't there. This will | |
3258 ;; build complete threads - if the roots haven't been expired by the | |
3259 ;; server, that is. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3260 (let ((mail-parse-charset gnus-newsgroup-charset) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3261 id heads) |
17493 | 3262 (mapatoms |
3263 (lambda (refs) | |
3264 (when (not (car (symbol-value refs))) | |
3265 (setq heads (cdr (symbol-value refs))) | |
3266 (while heads | |
3267 (if (memq (mail-header-number (caar heads)) | |
3268 gnus-newsgroup-dormant) | |
3269 (setq heads (cdr heads)) | |
3270 (setq id (symbol-name refs)) | |
3271 (while (and (setq id (gnus-build-get-header id)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3272 (not (car (gnus-id-to-thread id))))) |
17493 | 3273 (setq heads nil))))) |
3274 gnus-newsgroup-dependencies))) | |
3275 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3276 ;; This function has to be called with point after the article number |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3277 ;; on the beginning of the line. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3278 (defsubst gnus-nov-parse-line (number dependencies &optional force-new) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3279 (let ((eol (gnus-point-at-eol)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3280 (buffer (current-buffer)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3281 header) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3282 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3283 ;; overview: [num subject from date id refs chars lines misc] |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3284 (unwind-protect |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3285 (progn |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3286 (narrow-to-region (point) eol) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3287 (unless (eobp) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3288 (forward-char)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3289 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3290 (setq header |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3291 (make-full-mail-header |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3292 number ; number |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3293 (funcall gnus-decode-encoded-word-function |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3294 (nnheader-nov-field)) ; subject |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3295 (funcall gnus-decode-encoded-word-function |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3296 (nnheader-nov-field)) ; from |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3297 (nnheader-nov-field) ; date |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3298 (nnheader-nov-read-message-id) ; id |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3299 (nnheader-nov-field) ; refs |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3300 (nnheader-nov-read-integer) ; chars |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3301 (nnheader-nov-read-integer) ; lines |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3302 (unless (eobp) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3303 (nnheader-nov-field)) ; misc |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3304 (nnheader-nov-parse-extra)))) ; extra |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3305 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3306 (widen)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3307 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3308 (when gnus-alter-header-function |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3309 (funcall gnus-alter-header-function header)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3310 (gnus-dependencies-add-header header dependencies force-new))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3311 |
17493 | 3312 (defun gnus-build-get-header (id) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3313 "Look through the buffer of NOV lines and find the header to ID. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3314 Enter this line into the dependencies hash table, and return |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3315 the id of the parent article (if any)." |
17493 | 3316 (let ((deps gnus-newsgroup-dependencies) |
3317 found header) | |
3318 (prog1 | |
3319 (save-excursion | |
3320 (set-buffer nntp-server-buffer) | |
3321 (let ((case-fold-search nil)) | |
3322 (goto-char (point-min)) | |
3323 (while (and (not found) | |
3324 (search-forward id nil t)) | |
3325 (beginning-of-line) | |
3326 (setq found (looking-at | |
3327 (format "^[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t%s" | |
3328 (regexp-quote id)))) | |
3329 (or found (beginning-of-line 2))) | |
3330 (when found | |
3331 (beginning-of-line) | |
3332 (and | |
3333 (setq header (gnus-nov-parse-line | |
3334 (read (current-buffer)) deps)) | |
3335 (gnus-parent-id (mail-header-references header)))))) | |
3336 (when header | |
3337 (let ((number (mail-header-number header))) | |
3338 (push number gnus-newsgroup-limit) | |
3339 (push header gnus-newsgroup-headers) | |
3340 (if (memq number gnus-newsgroup-unselected) | |
3341 (progn | |
3342 (push number gnus-newsgroup-unreads) | |
3343 (setq gnus-newsgroup-unselected | |
3344 (delq number gnus-newsgroup-unselected))) | |
3345 (push number gnus-newsgroup-ancient))))))) | |
3346 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3347 (defun gnus-build-all-threads () |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3348 "Read all the headers." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3349 (let ((gnus-summary-ignore-duplicates t) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3350 (mail-parse-charset gnus-newsgroup-charset) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3351 (dependencies gnus-newsgroup-dependencies) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3352 header article) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3353 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3354 (set-buffer nntp-server-buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3355 (let ((case-fold-search nil)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3356 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3357 (while (not (eobp)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3358 (ignore-errors |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3359 (setq article (read (current-buffer)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3360 header (gnus-nov-parse-line article dependencies))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3361 (when header |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3362 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3363 (set-buffer gnus-summary-buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3364 (push header gnus-newsgroup-headers) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3365 (if (memq (setq article (mail-header-number header)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3366 gnus-newsgroup-unselected) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3367 (progn |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3368 (push article gnus-newsgroup-unreads) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3369 (setq gnus-newsgroup-unselected |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3370 (delq article gnus-newsgroup-unselected))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3371 (push article gnus-newsgroup-ancient))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3372 (forward-line 1))))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3373 |
17493 | 3374 (defun gnus-summary-update-article-line (article header) |
3375 "Update the line for ARTICLE using HEADERS." | |
3376 (let* ((id (mail-header-id header)) | |
3377 (thread (gnus-id-to-thread id))) | |
3378 (unless thread | |
3379 (error "Article in no thread")) | |
3380 ;; Update the thread. | |
3381 (setcar thread header) | |
3382 (gnus-summary-goto-subject article) | |
3383 (let* ((datal (gnus-data-find-list article)) | |
3384 (data (car datal)) | |
3385 (length (when (cdr datal) | |
3386 (- (gnus-data-pos data) | |
3387 (gnus-data-pos (cadr datal))))) | |
3388 (buffer-read-only nil) | |
3389 (level (gnus-summary-thread-level))) | |
3390 (gnus-delete-line) | |
3391 (gnus-summary-insert-line | |
3392 header level nil (gnus-article-mark article) | |
3393 (memq article gnus-newsgroup-replied) | |
3394 (memq article gnus-newsgroup-expirable) | |
3395 ;; Only insert the Subject string when it's different | |
3396 ;; from the previous Subject string. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3397 (if (and |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3398 gnus-show-threads |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3399 (gnus-subject-equal |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3400 (condition-case () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3401 (mail-header-subject |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3402 (gnus-data-header |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3403 (cadr |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3404 (gnus-data-find-list |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3405 article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3406 (gnus-data-list t))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3407 ;; Error on the side of excessive subjects. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3408 (error "")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3409 (mail-header-subject header))) |
17493 | 3410 "" |
3411 (mail-header-subject header)) | |
3412 nil (cdr (assq article gnus-newsgroup-scored)) | |
3413 (memq article gnus-newsgroup-processable)) | |
3414 (when length | |
3415 (gnus-data-update-list | |
3416 (cdr datal) (- length (- (gnus-data-pos data) (point)))))))) | |
3417 | |
3418 (defun gnus-summary-update-article (article &optional iheader) | |
3419 "Update ARTICLE in the summary buffer." | |
3420 (set-buffer gnus-summary-buffer) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3421 (let* ((header (gnus-summary-article-header article)) |
17493 | 3422 (id (mail-header-id header)) |
3423 (data (gnus-data-find article)) | |
3424 (thread (gnus-id-to-thread id)) | |
3425 (references (mail-header-references header)) | |
3426 (parent | |
3427 (gnus-id-to-thread | |
3428 (or (gnus-parent-id | |
3429 (when (and references | |
3430 (not (equal "" references))) | |
3431 references)) | |
3432 "none"))) | |
3433 (buffer-read-only nil) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3434 (old (car thread))) |
17493 | 3435 (when thread |
3436 (unless iheader | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3437 (setcar thread nil) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3438 (when parent |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3439 (delq thread parent))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3440 (if (gnus-summary-insert-subject id header) |
17493 | 3441 ;; Set the (possibly) new article number in the data structure. |
3442 (gnus-data-set-number data (gnus-id-to-article id)) | |
3443 (setcar thread old) | |
3444 nil)))) | |
3445 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3446 (defun gnus-rebuild-thread (id &optional line) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3447 "Rebuild the thread containing ID. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3448 If LINE, insert the rebuilt thread starting on line LINE." |
17493 | 3449 (let ((buffer-read-only nil) |
3450 old-pos current thread data) | |
3451 (if (not gnus-show-threads) | |
3452 (setq thread (list (car (gnus-id-to-thread id)))) | |
3453 ;; Get the thread this article is part of. | |
3454 (setq thread (gnus-remove-thread id))) | |
3455 (setq old-pos (gnus-point-at-bol)) | |
3456 (setq current (save-excursion | |
3457 (and (zerop (forward-line -1)) | |
3458 (gnus-summary-article-number)))) | |
3459 ;; If this is a gathered thread, we have to go some re-gathering. | |
3460 (when (stringp (car thread)) | |
3461 (let ((subject (car thread)) | |
3462 roots thr) | |
3463 (setq thread (cdr thread)) | |
3464 (while thread | |
3465 (unless (memq (setq thr (gnus-id-to-thread | |
3466 (gnus-root-id | |
3467 (mail-header-id (caar thread))))) | |
3468 roots) | |
3469 (push thr roots)) | |
3470 (setq thread (cdr thread))) | |
3471 ;; We now have all (unique) roots. | |
3472 (if (= (length roots) 1) | |
3473 ;; All the loose roots are now one solid root. | |
3474 (setq thread (car roots)) | |
3475 (setq thread (cons subject (gnus-sort-threads roots)))))) | |
3476 (let (threads) | |
3477 ;; We then insert this thread into the summary buffer. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3478 (when line |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3479 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3480 (forward-line (1- line))) |
17493 | 3481 (let (gnus-newsgroup-data gnus-newsgroup-threads) |
3482 (if gnus-show-threads | |
3483 (gnus-summary-prepare-threads (gnus-cut-threads (list thread))) | |
3484 (gnus-summary-prepare-unthreaded thread)) | |
3485 (setq data (nreverse gnus-newsgroup-data)) | |
3486 (setq threads gnus-newsgroup-threads)) | |
3487 ;; We splice the new data into the data structure. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3488 ;;!!! This is kinda bogus. We assume that in LINE is non-nil, |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3489 ;;!!! then we want to insert at the beginning of the buffer. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3490 ;;!!! That happens to be true with Gnus now, but that may |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3491 ;;!!! change in the future. Perhaps. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3492 (gnus-data-enter-list |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3493 (if line nil current) data (- (point) old-pos)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3494 (setq gnus-newsgroup-threads |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3495 (nconc threads gnus-newsgroup-threads)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3496 (gnus-data-compute-positions)))) |
17493 | 3497 |
3498 (defun gnus-number-to-header (number) | |
3499 "Return the header for article NUMBER." | |
3500 (let ((headers gnus-newsgroup-headers)) | |
3501 (while (and headers | |
3502 (not (= number (mail-header-number (car headers))))) | |
3503 (pop headers)) | |
3504 (when headers | |
3505 (car headers)))) | |
3506 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3507 (defun gnus-parent-headers (in-headers &optional generation) |
17493 | 3508 "Return the headers of the GENERATIONeth parent of HEADERS." |
3509 (unless generation | |
3510 (setq generation 1)) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
3511 (let ((parent t) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3512 (headers in-headers) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
3513 references) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3514 (while (and parent |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3515 (not (zerop generation)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3516 (setq references (mail-header-references headers))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3517 (setq headers (if (and references |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3518 (setq parent (gnus-parent-id references))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3519 (car (gnus-id-to-thread parent)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3520 nil)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3521 (decf generation)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3522 (and (not (eq headers in-headers)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3523 headers))) |
17493 | 3524 |
3525 (defun gnus-id-to-thread (id) | |
3526 "Return the (sub-)thread where ID appears." | |
3527 (gnus-gethash id gnus-newsgroup-dependencies)) | |
3528 | |
3529 (defun gnus-id-to-article (id) | |
3530 "Return the article number of ID." | |
3531 (let ((thread (gnus-id-to-thread id))) | |
3532 (when (and thread | |
3533 (car thread)) | |
3534 (mail-header-number (car thread))))) | |
3535 | |
3536 (defun gnus-id-to-header (id) | |
3537 "Return the article headers of ID." | |
3538 (car (gnus-id-to-thread id))) | |
3539 | |
3540 (defun gnus-article-displayed-root-p (article) | |
3541 "Say whether ARTICLE is a root(ish) article." | |
3542 (let ((level (gnus-summary-thread-level article)) | |
3543 (refs (mail-header-references (gnus-summary-article-header article))) | |
3544 particle) | |
3545 (cond | |
3546 ((null level) nil) | |
3547 ((zerop level) t) | |
3548 ((null refs) t) | |
3549 ((null (gnus-parent-id refs)) t) | |
3550 ((and (= 1 level) | |
3551 (null (setq particle (gnus-id-to-article | |
3552 (gnus-parent-id refs)))) | |
3553 (null (gnus-summary-thread-level particle))))))) | |
3554 | |
3555 (defun gnus-root-id (id) | |
3556 "Return the id of the root of the thread where ID appears." | |
3557 (let (last-id prev) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3558 (while (and id (setq prev (car (gnus-id-to-thread id)))) |
17493 | 3559 (setq last-id id |
3560 id (gnus-parent-id (mail-header-references prev)))) | |
3561 last-id)) | |
3562 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3563 (defun gnus-articles-in-thread (thread) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3564 "Return the list of articles in THREAD." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3565 (cons (mail-header-number (car thread)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3566 (apply 'nconc (mapcar 'gnus-articles-in-thread (cdr thread))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3567 |
17493 | 3568 (defun gnus-remove-thread (id &optional dont-remove) |
3569 "Remove the thread that has ID in it." | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3570 (let (headers thread last-id) |
17493 | 3571 ;; First go up in this thread until we find the root. |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3572 (setq last-id (gnus-root-id id) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3573 headers (message-flatten-list (gnus-id-to-thread last-id))) |
17493 | 3574 ;; We have now found the real root of this thread. It might have |
3575 ;; been gathered into some loose thread, so we have to search | |
3576 ;; through the threads to find the thread we wanted. | |
3577 (let ((threads gnus-newsgroup-threads) | |
3578 sub) | |
3579 (while threads | |
3580 (setq sub (car threads)) | |
3581 (if (stringp (car sub)) | |
3582 ;; This is a gathered thread, so we look at the roots | |
3583 ;; below it to find whether this article is in this | |
3584 ;; gathered root. | |
3585 (progn | |
3586 (setq sub (cdr sub)) | |
3587 (while sub | |
3588 (when (member (caar sub) headers) | |
3589 (setq thread (car threads) | |
3590 threads nil | |
3591 sub nil)) | |
3592 (setq sub (cdr sub)))) | |
3593 ;; It's an ordinary thread, so we check it. | |
3594 (when (eq (car sub) (car headers)) | |
3595 (setq thread sub | |
3596 threads nil))) | |
3597 (setq threads (cdr threads))) | |
3598 ;; If this article is in no thread, then it's a root. | |
3599 (if thread | |
3600 (unless dont-remove | |
3601 (setq gnus-newsgroup-threads (delq thread gnus-newsgroup-threads))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3602 (setq thread (gnus-id-to-thread last-id))) |
17493 | 3603 (when thread |
3604 (prog1 | |
3605 thread ; We return this thread. | |
3606 (unless dont-remove | |
3607 (if (stringp (car thread)) | |
3608 (progn | |
3609 ;; If we use dummy roots, then we have to remove the | |
3610 ;; dummy root as well. | |
3611 (when (eq gnus-summary-make-false-root 'dummy) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3612 ;; We go to the dummy root by going to |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3613 ;; the first sub-"thread", and then one line up. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3614 (gnus-summary-goto-article |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3615 (mail-header-number (caadr thread))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3616 (forward-line -1) |
17493 | 3617 (gnus-delete-line) |
3618 (gnus-data-compute-positions)) | |
3619 (setq thread (cdr thread)) | |
3620 (while thread | |
3621 (gnus-remove-thread-1 (car thread)) | |
3622 (setq thread (cdr thread)))) | |
3623 (gnus-remove-thread-1 thread)))))))) | |
3624 | |
3625 (defun gnus-remove-thread-1 (thread) | |
3626 "Remove the thread THREAD recursively." | |
3627 (let ((number (mail-header-number (pop thread))) | |
3628 d) | |
3629 (setq thread (reverse thread)) | |
3630 (while thread | |
3631 (gnus-remove-thread-1 (pop thread))) | |
3632 (when (setq d (gnus-data-find number)) | |
3633 (goto-char (gnus-data-pos d)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3634 (gnus-summary-show-thread) |
17493 | 3635 (gnus-data-remove |
3636 number | |
3637 (- (gnus-point-at-bol) | |
3638 (prog1 | |
3639 (1+ (gnus-point-at-eol)) | |
3640 (gnus-delete-line))))))) | |
3641 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3642 (defun gnus-sort-threads-1 (threads func) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3643 (sort (mapcar (lambda (thread) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3644 (cons (car thread) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3645 (and (cdr thread) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3646 (gnus-sort-threads-1 (cdr thread) func)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3647 threads) func)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3648 |
17493 | 3649 (defun gnus-sort-threads (threads) |
3650 "Sort THREADS." | |
3651 (if (not gnus-thread-sort-functions) | |
3652 threads | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3653 (gnus-message 8 "Sorting threads...") |
17493 | 3654 (prog1 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3655 (gnus-sort-threads-1 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3656 threads |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3657 (gnus-make-sort-function gnus-thread-sort-functions)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3658 (gnus-message 8 "Sorting threads...done")))) |
17493 | 3659 |
3660 (defun gnus-sort-articles (articles) | |
3661 "Sort ARTICLES." | |
3662 (when gnus-article-sort-functions | |
3663 (gnus-message 7 "Sorting articles...") | |
3664 (prog1 | |
3665 (setq gnus-newsgroup-headers | |
3666 (sort articles (gnus-make-sort-function | |
3667 gnus-article-sort-functions))) | |
3668 (gnus-message 7 "Sorting articles...done")))) | |
3669 | |
3670 ;; Written by Hallvard B Furuseth <h.b.furuseth@usit.uio.no>. | |
3671 (defmacro gnus-thread-header (thread) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3672 "Return header of first article in THREAD. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3673 Note that THREAD must never, ever be anything else than a variable - |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3674 using some other form will lead to serious barfage." |
17493 | 3675 (or (symbolp thread) (signal 'wrong-type-argument '(symbolp thread))) |
3676 ;; (8% speedup to gnus-summary-prepare, just for fun :-) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3677 (list 'byte-code "\10\211:\203\17\0\211@;\203\16\0A@@\207" |
17493 | 3678 (vector thread) 2)) |
3679 | |
3680 (defsubst gnus-article-sort-by-number (h1 h2) | |
3681 "Sort articles by article number." | |
3682 (< (mail-header-number h1) | |
3683 (mail-header-number h2))) | |
3684 | |
3685 (defun gnus-thread-sort-by-number (h1 h2) | |
3686 "Sort threads by root article number." | |
3687 (gnus-article-sort-by-number | |
3688 (gnus-thread-header h1) (gnus-thread-header h2))) | |
3689 | |
3690 (defsubst gnus-article-sort-by-lines (h1 h2) | |
3691 "Sort articles by article Lines header." | |
3692 (< (mail-header-lines h1) | |
3693 (mail-header-lines h2))) | |
3694 | |
3695 (defun gnus-thread-sort-by-lines (h1 h2) | |
3696 "Sort threads by root article Lines header." | |
3697 (gnus-article-sort-by-lines | |
3698 (gnus-thread-header h1) (gnus-thread-header h2))) | |
3699 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3700 (defsubst gnus-article-sort-by-chars (h1 h2) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3701 "Sort articles by octet length." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3702 (< (mail-header-chars h1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3703 (mail-header-chars h2))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3704 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3705 (defun gnus-thread-sort-by-chars (h1 h2) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3706 "Sort threads by root article octet length." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3707 (gnus-article-sort-by-chars |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3708 (gnus-thread-header h1) (gnus-thread-header h2))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3709 |
17493 | 3710 (defsubst gnus-article-sort-by-author (h1 h2) |
3711 "Sort articles by root author." | |
3712 (string-lessp | |
3713 (let ((extract (funcall | |
3714 gnus-extract-address-components | |
3715 (mail-header-from h1)))) | |
3716 (or (car extract) (cadr extract) "")) | |
3717 (let ((extract (funcall | |
3718 gnus-extract-address-components | |
3719 (mail-header-from h2)))) | |
3720 (or (car extract) (cadr extract) "")))) | |
3721 | |
3722 (defun gnus-thread-sort-by-author (h1 h2) | |
3723 "Sort threads by root author." | |
3724 (gnus-article-sort-by-author | |
3725 (gnus-thread-header h1) (gnus-thread-header h2))) | |
3726 | |
3727 (defsubst gnus-article-sort-by-subject (h1 h2) | |
3728 "Sort articles by root subject." | |
3729 (string-lessp | |
3730 (downcase (gnus-simplify-subject-re (mail-header-subject h1))) | |
3731 (downcase (gnus-simplify-subject-re (mail-header-subject h2))))) | |
3732 | |
3733 (defun gnus-thread-sort-by-subject (h1 h2) | |
3734 "Sort threads by root subject." | |
3735 (gnus-article-sort-by-subject | |
3736 (gnus-thread-header h1) (gnus-thread-header h2))) | |
3737 | |
3738 (defsubst gnus-article-sort-by-date (h1 h2) | |
3739 "Sort articles by root article date." | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3740 (time-less-p |
17493 | 3741 (gnus-date-get-time (mail-header-date h1)) |
3742 (gnus-date-get-time (mail-header-date h2)))) | |
3743 | |
3744 (defun gnus-thread-sort-by-date (h1 h2) | |
3745 "Sort threads by root article date." | |
3746 (gnus-article-sort-by-date | |
3747 (gnus-thread-header h1) (gnus-thread-header h2))) | |
3748 | |
3749 (defsubst gnus-article-sort-by-score (h1 h2) | |
3750 "Sort articles by root article score. | |
3751 Unscored articles will be counted as having a score of zero." | |
3752 (> (or (cdr (assq (mail-header-number h1) | |
3753 gnus-newsgroup-scored)) | |
3754 gnus-summary-default-score 0) | |
3755 (or (cdr (assq (mail-header-number h2) | |
3756 gnus-newsgroup-scored)) | |
3757 gnus-summary-default-score 0))) | |
3758 | |
3759 (defun gnus-thread-sort-by-score (h1 h2) | |
3760 "Sort threads by root article score." | |
3761 (gnus-article-sort-by-score | |
3762 (gnus-thread-header h1) (gnus-thread-header h2))) | |
3763 | |
3764 (defun gnus-thread-sort-by-total-score (h1 h2) | |
3765 "Sort threads by the sum of all scores in the thread. | |
3766 Unscored articles will be counted as having a score of zero." | |
3767 (> (gnus-thread-total-score h1) (gnus-thread-total-score h2))) | |
3768 | |
3769 (defun gnus-thread-total-score (thread) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3770 ;; This function find the total score of THREAD. |
17493 | 3771 (cond ((null thread) |
3772 0) | |
3773 ((consp thread) | |
3774 (if (stringp (car thread)) | |
3775 (apply gnus-thread-score-function 0 | |
3776 (mapcar 'gnus-thread-total-score-1 (cdr thread))) | |
3777 (gnus-thread-total-score-1 thread))) | |
3778 (t | |
3779 (gnus-thread-total-score-1 (list thread))))) | |
3780 | |
3781 (defun gnus-thread-total-score-1 (root) | |
3782 ;; This function find the total score of the thread below ROOT. | |
3783 (setq root (car root)) | |
3784 (apply gnus-thread-score-function | |
3785 (or (append | |
3786 (mapcar 'gnus-thread-total-score | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3787 (cdr (gnus-id-to-thread (mail-header-id root)))) |
17493 | 3788 (when (> (mail-header-number root) 0) |
3789 (list (or (cdr (assq (mail-header-number root) | |
3790 gnus-newsgroup-scored)) | |
3791 gnus-summary-default-score 0)))) | |
3792 (list gnus-summary-default-score) | |
3793 '(0)))) | |
3794 | |
3795 ;; Added by Per Abrahamsen <amanda@iesd.auc.dk>. | |
3796 (defvar gnus-tmp-prev-subject nil) | |
3797 (defvar gnus-tmp-false-parent nil) | |
3798 (defvar gnus-tmp-root-expunged nil) | |
3799 (defvar gnus-tmp-dummy-line nil) | |
3800 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3801 (defvar gnus-tmp-header) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3802 (defun gnus-extra-header (type &optional header) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3803 "Return the extra header of TYPE." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3804 (or (cdr (assq type (mail-header-extra (or header gnus-tmp-header)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3805 "")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
3806 |
17493 | 3807 (defun gnus-summary-prepare-threads (threads) |
3808 "Prepare summary buffer from THREADS and indentation LEVEL. | |
3809 THREADS is either a list of `(PARENT [(CHILD1 [(GRANDCHILD ...]...) ...])' | |
3810 or a straight list of headers." | |
3811 (gnus-message 7 "Generating summary...") | |
3812 | |
3813 (setq gnus-newsgroup-threads threads) | |
3814 (beginning-of-line) | |
3815 | |
3816 (let ((gnus-tmp-level 0) | |
3817 (default-score (or gnus-summary-default-score 0)) | |
3818 (gnus-visual-p (gnus-visual-p 'summary-highlight 'highlight)) | |
3819 thread number subject stack state gnus-tmp-gathered beg-match | |
3820 new-roots gnus-tmp-new-adopts thread-end | |
3821 gnus-tmp-header gnus-tmp-unread | |
3822 gnus-tmp-replied gnus-tmp-subject-or-nil | |
3823 gnus-tmp-dummy gnus-tmp-indentation gnus-tmp-lines gnus-tmp-score | |
3824 gnus-tmp-score-char gnus-tmp-from gnus-tmp-name | |
3825 gnus-tmp-number gnus-tmp-opening-bracket gnus-tmp-closing-bracket) | |
3826 | |
3827 (setq gnus-tmp-prev-subject nil) | |
3828 | |
3829 (if (vectorp (car threads)) | |
3830 ;; If this is a straight (sic) list of headers, then a | |
3831 ;; threaded summary display isn't required, so we just create | |
3832 ;; an unthreaded one. | |
3833 (gnus-summary-prepare-unthreaded threads) | |
3834 | |
3835 ;; Do the threaded display. | |
3836 | |
3837 (while (or threads stack gnus-tmp-new-adopts new-roots) | |
3838 | |
3839 (if (and (= gnus-tmp-level 0) | |
3840 (or (not stack) | |
3841 (= (caar stack) 0)) | |
3842 (not gnus-tmp-false-parent) | |
3843 (or gnus-tmp-new-adopts new-roots)) | |
3844 (if gnus-tmp-new-adopts | |
3845 (setq gnus-tmp-level (if gnus-tmp-root-expunged 0 1) | |
3846 thread (list (car gnus-tmp-new-adopts)) | |
3847 gnus-tmp-header (caar thread) | |
3848 gnus-tmp-new-adopts (cdr gnus-tmp-new-adopts)) | |
3849 (when new-roots | |
3850 (setq thread (list (car new-roots)) | |
3851 gnus-tmp-header (caar thread) | |
3852 new-roots (cdr new-roots)))) | |
3853 | |
3854 (if threads | |
3855 ;; If there are some threads, we do them before the | |
3856 ;; threads on the stack. | |
3857 (setq thread threads | |
3858 gnus-tmp-header (caar thread)) | |
3859 ;; There were no current threads, so we pop something off | |
3860 ;; the stack. | |
3861 (setq state (car stack) | |
3862 gnus-tmp-level (car state) | |
3863 thread (cdr state) | |
3864 stack (cdr stack) | |
3865 gnus-tmp-header (caar thread)))) | |
3866 | |
3867 (setq gnus-tmp-false-parent nil) | |
3868 (setq gnus-tmp-root-expunged nil) | |
3869 (setq thread-end nil) | |
3870 | |
3871 (if (stringp gnus-tmp-header) | |
3872 ;; The header is a dummy root. | |
3873 (cond | |
3874 ((eq gnus-summary-make-false-root 'adopt) | |
3875 ;; We let the first article adopt the rest. | |
3876 (setq gnus-tmp-new-adopts (nconc gnus-tmp-new-adopts | |
3877 (cddar thread))) | |
3878 (setq gnus-tmp-gathered | |
3879 (nconc (mapcar | |
3880 (lambda (h) (mail-header-number (car h))) | |
3881 (cddar thread)) | |
3882 gnus-tmp-gathered)) | |
3883 (setq thread (cons (list (caar thread) | |
3884 (cadar thread)) | |
3885 (cdr thread))) | |
3886 (setq gnus-tmp-level -1 | |
3887 gnus-tmp-false-parent t)) | |
3888 ((eq gnus-summary-make-false-root 'empty) | |
3889 ;; We print adopted articles with empty subject fields. | |
3890 (setq gnus-tmp-gathered | |
3891 (nconc (mapcar | |
3892 (lambda (h) (mail-header-number (car h))) | |
3893 (cddar thread)) | |
3894 gnus-tmp-gathered)) | |
3895 (setq gnus-tmp-level -1)) | |
3896 ((eq gnus-summary-make-false-root 'dummy) | |
3897 ;; We remember that we probably want to output a dummy | |
3898 ;; root. | |
3899 (setq gnus-tmp-dummy-line gnus-tmp-header) | |
3900 (setq gnus-tmp-prev-subject gnus-tmp-header)) | |
3901 (t | |
3902 ;; We do not make a root for the gathered | |
3903 ;; sub-threads at all. | |
3904 (setq gnus-tmp-level -1))) | |
3905 | |
3906 (setq number (mail-header-number gnus-tmp-header) | |
3907 subject (mail-header-subject gnus-tmp-header)) | |
3908 | |
3909 (cond | |
3910 ;; If the thread has changed subject, we might want to make | |
3911 ;; this subthread into a root. | |
3912 ((and (null gnus-thread-ignore-subject) | |
3913 (not (zerop gnus-tmp-level)) | |
3914 gnus-tmp-prev-subject | |
3915 (not (inline | |
3916 (gnus-subject-equal gnus-tmp-prev-subject subject)))) | |
3917 (setq new-roots (nconc new-roots (list (car thread))) | |
3918 thread-end t | |
3919 gnus-tmp-header nil)) | |
3920 ;; If the article lies outside the current limit, | |
3921 ;; then we do not display it. | |
3922 ((not (memq number gnus-newsgroup-limit)) | |
3923 (setq gnus-tmp-gathered | |
3924 (nconc (mapcar | |
3925 (lambda (h) (mail-header-number (car h))) | |
3926 (cdar thread)) | |
3927 gnus-tmp-gathered)) | |
3928 (setq gnus-tmp-new-adopts (if (cdar thread) | |
3929 (append gnus-tmp-new-adopts | |
3930 (cdar thread)) | |
3931 gnus-tmp-new-adopts) | |
3932 thread-end t | |
3933 gnus-tmp-header nil) | |
3934 (when (zerop gnus-tmp-level) | |
3935 (setq gnus-tmp-root-expunged t))) | |
3936 ;; Perhaps this article is to be marked as read? | |
3937 ((and gnus-summary-mark-below | |
3938 (< (or (cdr (assq number gnus-newsgroup-scored)) | |
3939 default-score) | |
3940 gnus-summary-mark-below) | |
3941 ;; Don't touch sparse articles. | |
3942 (not (gnus-summary-article-sparse-p number)) | |
3943 (not (gnus-summary-article-ancient-p number))) | |
3944 (setq gnus-newsgroup-unreads | |
3945 (delq number gnus-newsgroup-unreads)) | |
3946 (if gnus-newsgroup-auto-expire | |
3947 (push number gnus-newsgroup-expirable) | |
3948 (push (cons number gnus-low-score-mark) | |
3949 gnus-newsgroup-reads)))) | |
3950 | |
3951 (when gnus-tmp-header | |
3952 ;; We may have an old dummy line to output before this | |
3953 ;; article. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3954 (when (and gnus-tmp-dummy-line |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3955 (gnus-subject-equal |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3956 gnus-tmp-dummy-line |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
3957 (mail-header-subject gnus-tmp-header))) |
17493 | 3958 (gnus-summary-insert-dummy-line |
3959 gnus-tmp-dummy-line (mail-header-number gnus-tmp-header)) | |
3960 (setq gnus-tmp-dummy-line nil)) | |
3961 | |
3962 ;; Compute the mark. | |
3963 (setq gnus-tmp-unread (gnus-article-mark number)) | |
3964 | |
3965 (push (gnus-data-make number gnus-tmp-unread (1+ (point)) | |
3966 gnus-tmp-header gnus-tmp-level) | |
3967 gnus-newsgroup-data) | |
3968 | |
3969 ;; Actually insert the line. | |
3970 (setq | |
3971 gnus-tmp-subject-or-nil | |
3972 (cond | |
3973 ((and gnus-thread-ignore-subject | |
3974 gnus-tmp-prev-subject | |
3975 (not (inline (gnus-subject-equal | |
3976 gnus-tmp-prev-subject subject)))) | |
3977 subject) | |
3978 ((zerop gnus-tmp-level) | |
3979 (if (and (eq gnus-summary-make-false-root 'empty) | |
3980 (memq number gnus-tmp-gathered) | |
3981 gnus-tmp-prev-subject | |
3982 (inline (gnus-subject-equal | |
3983 gnus-tmp-prev-subject subject))) | |
3984 gnus-summary-same-subject | |
3985 subject)) | |
3986 (t gnus-summary-same-subject))) | |
3987 (if (and (eq gnus-summary-make-false-root 'adopt) | |
3988 (= gnus-tmp-level 1) | |
3989 (memq number gnus-tmp-gathered)) | |
3990 (setq gnus-tmp-opening-bracket ?\< | |
3991 gnus-tmp-closing-bracket ?\>) | |
3992 (setq gnus-tmp-opening-bracket ?\[ | |
3993 gnus-tmp-closing-bracket ?\])) | |
3994 (setq | |
3995 gnus-tmp-indentation | |
3996 (aref gnus-thread-indent-array gnus-tmp-level) | |
3997 gnus-tmp-lines (mail-header-lines gnus-tmp-header) | |
3998 gnus-tmp-score (or (cdr (assq number gnus-newsgroup-scored)) | |
3999 gnus-summary-default-score 0) | |
4000 gnus-tmp-score-char | |
4001 (if (or (null gnus-summary-default-score) | |
4002 (<= (abs (- gnus-tmp-score gnus-summary-default-score)) | |
4003 gnus-summary-zcore-fuzz)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4004 ? ;Whitespace |
17493 | 4005 (if (< gnus-tmp-score gnus-summary-default-score) |
4006 gnus-score-below-mark gnus-score-over-mark)) | |
4007 gnus-tmp-replied | |
4008 (cond ((memq number gnus-newsgroup-processable) | |
4009 gnus-process-mark) | |
4010 ((memq number gnus-newsgroup-cached) | |
4011 gnus-cached-mark) | |
4012 ((memq number gnus-newsgroup-replied) | |
4013 gnus-replied-mark) | |
4014 ((memq number gnus-newsgroup-saved) | |
4015 gnus-saved-mark) | |
4016 (t gnus-unread-mark)) | |
4017 gnus-tmp-from (mail-header-from gnus-tmp-header) | |
4018 gnus-tmp-name | |
4019 (cond | |
4020 ((string-match "<[^>]+> *$" gnus-tmp-from) | |
4021 (setq beg-match (match-beginning 0)) | |
4022 (or (and (string-match "^\"[^\"]*\"" gnus-tmp-from) | |
4023 (substring gnus-tmp-from (1+ (match-beginning 0)) | |
4024 (1- (match-end 0)))) | |
4025 (substring gnus-tmp-from 0 beg-match))) | |
4026 ((string-match "(.+)" gnus-tmp-from) | |
4027 (substring gnus-tmp-from | |
4028 (1+ (match-beginning 0)) (1- (match-end 0)))) | |
4029 (t gnus-tmp-from))) | |
4030 (when (string= gnus-tmp-name "") | |
4031 (setq gnus-tmp-name gnus-tmp-from)) | |
4032 (unless (numberp gnus-tmp-lines) | |
4033 (setq gnus-tmp-lines 0)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4034 (gnus-put-text-property |
17493 | 4035 (point) |
4036 (progn (eval gnus-summary-line-format-spec) (point)) | |
4037 'gnus-number number) | |
4038 (when gnus-visual-p | |
4039 (forward-line -1) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4040 (gnus-run-hooks 'gnus-summary-update-hook) |
17493 | 4041 (forward-line 1)) |
4042 | |
4043 (setq gnus-tmp-prev-subject subject))) | |
4044 | |
4045 (when (nth 1 thread) | |
4046 (push (cons (max 0 gnus-tmp-level) (nthcdr 1 thread)) stack)) | |
4047 (incf gnus-tmp-level) | |
4048 (setq threads (if thread-end nil (cdar thread))) | |
4049 (unless threads | |
4050 (setq gnus-tmp-level 0))))) | |
4051 (gnus-message 7 "Generating summary...done")) | |
4052 | |
4053 (defun gnus-summary-prepare-unthreaded (headers) | |
4054 "Generate an unthreaded summary buffer based on HEADERS." | |
4055 (let (header number mark) | |
4056 | |
4057 (beginning-of-line) | |
4058 | |
4059 (while headers | |
4060 ;; We may have to root out some bad articles... | |
4061 (when (memq (setq number (mail-header-number | |
4062 (setq header (pop headers)))) | |
4063 gnus-newsgroup-limit) | |
4064 ;; Mark article as read when it has a low score. | |
4065 (when (and gnus-summary-mark-below | |
4066 (< (or (cdr (assq number gnus-newsgroup-scored)) | |
4067 gnus-summary-default-score 0) | |
4068 gnus-summary-mark-below) | |
4069 (not (gnus-summary-article-ancient-p number))) | |
4070 (setq gnus-newsgroup-unreads | |
4071 (delq number gnus-newsgroup-unreads)) | |
4072 (if gnus-newsgroup-auto-expire | |
4073 (push number gnus-newsgroup-expirable) | |
4074 (push (cons number gnus-low-score-mark) | |
4075 gnus-newsgroup-reads))) | |
4076 | |
4077 (setq mark (gnus-article-mark number)) | |
4078 (push (gnus-data-make number mark (1+ (point)) header 0) | |
4079 gnus-newsgroup-data) | |
4080 (gnus-summary-insert-line | |
4081 header 0 number | |
4082 mark (memq number gnus-newsgroup-replied) | |
4083 (memq number gnus-newsgroup-expirable) | |
4084 (mail-header-subject header) nil | |
4085 (cdr (assq number gnus-newsgroup-scored)) | |
4086 (memq number gnus-newsgroup-processable)))))) | |
4087 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4088 (defun gnus-summary-remove-list-identifiers () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4089 "Remove list identifiers in `gnus-list-identifiers' from articles in the current group." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4090 (let ((regexp (if (stringp gnus-list-identifiers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4091 gnus-list-identifiers |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4092 (mapconcat 'identity gnus-list-identifiers " *\\|")))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4093 (dolist (header gnus-newsgroup-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4094 (when (string-match (concat "\\(\\(\\(Re: +\\)?\\(" regexp |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4095 " *\\)\\)+\\(Re: +\\)?\\)") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4096 (mail-header-subject header)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4097 (mail-header-set-subject |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4098 header (concat (substring (mail-header-subject header) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4099 0 (match-beginning 1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4100 (or |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4101 (match-string 3 (mail-header-subject header)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4102 (match-string 5 (mail-header-subject header))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4103 (substring (mail-header-subject header) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4104 (match-end 1)))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4105 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4106 (defun gnus-select-newsgroup (group &optional read-all select-articles) |
17493 | 4107 "Select newsgroup GROUP. |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4108 If READ-ALL is non-nil, all articles in the group are selected. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4109 If SELECT-ARTICLES, only select those articles from GROUP." |
17493 | 4110 (let* ((entry (gnus-gethash group gnus-newsrc-hashtb)) |
4111 ;;!!! Dirty hack; should be removed. | |
4112 (gnus-summary-ignore-duplicates | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4113 (if (eq (car (gnus-find-method-for-group group)) 'nnvirtual) |
17493 | 4114 t |
4115 gnus-summary-ignore-duplicates)) | |
4116 (info (nth 2 entry)) | |
4117 articles fetched-articles cached) | |
4118 | |
4119 (unless (gnus-check-server | |
4120 (setq gnus-current-select-method | |
4121 (gnus-find-method-for-group group))) | |
4122 (error "Couldn't open server")) | |
4123 | |
4124 (or (and entry (not (eq (car entry) t))) ; Either it's active... | |
4125 (gnus-activate-group group) ; Or we can activate it... | |
4126 (progn ; Or we bug out. | |
4127 (when (equal major-mode 'gnus-summary-mode) | |
4128 (kill-buffer (current-buffer))) | |
4129 (error "Couldn't request group %s: %s" | |
4130 group (gnus-status-message group)))) | |
4131 | |
4132 (unless (gnus-request-group group t) | |
4133 (when (equal major-mode 'gnus-summary-mode) | |
4134 (kill-buffer (current-buffer))) | |
4135 (error "Couldn't request group %s: %s" | |
4136 group (gnus-status-message group))) | |
4137 | |
4138 (setq gnus-newsgroup-name group) | |
4139 (setq gnus-newsgroup-unselected nil) | |
4140 (setq gnus-newsgroup-unreads (gnus-list-of-unread-articles group)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4141 (gnus-summary-setup-default-charset) |
17493 | 4142 |
4143 ;; Adjust and set lists of article marks. | |
4144 (when info | |
4145 (gnus-adjust-marked-articles info)) | |
4146 | |
4147 ;; Kludge to avoid having cached articles nixed out in virtual groups. | |
4148 (when (gnus-virtual-group-p group) | |
4149 (setq cached gnus-newsgroup-cached)) | |
4150 | |
4151 (setq gnus-newsgroup-unreads | |
4152 (gnus-set-difference | |
4153 (gnus-set-difference gnus-newsgroup-unreads gnus-newsgroup-marked) | |
4154 gnus-newsgroup-dormant)) | |
4155 | |
4156 (setq gnus-newsgroup-processable nil) | |
4157 | |
4158 (gnus-update-read-articles group gnus-newsgroup-unreads) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4159 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4160 (if (setq articles select-articles) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4161 (setq gnus-newsgroup-unselected |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4162 (gnus-sorted-intersection |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4163 gnus-newsgroup-unreads |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4164 (gnus-sorted-complement gnus-newsgroup-unreads articles))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4165 (setq articles (gnus-articles-to-read group read-all))) |
17493 | 4166 |
4167 (cond | |
4168 ((null articles) | |
4169 ;;(gnus-message 3 "Couldn't select newsgroup -- no articles to display") | |
4170 'quit) | |
4171 ((eq articles 0) nil) | |
4172 (t | |
4173 ;; Init the dependencies hash table. | |
4174 (setq gnus-newsgroup-dependencies | |
4175 (gnus-make-hashtable (length articles))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4176 (gnus-set-global-variables) |
17493 | 4177 ;; Retrieve the headers and read them in. |
4178 (gnus-message 5 "Fetching headers for %s..." gnus-newsgroup-name) | |
4179 (setq gnus-newsgroup-headers | |
4180 (if (eq 'nov | |
4181 (setq gnus-headers-retrieved-by | |
4182 (gnus-retrieve-headers | |
4183 articles gnus-newsgroup-name | |
4184 ;; We might want to fetch old headers, but | |
4185 ;; not if there is only 1 article. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4186 (and (or (and |
17493 | 4187 (not (eq gnus-fetch-old-headers 'some)) |
4188 (not (numberp gnus-fetch-old-headers))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4189 (> (length articles) 1)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4190 gnus-fetch-old-headers)))) |
17493 | 4191 (gnus-get-newsgroup-headers-xover |
4192 articles nil nil gnus-newsgroup-name t) | |
4193 (gnus-get-newsgroup-headers))) | |
4194 (gnus-message 5 "Fetching headers for %s...done" gnus-newsgroup-name) | |
4195 | |
4196 ;; Kludge to avoid having cached articles nixed out in virtual groups. | |
4197 (when cached | |
4198 (setq gnus-newsgroup-cached cached)) | |
4199 | |
4200 ;; Suppress duplicates? | |
4201 (when gnus-suppress-duplicates | |
4202 (gnus-dup-suppress-articles)) | |
4203 | |
4204 ;; Set the initial limit. | |
4205 (setq gnus-newsgroup-limit (copy-sequence articles)) | |
4206 ;; Remove canceled articles from the list of unread articles. | |
4207 (setq gnus-newsgroup-unreads | |
4208 (gnus-set-sorted-intersection | |
4209 gnus-newsgroup-unreads | |
4210 (setq fetched-articles | |
4211 (mapcar (lambda (headers) (mail-header-number headers)) | |
4212 gnus-newsgroup-headers)))) | |
4213 ;; Removed marked articles that do not exist. | |
4214 (gnus-update-missing-marks | |
4215 (gnus-sorted-complement fetched-articles articles)) | |
4216 ;; We might want to build some more threads first. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4217 (when (and gnus-fetch-old-headers |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4218 (eq gnus-headers-retrieved-by 'nov)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4219 (if (eq gnus-fetch-old-headers 'invisible) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4220 (gnus-build-all-threads) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4221 (gnus-build-old-threads))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4222 ;; Let the Gnus agent mark articles as read. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4223 (when gnus-agent |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4224 (gnus-agent-get-undownloaded-list)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4225 ;; Remove list identifiers from subject |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4226 (when gnus-list-identifiers |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4227 (gnus-summary-remove-list-identifiers)) |
17493 | 4228 ;; Check whether auto-expire is to be done in this group. |
4229 (setq gnus-newsgroup-auto-expire | |
4230 (gnus-group-auto-expirable-p group)) | |
4231 ;; Set up the article buffer now, if necessary. | |
4232 (unless gnus-single-article-buffer | |
4233 (gnus-article-setup-buffer)) | |
4234 ;; First and last article in this newsgroup. | |
4235 (when gnus-newsgroup-headers | |
4236 (setq gnus-newsgroup-begin | |
4237 (mail-header-number (car gnus-newsgroup-headers)) | |
4238 gnus-newsgroup-end | |
4239 (mail-header-number | |
4240 (gnus-last-element gnus-newsgroup-headers)))) | |
4241 ;; GROUP is successfully selected. | |
4242 (or gnus-newsgroup-headers t))))) | |
4243 | |
4244 (defun gnus-articles-to-read (group &optional read-all) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4245 "Find out what articles the user wants to read." |
17493 | 4246 (let* ((articles |
4247 ;; Select all articles if `read-all' is non-nil, or if there | |
4248 ;; are no unread articles. | |
4249 (if (or read-all | |
4250 (and (zerop (length gnus-newsgroup-marked)) | |
4251 (zerop (length gnus-newsgroup-unreads))) | |
4252 (eq (gnus-group-find-parameter group 'display) | |
4253 'all)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4254 (or |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4255 (gnus-uncompress-range (gnus-active group)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4256 (gnus-cache-articles-in-group group)) |
17493 | 4257 (sort (append gnus-newsgroup-dormant gnus-newsgroup-marked |
4258 (copy-sequence gnus-newsgroup-unreads)) | |
4259 '<))) | |
4260 (scored-list (gnus-killed-articles gnus-newsgroup-killed articles)) | |
4261 (scored (length scored-list)) | |
4262 (number (length articles)) | |
4263 (marked (+ (length gnus-newsgroup-marked) | |
4264 (length gnus-newsgroup-dormant))) | |
4265 (select | |
4266 (cond | |
4267 ((numberp read-all) | |
4268 read-all) | |
4269 (t | |
4270 (condition-case () | |
4271 (cond | |
4272 ((and (or (<= scored marked) (= scored number)) | |
4273 (numberp gnus-large-newsgroup) | |
4274 (> number gnus-large-newsgroup)) | |
4275 (let ((input | |
4276 (read-string | |
4277 (format | |
4278 "How many articles from %s (default %d): " | |
4279 (gnus-limit-string gnus-newsgroup-name 35) | |
4280 number)))) | |
4281 (if (string-match "^[ \t]*$" input) number input))) | |
4282 ((and (> scored marked) (< scored number) | |
4283 (> (- scored number) 20)) | |
4284 (let ((input | |
4285 (read-string | |
4286 (format "%s %s (%d scored, %d total): " | |
4287 "How many articles from" | |
4288 group scored number)))) | |
4289 (if (string-match "^[ \t]*$" input) | |
4290 number input))) | |
4291 (t number)) | |
4292 (quit nil)))))) | |
4293 (setq select (if (stringp select) (string-to-number select) select)) | |
4294 (if (or (null select) (zerop select)) | |
4295 select | |
4296 (if (and (not (zerop scored)) (<= (abs select) scored)) | |
4297 (progn | |
4298 (setq articles (sort scored-list '<)) | |
4299 (setq number (length articles))) | |
4300 (setq articles (copy-sequence articles))) | |
4301 | |
4302 (when (< (abs select) number) | |
4303 (if (< select 0) | |
4304 ;; Select the N oldest articles. | |
4305 (setcdr (nthcdr (1- (abs select)) articles) nil) | |
4306 ;; Select the N most recent articles. | |
4307 (setq articles (nthcdr (- number select) articles)))) | |
4308 (setq gnus-newsgroup-unselected | |
4309 (gnus-sorted-intersection | |
4310 gnus-newsgroup-unreads | |
4311 (gnus-sorted-complement gnus-newsgroup-unreads articles))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4312 (when gnus-alter-articles-to-read-function |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4313 (setq gnus-newsgroup-unreads |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4314 (sort |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4315 (funcall gnus-alter-articles-to-read-function |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4316 gnus-newsgroup-name gnus-newsgroup-unreads) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4317 '<))) |
17493 | 4318 articles))) |
4319 | |
4320 (defun gnus-killed-articles (killed articles) | |
4321 (let (out) | |
4322 (while articles | |
4323 (when (inline (gnus-member-of-range (car articles) killed)) | |
4324 (push (car articles) out)) | |
4325 (setq articles (cdr articles))) | |
4326 out)) | |
4327 | |
4328 (defun gnus-uncompress-marks (marks) | |
4329 "Uncompress the mark ranges in MARKS." | |
4330 (let ((uncompressed '(score bookmark)) | |
4331 out) | |
4332 (while marks | |
4333 (if (memq (caar marks) uncompressed) | |
4334 (push (car marks) out) | |
4335 (push (cons (caar marks) (gnus-uncompress-range (cdar marks))) out)) | |
4336 (setq marks (cdr marks))) | |
4337 out)) | |
4338 | |
4339 (defun gnus-adjust-marked-articles (info) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4340 "Set all article lists and remove all marks that are no longer valid." |
17493 | 4341 (let* ((marked-lists (gnus-info-marks info)) |
4342 (active (gnus-active (gnus-info-group info))) | |
4343 (min (car active)) | |
4344 (max (cdr active)) | |
4345 (types gnus-article-mark-lists) | |
4346 (uncompressed '(score bookmark killed)) | |
4347 marks var articles article mark) | |
4348 | |
4349 (while marked-lists | |
4350 (setq marks (pop marked-lists)) | |
4351 (set (setq var (intern (format "gnus-newsgroup-%s" | |
4352 (car (rassq (setq mark (car marks)) | |
4353 types))))) | |
4354 (if (memq (car marks) uncompressed) (cdr marks) | |
4355 (gnus-uncompress-range (cdr marks)))) | |
4356 | |
4357 (setq articles (symbol-value var)) | |
4358 | |
4359 ;; All articles have to be subsets of the active articles. | |
4360 (cond | |
4361 ;; Adjust "simple" lists. | |
4362 ((memq mark '(tick dormant expire reply save)) | |
4363 (while articles | |
4364 (when (or (< (setq article (pop articles)) min) (> article max)) | |
4365 (set var (delq article (symbol-value var)))))) | |
4366 ;; Adjust assocs. | |
4367 ((memq mark uncompressed) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
4368 (when (not (listp (cdr (symbol-value var)))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
4369 (set var (list (symbol-value var)))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
4370 (when (not (listp (cdr articles))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
4371 (setq articles (list articles))) |
17493 | 4372 (while articles |
4373 (when (or (not (consp (setq article (pop articles)))) | |
4374 (< (car article) min) | |
4375 (> (car article) max)) | |
4376 (set var (delq article (symbol-value var)))))))))) | |
4377 | |
4378 (defun gnus-update-missing-marks (missing) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4379 "Go through the list of MISSING articles and remove them from the mark lists." |
17493 | 4380 (when missing |
4381 (let ((types gnus-article-mark-lists) | |
4382 var m) | |
4383 ;; Go through all types. | |
4384 (while types | |
4385 (setq var (intern (format "gnus-newsgroup-%s" (car (pop types))))) | |
4386 (when (symbol-value var) | |
4387 ;; This list has articles. So we delete all missing articles | |
4388 ;; from it. | |
4389 (setq m missing) | |
4390 (while m | |
4391 (set var (delq (pop m) (symbol-value var))))))))) | |
4392 | |
4393 (defun gnus-update-marks () | |
4394 "Enter the various lists of marked articles into the newsgroup info list." | |
4395 (let ((types gnus-article-mark-lists) | |
4396 (info (gnus-get-info gnus-newsgroup-name)) | |
4397 (uncompressed '(score bookmark killed)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4398 type list newmarked symbol delta-marks) |
17493 | 4399 (when info |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4400 ;; Add all marks lists to the list of marks lists. |
17493 | 4401 (while (setq type (pop types)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4402 (setq list (symbol-value |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4403 (setq symbol |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4404 (intern (format "gnus-newsgroup-%s" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4405 (car type)))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4406 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4407 (when list |
17493 | 4408 ;; Get rid of the entries of the articles that have the |
4409 ;; default score. | |
4410 (when (and (eq (cdr type) 'score) | |
4411 gnus-save-score | |
4412 list) | |
4413 (let* ((arts list) | |
4414 (prev (cons nil list)) | |
4415 (all prev)) | |
4416 (while arts | |
4417 (if (or (not (consp (car arts))) | |
4418 (= (cdar arts) gnus-summary-default-score)) | |
4419 (setcdr prev (cdr arts)) | |
4420 (setq prev arts)) | |
4421 (setq arts (cdr arts))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4422 (setq list (cdr all))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4423 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4424 (unless (memq (cdr type) uncompressed) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4425 (setq list (gnus-compress-sequence (set symbol (sort list '<)) t))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4426 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4427 (when (gnus-check-backend-function |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4428 'request-set-mark gnus-newsgroup-name) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4429 ;; propagate flags to server, with the following exceptions: |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4430 ;; uncompressed:s are not proper flags (they are cons cells) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4431 ;; cache is a internal gnus flag |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4432 ;; download are local to one gnus installation (well) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4433 ;; unsend are for nndraft groups only |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4434 ;; xxx: generality of this? this suits nnimap anyway |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4435 (unless (memq (cdr type) (append '(cache download unsend) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4436 uncompressed)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4437 (let* ((old (cdr (assq (cdr type) (gnus-info-marks info)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4438 (del (gnus-remove-from-range (gnus-copy-sequence old) list)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4439 (add (gnus-remove-from-range |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4440 (gnus-copy-sequence list) old))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4441 (when add |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4442 (push (list add 'add (list (cdr type))) delta-marks)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4443 (when del |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4444 (push (list del 'del (list (cdr type))) delta-marks))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4445 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4446 (when list |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4447 (push (cons (cdr type) list) newmarked))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4448 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4449 (when delta-marks |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4450 (unless (gnus-check-group gnus-newsgroup-name) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4451 (error "Can't open server for %s" gnus-newsgroup-name)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4452 (gnus-request-set-mark gnus-newsgroup-name delta-marks)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4453 |
17493 | 4454 ;; Enter these new marks into the info of the group. |
4455 (if (nthcdr 3 info) | |
4456 (setcar (nthcdr 3 info) newmarked) | |
4457 ;; Add the marks lists to the end of the info. | |
4458 (when newmarked | |
4459 (setcdr (nthcdr 2 info) (list newmarked)))) | |
4460 | |
4461 ;; Cut off the end of the info if there's nothing else there. | |
4462 (let ((i 5)) | |
4463 (while (and (> i 2) | |
4464 (not (nth i info))) | |
4465 (when (nthcdr (decf i) info) | |
4466 (setcdr (nthcdr i info) nil))))))) | |
4467 | |
4468 (defun gnus-set-mode-line (where) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4469 "Set the mode line of the article or summary buffers. |
17493 | 4470 If WHERE is `summary', the summary mode line format will be used." |
4471 ;; Is this mode line one we keep updated? | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4472 (when (and (memq where gnus-updated-mode-lines) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4473 (symbol-value |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4474 (intern (format "gnus-%s-mode-line-format-spec" where)))) |
17493 | 4475 (let (mode-string) |
4476 (save-excursion | |
4477 ;; We evaluate this in the summary buffer since these | |
4478 ;; variables are buffer-local to that buffer. | |
4479 (set-buffer gnus-summary-buffer) | |
4480 ;; We bind all these variables that are used in the `eval' form | |
4481 ;; below. | |
4482 (let* ((mformat (symbol-value | |
4483 (intern | |
4484 (format "gnus-%s-mode-line-format-spec" where)))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4485 (gnus-tmp-group-name (gnus-group-name-decode |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4486 gnus-newsgroup-name |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4487 (gnus-group-name-charset |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4488 nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4489 gnus-newsgroup-name))) |
17493 | 4490 (gnus-tmp-article-number (or gnus-current-article 0)) |
4491 (gnus-tmp-unread gnus-newsgroup-unreads) | |
4492 (gnus-tmp-unread-and-unticked (length gnus-newsgroup-unreads)) | |
4493 (gnus-tmp-unselected (length gnus-newsgroup-unselected)) | |
4494 (gnus-tmp-unread-and-unselected | |
4495 (cond ((and (zerop gnus-tmp-unread-and-unticked) | |
4496 (zerop gnus-tmp-unselected)) | |
4497 "") | |
4498 ((zerop gnus-tmp-unselected) | |
4499 (format "{%d more}" gnus-tmp-unread-and-unticked)) | |
4500 (t (format "{%d(+%d) more}" | |
4501 gnus-tmp-unread-and-unticked | |
4502 gnus-tmp-unselected)))) | |
4503 (gnus-tmp-subject | |
4504 (if (and gnus-current-headers | |
4505 (vectorp gnus-current-headers)) | |
4506 (gnus-mode-string-quote | |
4507 (mail-header-subject gnus-current-headers)) | |
4508 "")) | |
4509 bufname-length max-len | |
4510 gnus-tmp-header);; passed as argument to any user-format-funcs | |
4511 (setq mode-string (eval mformat)) | |
4512 (setq bufname-length (if (string-match "%b" mode-string) | |
4513 (- (length | |
4514 (buffer-name | |
4515 (if (eq where 'summary) | |
4516 nil | |
4517 (get-buffer gnus-article-buffer)))) | |
4518 2) | |
4519 0)) | |
4520 (setq max-len (max 4 (if gnus-mode-non-string-length | |
4521 (- (window-width) | |
4522 gnus-mode-non-string-length | |
4523 bufname-length) | |
4524 (length mode-string)))) | |
4525 ;; We might have to chop a bit of the string off... | |
4526 (when (> (length mode-string) max-len) | |
4527 (setq mode-string | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4528 (concat (truncate-string-to-width mode-string (- max-len 3)) |
17493 | 4529 "..."))) |
4530 ;; Pad the mode string a bit. | |
4531 (setq mode-string (format (format "%%-%ds" max-len) mode-string)))) | |
4532 ;; Update the mode line. | |
4533 (setq mode-line-buffer-identification | |
4534 (gnus-mode-line-buffer-identification (list mode-string))) | |
4535 (set-buffer-modified-p t)))) | |
4536 | |
4537 (defun gnus-create-xref-hashtb (from-newsgroup headers unreads) | |
4538 "Go through the HEADERS list and add all Xrefs to a hash table. | |
4539 The resulting hash table is returned, or nil if no Xrefs were found." | |
4540 (let* ((virtual (gnus-virtual-group-p from-newsgroup)) | |
4541 (prefix (if virtual "" (gnus-group-real-prefix from-newsgroup))) | |
4542 (xref-hashtb (gnus-make-hashtable)) | |
4543 start group entry number xrefs header) | |
4544 (while headers | |
4545 (setq header (pop headers)) | |
4546 (when (and (setq xrefs (mail-header-xref header)) | |
4547 (not (memq (setq number (mail-header-number header)) | |
4548 unreads))) | |
4549 (setq start 0) | |
4550 (while (string-match "\\([^ ]+\\)[:/]\\([0-9]+\\)" xrefs start) | |
4551 (setq start (match-end 0)) | |
4552 (setq group (if prefix | |
4553 (concat prefix (substring xrefs (match-beginning 1) | |
4554 (match-end 1))) | |
4555 (substring xrefs (match-beginning 1) (match-end 1)))) | |
4556 (setq number | |
4557 (string-to-int (substring xrefs (match-beginning 2) | |
4558 (match-end 2)))) | |
4559 (if (setq entry (gnus-gethash group xref-hashtb)) | |
4560 (setcdr entry (cons number (cdr entry))) | |
4561 (gnus-sethash group (cons number nil) xref-hashtb))))) | |
4562 (and start xref-hashtb))) | |
4563 | |
4564 (defun gnus-mark-xrefs-as-read (from-newsgroup headers unreads) | |
4565 "Look through all the headers and mark the Xrefs as read." | |
4566 (let ((virtual (gnus-virtual-group-p from-newsgroup)) | |
4567 name entry info xref-hashtb idlist method nth4) | |
4568 (save-excursion | |
4569 (set-buffer gnus-group-buffer) | |
4570 (when (setq xref-hashtb | |
4571 (gnus-create-xref-hashtb from-newsgroup headers unreads)) | |
4572 (mapatoms | |
4573 (lambda (group) | |
4574 (unless (string= from-newsgroup (setq name (symbol-name group))) | |
4575 (setq idlist (symbol-value group)) | |
4576 ;; Dead groups are not updated. | |
4577 (and (prog1 | |
4578 (setq entry (gnus-gethash name gnus-newsrc-hashtb) | |
4579 info (nth 2 entry)) | |
4580 (when (stringp (setq nth4 (gnus-info-method info))) | |
4581 (setq nth4 (gnus-server-to-method nth4)))) | |
4582 ;; Only do the xrefs if the group has the same | |
4583 ;; select method as the group we have just read. | |
4584 (or (gnus-methods-equal-p | |
4585 nth4 (gnus-find-method-for-group from-newsgroup)) | |
4586 virtual | |
4587 (equal nth4 (setq method (gnus-find-method-for-group | |
4588 from-newsgroup))) | |
4589 (and (equal (car nth4) (car method)) | |
4590 (equal (nth 1 nth4) (nth 1 method)))) | |
4591 gnus-use-cross-reference | |
4592 (or (not (eq gnus-use-cross-reference t)) | |
4593 virtual | |
4594 ;; Only do cross-references on subscribed | |
4595 ;; groups, if that is what is wanted. | |
4596 (<= (gnus-info-level info) gnus-level-subscribed)) | |
4597 (gnus-group-make-articles-read name idlist)))) | |
4598 xref-hashtb))))) | |
4599 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4600 (defun gnus-compute-read-articles (group articles) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4601 (let* ((entry (gnus-gethash group gnus-newsrc-hashtb)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4602 (info (nth 2 entry)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4603 (active (gnus-active group)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4604 ninfo) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4605 (when entry |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4606 ;; First peel off all invalid article numbers. |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4607 (when active |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4608 (let ((ids articles) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4609 id first) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4610 (while (setq id (pop ids)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4611 (when (and first (> id (cdr active))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4612 ;; We'll end up in this situation in one particular |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4613 ;; obscure situation. If you re-scan a group and get |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4614 ;; a new article that is cross-posted to a different |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4615 ;; group that has not been re-scanned, you might get |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4616 ;; crossposted article that has a higher number than |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4617 ;; Gnus believes possible. So we re-activate this |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4618 ;; group as well. This might mean doing the |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4619 ;; crossposting thingy will *increase* the number |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4620 ;; of articles in some groups. Tsk, tsk. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4621 (setq active (or (gnus-activate-group group) active))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4622 (when (or (> id (cdr active)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4623 (< id (car active))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4624 (setq articles (delq id articles)))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4625 ;; If the read list is nil, we init it. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4626 (if (and active |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4627 (null (gnus-info-read info)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4628 (> (car active) 1)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4629 (setq ninfo (cons 1 (1- (car active)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4630 (setq ninfo (gnus-info-read info))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4631 ;; Then we add the read articles to the range. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4632 (gnus-add-to-range |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4633 ninfo (setq articles (sort articles '<)))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4634 |
17493 | 4635 (defun gnus-group-make-articles-read (group articles) |
4636 "Update the info of GROUP to say that ARTICLES are read." | |
4637 (let* ((num 0) | |
4638 (entry (gnus-gethash group gnus-newsrc-hashtb)) | |
4639 (info (nth 2 entry)) | |
4640 (active (gnus-active group)) | |
4641 range) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4642 (when entry |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4643 (setq range (gnus-compute-read-articles group articles)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4644 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4645 (set-buffer gnus-group-buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4646 (gnus-undo-register |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4647 `(progn |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4648 (gnus-info-set-marks ',info ',(gnus-info-marks info) t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4649 (gnus-info-set-read ',info ',(gnus-info-read info)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4650 (gnus-get-unread-articles-in-group ',info (gnus-active ,group)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4651 (gnus-group-update-group ,group t)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4652 ;; Add the read articles to the range. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4653 (gnus-info-set-read info range) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4654 ;; Then we have to re-compute how many unread |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4655 ;; articles there are in this group. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4656 (when active |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4657 (cond |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4658 ((not range) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4659 (setq num (- (1+ (cdr active)) (car active)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4660 ((not (listp (cdr range))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4661 (setq num (- (cdr active) (- (1+ (cdr range)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4662 (car range))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4663 (t |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4664 (while range |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4665 (if (numberp (car range)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4666 (setq num (1+ num)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4667 (setq num (+ num (- (1+ (cdar range)) (caar range))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4668 (setq range (cdr range))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4669 (setq num (- (cdr active) num)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4670 ;; Update the number of unread articles. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4671 (setcar entry num) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4672 ;; Update the group buffer. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4673 (gnus-group-update-group group t))))) |
17493 | 4674 |
4675 (defvar gnus-newsgroup-none-id 0) | |
4676 | |
4677 (defun gnus-get-newsgroup-headers (&optional dependencies force-new) | |
4678 (let ((cur nntp-server-buffer) | |
4679 (dependencies | |
4680 (or dependencies | |
4681 (save-excursion (set-buffer gnus-summary-buffer) | |
4682 gnus-newsgroup-dependencies))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4683 headers id end ref |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4684 (mail-parse-charset gnus-newsgroup-charset) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4685 (mail-parse-ignored-charsets |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4686 (save-excursion (condition-case nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4687 (set-buffer gnus-summary-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4688 (error)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4689 gnus-newsgroup-ignored-charsets))) |
17493 | 4690 (save-excursion |
4691 (set-buffer nntp-server-buffer) | |
4692 ;; Translate all TAB characters into SPACE characters. | |
4693 (subst-char-in-region (point-min) (point-max) ?\t ? t) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4694 (subst-char-in-region (point-min) (point-max) ?\r ? t) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4695 (gnus-run-hooks 'gnus-parse-headers-hook) |
17493 | 4696 (let ((case-fold-search t) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4697 in-reply-to header p lines chars) |
17493 | 4698 (goto-char (point-min)) |
4699 ;; Search to the beginning of the next header. Error messages | |
4700 ;; do not begin with 2 or 3. | |
4701 (while (re-search-forward "^[23][0-9]+ " nil t) | |
4702 (setq id nil | |
4703 ref nil) | |
4704 ;; This implementation of this function, with nine | |
4705 ;; search-forwards instead of the one re-search-forward and | |
4706 ;; a case (which basically was the old function) is actually | |
4707 ;; about twice as fast, even though it looks messier. You | |
4708 ;; can't have everything, I guess. Speed and elegance | |
4709 ;; doesn't always go hand in hand. | |
4710 (setq | |
4711 header | |
4712 (vector | |
4713 ;; Number. | |
4714 (prog1 | |
4715 (read cur) | |
4716 (end-of-line) | |
4717 (setq p (point)) | |
4718 (narrow-to-region (point) | |
4719 (or (and (search-forward "\n.\n" nil t) | |
4720 (- (point) 2)) | |
4721 (point)))) | |
4722 ;; Subject. | |
4723 (progn | |
4724 (goto-char p) | |
4725 (if (search-forward "\nsubject: " nil t) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4726 (funcall gnus-decode-encoded-word-function |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4727 (nnheader-header-value)) |
19594
abfa7b46c7bd
(gnus-structured-field-decoder): New variable.
Kenichi Handa <handa@m17n.org>
parents:
19521
diff
changeset
|
4728 "(none)")) |
17493 | 4729 ;; From. |
4730 (progn | |
4731 (goto-char p) | |
4732 (if (search-forward "\nfrom: " nil t) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4733 (funcall gnus-decode-encoded-word-function |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4734 (nnheader-header-value)) |
19594
abfa7b46c7bd
(gnus-structured-field-decoder): New variable.
Kenichi Handa <handa@m17n.org>
parents:
19521
diff
changeset
|
4735 "(nobody)")) |
17493 | 4736 ;; Date. |
4737 (progn | |
4738 (goto-char p) | |
4739 (if (search-forward "\ndate: " nil t) | |
4740 (nnheader-header-value) "")) | |
4741 ;; Message-ID. | |
4742 (progn | |
4743 (goto-char p) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4744 (setq id (if (re-search-forward |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4745 "^message-id: *\\(<[^\n\t> ]+>\\)" nil t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4746 ;; We do it this way to make sure the Message-ID |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4747 ;; is (somewhat) syntactically valid. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4748 (buffer-substring (match-beginning 1) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4749 (match-end 1)) |
17493 | 4750 ;; If there was no message-id, we just fake one |
4751 ;; to make subsequent routines simpler. | |
4752 (nnheader-generate-fake-message-id)))) | |
4753 ;; References. | |
4754 (progn | |
4755 (goto-char p) | |
4756 (if (search-forward "\nreferences: " nil t) | |
4757 (progn | |
4758 (setq end (point)) | |
4759 (prog1 | |
4760 (nnheader-header-value) | |
4761 (setq ref | |
4762 (buffer-substring | |
4763 (progn | |
4764 (end-of-line) | |
4765 (search-backward ">" end t) | |
4766 (1+ (point))) | |
4767 (progn | |
4768 (search-backward "<" end t) | |
4769 (point)))))) | |
4770 ;; Get the references from the in-reply-to header if there | |
4771 ;; were no references and the in-reply-to header looks | |
4772 ;; promising. | |
4773 (if (and (search-forward "\nin-reply-to: " nil t) | |
4774 (setq in-reply-to (nnheader-header-value)) | |
4775 (string-match "<[^>]+>" in-reply-to)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4776 (let (ref2) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4777 (setq ref (substring in-reply-to (match-beginning 0) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4778 (match-end 0))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4779 (while (string-match "<[^>]+>" in-reply-to (match-end 0)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4780 (setq ref2 (substring in-reply-to (match-beginning 0) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4781 (match-end 0))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4782 (when (> (length ref2) (length ref)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4783 (setq ref ref2))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4784 ref) |
17493 | 4785 (setq ref nil)))) |
4786 ;; Chars. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4787 (progn |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4788 (goto-char p) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4789 (if (search-forward "\nchars: " nil t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4790 (if (numberp (setq chars (ignore-errors (read cur)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4791 chars 0) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4792 0)) |
17493 | 4793 ;; Lines. |
4794 (progn | |
4795 (goto-char p) | |
4796 (if (search-forward "\nlines: " nil t) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
4797 (if (numberp (setq lines (ignore-errors (read cur)))) |
17493 | 4798 lines 0) |
4799 0)) | |
4800 ;; Xref. | |
4801 (progn | |
4802 (goto-char p) | |
4803 (and (search-forward "\nxref: " nil t) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4804 (nnheader-header-value))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4805 ;; Extra. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4806 (when gnus-extra-headers |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4807 (let ((extra gnus-extra-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4808 out) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4809 (while extra |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4810 (goto-char p) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4811 (when (search-forward |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4812 (concat "\n" (symbol-name (car extra)) ": ") nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4813 (push (cons (car extra) (nnheader-header-value)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4814 out)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4815 (pop extra)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4816 out)))) |
17493 | 4817 (when (equal id ref) |
4818 (setq ref nil)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4819 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4820 (when gnus-alter-header-function |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4821 (funcall gnus-alter-header-function header) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4822 (setq id (mail-header-id header) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4823 ref (gnus-parent-id (mail-header-references header)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4824 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4825 (when (setq header |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4826 (gnus-dependencies-add-header |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4827 header dependencies force-new)) |
17493 | 4828 (push header headers)) |
4829 (goto-char (point-max)) | |
4830 (widen)) | |
4831 (nreverse headers))))) | |
4832 | |
4833 ;; Goes through the xover lines and returns a list of vectors | |
4834 (defun gnus-get-newsgroup-headers-xover (sequence &optional | |
4835 force-new dependencies | |
4836 group also-fetch-heads) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4837 "Parse the news overview data in the server buffer. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4838 Return a list of headers that match SEQUENCE (see |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4839 `nntp-retrieve-headers')." |
17493 | 4840 ;; Get the Xref when the users reads the articles since most/some |
4841 ;; NNTP servers do not include Xrefs when using XOVER. | |
4842 (setq gnus-article-internal-prepare-hook '(gnus-article-get-xrefs)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4843 (let ((mail-parse-charset gnus-newsgroup-charset) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4844 (mail-parse-ignored-charsets gnus-newsgroup-ignored-charsets) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4845 (cur nntp-server-buffer) |
17493 | 4846 (dependencies (or dependencies gnus-newsgroup-dependencies)) |
4847 number headers header) | |
4848 (save-excursion | |
4849 (set-buffer nntp-server-buffer) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4850 (subst-char-in-region (point-min) (point-max) ?\r ? t) |
17493 | 4851 ;; Allow the user to mangle the headers before parsing them. |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4852 (gnus-run-hooks 'gnus-parse-headers-hook) |
17493 | 4853 (goto-char (point-min)) |
4854 (while (not (eobp)) | |
4855 (condition-case () | |
4856 (while (and sequence (not (eobp))) | |
4857 (setq number (read cur)) | |
4858 (while (and sequence | |
4859 (< (car sequence) number)) | |
4860 (setq sequence (cdr sequence))) | |
4861 (and sequence | |
4862 (eq number (car sequence)) | |
4863 (progn | |
4864 (setq sequence (cdr sequence)) | |
4865 (setq header (inline | |
4866 (gnus-nov-parse-line | |
4867 number dependencies force-new)))) | |
4868 (push header headers)) | |
4869 (forward-line 1)) | |
4870 (error | |
4871 (gnus-error 4 "Strange nov line (%d)" | |
4872 (count-lines (point-min) (point))))) | |
4873 (forward-line 1)) | |
4874 ;; A common bug in inn is that if you have posted an article and | |
4875 ;; then retrieves the active file, it will answer correctly -- | |
4876 ;; the new article is included. However, a NOV entry for the | |
4877 ;; article may not have been generated yet, so this may fail. | |
4878 ;; We work around this problem by retrieving the last few | |
4879 ;; headers using HEAD. | |
4880 (if (or (not also-fetch-heads) | |
4881 (not sequence)) | |
4882 ;; We (probably) got all the headers. | |
4883 (nreverse headers) | |
4884 (let ((gnus-nov-is-evil t)) | |
4885 (nconc | |
4886 (nreverse headers) | |
4887 (when (gnus-retrieve-headers sequence group) | |
4888 (gnus-get-newsgroup-headers)))))))) | |
4889 | |
4890 (defun gnus-article-get-xrefs () | |
4891 "Fill in the Xref value in `gnus-current-headers', if necessary. | |
4892 This is meant to be called in `gnus-article-internal-prepare-hook'." | |
4893 (let ((headers (save-excursion (set-buffer gnus-summary-buffer) | |
4894 gnus-current-headers))) | |
4895 (or (not gnus-use-cross-reference) | |
4896 (not headers) | |
4897 (and (mail-header-xref headers) | |
4898 (not (string= (mail-header-xref headers) ""))) | |
4899 (let ((case-fold-search t) | |
4900 xref) | |
4901 (save-restriction | |
4902 (nnheader-narrow-to-headers) | |
4903 (goto-char (point-min)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4904 (when (or (and (not (eobp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4905 (eq (downcase (char-after)) ?x) |
17493 | 4906 (looking-at "Xref:")) |
4907 (search-forward "\nXref:" nil t)) | |
4908 (goto-char (1+ (match-end 0))) | |
4909 (setq xref (buffer-substring (point) | |
4910 (progn (end-of-line) (point)))) | |
4911 (mail-header-set-xref headers xref))))))) | |
4912 | |
4913 (defun gnus-summary-insert-subject (id &optional old-header use-old-header) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4914 "Find article ID and insert the summary line for that article. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4915 OLD-HEADER can either be a header or a line number to insert |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4916 the subject line on." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4917 (let* ((line (and (numberp old-header) old-header)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4918 (old-header (and (vectorp old-header) old-header)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4919 (header (cond ((and old-header use-old-header) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4920 old-header) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4921 ((and (numberp id) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4922 (gnus-number-to-header id)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4923 (gnus-number-to-header id)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4924 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4925 (gnus-read-header id)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4926 (number (and (numberp id) id)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
4927 d) |
17493 | 4928 (when header |
4929 ;; Rebuild the thread that this article is part of and go to the | |
4930 ;; article we have fetched. | |
4931 (when (and (not gnus-show-threads) | |
4932 old-header) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4933 (when (and number |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4934 (setq d (gnus-data-find (mail-header-number old-header)))) |
17493 | 4935 (goto-char (gnus-data-pos d)) |
4936 (gnus-data-remove | |
4937 number | |
4938 (- (gnus-point-at-bol) | |
4939 (prog1 | |
4940 (1+ (gnus-point-at-eol)) | |
4941 (gnus-delete-line)))))) | |
4942 (when old-header | |
4943 (mail-header-set-number header (mail-header-number old-header))) | |
4944 (setq gnus-newsgroup-sparse | |
4945 (delq (setq number (mail-header-number header)) | |
4946 gnus-newsgroup-sparse)) | |
4947 (setq gnus-newsgroup-ancient (delq number gnus-newsgroup-ancient)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4948 (push number gnus-newsgroup-limit) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4949 (gnus-rebuild-thread (mail-header-id header) line) |
17493 | 4950 (gnus-summary-goto-subject number nil t)) |
4951 (when (and (numberp number) | |
4952 (> number 0)) | |
4953 ;; We have to update the boundaries even if we can't fetch the | |
4954 ;; article if ID is a number -- so that the next `P' or `N' | |
4955 ;; command will fetch the previous (or next) article even | |
4956 ;; if the one we tried to fetch this time has been canceled. | |
4957 (when (> number gnus-newsgroup-end) | |
4958 (setq gnus-newsgroup-end number)) | |
4959 (when (< number gnus-newsgroup-begin) | |
4960 (setq gnus-newsgroup-begin number)) | |
4961 (setq gnus-newsgroup-unselected | |
4962 (delq number gnus-newsgroup-unselected))) | |
4963 ;; Report back a success? | |
4964 (and header (mail-header-number header)))) | |
4965 | |
4966 ;;; Process/prefix in the summary buffer | |
4967 | |
4968 (defun gnus-summary-work-articles (n) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4969 "Return a list of articles to be worked upon. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4970 The prefix argument, the list of process marked articles, and the |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4971 current article will be taken into consideration." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4972 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4973 (set-buffer gnus-summary-buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4974 (cond |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4975 (n |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4976 ;; A numerical prefix has been given. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4977 (setq n (prefix-numeric-value n)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4978 (let ((backward (< n 0)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4979 (n (abs (prefix-numeric-value n))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4980 articles article) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4981 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4982 (while |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4983 (and (> n 0) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4984 (push (setq article (gnus-summary-article-number)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4985 articles) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4986 (if backward |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4987 (gnus-summary-find-prev nil article) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4988 (gnus-summary-find-next nil article))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4989 (decf n))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4990 (nreverse articles))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4991 ((and (gnus-region-active-p) (mark)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4992 (message "region active") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4993 ;; Work on the region between point and mark. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4994 (let ((max (max (point) (mark))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4995 articles article) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4996 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4997 (goto-char (min (min (point) (mark)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4998 (while |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
4999 (and |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5000 (push (setq article (gnus-summary-article-number)) articles) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5001 (gnus-summary-find-next nil article) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5002 (< (point) max))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5003 (nreverse articles)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5004 (gnus-newsgroup-processable |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5005 ;; There are process-marked articles present. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5006 ;; Save current state. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5007 (gnus-summary-save-process-mark) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5008 ;; Return the list. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5009 (reverse gnus-newsgroup-processable)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5010 (t |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5011 ;; Just return the current article. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5012 (list (gnus-summary-article-number)))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5013 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5014 (defmacro gnus-summary-iterate (arg &rest forms) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5015 "Iterate over the process/prefixed articles and do FORMS. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5016 ARG is the interactive prefix given to the command. FORMS will be |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5017 executed with point over the summary line of the articles." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5018 (let ((articles (make-symbol "gnus-summary-iterate-articles"))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5019 `(let ((,articles (gnus-summary-work-articles ,arg))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5020 (while ,articles |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5021 (gnus-summary-goto-subject (car ,articles)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5022 ,@forms |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5023 (pop ,articles))))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5024 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5025 (put 'gnus-summary-iterate 'lisp-indent-function 1) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5026 (put 'gnus-summary-iterate 'edebug-form-spec '(form body)) |
17493 | 5027 |
5028 (defun gnus-summary-save-process-mark () | |
5029 "Push the current set of process marked articles on the stack." | |
5030 (interactive) | |
5031 (push (copy-sequence gnus-newsgroup-processable) | |
5032 gnus-newsgroup-process-stack)) | |
5033 | |
5034 (defun gnus-summary-kill-process-mark () | |
5035 "Push the current set of process marked articles on the stack and unmark." | |
5036 (interactive) | |
5037 (gnus-summary-save-process-mark) | |
5038 (gnus-summary-unmark-all-processable)) | |
5039 | |
5040 (defun gnus-summary-yank-process-mark () | |
5041 "Pop the last process mark state off the stack and restore it." | |
5042 (interactive) | |
5043 (unless gnus-newsgroup-process-stack | |
5044 (error "Empty mark stack")) | |
5045 (gnus-summary-process-mark-set (pop gnus-newsgroup-process-stack))) | |
5046 | |
5047 (defun gnus-summary-process-mark-set (set) | |
5048 "Make SET into the current process marked articles." | |
5049 (gnus-summary-unmark-all-processable) | |
5050 (while set | |
5051 (gnus-summary-set-process-mark (pop set)))) | |
5052 | |
5053 ;;; Searching and stuff | |
5054 | |
5055 (defun gnus-summary-search-group (&optional backward use-level) | |
5056 "Search for next unread newsgroup. | |
5057 If optional argument BACKWARD is non-nil, search backward instead." | |
5058 (save-excursion | |
5059 (set-buffer gnus-group-buffer) | |
5060 (when (gnus-group-search-forward | |
5061 backward nil (if use-level (gnus-group-group-level) nil)) | |
5062 (gnus-group-group-name)))) | |
5063 | |
5064 (defun gnus-summary-best-group (&optional exclude-group) | |
5065 "Find the name of the best unread group. | |
5066 If EXCLUDE-GROUP, do not go to this group." | |
5067 (save-excursion | |
5068 (set-buffer gnus-group-buffer) | |
5069 (save-excursion | |
5070 (gnus-group-best-unread-group exclude-group)))) | |
5071 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5072 (defun gnus-summary-find-next (&optional unread article backward undownloaded) |
17493 | 5073 (if backward (gnus-summary-find-prev) |
5074 (let* ((dummy (gnus-summary-article-intangible-p)) | |
5075 (article (or article (gnus-summary-article-number))) | |
5076 (arts (gnus-data-find-list article)) | |
5077 result) | |
5078 (when (and (not dummy) | |
5079 (or (not gnus-summary-check-current) | |
5080 (not unread) | |
5081 (not (gnus-data-unread-p (car arts))))) | |
5082 (setq arts (cdr arts))) | |
5083 (when (setq result | |
5084 (if unread | |
5085 (progn | |
5086 (while arts | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5087 (when (or (and undownloaded |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5088 (eq gnus-undownloaded-mark |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5089 (gnus-data-mark (car arts)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5090 (gnus-data-unread-p (car arts))) |
17493 | 5091 (setq result (car arts) |
5092 arts nil)) | |
5093 (setq arts (cdr arts))) | |
5094 result) | |
5095 (car arts))) | |
5096 (goto-char (gnus-data-pos result)) | |
5097 (gnus-data-number result))))) | |
5098 | |
5099 (defun gnus-summary-find-prev (&optional unread article) | |
5100 (let* ((eobp (eobp)) | |
5101 (article (or article (gnus-summary-article-number))) | |
5102 (arts (gnus-data-find-list article (gnus-data-list 'rev))) | |
5103 result) | |
5104 (when (and (not eobp) | |
5105 (or (not gnus-summary-check-current) | |
5106 (not unread) | |
5107 (not (gnus-data-unread-p (car arts))))) | |
5108 (setq arts (cdr arts))) | |
5109 (when (setq result | |
5110 (if unread | |
5111 (progn | |
5112 (while arts | |
5113 (when (gnus-data-unread-p (car arts)) | |
5114 (setq result (car arts) | |
5115 arts nil)) | |
5116 (setq arts (cdr arts))) | |
5117 result) | |
5118 (car arts))) | |
5119 (goto-char (gnus-data-pos result)) | |
5120 (gnus-data-number result)))) | |
5121 | |
5122 (defun gnus-summary-find-subject (subject &optional unread backward article) | |
5123 (let* ((simp-subject (gnus-simplify-subject-fully subject)) | |
5124 (article (or article (gnus-summary-article-number))) | |
5125 (articles (gnus-data-list backward)) | |
5126 (arts (gnus-data-find-list article articles)) | |
5127 result) | |
5128 (when (or (not gnus-summary-check-current) | |
5129 (not unread) | |
5130 (not (gnus-data-unread-p (car arts)))) | |
5131 (setq arts (cdr arts))) | |
5132 (while arts | |
5133 (and (or (not unread) | |
5134 (gnus-data-unread-p (car arts))) | |
5135 (vectorp (gnus-data-header (car arts))) | |
5136 (gnus-subject-equal | |
5137 simp-subject (mail-header-subject (gnus-data-header (car arts))) t) | |
5138 (setq result (car arts) | |
5139 arts nil)) | |
5140 (setq arts (cdr arts))) | |
5141 (and result | |
5142 (goto-char (gnus-data-pos result)) | |
5143 (gnus-data-number result)))) | |
5144 | |
5145 (defun gnus-summary-search-forward (&optional unread subject backward) | |
5146 "Search forward for an article. | |
5147 If UNREAD, look for unread articles. If SUBJECT, look for | |
5148 articles with that subject. If BACKWARD, search backward instead." | |
5149 (cond (subject (gnus-summary-find-subject subject unread backward)) | |
5150 (backward (gnus-summary-find-prev unread)) | |
5151 (t (gnus-summary-find-next unread)))) | |
5152 | |
5153 (defun gnus-recenter (&optional n) | |
5154 "Center point in window and redisplay frame. | |
5155 Also do horizontal recentering." | |
5156 (interactive "P") | |
5157 (when (and gnus-auto-center-summary | |
5158 (not (eq gnus-auto-center-summary 'vertical))) | |
5159 (gnus-horizontal-recenter)) | |
5160 (recenter n)) | |
5161 | |
5162 (defun gnus-summary-recenter () | |
5163 "Center point in the summary window. | |
5164 If `gnus-auto-center-summary' is nil, or the article buffer isn't | |
5165 displayed, no centering will be performed." | |
5166 ;; Suggested by earle@mahendo.JPL.NASA.GOV (Greg Earle). | |
5167 ;; Recenter only when requested. Suggested by popovich@park.cs.columbia.edu. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5168 (interactive) |
17493 | 5169 (let* ((top (cond ((< (window-height) 4) 0) |
5170 ((< (window-height) 7) 1) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5171 (t (if (numberp gnus-auto-center-summary) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5172 gnus-auto-center-summary |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5173 2)))) |
17493 | 5174 (height (1- (window-height))) |
5175 (bottom (save-excursion (goto-char (point-max)) | |
5176 (forward-line (- height)) | |
5177 (point))) | |
5178 (window (get-buffer-window (current-buffer)))) | |
5179 ;; The user has to want it. | |
5180 (when gnus-auto-center-summary | |
5181 (when (get-buffer-window gnus-article-buffer) | |
5182 ;; Only do recentering when the article buffer is displayed, | |
5183 ;; Set the window start to either `bottom', which is the biggest | |
5184 ;; possible valid number, or the second line from the top, | |
5185 ;; whichever is the least. | |
5186 (set-window-start | |
5187 window (min bottom (save-excursion | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5188 (forward-line (- top)) (point))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5189 t)) |
17493 | 5190 ;; Do horizontal recentering while we're at it. |
5191 (when (and (get-buffer-window (current-buffer) t) | |
5192 (not (eq gnus-auto-center-summary 'vertical))) | |
5193 (let ((selected (selected-window))) | |
5194 (select-window (get-buffer-window (current-buffer) t)) | |
5195 (gnus-summary-position-point) | |
5196 (gnus-horizontal-recenter) | |
5197 (select-window selected)))))) | |
5198 | |
5199 (defun gnus-summary-jump-to-group (newsgroup) | |
5200 "Move point to NEWSGROUP in group mode buffer." | |
5201 ;; Keep update point of group mode buffer if visible. | |
5202 (if (eq (current-buffer) (get-buffer gnus-group-buffer)) | |
5203 (save-window-excursion | |
5204 ;; Take care of tree window mode. | |
5205 (when (get-buffer-window gnus-group-buffer) | |
5206 (pop-to-buffer gnus-group-buffer)) | |
5207 (gnus-group-jump-to-group newsgroup)) | |
5208 (save-excursion | |
5209 ;; Take care of tree window mode. | |
5210 (if (get-buffer-window gnus-group-buffer) | |
5211 (pop-to-buffer gnus-group-buffer) | |
5212 (set-buffer gnus-group-buffer)) | |
5213 (gnus-group-jump-to-group newsgroup)))) | |
5214 | |
5215 ;; This function returns a list of article numbers based on the | |
5216 ;; difference between the ranges of read articles in this group and | |
5217 ;; the range of active articles. | |
5218 (defun gnus-list-of-unread-articles (group) | |
5219 (let* ((read (gnus-info-read (gnus-get-info group))) | |
5220 (active (or (gnus-active group) (gnus-activate-group group))) | |
5221 (last (cdr active)) | |
5222 first nlast unread) | |
5223 ;; If none are read, then all are unread. | |
5224 (if (not read) | |
5225 (setq first (car active)) | |
5226 ;; If the range of read articles is a single range, then the | |
5227 ;; first unread article is the article after the last read | |
5228 ;; article. Sounds logical, doesn't it? | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5229 (if (and (not (listp (cdr read))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5230 (or (< (car read) (car active)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5231 (progn (setq read (list read)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5232 nil))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5233 (setq first (max (car active) (1+ (cdr read)))) |
17493 | 5234 ;; `read' is a list of ranges. |
5235 (when (/= (setq nlast (or (and (numberp (car read)) (car read)) | |
5236 (caar read))) | |
5237 1) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5238 (setq first (car active))) |
17493 | 5239 (while read |
5240 (when first | |
5241 (while (< first nlast) | |
5242 (push first unread) | |
5243 (setq first (1+ first)))) | |
5244 (setq first (1+ (if (atom (car read)) (car read) (cdar read)))) | |
5245 (setq nlast (if (atom (cadr read)) (cadr read) (caadr read))) | |
5246 (setq read (cdr read))))) | |
5247 ;; And add the last unread articles. | |
5248 (while (<= first last) | |
5249 (push first unread) | |
5250 (setq first (1+ first))) | |
5251 ;; Return the list of unread articles. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5252 (delq 0 (nreverse unread)))) |
17493 | 5253 |
5254 (defun gnus-list-of-read-articles (group) | |
5255 "Return a list of unread, unticked and non-dormant articles." | |
5256 (let* ((info (gnus-get-info group)) | |
5257 (marked (gnus-info-marks info)) | |
5258 (active (gnus-active group))) | |
5259 (and info active | |
5260 (gnus-set-difference | |
5261 (gnus-sorted-complement | |
5262 (gnus-uncompress-range active) | |
5263 (gnus-list-of-unread-articles group)) | |
5264 (append | |
5265 (gnus-uncompress-range (cdr (assq 'dormant marked))) | |
5266 (gnus-uncompress-range (cdr (assq 'tick marked)))))))) | |
5267 | |
5268 ;; Various summary commands | |
5269 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5270 (defun gnus-summary-select-article-buffer () |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5271 "Reconfigure windows to show article buffer." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5272 (interactive) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5273 (if (not (gnus-buffer-live-p gnus-article-buffer)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5274 (error "There is no article buffer for this summary buffer") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5275 (gnus-configure-windows 'article) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5276 (select-window (get-buffer-window gnus-article-buffer)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5277 |
17493 | 5278 (defun gnus-summary-universal-argument (arg) |
5279 "Perform any operation on all articles that are process/prefixed." | |
5280 (interactive "P") | |
5281 (let ((articles (gnus-summary-work-articles arg)) | |
5282 func article) | |
5283 (if (eq | |
5284 (setq | |
5285 func | |
5286 (key-binding | |
5287 (read-key-sequence | |
5288 (substitute-command-keys | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5289 "\\<gnus-summary-mode-map>\\[gnus-summary-universal-argument]")))) |
17493 | 5290 'undefined) |
5291 (gnus-error 1 "Undefined key") | |
5292 (save-excursion | |
5293 (while articles | |
5294 (gnus-summary-goto-subject (setq article (pop articles))) | |
5295 (let (gnus-newsgroup-processable) | |
5296 (command-execute func)) | |
5297 (gnus-summary-remove-process-mark article))))) | |
5298 (gnus-summary-position-point)) | |
5299 | |
5300 (defun gnus-summary-toggle-truncation (&optional arg) | |
5301 "Toggle truncation of summary lines. | |
5302 With arg, turn line truncation on iff arg is positive." | |
5303 (interactive "P") | |
5304 (setq truncate-lines | |
5305 (if (null arg) (not truncate-lines) | |
5306 (> (prefix-numeric-value arg) 0))) | |
5307 (redraw-display)) | |
5308 | |
5309 (defun gnus-summary-reselect-current-group (&optional all rescan) | |
5310 "Exit and then reselect the current newsgroup. | |
5311 The prefix argument ALL means to select all articles." | |
5312 (interactive "P") | |
5313 (when (gnus-ephemeral-group-p gnus-newsgroup-name) | |
5314 (error "Ephemeral groups can't be reselected")) | |
5315 (let ((current-subject (gnus-summary-article-number)) | |
5316 (group gnus-newsgroup-name)) | |
5317 (setq gnus-newsgroup-begin nil) | |
5318 (gnus-summary-exit) | |
5319 ;; We have to adjust the point of group mode buffer because | |
5320 ;; point was moved to the next unread newsgroup by exiting. | |
5321 (gnus-summary-jump-to-group group) | |
5322 (when rescan | |
5323 (save-excursion | |
5324 (gnus-group-get-new-news-this-group 1))) | |
5325 (gnus-group-read-group all t) | |
5326 (gnus-summary-goto-subject current-subject nil t))) | |
5327 | |
5328 (defun gnus-summary-rescan-group (&optional all) | |
5329 "Exit the newsgroup, ask for new articles, and select the newsgroup." | |
5330 (interactive "P") | |
5331 (gnus-summary-reselect-current-group all t)) | |
5332 | |
5333 (defun gnus-summary-update-info (&optional non-destructive) | |
5334 (save-excursion | |
5335 (let ((group gnus-newsgroup-name)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5336 (when group |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5337 (when gnus-newsgroup-kill-headers |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5338 (setq gnus-newsgroup-killed |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5339 (gnus-compress-sequence |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5340 (nconc |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5341 (gnus-set-sorted-intersection |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5342 (gnus-uncompress-range gnus-newsgroup-killed) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5343 (setq gnus-newsgroup-unselected |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5344 (sort gnus-newsgroup-unselected '<))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5345 (setq gnus-newsgroup-unreads |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5346 (sort gnus-newsgroup-unreads '<))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5347 t))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5348 (unless (listp (cdr gnus-newsgroup-killed)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5349 (setq gnus-newsgroup-killed (list gnus-newsgroup-killed))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5350 (let ((headers gnus-newsgroup-headers)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5351 ;; Set the new ranges of read articles. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5352 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5353 (set-buffer gnus-group-buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5354 (gnus-undo-force-boundary)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5355 (gnus-update-read-articles |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5356 group (append gnus-newsgroup-unreads gnus-newsgroup-unselected)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5357 ;; Set the current article marks. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5358 (let ((gnus-newsgroup-scored |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5359 (if (and (not gnus-save-score) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5360 (not non-destructive)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5361 nil |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5362 gnus-newsgroup-scored))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5363 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5364 (gnus-update-marks))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5365 ;; Do the cross-ref thing. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5366 (when gnus-use-cross-reference |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5367 (gnus-mark-xrefs-as-read group headers gnus-newsgroup-unreads)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5368 ;; Do not switch windows but change the buffer to work. |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
5369 (set-buffer gnus-group-buffer) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5370 (unless (gnus-ephemeral-group-p group) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5371 (gnus-group-update-group group))))))) |
17493 | 5372 |
5373 (defun gnus-summary-save-newsrc (&optional force) | |
5374 "Save the current number of read/marked articles in the dribble buffer. | |
5375 The dribble buffer will then be saved. | |
5376 If FORCE (the prefix), also save the .newsrc file(s)." | |
5377 (interactive "P") | |
5378 (gnus-summary-update-info t) | |
5379 (if force | |
5380 (gnus-save-newsrc-file) | |
5381 (gnus-dribble-save))) | |
5382 | |
5383 (defun gnus-summary-exit (&optional temporary) | |
5384 "Exit reading current newsgroup, and then return to group selection mode. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5385 `gnus-exit-group-hook' is called with no arguments if that value is non-nil." |
17493 | 5386 (interactive) |
5387 (gnus-set-global-variables) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5388 (when (gnus-buffer-live-p gnus-article-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5389 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5390 (set-buffer gnus-article-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5391 (mm-destroy-parts gnus-article-mime-handles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5392 ;; Set it to nil for safety reason. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5393 (setq gnus-article-mime-handle-alist nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5394 (setq gnus-article-mime-handles nil))) |
17493 | 5395 (gnus-kill-save-kill-buffer) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5396 (gnus-async-halt-prefetch) |
17493 | 5397 (let* ((group gnus-newsgroup-name) |
5398 (quit-config (gnus-group-quit-config gnus-newsgroup-name)) | |
5399 (mode major-mode) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
5400 (group-point nil) |
17493 | 5401 (buf (current-buffer))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5402 (unless quit-config |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5403 ;; Do adaptive scoring, and possibly save score files. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5404 (when gnus-newsgroup-adaptive |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5405 (gnus-score-adaptive)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5406 (when gnus-use-scoring |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5407 (gnus-score-save))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5408 (gnus-run-hooks 'gnus-summary-prepare-exit-hook) |
17493 | 5409 ;; If we have several article buffers, we kill them at exit. |
5410 (unless gnus-single-article-buffer | |
5411 (gnus-kill-buffer gnus-original-article-buffer) | |
5412 (setq gnus-article-current nil)) | |
5413 (when gnus-use-cache | |
5414 (gnus-cache-possibly-remove-articles) | |
5415 (gnus-cache-save-buffers)) | |
5416 (gnus-async-prefetch-remove-group group) | |
5417 (when gnus-suppress-duplicates | |
5418 (gnus-dup-enter-articles)) | |
5419 (when gnus-use-trees | |
5420 (gnus-tree-close group)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5421 (when gnus-use-cache |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5422 (gnus-cache-write-active)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5423 ;; Remove entries for this group. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5424 (nnmail-purge-split-history (gnus-group-real-name group)) |
17493 | 5425 ;; Make all changes in this group permanent. |
5426 (unless quit-config | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5427 (gnus-run-hooks 'gnus-exit-group-hook) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5428 (gnus-summary-update-info)) |
17493 | 5429 (gnus-close-group group) |
5430 ;; Make sure where we were, and go to next newsgroup. | |
5431 (set-buffer gnus-group-buffer) | |
5432 (unless quit-config | |
5433 (gnus-group-jump-to-group group)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5434 (gnus-run-hooks 'gnus-summary-exit-hook) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5435 (unless (or quit-config |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5436 ;; If this group has disappeared from the summary |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5437 ;; buffer, don't skip forwards. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5438 (not (string= group (gnus-group-group-name)))) |
17493 | 5439 (gnus-group-next-unread-group 1)) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
5440 (setq group-point (point)) |
17493 | 5441 (if temporary |
5442 nil ;Nothing to do. | |
5443 ;; If we have several article buffers, we kill them at exit. | |
5444 (unless gnus-single-article-buffer | |
5445 (gnus-kill-buffer gnus-article-buffer) | |
5446 (gnus-kill-buffer gnus-original-article-buffer) | |
5447 (setq gnus-article-current nil)) | |
5448 (set-buffer buf) | |
5449 (if (not gnus-kill-summary-on-exit) | |
5450 (gnus-deaden-summary) | |
5451 ;; We set all buffer-local variables to nil. It is unclear why | |
5452 ;; this is needed, but if we don't, buffer-local variables are | |
5453 ;; not garbage-collected, it seems. This would the lead to en | |
5454 ;; ever-growing Emacs. | |
5455 (gnus-summary-clear-local-variables) | |
5456 (when (get-buffer gnus-article-buffer) | |
5457 (bury-buffer gnus-article-buffer)) | |
5458 ;; We clear the global counterparts of the buffer-local | |
5459 ;; variables as well, just to be on the safe side. | |
5460 (set-buffer gnus-group-buffer) | |
5461 (gnus-summary-clear-local-variables) | |
5462 ;; Return to group mode buffer. | |
5463 (when (eq mode 'gnus-summary-mode) | |
5464 (gnus-kill-buffer buf))) | |
5465 (setq gnus-current-select-method gnus-select-method) | |
5466 (pop-to-buffer gnus-group-buffer) | |
5467 (if (not quit-config) | |
5468 (progn | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
5469 (goto-char group-point) |
17493 | 5470 (gnus-configure-windows 'group 'force)) |
5471 (gnus-handle-ephemeral-exit quit-config)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5472 ;; Clear the current group name. |
17493 | 5473 (unless quit-config |
5474 (setq gnus-newsgroup-name nil))))) | |
5475 | |
5476 (defalias 'gnus-summary-quit 'gnus-summary-exit-no-update) | |
5477 (defun gnus-summary-exit-no-update (&optional no-questions) | |
5478 "Quit reading current newsgroup without updating read article info." | |
5479 (interactive) | |
5480 (let* ((group gnus-newsgroup-name) | |
5481 (quit-config (gnus-group-quit-config group))) | |
5482 (when (or no-questions | |
5483 gnus-expert-user | |
5484 (gnus-y-or-n-p "Discard changes to this group and exit? ")) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5485 (gnus-async-halt-prefetch) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5486 (mapcar 'funcall |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5487 (delq 'gnus-summary-expire-articles |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5488 (copy-sequence gnus-summary-prepare-exit-hook))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5489 (when (gnus-buffer-live-p gnus-article-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5490 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5491 (set-buffer gnus-article-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5492 (mm-destroy-parts gnus-article-mime-handles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5493 ;; Set it to nil for safety reason. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5494 (setq gnus-article-mime-handle-alist nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5495 (setq gnus-article-mime-handles nil))) |
17493 | 5496 ;; If we have several article buffers, we kill them at exit. |
5497 (unless gnus-single-article-buffer | |
5498 (gnus-kill-buffer gnus-article-buffer) | |
5499 (gnus-kill-buffer gnus-original-article-buffer) | |
5500 (setq gnus-article-current nil)) | |
5501 (if (not gnus-kill-summary-on-exit) | |
5502 (gnus-deaden-summary) | |
5503 (gnus-close-group group) | |
5504 (gnus-summary-clear-local-variables) | |
5505 (set-buffer gnus-group-buffer) | |
5506 (gnus-summary-clear-local-variables) | |
5507 (when (get-buffer gnus-summary-buffer) | |
5508 (kill-buffer gnus-summary-buffer))) | |
5509 (unless gnus-single-article-buffer | |
5510 (setq gnus-article-current nil)) | |
5511 (when gnus-use-trees | |
5512 (gnus-tree-close group)) | |
5513 (gnus-async-prefetch-remove-group group) | |
5514 (when (get-buffer gnus-article-buffer) | |
5515 (bury-buffer gnus-article-buffer)) | |
5516 ;; Return to the group buffer. | |
5517 (gnus-configure-windows 'group 'force) | |
5518 ;; Clear the current group name. | |
5519 (setq gnus-newsgroup-name nil) | |
5520 (when (equal (gnus-group-group-name) group) | |
5521 (gnus-group-next-unread-group 1)) | |
5522 (when quit-config | |
5523 (gnus-handle-ephemeral-exit quit-config))))) | |
5524 | |
5525 (defun gnus-handle-ephemeral-exit (quit-config) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5526 "Handle movement when leaving an ephemeral group. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5527 The state which existed when entering the ephemeral is reset." |
17493 | 5528 (if (not (buffer-name (car quit-config))) |
5529 (gnus-configure-windows 'group 'force) | |
5530 (set-buffer (car quit-config)) | |
5531 (cond ((eq major-mode 'gnus-summary-mode) | |
5532 (gnus-set-global-variables)) | |
5533 ((eq major-mode 'gnus-article-mode) | |
5534 (save-excursion | |
5535 ;; The `gnus-summary-buffer' variable may point | |
5536 ;; to the old summary buffer when using a single | |
5537 ;; article buffer. | |
5538 (unless (gnus-buffer-live-p gnus-summary-buffer) | |
5539 (set-buffer gnus-group-buffer)) | |
5540 (set-buffer gnus-summary-buffer) | |
5541 (gnus-set-global-variables)))) | |
5542 (if (or (eq (cdr quit-config) 'article) | |
5543 (eq (cdr quit-config) 'pick)) | |
5544 (progn | |
5545 ;; The current article may be from the ephemeral group | |
5546 ;; thus it is best that we reload this article | |
5547 (gnus-summary-show-article) | |
5548 (if (and (boundp 'gnus-pick-mode) (symbol-value 'gnus-pick-mode)) | |
5549 (gnus-configure-windows 'pick 'force) | |
5550 (gnus-configure-windows (cdr quit-config) 'force))) | |
5551 (gnus-configure-windows (cdr quit-config) 'force)) | |
5552 (when (eq major-mode 'gnus-summary-mode) | |
5553 (gnus-summary-next-subject 1 nil t) | |
5554 (gnus-summary-recenter) | |
5555 (gnus-summary-position-point)))) | |
5556 | |
5557 ;;; Dead summaries. | |
5558 | |
5559 (defvar gnus-dead-summary-mode-map nil) | |
5560 | |
5561 (unless gnus-dead-summary-mode-map | |
5562 (setq gnus-dead-summary-mode-map (make-keymap)) | |
5563 (suppress-keymap gnus-dead-summary-mode-map) | |
5564 (substitute-key-definition | |
5565 'undefined 'gnus-summary-wake-up-the-dead gnus-dead-summary-mode-map) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
5566 (let ((keys '("\C-d" "\r" "\177" [delete]))) |
17493 | 5567 (while keys |
5568 (define-key gnus-dead-summary-mode-map | |
5569 (pop keys) 'gnus-summary-wake-up-the-dead)))) | |
5570 | |
5571 (defvar gnus-dead-summary-mode nil | |
5572 "Minor mode for Gnus summary buffers.") | |
5573 | |
5574 (defun gnus-dead-summary-mode (&optional arg) | |
5575 "Minor mode for Gnus summary buffers." | |
5576 (interactive "P") | |
5577 (when (eq major-mode 'gnus-summary-mode) | |
5578 (make-local-variable 'gnus-dead-summary-mode) | |
5579 (setq gnus-dead-summary-mode | |
5580 (if (null arg) (not gnus-dead-summary-mode) | |
5581 (> (prefix-numeric-value arg) 0))) | |
5582 (when gnus-dead-summary-mode | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
5583 (gnus-add-minor-mode |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
5584 'gnus-dead-summary-mode " Dead" gnus-dead-summary-mode-map)))) |
17493 | 5585 |
5586 (defun gnus-deaden-summary () | |
5587 "Make the current summary buffer into a dead summary buffer." | |
5588 ;; Kill any previous dead summary buffer. | |
5589 (when (and gnus-dead-summary | |
5590 (buffer-name gnus-dead-summary)) | |
5591 (save-excursion | |
5592 (set-buffer gnus-dead-summary) | |
5593 (when gnus-dead-summary-mode | |
5594 (kill-buffer (current-buffer))))) | |
5595 ;; Make this the current dead summary. | |
5596 (setq gnus-dead-summary (current-buffer)) | |
5597 (gnus-dead-summary-mode 1) | |
5598 (let ((name (buffer-name))) | |
5599 (when (string-match "Summary" name) | |
5600 (rename-buffer | |
5601 (concat (substring name 0 (match-beginning 0)) "Dead " | |
5602 (substring name (match-beginning 0))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5603 t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5604 (bury-buffer)))) |
17493 | 5605 |
5606 (defun gnus-kill-or-deaden-summary (buffer) | |
5607 "Kill or deaden the summary BUFFER." | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5608 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5609 (when (and (buffer-name buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5610 (not gnus-single-article-buffer)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5611 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5612 (set-buffer buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5613 (gnus-kill-buffer gnus-article-buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5614 (gnus-kill-buffer gnus-original-article-buffer))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5615 (cond (gnus-kill-summary-on-exit |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5616 (when (and gnus-use-trees |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5617 (gnus-buffer-exists-p buffer)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5618 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5619 (set-buffer buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5620 (gnus-tree-close gnus-newsgroup-name))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5621 (gnus-kill-buffer buffer)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5622 ((gnus-buffer-exists-p buffer) |
17493 | 5623 (save-excursion |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5624 (set-buffer buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5625 (gnus-deaden-summary)))))) |
17493 | 5626 |
5627 (defun gnus-summary-wake-up-the-dead (&rest args) | |
5628 "Wake up the dead summary buffer." | |
5629 (interactive) | |
5630 (gnus-dead-summary-mode -1) | |
5631 (let ((name (buffer-name))) | |
5632 (when (string-match "Dead " name) | |
5633 (rename-buffer | |
5634 (concat (substring name 0 (match-beginning 0)) | |
5635 (substring name (match-end 0))) | |
5636 t))) | |
5637 (gnus-message 3 "This dead summary is now alive again")) | |
5638 | |
5639 ;; Suggested by Andrew Eskilsson <pi92ae@pt.hk-r.se>. | |
5640 (defun gnus-summary-fetch-faq (&optional faq-dir) | |
5641 "Fetch the FAQ for the current group. | |
5642 If FAQ-DIR (the prefix), prompt for a directory to search for the faq | |
5643 in." | |
5644 (interactive | |
5645 (list | |
5646 (when current-prefix-arg | |
5647 (completing-read | |
5648 "Faq dir: " (and (listp gnus-group-faq-directory) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
5649 (mapcar (lambda (file) (list file)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
5650 gnus-group-faq-directory)))))) |
17493 | 5651 (let (gnus-faq-buffer) |
5652 (when (setq gnus-faq-buffer | |
5653 (gnus-group-fetch-faq gnus-newsgroup-name faq-dir)) | |
5654 (gnus-configure-windows 'summary-faq)))) | |
5655 | |
5656 ;; Suggested by Per Abrahamsen <amanda@iesd.auc.dk>. | |
5657 (defun gnus-summary-describe-group (&optional force) | |
5658 "Describe the current newsgroup." | |
5659 (interactive "P") | |
5660 (gnus-group-describe-group force gnus-newsgroup-name)) | |
5661 | |
5662 (defun gnus-summary-describe-briefly () | |
5663 "Describe summary mode commands briefly." | |
5664 (interactive) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5665 (gnus-message 6 (substitute-command-keys "\\<gnus-summary-mode-map>\\[gnus-summary-next-page]:Select \\[gnus-summary-next-unread-article]:Forward \\[gnus-summary-prev-unread-article]:Backward \\[gnus-summary-exit]:Exit \\[gnus-info-find-node]:Run Info \\[gnus-summary-describe-briefly]:This help"))) |
17493 | 5666 |
5667 ;; Walking around group mode buffer from summary mode. | |
5668 | |
5669 (defun gnus-summary-next-group (&optional no-article target-group backward) | |
5670 "Exit current newsgroup and then select next unread newsgroup. | |
5671 If prefix argument NO-ARTICLE is non-nil, no article is selected | |
5672 initially. If NEXT-GROUP, go to this group. If BACKWARD, go to | |
5673 previous group instead." | |
5674 (interactive "P") | |
5675 ;; Stop pre-fetching. | |
5676 (gnus-async-halt-prefetch) | |
5677 (let ((current-group gnus-newsgroup-name) | |
5678 (current-buffer (current-buffer)) | |
5679 entered) | |
5680 ;; First we semi-exit this group to update Xrefs and all variables. | |
5681 ;; We can't do a real exit, because the window conf must remain | |
5682 ;; the same in case the user is prompted for info, and we don't | |
5683 ;; want the window conf to change before that... | |
5684 (gnus-summary-exit t) | |
5685 (while (not entered) | |
5686 ;; Then we find what group we are supposed to enter. | |
5687 (set-buffer gnus-group-buffer) | |
5688 (gnus-group-jump-to-group current-group) | |
5689 (setq target-group | |
5690 (or target-group | |
5691 (if (eq gnus-keep-same-level 'best) | |
5692 (gnus-summary-best-group gnus-newsgroup-name) | |
5693 (gnus-summary-search-group backward gnus-keep-same-level)))) | |
5694 (if (not target-group) | |
5695 ;; There are no further groups, so we return to the group | |
5696 ;; buffer. | |
5697 (progn | |
5698 (gnus-message 5 "Returning to the group buffer") | |
5699 (setq entered t) | |
5700 (when (gnus-buffer-live-p current-buffer) | |
5701 (set-buffer current-buffer) | |
5702 (gnus-summary-exit)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5703 (gnus-run-hooks 'gnus-group-no-more-groups-hook)) |
17493 | 5704 ;; We try to enter the target group. |
5705 (gnus-group-jump-to-group target-group) | |
5706 (let ((unreads (gnus-group-group-unread))) | |
5707 (if (and (or (eq t unreads) | |
5708 (and unreads (not (zerop unreads)))) | |
5709 (gnus-summary-read-group | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
5710 target-group nil no-article |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5711 (and (buffer-name current-buffer) current-buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5712 nil backward)) |
17493 | 5713 (setq entered t) |
5714 (setq current-group target-group | |
5715 target-group nil))))))) | |
5716 | |
5717 (defun gnus-summary-prev-group (&optional no-article) | |
5718 "Exit current newsgroup and then select previous unread newsgroup. | |
5719 If prefix argument NO-ARTICLE is non-nil, no article is selected initially." | |
5720 (interactive "P") | |
5721 (gnus-summary-next-group no-article nil t)) | |
5722 | |
5723 ;; Walking around summary lines. | |
5724 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5725 (defun gnus-summary-first-subject (&optional unread undownloaded) |
17493 | 5726 "Go to the first unread subject. |
5727 If UNREAD is non-nil, go to the first unread article. | |
5728 Returns the article selected or nil if there are no unread articles." | |
5729 (interactive "P") | |
5730 (prog1 | |
5731 (cond | |
5732 ;; Empty summary. | |
5733 ((null gnus-newsgroup-data) | |
5734 (gnus-message 3 "No articles in the group") | |
5735 nil) | |
5736 ;; Pick the first article. | |
5737 ((not unread) | |
5738 (goto-char (gnus-data-pos (car gnus-newsgroup-data))) | |
5739 (gnus-data-number (car gnus-newsgroup-data))) | |
5740 ;; No unread articles. | |
5741 ((null gnus-newsgroup-unreads) | |
5742 (gnus-message 3 "No more unread articles") | |
5743 nil) | |
5744 ;; Find the first unread article. | |
5745 (t | |
5746 (let ((data gnus-newsgroup-data)) | |
5747 (while (and data | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5748 (and (not (and undownloaded |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5749 (eq gnus-undownloaded-mark |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5750 (gnus-data-mark (car data))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5751 (not (gnus-data-unread-p (car data))))) |
17493 | 5752 (setq data (cdr data))) |
5753 (when data | |
5754 (goto-char (gnus-data-pos (car data))) | |
5755 (gnus-data-number (car data)))))) | |
5756 (gnus-summary-position-point))) | |
5757 | |
5758 (defun gnus-summary-next-subject (n &optional unread dont-display) | |
5759 "Go to next N'th summary line. | |
5760 If N is negative, go to the previous N'th subject line. | |
5761 If UNREAD is non-nil, only unread articles are selected. | |
5762 The difference between N and the actual number of steps taken is | |
5763 returned." | |
5764 (interactive "p") | |
5765 (let ((backward (< n 0)) | |
5766 (n (abs n))) | |
5767 (while (and (> n 0) | |
5768 (if backward | |
5769 (gnus-summary-find-prev unread) | |
5770 (gnus-summary-find-next unread))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5771 (unless (zerop (setq n (1- n))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5772 (gnus-summary-show-thread))) |
17493 | 5773 (when (/= 0 n) |
5774 (gnus-message 7 "No more%s articles" | |
5775 (if unread " unread" ""))) | |
5776 (unless dont-display | |
5777 (gnus-summary-recenter) | |
5778 (gnus-summary-position-point)) | |
5779 n)) | |
5780 | |
5781 (defun gnus-summary-next-unread-subject (n) | |
5782 "Go to next N'th unread summary line." | |
5783 (interactive "p") | |
5784 (gnus-summary-next-subject n t)) | |
5785 | |
5786 (defun gnus-summary-prev-subject (n &optional unread) | |
5787 "Go to previous N'th summary line. | |
5788 If optional argument UNREAD is non-nil, only unread article is selected." | |
5789 (interactive "p") | |
5790 (gnus-summary-next-subject (- n) unread)) | |
5791 | |
5792 (defun gnus-summary-prev-unread-subject (n) | |
5793 "Go to previous N'th unread summary line." | |
5794 (interactive "p") | |
5795 (gnus-summary-next-subject (- n) t)) | |
5796 | |
5797 (defun gnus-summary-goto-subject (article &optional force silent) | |
5798 "Go the subject line of ARTICLE. | |
5799 If FORCE, also allow jumping to articles not currently shown." | |
5800 (interactive "nArticle number: ") | |
5801 (let ((b (point)) | |
5802 (data (gnus-data-find article))) | |
5803 ;; We read in the article if we have to. | |
5804 (and (not data) | |
5805 force | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5806 (gnus-summary-insert-subject |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5807 article |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5808 (if (or (numberp force) (vectorp force)) force) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5809 t) |
17493 | 5810 (setq data (gnus-data-find article))) |
5811 (goto-char b) | |
5812 (if (not data) | |
5813 (progn | |
5814 (unless silent | |
5815 (gnus-message 3 "Can't find article %d" article)) | |
5816 nil) | |
5817 (goto-char (gnus-data-pos data)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5818 (gnus-summary-position-point) |
17493 | 5819 article))) |
5820 | |
5821 ;; Walking around summary lines with displaying articles. | |
5822 | |
5823 (defun gnus-summary-expand-window (&optional arg) | |
5824 "Make the summary buffer take up the entire Emacs frame. | |
5825 Given a prefix, will force an `article' buffer configuration." | |
5826 (interactive "P") | |
5827 (if arg | |
5828 (gnus-configure-windows 'article 'force) | |
5829 (gnus-configure-windows 'summary 'force))) | |
5830 | |
5831 (defun gnus-summary-display-article (article &optional all-header) | |
5832 "Display ARTICLE in article buffer." | |
5833 (gnus-set-global-variables) | |
5834 (if (null article) | |
5835 nil | |
5836 (prog1 | |
5837 (if gnus-summary-display-article-function | |
5838 (funcall gnus-summary-display-article-function article all-header) | |
5839 (gnus-article-prepare article all-header)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5840 (gnus-run-hooks 'gnus-select-article-hook) |
17493 | 5841 (when (and gnus-current-article |
5842 (not (zerop gnus-current-article))) | |
5843 (gnus-summary-goto-subject gnus-current-article)) | |
5844 (gnus-summary-recenter) | |
5845 (when (and gnus-use-trees gnus-show-threads) | |
5846 (gnus-possibly-generate-tree article) | |
5847 (gnus-highlight-selected-tree article)) | |
5848 ;; Successfully display article. | |
5849 (gnus-article-set-window-start | |
5850 (cdr (assq article gnus-newsgroup-bookmarks)))))) | |
5851 | |
5852 (defun gnus-summary-select-article (&optional all-headers force pseudo article) | |
5853 "Select the current article. | |
5854 If ALL-HEADERS is non-nil, show all header fields. If FORCE is | |
5855 non-nil, the article will be re-fetched even if it already present in | |
5856 the article buffer. If PSEUDO is non-nil, pseudo-articles will also | |
5857 be displayed." | |
5858 ;; Make sure we are in the summary buffer to work around bbdb bug. | |
5859 (unless (eq major-mode 'gnus-summary-mode) | |
5860 (set-buffer gnus-summary-buffer)) | |
5861 (let ((article (or article (gnus-summary-article-number))) | |
5862 (all-headers (not (not all-headers))) ;Must be T or NIL. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5863 gnus-summary-display-article-function) |
17493 | 5864 (and (not pseudo) |
5865 (gnus-summary-article-pseudo-p article) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
5866 (error "This is a pseudo-article")) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5867 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5868 (set-buffer gnus-summary-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5869 (if (or (and gnus-single-article-buffer |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5870 (or (null gnus-current-article) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5871 (null gnus-article-current) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5872 (null (get-buffer gnus-article-buffer)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5873 (not (eq article (cdr gnus-article-current))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5874 (not (equal (car gnus-article-current) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5875 gnus-newsgroup-name)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5876 (and (not gnus-single-article-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5877 (or (null gnus-current-article) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5878 (not (eq gnus-current-article article)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5879 force) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5880 ;; The requested article is different from the current article. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5881 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5882 (when (gnus-buffer-live-p gnus-article-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5883 (with-current-buffer gnus-article-buffer |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5884 (mm-enable-multibyte))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5885 (gnus-summary-display-article article all-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5886 (when (gnus-buffer-live-p gnus-article-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5887 (with-current-buffer gnus-article-buffer |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5888 (if (not gnus-article-decoded-p) ;; a local variable |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5889 (mm-disable-multibyte)))) |
17493 | 5890 (when (or all-headers gnus-show-all-headers) |
5891 (gnus-article-show-all-headers)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5892 (gnus-article-set-window-start |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5893 (cdr (assq article gnus-newsgroup-bookmarks))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5894 article) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5895 (when (or all-headers gnus-show-all-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5896 (gnus-article-show-all-headers)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
5897 'old)))) |
17493 | 5898 |
5899 (defun gnus-summary-set-current-mark (&optional current-mark) | |
5900 "Obsolete function." | |
5901 nil) | |
5902 | |
5903 (defun gnus-summary-next-article (&optional unread subject backward push) | |
5904 "Select the next article. | |
5905 If UNREAD, only unread articles are selected. | |
5906 If SUBJECT, only articles with SUBJECT are selected. | |
5907 If BACKWARD, the previous article is selected instead of the next." | |
5908 (interactive "P") | |
5909 (cond | |
5910 ;; Is there such an article? | |
5911 ((and (gnus-summary-search-forward unread subject backward) | |
5912 (or (gnus-summary-display-article (gnus-summary-article-number)) | |
5913 (eq (gnus-summary-article-mark) gnus-canceled-mark))) | |
5914 (gnus-summary-position-point)) | |
5915 ;; If not, we try the first unread, if that is wanted. | |
5916 ((and subject | |
5917 gnus-auto-select-same | |
5918 (gnus-summary-first-unread-article)) | |
5919 (gnus-summary-position-point) | |
5920 (gnus-message 6 "Wrapped")) | |
5921 ;; Try to get next/previous article not displayed in this group. | |
5922 ((and gnus-auto-extend-newsgroup | |
5923 (not unread) (not subject)) | |
5924 (gnus-summary-goto-article | |
5925 (if backward (1- gnus-newsgroup-begin) (1+ gnus-newsgroup-end)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
5926 nil (count-lines (point-min) (point)))) |
17493 | 5927 ;; Go to next/previous group. |
5928 (t | |
5929 (unless (gnus-ephemeral-group-p gnus-newsgroup-name) | |
5930 (gnus-summary-jump-to-group gnus-newsgroup-name)) | |
5931 (let ((cmd last-command-char) | |
5932 (point | |
5933 (save-excursion | |
5934 (set-buffer gnus-group-buffer) | |
5935 (point))) | |
5936 (group | |
5937 (if (eq gnus-keep-same-level 'best) | |
5938 (gnus-summary-best-group gnus-newsgroup-name) | |
5939 (gnus-summary-search-group backward gnus-keep-same-level)))) | |
5940 ;; For some reason, the group window gets selected. We change | |
5941 ;; it back. | |
5942 (select-window (get-buffer-window (current-buffer))) | |
5943 ;; Select next unread newsgroup automagically. | |
5944 (cond | |
5945 ((or (not gnus-auto-select-next) | |
5946 (not cmd)) | |
5947 (gnus-message 7 "No more%s articles" (if unread " unread" ""))) | |
5948 ((or (eq gnus-auto-select-next 'quietly) | |
5949 (and (eq gnus-auto-select-next 'slightly-quietly) | |
5950 push) | |
5951 (and (eq gnus-auto-select-next 'almost-quietly) | |
5952 (gnus-summary-last-article-p))) | |
5953 ;; Select quietly. | |
5954 (if (gnus-ephemeral-group-p gnus-newsgroup-name) | |
5955 (gnus-summary-exit) | |
5956 (gnus-message 7 "No more%s articles (%s)..." | |
5957 (if unread " unread" "") | |
5958 (if group (concat "selecting " group) | |
5959 "exiting")) | |
5960 (gnus-summary-next-group nil group backward))) | |
5961 (t | |
5962 (when (gnus-key-press-event-p last-input-event) | |
5963 (gnus-summary-walk-group-buffer | |
5964 gnus-newsgroup-name cmd unread backward point)))))))) | |
5965 | |
5966 (defun gnus-summary-walk-group-buffer (from-group cmd unread backward start) | |
5967 (let ((keystrokes '((?\C-n (gnus-group-next-unread-group 1)) | |
5968 (?\C-p (gnus-group-prev-unread-group 1)))) | |
5969 (cursor-in-echo-area t) | |
5970 keve key group ended) | |
5971 (save-excursion | |
5972 (set-buffer gnus-group-buffer) | |
5973 (goto-char start) | |
5974 (setq group | |
5975 (if (eq gnus-keep-same-level 'best) | |
5976 (gnus-summary-best-group gnus-newsgroup-name) | |
5977 (gnus-summary-search-group backward gnus-keep-same-level)))) | |
5978 (while (not ended) | |
5979 (gnus-message | |
5980 5 "No more%s articles%s" (if unread " unread" "") | |
5981 (if (and group | |
5982 (not (gnus-ephemeral-group-p gnus-newsgroup-name))) | |
5983 (format " (Type %s for %s [%s])" | |
5984 (single-key-description cmd) group | |
5985 (car (gnus-gethash group gnus-newsrc-hashtb))) | |
5986 (format " (Type %s to exit %s)" | |
5987 (single-key-description cmd) | |
5988 gnus-newsgroup-name))) | |
5989 ;; Confirm auto selection. | |
5990 (setq key (car (setq keve (gnus-read-event-char)))) | |
5991 (setq ended t) | |
5992 (cond | |
5993 ((assq key keystrokes) | |
5994 (let ((obuf (current-buffer))) | |
5995 (switch-to-buffer gnus-group-buffer) | |
5996 (when group | |
5997 (gnus-group-jump-to-group group)) | |
5998 (eval (cadr (assq key keystrokes))) | |
5999 (setq group (gnus-group-group-name)) | |
6000 (switch-to-buffer obuf)) | |
6001 (setq ended nil)) | |
6002 ((equal key cmd) | |
6003 (if (or (not group) | |
6004 (gnus-ephemeral-group-p gnus-newsgroup-name)) | |
6005 (gnus-summary-exit) | |
6006 (gnus-summary-next-group nil group backward))) | |
6007 (t | |
6008 (push (cdr keve) unread-command-events)))))) | |
6009 | |
6010 (defun gnus-summary-next-unread-article () | |
6011 "Select unread article after current one." | |
6012 (interactive) | |
6013 (gnus-summary-next-article | |
6014 (or (not (eq gnus-summary-goto-unread 'never)) | |
6015 (gnus-summary-last-article-p (gnus-summary-article-number))) | |
6016 (and gnus-auto-select-same | |
6017 (gnus-summary-article-subject)))) | |
6018 | |
6019 (defun gnus-summary-prev-article (&optional unread subject) | |
6020 "Select the article after the current one. | |
6021 If UNREAD is non-nil, only unread articles are selected." | |
6022 (interactive "P") | |
6023 (gnus-summary-next-article unread subject t)) | |
6024 | |
6025 (defun gnus-summary-prev-unread-article () | |
6026 "Select unread article before current one." | |
6027 (interactive) | |
6028 (gnus-summary-prev-article | |
6029 (or (not (eq gnus-summary-goto-unread 'never)) | |
6030 (gnus-summary-first-article-p (gnus-summary-article-number))) | |
6031 (and gnus-auto-select-same | |
6032 (gnus-summary-article-subject)))) | |
6033 | |
6034 (defun gnus-summary-next-page (&optional lines circular) | |
6035 "Show next page of the selected article. | |
6036 If at the end of the current article, select the next article. | |
6037 LINES says how many lines should be scrolled up. | |
6038 | |
6039 If CIRCULAR is non-nil, go to the start of the article instead of | |
6040 selecting the next article when reaching the end of the current | |
6041 article." | |
6042 (interactive "P") | |
6043 (setq gnus-summary-buffer (current-buffer)) | |
6044 (gnus-set-global-variables) | |
6045 (let ((article (gnus-summary-article-number)) | |
6046 (article-window (get-buffer-window gnus-article-buffer t)) | |
6047 endp) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6048 ;; If the buffer is empty, we have no article. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6049 (unless article |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6050 (error "No article to select")) |
17493 | 6051 (gnus-configure-windows 'article) |
6052 (if (eq (cdr (assq article gnus-newsgroup-reads)) gnus-canceled-mark) | |
6053 (if (and (eq gnus-summary-goto-unread 'never) | |
6054 (not (gnus-summary-last-article-p article))) | |
6055 (gnus-summary-next-article) | |
6056 (gnus-summary-next-unread-article)) | |
6057 (if (or (null gnus-current-article) | |
6058 (null gnus-article-current) | |
6059 (/= article (cdr gnus-article-current)) | |
6060 (not (equal (car gnus-article-current) gnus-newsgroup-name))) | |
6061 ;; Selected subject is different from current article's. | |
6062 (gnus-summary-display-article article) | |
6063 (when article-window | |
6064 (gnus-eval-in-buffer-window gnus-article-buffer | |
6065 (setq endp (gnus-article-next-page lines))) | |
6066 (when endp | |
6067 (cond (circular | |
6068 (gnus-summary-beginning-of-article)) | |
6069 (lines | |
6070 (gnus-message 3 "End of message")) | |
6071 ((null lines) | |
6072 (if (and (eq gnus-summary-goto-unread 'never) | |
6073 (not (gnus-summary-last-article-p article))) | |
6074 (gnus-summary-next-article) | |
6075 (gnus-summary-next-unread-article)))))))) | |
6076 (gnus-summary-recenter) | |
6077 (gnus-summary-position-point))) | |
6078 | |
6079 (defun gnus-summary-prev-page (&optional lines move) | |
6080 "Show previous page of selected article. | |
6081 Argument LINES specifies lines to be scrolled down. | |
6082 If MOVE, move to the previous unread article if point is at | |
6083 the beginning of the buffer." | |
6084 (interactive "P") | |
6085 (let ((article (gnus-summary-article-number)) | |
6086 (article-window (get-buffer-window gnus-article-buffer t)) | |
6087 endp) | |
6088 (gnus-configure-windows 'article) | |
6089 (if (or (null gnus-current-article) | |
6090 (null gnus-article-current) | |
6091 (/= article (cdr gnus-article-current)) | |
6092 (not (equal (car gnus-article-current) gnus-newsgroup-name))) | |
6093 ;; Selected subject is different from current article's. | |
6094 (gnus-summary-display-article article) | |
6095 (gnus-summary-recenter) | |
6096 (when article-window | |
6097 (gnus-eval-in-buffer-window gnus-article-buffer | |
6098 (setq endp (gnus-article-prev-page lines))) | |
6099 (when (and move endp) | |
6100 (cond (lines | |
6101 (gnus-message 3 "Beginning of message")) | |
6102 ((null lines) | |
6103 (if (and (eq gnus-summary-goto-unread 'never) | |
6104 (not (gnus-summary-first-article-p article))) | |
6105 (gnus-summary-prev-article) | |
6106 (gnus-summary-prev-unread-article)))))))) | |
6107 (gnus-summary-position-point)) | |
6108 | |
6109 (defun gnus-summary-prev-page-or-article (&optional lines) | |
6110 "Show previous page of selected article. | |
6111 Argument LINES specifies lines to be scrolled down. | |
6112 If at the beginning of the article, go to the next article." | |
6113 (interactive "P") | |
6114 (gnus-summary-prev-page lines t)) | |
6115 | |
6116 (defun gnus-summary-scroll-up (lines) | |
6117 "Scroll up (or down) one line current article. | |
6118 Argument LINES specifies lines to be scrolled up (or down if negative)." | |
6119 (interactive "p") | |
6120 (gnus-configure-windows 'article) | |
6121 (gnus-summary-show-thread) | |
6122 (when (eq (gnus-summary-select-article nil nil 'pseudo) 'old) | |
6123 (gnus-eval-in-buffer-window gnus-article-buffer | |
6124 (cond ((> lines 0) | |
6125 (when (gnus-article-next-page lines) | |
6126 (gnus-message 3 "End of message"))) | |
6127 ((< lines 0) | |
6128 (gnus-article-prev-page (- lines)))))) | |
6129 (gnus-summary-recenter) | |
6130 (gnus-summary-position-point)) | |
6131 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6132 (defun gnus-summary-scroll-down (lines) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6133 "Scroll down (or up) one line current article. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6134 Argument LINES specifies lines to be scrolled down (or up if negative)." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6135 (interactive "p") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6136 (gnus-summary-scroll-up (- lines))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6137 |
17493 | 6138 (defun gnus-summary-next-same-subject () |
6139 "Select next article which has the same subject as current one." | |
6140 (interactive) | |
6141 (gnus-summary-next-article nil (gnus-summary-article-subject))) | |
6142 | |
6143 (defun gnus-summary-prev-same-subject () | |
6144 "Select previous article which has the same subject as current one." | |
6145 (interactive) | |
6146 (gnus-summary-prev-article nil (gnus-summary-article-subject))) | |
6147 | |
6148 (defun gnus-summary-next-unread-same-subject () | |
6149 "Select next unread article which has the same subject as current one." | |
6150 (interactive) | |
6151 (gnus-summary-next-article t (gnus-summary-article-subject))) | |
6152 | |
6153 (defun gnus-summary-prev-unread-same-subject () | |
6154 "Select previous unread article which has the same subject as current one." | |
6155 (interactive) | |
6156 (gnus-summary-prev-article t (gnus-summary-article-subject))) | |
6157 | |
6158 (defun gnus-summary-first-unread-article () | |
6159 "Select the first unread article. | |
6160 Return nil if there are no unread articles." | |
6161 (interactive) | |
6162 (prog1 | |
6163 (when (gnus-summary-first-subject t) | |
6164 (gnus-summary-show-thread) | |
6165 (gnus-summary-first-subject t) | |
6166 (gnus-summary-display-article (gnus-summary-article-number))) | |
6167 (gnus-summary-position-point))) | |
6168 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6169 (defun gnus-summary-first-unread-subject () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6170 "Place the point on the subject line of the first unread article. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6171 Return nil if there are no unread articles." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6172 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6173 (prog1 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6174 (when (gnus-summary-first-subject t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6175 (gnus-summary-show-thread) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6176 (gnus-summary-first-subject t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6177 (gnus-summary-position-point))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6178 |
17493 | 6179 (defun gnus-summary-first-article () |
6180 "Select the first article. | |
6181 Return nil if there are no articles." | |
6182 (interactive) | |
6183 (prog1 | |
6184 (when (gnus-summary-first-subject) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6185 (gnus-summary-show-thread) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6186 (gnus-summary-first-subject) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6187 (gnus-summary-display-article (gnus-summary-article-number))) |
17493 | 6188 (gnus-summary-position-point))) |
6189 | |
6190 (defun gnus-summary-best-unread-article () | |
6191 "Select the unread article with the highest score." | |
6192 (interactive) | |
6193 (let ((best -1000000) | |
6194 (data gnus-newsgroup-data) | |
6195 article score) | |
6196 (while data | |
6197 (and (gnus-data-unread-p (car data)) | |
6198 (> (setq score | |
6199 (gnus-summary-article-score (gnus-data-number (car data)))) | |
6200 best) | |
6201 (setq best score | |
6202 article (gnus-data-number (car data)))) | |
6203 (setq data (cdr data))) | |
6204 (prog1 | |
6205 (if article | |
6206 (gnus-summary-goto-article article) | |
6207 (error "No unread articles")) | |
6208 (gnus-summary-position-point)))) | |
6209 | |
6210 (defun gnus-summary-last-subject () | |
6211 "Go to the last displayed subject line in the group." | |
6212 (let ((article (gnus-data-number (car (gnus-data-list t))))) | |
6213 (when article | |
6214 (gnus-summary-goto-subject article)))) | |
6215 | |
6216 (defun gnus-summary-goto-article (article &optional all-headers force) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6217 "Fetch ARTICLE (article number or Message-ID) and display it if it exists. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6218 If ALL-HEADERS is non-nil, no header lines are hidden. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6219 If FORCE, go to the article even if it isn't displayed. If FORCE |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6220 is a number, it is the line the article is to be displayed on." |
17493 | 6221 (interactive |
6222 (list | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6223 (completing-read |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6224 "Article number or Message-ID: " |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6225 (mapcar (lambda (number) (list (int-to-string number))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6226 gnus-newsgroup-limit)) |
17493 | 6227 current-prefix-arg |
6228 t)) | |
6229 (prog1 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6230 (if (and (stringp article) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6231 (string-match "@" article)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6232 (gnus-summary-refer-article article) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6233 (when (stringp article) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6234 (setq article (string-to-number article))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6235 (if (gnus-summary-goto-subject article force) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6236 (gnus-summary-display-article article all-headers) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6237 (gnus-message 4 "Couldn't go to article %s" article) nil)) |
17493 | 6238 (gnus-summary-position-point))) |
6239 | |
6240 (defun gnus-summary-goto-last-article () | |
6241 "Go to the previously read article." | |
6242 (interactive) | |
6243 (prog1 | |
6244 (when gnus-last-article | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6245 (gnus-summary-goto-article gnus-last-article nil t)) |
17493 | 6246 (gnus-summary-position-point))) |
6247 | |
6248 (defun gnus-summary-pop-article (number) | |
6249 "Pop one article off the history and go to the previous. | |
6250 NUMBER articles will be popped off." | |
6251 (interactive "p") | |
6252 (let (to) | |
6253 (setq gnus-newsgroup-history | |
6254 (cdr (setq to (nthcdr number gnus-newsgroup-history)))) | |
6255 (if to | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6256 (gnus-summary-goto-article (car to) nil t) |
17493 | 6257 (error "Article history empty"))) |
6258 (gnus-summary-position-point)) | |
6259 | |
6260 ;; Summary commands and functions for limiting the summary buffer. | |
6261 | |
6262 (defun gnus-summary-limit-to-articles (n) | |
6263 "Limit the summary buffer to the next N articles. | |
6264 If not given a prefix, use the process marked articles instead." | |
6265 (interactive "P") | |
6266 (prog1 | |
6267 (let ((articles (gnus-summary-work-articles n))) | |
6268 (setq gnus-newsgroup-processable nil) | |
6269 (gnus-summary-limit articles)) | |
6270 (gnus-summary-position-point))) | |
6271 | |
6272 (defun gnus-summary-pop-limit (&optional total) | |
6273 "Restore the previous limit. | |
6274 If given a prefix, remove all limits." | |
6275 (interactive "P") | |
6276 (when total | |
6277 (setq gnus-newsgroup-limits | |
6278 (list (mapcar (lambda (h) (mail-header-number h)) | |
6279 gnus-newsgroup-headers)))) | |
6280 (unless gnus-newsgroup-limits | |
6281 (error "No limit to pop")) | |
6282 (prog1 | |
6283 (gnus-summary-limit nil 'pop) | |
6284 (gnus-summary-position-point))) | |
6285 | |
6286 (defun gnus-summary-limit-to-subject (subject &optional header) | |
6287 "Limit the summary buffer to articles that have subjects that match a regexp." | |
6288 (interactive "sLimit to subject (regexp): ") | |
6289 (unless header | |
6290 (setq header "subject")) | |
6291 (when (not (equal "" subject)) | |
6292 (prog1 | |
6293 (let ((articles (gnus-summary-find-matching | |
6294 (or header "subject") subject 'all))) | |
6295 (unless articles | |
6296 (error "Found no matches for \"%s\"" subject)) | |
6297 (gnus-summary-limit articles)) | |
6298 (gnus-summary-position-point)))) | |
6299 | |
6300 (defun gnus-summary-limit-to-author (from) | |
6301 "Limit the summary buffer to articles that have authors that match a regexp." | |
6302 (interactive "sLimit to author (regexp): ") | |
6303 (gnus-summary-limit-to-subject from "from")) | |
6304 | |
6305 (defun gnus-summary-limit-to-age (age &optional younger-p) | |
6306 "Limit the summary buffer to articles that are older than (or equal) AGE days. | |
6307 If YOUNGER-P (the prefix) is non-nil, limit the summary buffer to | |
6308 articles that are younger than AGE days." | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6309 (interactive |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6310 (let ((younger current-prefix-arg) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6311 (days-got nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6312 days) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6313 (while (not days-got) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6314 (setq days (if younger |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6315 (read-string "Limit to articles within (in days): ") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6316 (read-string "Limit to articles old than (in days): "))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6317 (when (> (length days) 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6318 (setq days (read days))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6319 (if (numberp days) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6320 (setq days-got t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6321 (message "Please enter a number.") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6322 (sleep-for 1))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6323 (list days younger))) |
17493 | 6324 (prog1 |
6325 (let ((data gnus-newsgroup-data) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6326 (cutoff (days-to-time age)) |
17493 | 6327 articles d date is-younger) |
6328 (while (setq d (pop data)) | |
6329 (when (and (vectorp (gnus-data-header d)) | |
6330 (setq date (mail-header-date (gnus-data-header d)))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6331 (setq is-younger (time-less-p |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6332 (time-since (condition-case () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6333 (date-to-time date) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6334 (error '(0 0)))) |
17493 | 6335 cutoff)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6336 (when (if younger-p |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6337 is-younger |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6338 (not is-younger)) |
17493 | 6339 (push (gnus-data-number d) articles)))) |
6340 (gnus-summary-limit (nreverse articles))) | |
6341 (gnus-summary-position-point))) | |
6342 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6343 (defun gnus-summary-limit-to-extra (header regexp) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6344 "Limit the summary buffer to articles that match an 'extra' header." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6345 (interactive |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6346 (let ((header |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6347 (intern |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6348 (gnus-completing-read |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6349 (symbol-name (car gnus-extra-headers)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6350 "Limit extra header:" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6351 (mapcar (lambda (x) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6352 (cons (symbol-name x) x)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6353 gnus-extra-headers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6354 nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6355 t)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6356 (list header |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6357 (read-string (format "Limit to header %s (regexp): " header))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6358 (when (not (equal "" regexp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6359 (prog1 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6360 (let ((articles (gnus-summary-find-matching |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6361 (cons 'extra header) regexp 'all))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6362 (unless articles |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6363 (error "Found no matches for \"%s\"" regexp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6364 (gnus-summary-limit articles)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6365 (gnus-summary-position-point)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6366 |
17493 | 6367 (defalias 'gnus-summary-delete-marked-as-read 'gnus-summary-limit-to-unread) |
6368 (make-obsolete | |
6369 'gnus-summary-delete-marked-as-read 'gnus-summary-limit-to-unread) | |
6370 | |
6371 (defun gnus-summary-limit-to-unread (&optional all) | |
6372 "Limit the summary buffer to articles that are not marked as read. | |
6373 If ALL is non-nil, limit strictly to unread articles." | |
6374 (interactive "P") | |
6375 (if all | |
6376 (gnus-summary-limit-to-marks (char-to-string gnus-unread-mark)) | |
6377 (gnus-summary-limit-to-marks | |
6378 ;; Concat all the marks that say that an article is read and have | |
6379 ;; those removed. | |
6380 (list gnus-del-mark gnus-read-mark gnus-ancient-mark | |
6381 gnus-killed-mark gnus-kill-file-mark | |
6382 gnus-low-score-mark gnus-expirable-mark | |
6383 gnus-canceled-mark gnus-catchup-mark gnus-sparse-mark | |
6384 gnus-duplicate-mark gnus-souped-mark) | |
6385 'reverse))) | |
6386 | |
6387 (defalias 'gnus-summary-delete-marked-with 'gnus-summary-limit-exclude-marks) | |
6388 (make-obsolete 'gnus-summary-delete-marked-with | |
6389 'gnus-summary-limit-exlude-marks) | |
6390 | |
6391 (defun gnus-summary-limit-exclude-marks (marks &optional reverse) | |
6392 "Exclude articles that are marked with MARKS (e.g. \"DK\"). | |
6393 If REVERSE, limit the summary buffer to articles that are marked | |
6394 with MARKS. MARKS can either be a string of marks or a list of marks. | |
6395 Returns how many articles were removed." | |
6396 (interactive "sMarks: ") | |
6397 (gnus-summary-limit-to-marks marks t)) | |
6398 | |
6399 (defun gnus-summary-limit-to-marks (marks &optional reverse) | |
6400 "Limit the summary buffer to articles that are marked with MARKS (e.g. \"DK\"). | |
6401 If REVERSE (the prefix), limit the summary buffer to articles that are | |
6402 not marked with MARKS. MARKS can either be a string of marks or a | |
6403 list of marks. | |
6404 Returns how many articles were removed." | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6405 (interactive "sMarks: \nP") |
17493 | 6406 (prog1 |
6407 (let ((data gnus-newsgroup-data) | |
6408 (marks (if (listp marks) marks | |
6409 (append marks nil))) ; Transform to list. | |
6410 articles) | |
6411 (while data | |
6412 (when (if reverse (not (memq (gnus-data-mark (car data)) marks)) | |
6413 (memq (gnus-data-mark (car data)) marks)) | |
6414 (push (gnus-data-number (car data)) articles)) | |
6415 (setq data (cdr data))) | |
6416 (gnus-summary-limit articles)) | |
6417 (gnus-summary-position-point))) | |
6418 | |
6419 (defun gnus-summary-limit-to-score (&optional score) | |
6420 "Limit to articles with score at or above SCORE." | |
6421 (interactive "P") | |
6422 (setq score (if score | |
6423 (prefix-numeric-value score) | |
6424 (or gnus-summary-default-score 0))) | |
6425 (let ((data gnus-newsgroup-data) | |
6426 articles) | |
6427 (while data | |
6428 (when (>= (gnus-summary-article-score (gnus-data-number (car data))) | |
6429 score) | |
6430 (push (gnus-data-number (car data)) articles)) | |
6431 (setq data (cdr data))) | |
6432 (prog1 | |
6433 (gnus-summary-limit articles) | |
6434 (gnus-summary-position-point)))) | |
6435 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6436 (defun gnus-summary-limit-include-thread (id) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6437 "Display all the hidden articles that in the current thread." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6438 (interactive (list (mail-header-id (gnus-summary-article-header)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6439 (let ((articles (gnus-articles-in-thread |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6440 (gnus-id-to-thread (gnus-root-id id))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6441 (prog1 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6442 (gnus-summary-limit (nconc articles gnus-newsgroup-limit)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6443 (gnus-summary-position-point)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6444 |
17493 | 6445 (defun gnus-summary-limit-include-dormant () |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6446 "Display all the hidden articles that are marked as dormant. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6447 Note that this command only works on a subset of the articles currently |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6448 fetched for this group." |
17493 | 6449 (interactive) |
6450 (unless gnus-newsgroup-dormant | |
6451 (error "There are no dormant articles in this group")) | |
6452 (prog1 | |
6453 (gnus-summary-limit (append gnus-newsgroup-dormant gnus-newsgroup-limit)) | |
6454 (gnus-summary-position-point))) | |
6455 | |
6456 (defun gnus-summary-limit-exclude-dormant () | |
6457 "Hide all dormant articles." | |
6458 (interactive) | |
6459 (prog1 | |
6460 (gnus-summary-limit-to-marks (list gnus-dormant-mark) 'reverse) | |
6461 (gnus-summary-position-point))) | |
6462 | |
6463 (defun gnus-summary-limit-exclude-childless-dormant () | |
6464 "Hide all dormant articles that have no children." | |
6465 (interactive) | |
6466 (let ((data (gnus-data-list t)) | |
6467 articles d children) | |
6468 ;; Find all articles that are either not dormant or have | |
6469 ;; children. | |
6470 (while (setq d (pop data)) | |
6471 (when (or (not (= (gnus-data-mark d) gnus-dormant-mark)) | |
6472 (and (setq children | |
6473 (gnus-article-children (gnus-data-number d))) | |
6474 (let (found) | |
6475 (while children | |
6476 (when (memq (car children) articles) | |
6477 (setq children nil | |
6478 found t)) | |
6479 (pop children)) | |
6480 found))) | |
6481 (push (gnus-data-number d) articles))) | |
6482 ;; Do the limiting. | |
6483 (prog1 | |
6484 (gnus-summary-limit articles) | |
6485 (gnus-summary-position-point)))) | |
6486 | |
6487 (defun gnus-summary-limit-mark-excluded-as-read (&optional all) | |
6488 "Mark all unread excluded articles as read. | |
6489 If ALL, mark even excluded ticked and dormants as read." | |
6490 (interactive "P") | |
6491 (let ((articles (gnus-sorted-complement | |
6492 (sort | |
6493 (mapcar (lambda (h) (mail-header-number h)) | |
6494 gnus-newsgroup-headers) | |
6495 '<) | |
6496 (sort gnus-newsgroup-limit '<))) | |
6497 article) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6498 (setq gnus-newsgroup-unreads |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6499 (gnus-intersection gnus-newsgroup-unreads gnus-newsgroup-limit)) |
17493 | 6500 (if all |
6501 (setq gnus-newsgroup-dormant nil | |
6502 gnus-newsgroup-marked nil | |
6503 gnus-newsgroup-reads | |
6504 (nconc | |
6505 (mapcar (lambda (n) (cons n gnus-catchup-mark)) articles) | |
6506 gnus-newsgroup-reads)) | |
6507 (while (setq article (pop articles)) | |
6508 (unless (or (memq article gnus-newsgroup-dormant) | |
6509 (memq article gnus-newsgroup-marked)) | |
6510 (push (cons article gnus-catchup-mark) gnus-newsgroup-reads)))))) | |
6511 | |
6512 (defun gnus-summary-limit (articles &optional pop) | |
6513 (if pop | |
6514 ;; We pop the previous limit off the stack and use that. | |
6515 (setq articles (car gnus-newsgroup-limits) | |
6516 gnus-newsgroup-limits (cdr gnus-newsgroup-limits)) | |
6517 ;; We use the new limit, so we push the old limit on the stack. | |
6518 (push gnus-newsgroup-limit gnus-newsgroup-limits)) | |
6519 ;; Set the limit. | |
6520 (setq gnus-newsgroup-limit articles) | |
6521 (let ((total (length gnus-newsgroup-data)) | |
6522 (data (gnus-data-find-list (gnus-summary-article-number))) | |
6523 (gnus-summary-mark-below nil) ; Inhibit this. | |
6524 found) | |
6525 ;; This will do all the work of generating the new summary buffer | |
6526 ;; according to the new limit. | |
6527 (gnus-summary-prepare) | |
6528 ;; Hide any threads, possibly. | |
6529 (and gnus-show-threads | |
6530 gnus-thread-hide-subtree | |
6531 (gnus-summary-hide-all-threads)) | |
6532 ;; Try to return to the article you were at, or one in the | |
6533 ;; neighborhood. | |
6534 (when data | |
6535 ;; We try to find some article after the current one. | |
6536 (while data | |
6537 (when (gnus-summary-goto-subject (gnus-data-number (car data)) nil t) | |
6538 (setq data nil | |
6539 found t)) | |
6540 (setq data (cdr data)))) | |
6541 (unless found | |
6542 ;; If there is no data, that means that we were after the last | |
6543 ;; article. The same goes when we can't find any articles | |
6544 ;; after the current one. | |
6545 (goto-char (point-max)) | |
6546 (gnus-summary-find-prev)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6547 (gnus-set-mode-line 'summary) |
17493 | 6548 ;; We return how many articles were removed from the summary |
6549 ;; buffer as a result of the new limit. | |
6550 (- total (length gnus-newsgroup-data)))) | |
6551 | |
6552 (defsubst gnus-invisible-cut-children (threads) | |
6553 (let ((num 0)) | |
6554 (while threads | |
6555 (when (memq (mail-header-number (caar threads)) gnus-newsgroup-limit) | |
6556 (incf num)) | |
6557 (pop threads)) | |
6558 (< num 2))) | |
6559 | |
6560 (defsubst gnus-cut-thread (thread) | |
6561 "Go forwards in the thread until we find an article that we want to display." | |
6562 (when (or (eq gnus-fetch-old-headers 'some) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6563 (eq gnus-fetch-old-headers 'invisible) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6564 (numberp gnus-fetch-old-headers) |
17493 | 6565 (eq gnus-build-sparse-threads 'some) |
6566 (eq gnus-build-sparse-threads 'more)) | |
6567 ;; Deal with old-fetched headers and sparse threads. | |
6568 (while (and | |
6569 thread | |
6570 (or | |
6571 (gnus-summary-article-sparse-p (mail-header-number (car thread))) | |
6572 (gnus-summary-article-ancient-p | |
6573 (mail-header-number (car thread)))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6574 (if (or (<= (length (cdr thread)) 1) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6575 (eq gnus-fetch-old-headers 'invisible)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6576 (setq gnus-newsgroup-limit |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6577 (delq (mail-header-number (car thread)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6578 gnus-newsgroup-limit) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6579 thread (cadr thread)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6580 (when (gnus-invisible-cut-children (cdr thread)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6581 (let ((th (cdr thread))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6582 (while th |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6583 (if (memq (mail-header-number (caar th)) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
6584 gnus-newsgroup-limit) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6585 (setq thread (car th) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6586 th nil) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6587 (setq th (cdr th)))))))))) |
17493 | 6588 thread) |
6589 | |
6590 (defun gnus-cut-threads (threads) | |
6591 "Cut off all uninteresting articles from the beginning of threads." | |
6592 (when (or (eq gnus-fetch-old-headers 'some) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6593 (eq gnus-fetch-old-headers 'invisible) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6594 (numberp gnus-fetch-old-headers) |
17493 | 6595 (eq gnus-build-sparse-threads 'some) |
6596 (eq gnus-build-sparse-threads 'more)) | |
6597 (let ((th threads)) | |
6598 (while th | |
6599 (setcar th (gnus-cut-thread (car th))) | |
6600 (setq th (cdr th))))) | |
6601 ;; Remove nixed out threads. | |
6602 (delq nil threads)) | |
6603 | |
6604 (defun gnus-summary-initial-limit (&optional show-if-empty) | |
6605 "Figure out what the initial limit is supposed to be on group entry. | |
6606 This entails weeding out unwanted dormants, low-scored articles, | |
6607 fetch-old-headers verbiage, and so on." | |
6608 ;; Most groups have nothing to remove. | |
6609 (if (or gnus-inhibit-limiting | |
6610 (and (null gnus-newsgroup-dormant) | |
6611 (not (eq gnus-fetch-old-headers 'some)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6612 (not (numberp gnus-fetch-old-headers)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6613 (not (eq gnus-fetch-old-headers 'invisible)) |
17493 | 6614 (null gnus-summary-expunge-below) |
6615 (not (eq gnus-build-sparse-threads 'some)) | |
6616 (not (eq gnus-build-sparse-threads 'more)) | |
6617 (null gnus-thread-expunge-below) | |
6618 (not gnus-use-nocem))) | |
6619 () ; Do nothing. | |
6620 (push gnus-newsgroup-limit gnus-newsgroup-limits) | |
6621 (setq gnus-newsgroup-limit nil) | |
6622 (mapatoms | |
6623 (lambda (node) | |
6624 (unless (car (symbol-value node)) | |
6625 ;; These threads have no parents -- they are roots. | |
6626 (let ((nodes (cdr (symbol-value node))) | |
6627 thread) | |
6628 (while nodes | |
6629 (if (and gnus-thread-expunge-below | |
6630 (< (gnus-thread-total-score (car nodes)) | |
6631 gnus-thread-expunge-below)) | |
6632 (gnus-expunge-thread (pop nodes)) | |
6633 (setq thread (pop nodes)) | |
6634 (gnus-summary-limit-children thread)))))) | |
6635 gnus-newsgroup-dependencies) | |
6636 ;; If this limitation resulted in an empty group, we might | |
6637 ;; pop the previous limit and use it instead. | |
6638 (when (and (not gnus-newsgroup-limit) | |
6639 show-if-empty) | |
6640 (setq gnus-newsgroup-limit (pop gnus-newsgroup-limits))) | |
6641 gnus-newsgroup-limit)) | |
6642 | |
6643 (defun gnus-summary-limit-children (thread) | |
6644 "Return 1 if this subthread is visible and 0 if it is not." | |
6645 ;; First we get the number of visible children to this thread. This | |
6646 ;; is done by recursing down the thread using this function, so this | |
6647 ;; will really go down to a leaf article first, before slowly | |
6648 ;; working its way up towards the root. | |
6649 (when thread | |
6650 (let ((children | |
6651 (if (cdr thread) | |
6652 (apply '+ (mapcar 'gnus-summary-limit-children | |
6653 (cdr thread))) | |
6654 0)) | |
6655 (number (mail-header-number (car thread))) | |
6656 score) | |
6657 (if (and | |
6658 (not (memq number gnus-newsgroup-marked)) | |
6659 (or | |
6660 ;; If this article is dormant and has absolutely no visible | |
6661 ;; children, then this article isn't visible. | |
6662 (and (memq number gnus-newsgroup-dormant) | |
6663 (zerop children)) | |
6664 ;; If this is "fetch-old-headered" and there is no | |
6665 ;; visible children, then we don't want this article. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6666 (and (or (eq gnus-fetch-old-headers 'some) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6667 (numberp gnus-fetch-old-headers)) |
17493 | 6668 (gnus-summary-article-ancient-p number) |
6669 (zerop children)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6670 ;; If this is "fetch-old-headered" and `invisible', then |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6671 ;; we don't want this article. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6672 (and (eq gnus-fetch-old-headers 'invisible) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6673 (gnus-summary-article-ancient-p number)) |
17493 | 6674 ;; If this is a sparsely inserted article with no children, |
6675 ;; we don't want it. | |
6676 (and (eq gnus-build-sparse-threads 'some) | |
6677 (gnus-summary-article-sparse-p number) | |
6678 (zerop children)) | |
6679 ;; If we use expunging, and this article is really | |
6680 ;; low-scored, then we don't want this article. | |
6681 (when (and gnus-summary-expunge-below | |
6682 (< (setq score | |
6683 (or (cdr (assq number gnus-newsgroup-scored)) | |
6684 gnus-summary-default-score)) | |
6685 gnus-summary-expunge-below)) | |
6686 ;; We increase the expunge-tally here, but that has | |
6687 ;; nothing to do with the limits, really. | |
6688 (incf gnus-newsgroup-expunged-tally) | |
6689 ;; We also mark as read here, if that's wanted. | |
6690 (when (and gnus-summary-mark-below | |
6691 (< score gnus-summary-mark-below)) | |
6692 (setq gnus-newsgroup-unreads | |
6693 (delq number gnus-newsgroup-unreads)) | |
6694 (if gnus-newsgroup-auto-expire | |
6695 (push number gnus-newsgroup-expirable) | |
6696 (push (cons number gnus-low-score-mark) | |
6697 gnus-newsgroup-reads))) | |
6698 t) | |
6699 ;; Check NoCeM things. | |
6700 (if (and gnus-use-nocem | |
6701 (gnus-nocem-unwanted-article-p | |
6702 (mail-header-id (car thread)))) | |
6703 (progn | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
6704 (setq gnus-newsgroup-unreads |
17493 | 6705 (delq number gnus-newsgroup-unreads)) |
6706 t)))) | |
6707 ;; Nope, invisible article. | |
6708 0 | |
6709 ;; Ok, this article is to be visible, so we add it to the limit | |
6710 ;; and return 1. | |
6711 (push number gnus-newsgroup-limit) | |
6712 1)))) | |
6713 | |
6714 (defun gnus-expunge-thread (thread) | |
6715 "Mark all articles in THREAD as read." | |
6716 (let* ((number (mail-header-number (car thread)))) | |
6717 (incf gnus-newsgroup-expunged-tally) | |
6718 ;; We also mark as read here, if that's wanted. | |
6719 (setq gnus-newsgroup-unreads | |
6720 (delq number gnus-newsgroup-unreads)) | |
6721 (if gnus-newsgroup-auto-expire | |
6722 (push number gnus-newsgroup-expirable) | |
6723 (push (cons number gnus-low-score-mark) | |
6724 gnus-newsgroup-reads))) | |
6725 ;; Go recursively through all subthreads. | |
6726 (mapcar 'gnus-expunge-thread (cdr thread))) | |
6727 | |
6728 ;; Summary article oriented commands | |
6729 | |
6730 (defun gnus-summary-refer-parent-article (n) | |
6731 "Refer parent article N times. | |
6732 If N is negative, go to ancestor -N instead. | |
6733 The difference between N and the number of articles fetched is returned." | |
6734 (interactive "p") | |
6735 (let ((skip 1) | |
6736 error header ref) | |
6737 (when (not (natnump n)) | |
6738 (setq skip (abs n) | |
6739 n 1)) | |
6740 (while (and (> n 0) | |
6741 (not error)) | |
6742 (setq header (gnus-summary-article-header)) | |
6743 (if (and (eq (mail-header-number header) | |
6744 (cdr gnus-article-current)) | |
6745 (equal gnus-newsgroup-name | |
6746 (car gnus-article-current))) | |
6747 ;; If we try to find the parent of the currently | |
6748 ;; displayed article, then we take a look at the actual | |
6749 ;; References header, since this is slightly more | |
6750 ;; reliable than the References field we got from the | |
6751 ;; server. | |
6752 (save-excursion | |
6753 (set-buffer gnus-original-article-buffer) | |
6754 (nnheader-narrow-to-headers) | |
6755 (unless (setq ref (message-fetch-field "references")) | |
6756 (setq ref (message-fetch-field "in-reply-to"))) | |
6757 (widen)) | |
6758 (setq ref | |
6759 ;; It's not the current article, so we take a bet on | |
6760 ;; the value we got from the server. | |
6761 (mail-header-references header))) | |
6762 (if (and ref | |
6763 (not (equal ref ""))) | |
6764 (unless (gnus-summary-refer-article (gnus-parent-id ref skip)) | |
6765 (gnus-message 1 "Couldn't find parent")) | |
6766 (gnus-message 1 "No references in article %d" | |
6767 (gnus-summary-article-number)) | |
6768 (setq error t)) | |
6769 (decf n)) | |
6770 (gnus-summary-position-point) | |
6771 n)) | |
6772 | |
6773 (defun gnus-summary-refer-references () | |
6774 "Fetch all articles mentioned in the References header. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6775 Return the number of articles fetched." |
17493 | 6776 (interactive) |
6777 (let ((ref (mail-header-references (gnus-summary-article-header))) | |
6778 (current (gnus-summary-article-number)) | |
6779 (n 0)) | |
6780 (if (or (not ref) | |
6781 (equal ref "")) | |
6782 (error "No References in the current article") | |
6783 ;; For each Message-ID in the References header... | |
6784 (while (string-match "<[^>]*>" ref) | |
6785 (incf n) | |
6786 ;; ... fetch that article. | |
6787 (gnus-summary-refer-article | |
6788 (prog1 (match-string 0 ref) | |
6789 (setq ref (substring ref (match-end 0)))))) | |
6790 (gnus-summary-goto-subject current) | |
6791 (gnus-summary-position-point) | |
6792 n))) | |
6793 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6794 (defun gnus-summary-refer-thread (&optional limit) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6795 "Fetch all articles in the current thread. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6796 If LIMIT (the numerical prefix), fetch that many old headers instead |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6797 of what's specified by the `gnus-refer-thread-limit' variable." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6798 (interactive "P") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6799 (let ((id (mail-header-id (gnus-summary-article-header))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6800 (limit (if limit (prefix-numeric-value limit) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6801 gnus-refer-thread-limit))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6802 ;; We want to fetch LIMIT *old* headers, but we also have to |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6803 ;; re-fetch all the headers in the current buffer, because many of |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6804 ;; them may be undisplayed. So we adjust LIMIT. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6805 (when (numberp limit) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6806 (incf limit (- gnus-newsgroup-end gnus-newsgroup-begin))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6807 (unless (eq gnus-fetch-old-headers 'invisible) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6808 (gnus-message 5 "Fetching headers for %s..." gnus-newsgroup-name) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6809 ;; Retrieve the headers and read them in. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6810 (if (eq (gnus-retrieve-headers |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6811 (list gnus-newsgroup-end) gnus-newsgroup-name limit) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6812 'nov) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6813 (gnus-build-all-threads) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6814 (error "Can't fetch thread from backends that don't support NOV")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6815 (gnus-message 5 "Fetching headers for %s...done" gnus-newsgroup-name)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6816 (gnus-summary-limit-include-thread id))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6817 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6818 (defun gnus-summary-refer-article (message-id) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6819 "Fetch an article specified by MESSAGE-ID." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6820 (interactive "sMessage-ID: ") |
17493 | 6821 (when (and (stringp message-id) |
6822 (not (zerop (length message-id)))) | |
6823 ;; Construct the correct Message-ID if necessary. | |
6824 ;; Suggested by tale@pawl.rpi.edu. | |
6825 (unless (string-match "^<" message-id) | |
6826 (setq message-id (concat "<" message-id))) | |
6827 (unless (string-match ">$" message-id) | |
6828 (setq message-id (concat message-id ">"))) | |
6829 (let* ((header (gnus-id-to-header message-id)) | |
6830 (sparse (and header | |
6831 (gnus-summary-article-sparse-p | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
6832 (mail-header-number header)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
6833 (memq (mail-header-number header) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6834 gnus-newsgroup-limit))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6835 number) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6836 (cond |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6837 ;; If the article is present in the buffer we just go to it. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6838 ((and header |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6839 (or (not (gnus-summary-article-sparse-p |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6840 (mail-header-number header))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6841 sparse)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6842 (prog1 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6843 (gnus-summary-goto-article |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6844 (mail-header-number header) nil t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6845 (when sparse |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6846 (gnus-summary-update-article (mail-header-number header))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6847 (t |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6848 ;; We fetch the article. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6849 (catch 'found |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6850 (dolist (gnus-override-method (gnus-refer-article-methods)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6851 (gnus-check-server gnus-override-method) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6852 ;; Fetch the header, and display the article. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6853 (when (setq number (gnus-summary-insert-subject message-id)) |
17493 | 6854 (gnus-summary-select-article nil nil nil number) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6855 (throw 'found t))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6856 (gnus-message 3 "Couldn't fetch article %s" message-id))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6857 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6858 (defun gnus-refer-article-methods () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6859 "Return a list of referrable methods." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6860 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6861 ;; No method, so we default to current and native. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6862 ((null gnus-refer-article-method) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6863 (list gnus-current-select-method gnus-select-method)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6864 ;; Current. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6865 ((eq 'current gnus-refer-article-method) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6866 (list gnus-current-select-method)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6867 ;; List of select methods. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6868 ((not (stringp (cadr gnus-refer-article-method))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6869 (let (out) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6870 (dolist (method gnus-refer-article-method) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6871 (push (if (eq 'current method) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6872 gnus-current-select-method |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6873 method) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6874 out)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6875 (nreverse out))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6876 ;; One single select method. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6877 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6878 (list gnus-refer-article-method)))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6879 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6880 (defun gnus-summary-edit-parameters () |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6881 "Edit the group parameters of the current group." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6882 (interactive) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
6883 (gnus-group-edit-group gnus-newsgroup-name 'params)) |
17493 | 6884 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6885 (defun gnus-summary-customize-parameters () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6886 "Customize the group parameters of the current group." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6887 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6888 (gnus-group-customize gnus-newsgroup-name)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6889 |
17493 | 6890 (defun gnus-summary-enter-digest-group (&optional force) |
6891 "Enter an nndoc group based on the current article. | |
6892 If FORCE, force a digest interpretation. If not, try | |
6893 to guess what the document format is." | |
6894 (interactive "P") | |
6895 (let ((conf gnus-current-window-configuration)) | |
6896 (save-excursion | |
6897 (gnus-summary-select-article)) | |
6898 (setq gnus-current-window-configuration conf) | |
6899 (let* ((name (format "%s-%d" | |
6900 (gnus-group-prefixed-name | |
6901 gnus-newsgroup-name (list 'nndoc "")) | |
6902 (save-excursion | |
6903 (set-buffer gnus-summary-buffer) | |
6904 gnus-current-article))) | |
6905 (ogroup gnus-newsgroup-name) | |
6906 (params (append (gnus-info-params (gnus-get-info ogroup)) | |
6907 (list (cons 'to-group ogroup)) | |
6908 (list (cons 'save-article-group ogroup)))) | |
6909 (case-fold-search t) | |
6910 (buf (current-buffer)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6911 dig to-address) |
17493 | 6912 (save-excursion |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6913 (set-buffer gnus-original-article-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6914 ;; Have the digest group inherit the main mail address of |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6915 ;; the parent article. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6916 (when (setq to-address (or (message-fetch-field "reply-to") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6917 (message-fetch-field "from"))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6918 (setq params (append (list (cons 'to-address to-address))))) |
17493 | 6919 (setq dig (nnheader-set-temp-buffer " *gnus digest buffer*")) |
6920 (insert-buffer-substring gnus-original-article-buffer) | |
6921 ;; Remove lines that may lead nndoc to misinterpret the | |
6922 ;; document type. | |
6923 (narrow-to-region | |
6924 (goto-char (point-min)) | |
6925 (or (search-forward "\n\n" nil t) (point))) | |
6926 (goto-char (point-min)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6927 (delete-matching-lines "^Path:\\|^From ") |
17493 | 6928 (widen)) |
6929 (unwind-protect | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6930 (if (let ((gnus-newsgroup-ephemeral-charset gnus-newsgroup-charset) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6931 (gnus-newsgroup-ephemeral-ignored-charsets |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6932 gnus-newsgroup-ignored-charsets)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6933 (gnus-group-read-ephemeral-group |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6934 name `(nndoc ,name (nndoc-address ,(get-buffer dig)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6935 (nndoc-article-type |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6936 ,(if force 'mbox 'guess))) t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6937 ;; Make all postings to this group go to the parent group. |
17493 | 6938 (nconc (gnus-info-params (gnus-get-info name)) |
6939 params) | |
6940 ;; Couldn't select this doc group. | |
6941 (switch-to-buffer buf) | |
6942 (gnus-set-global-variables) | |
6943 (gnus-configure-windows 'summary) | |
6944 (gnus-message 3 "Article couldn't be entered?")) | |
6945 (kill-buffer dig))))) | |
6946 | |
6947 (defun gnus-summary-read-document (n) | |
6948 "Open a new group based on the current article(s). | |
6949 This will allow you to read digests and other similar | |
6950 documents as newsgroups. | |
6951 Obeys the standard process/prefix convention." | |
6952 (interactive "P") | |
6953 (let* ((articles (gnus-summary-work-articles n)) | |
6954 (ogroup gnus-newsgroup-name) | |
6955 (params (append (gnus-info-params (gnus-get-info ogroup)) | |
6956 (list (cons 'to-group ogroup)))) | |
6957 article group egroup groups vgroup) | |
6958 (while (setq article (pop articles)) | |
6959 (setq group (format "%s-%d" gnus-newsgroup-name article)) | |
6960 (gnus-summary-remove-process-mark article) | |
6961 (when (gnus-summary-display-article article) | |
6962 (save-excursion | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
6963 (with-temp-buffer |
17493 | 6964 (insert-buffer-substring gnus-original-article-buffer) |
6965 ;; Remove some headers that may lead nndoc to make | |
6966 ;; the wrong guess. | |
6967 (message-narrow-to-head) | |
6968 (goto-char (point-min)) | |
6969 (delete-matching-lines "^\\(Path\\):\\|^From ") | |
6970 (widen) | |
6971 (if (setq egroup | |
6972 (gnus-group-read-ephemeral-group | |
6973 group `(nndoc ,group (nndoc-address ,(current-buffer)) | |
6974 (nndoc-article-type guess)) | |
6975 t nil t)) | |
6976 (progn | |
6977 ;; Make all postings to this group go to the parent group. | |
6978 (nconc (gnus-info-params (gnus-get-info egroup)) | |
6979 params) | |
6980 (push egroup groups)) | |
6981 ;; Couldn't select this doc group. | |
6982 (gnus-error 3 "Article couldn't be entered")))))) | |
6983 ;; Now we have selected all the documents. | |
6984 (cond | |
6985 ((not groups) | |
6986 (error "None of the articles could be interpreted as documents")) | |
6987 ((gnus-group-read-ephemeral-group | |
6988 (setq vgroup (format | |
6989 "nnvirtual:%s-%s" gnus-newsgroup-name | |
6990 (format-time-string "%Y%m%dT%H%M%S" (current-time)))) | |
6991 `(nnvirtual ,vgroup (nnvirtual-component-groups ,groups)) | |
6992 t | |
6993 (cons (current-buffer) 'summary))) | |
6994 (t | |
6995 (error "Couldn't select virtual nndoc group"))))) | |
6996 | |
6997 (defun gnus-summary-isearch-article (&optional regexp-p) | |
6998 "Do incremental search forward on the current article. | |
6999 If REGEXP-P (the prefix) is non-nil, do regexp isearch." | |
7000 (interactive "P") | |
7001 (gnus-summary-select-article) | |
7002 (gnus-configure-windows 'article) | |
7003 (gnus-eval-in-buffer-window gnus-article-buffer | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7004 (save-restriction |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7005 (widen) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7006 (isearch-forward regexp-p)))) |
17493 | 7007 |
7008 (defun gnus-summary-search-article-forward (regexp &optional backward) | |
7009 "Search for an article containing REGEXP forward. | |
7010 If BACKWARD, search backward instead." | |
7011 (interactive | |
7012 (list (read-string | |
7013 (format "Search article %s (regexp%s): " | |
7014 (if current-prefix-arg "backward" "forward") | |
7015 (if gnus-last-search-regexp | |
7016 (concat ", default " gnus-last-search-regexp) | |
7017 ""))) | |
7018 current-prefix-arg)) | |
7019 (if (string-equal regexp "") | |
7020 (setq regexp (or gnus-last-search-regexp "")) | |
7021 (setq gnus-last-search-regexp regexp)) | |
7022 (if (gnus-summary-search-article regexp backward) | |
7023 (gnus-summary-show-thread) | |
7024 (error "Search failed: \"%s\"" regexp))) | |
7025 | |
7026 (defun gnus-summary-search-article-backward (regexp) | |
7027 "Search for an article containing REGEXP backward." | |
7028 (interactive | |
7029 (list (read-string | |
7030 (format "Search article backward (regexp%s): " | |
7031 (if gnus-last-search-regexp | |
7032 (concat ", default " gnus-last-search-regexp) | |
7033 ""))))) | |
7034 (gnus-summary-search-article-forward regexp 'backward)) | |
7035 | |
7036 (defun gnus-summary-search-article (regexp &optional backward) | |
7037 "Search for an article containing REGEXP. | |
7038 Optional argument BACKWARD means do search for backward. | |
7039 `gnus-select-article-hook' is not called during the search." | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
7040 ;; We have to require this here to make sure that the following |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
7041 ;; dynamic binding isn't shadowed by autoloading. |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
7042 (require 'gnus-async) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7043 (require 'gnus-art) |
17493 | 7044 (let ((gnus-select-article-hook nil) ;Disable hook. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7045 (gnus-article-prepare-hook nil) |
17493 | 7046 (gnus-mark-article-hook nil) ;Inhibit marking as read. |
7047 (gnus-use-article-prefetch nil) | |
7048 (gnus-xmas-force-redisplay nil) ;Inhibit XEmacs redisplay. | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
7049 (gnus-use-trees nil) ;Inhibit updating tree buffer. |
17493 | 7050 (sum (current-buffer)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7051 (gnus-display-mime-function nil) |
17493 | 7052 (found nil) |
7053 point) | |
7054 (gnus-save-hidden-threads | |
7055 (gnus-summary-select-article) | |
7056 (set-buffer gnus-article-buffer) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7057 (goto-char (window-point (get-buffer-window (current-buffer)))) |
17493 | 7058 (when backward |
7059 (forward-line -1)) | |
7060 (while (not found) | |
7061 (gnus-message 7 "Searching article: %d..." (cdr gnus-article-current)) | |
7062 (if (if backward | |
7063 (re-search-backward regexp nil t) | |
7064 (re-search-forward regexp nil t)) | |
7065 ;; We found the regexp. | |
7066 (progn | |
7067 (setq found 'found) | |
7068 (beginning-of-line) | |
7069 (set-window-start | |
7070 (get-buffer-window (current-buffer)) | |
7071 (point)) | |
7072 (forward-line 1) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7073 (set-window-point |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7074 (get-buffer-window (current-buffer)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7075 (point)) |
17493 | 7076 (set-buffer sum) |
7077 (setq point (point))) | |
7078 ;; We didn't find it, so we go to the next article. | |
7079 (set-buffer sum) | |
7080 (setq found 'not) | |
7081 (while (eq found 'not) | |
7082 (if (not (if backward (gnus-summary-find-prev) | |
7083 (gnus-summary-find-next))) | |
7084 ;; No more articles. | |
7085 (setq found t) | |
7086 ;; Select the next article and adjust point. | |
7087 (unless (gnus-summary-article-sparse-p | |
7088 (gnus-summary-article-number)) | |
7089 (setq found nil) | |
7090 (gnus-summary-select-article) | |
7091 (set-buffer gnus-article-buffer) | |
7092 (widen) | |
7093 (goto-char (if backward (point-max) (point-min)))))))) | |
7094 (gnus-message 7 "")) | |
7095 ;; Return whether we found the regexp. | |
7096 (when (eq found 'found) | |
7097 (goto-char point) | |
7098 (gnus-summary-show-thread) | |
7099 (gnus-summary-goto-subject gnus-current-article) | |
7100 (gnus-summary-position-point) | |
7101 t))) | |
7102 | |
7103 (defun gnus-summary-find-matching (header regexp &optional backward unread | |
7104 not-case-fold) | |
7105 "Return a list of all articles that match REGEXP on HEADER. | |
7106 The search stars on the current article and goes forwards unless | |
7107 BACKWARD is non-nil. If BACKWARD is `all', do all articles. | |
7108 If UNREAD is non-nil, only unread articles will | |
7109 be taken into consideration. If NOT-CASE-FOLD, case won't be folded | |
7110 in the comparisons." | |
7111 (let ((data (if (eq backward 'all) gnus-newsgroup-data | |
7112 (gnus-data-find-list | |
7113 (gnus-summary-article-number) (gnus-data-list backward)))) | |
7114 (case-fold-search (not not-case-fold)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7115 articles d func) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7116 (if (consp header) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7117 (if (eq (car header) 'extra) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7118 (setq func |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7119 `(lambda (h) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7120 (or (cdr (assq ',(cdr header) (mail-header-extra h))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7121 ""))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7122 (error "%s is an invalid header" header)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7123 (unless (fboundp (intern (concat "mail-header-" header))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7124 (error "%s is not a valid header" header)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7125 (setq func `(lambda (h) (,(intern (concat "mail-header-" header)) h)))) |
17493 | 7126 (while data |
7127 (setq d (car data)) | |
7128 (and (or (not unread) ; We want all articles... | |
7129 (gnus-data-unread-p d)) ; Or just unreads. | |
7130 (vectorp (gnus-data-header d)) ; It's not a pseudo. | |
7131 (string-match regexp (funcall func (gnus-data-header d))) ; Match. | |
7132 (push (gnus-data-number d) articles)) ; Success! | |
7133 (setq data (cdr data))) | |
7134 (nreverse articles))) | |
7135 | |
7136 (defun gnus-summary-execute-command (header regexp command &optional backward) | |
7137 "Search forward for an article whose HEADER matches REGEXP and execute COMMAND. | |
7138 If HEADER is an empty string (or nil), the match is done on the entire | |
7139 article. If BACKWARD (the prefix) is non-nil, search backward instead." | |
7140 (interactive | |
7141 (list (let ((completion-ignore-case t)) | |
7142 (completing-read | |
7143 "Header name: " | |
7144 (mapcar (lambda (string) (list string)) | |
7145 '("Number" "Subject" "From" "Lines" "Date" | |
7146 "Message-ID" "Xref" "References" "Body")) | |
7147 nil 'require-match)) | |
7148 (read-string "Regexp: ") | |
7149 (read-key-sequence "Command: ") | |
7150 current-prefix-arg)) | |
7151 (when (equal header "Body") | |
7152 (setq header "")) | |
7153 ;; Hidden thread subtrees must be searched as well. | |
7154 (gnus-summary-show-all-threads) | |
7155 ;; We don't want to change current point nor window configuration. | |
7156 (save-excursion | |
7157 (save-window-excursion | |
7158 (gnus-message 6 "Executing %s..." (key-description command)) | |
7159 ;; We'd like to execute COMMAND interactively so as to give arguments. | |
7160 (gnus-execute header regexp | |
7161 `(call-interactively ',(key-binding command)) | |
7162 backward) | |
7163 (gnus-message 6 "Executing %s...done" (key-description command))))) | |
7164 | |
7165 (defun gnus-summary-beginning-of-article () | |
7166 "Scroll the article back to the beginning." | |
7167 (interactive) | |
7168 (gnus-summary-select-article) | |
7169 (gnus-configure-windows 'article) | |
7170 (gnus-eval-in-buffer-window gnus-article-buffer | |
7171 (widen) | |
7172 (goto-char (point-min)) | |
7173 (when gnus-page-broken | |
7174 (gnus-narrow-to-page)))) | |
7175 | |
7176 (defun gnus-summary-end-of-article () | |
7177 "Scroll to the end of the article." | |
7178 (interactive) | |
7179 (gnus-summary-select-article) | |
7180 (gnus-configure-windows 'article) | |
7181 (gnus-eval-in-buffer-window gnus-article-buffer | |
7182 (widen) | |
7183 (goto-char (point-max)) | |
7184 (recenter -3) | |
7185 (when gnus-page-broken | |
7186 (gnus-narrow-to-page)))) | |
7187 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7188 (defun gnus-summary-print-article (&optional filename n) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7189 "Generate and print a PostScript image of the N next (mail) articles. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7190 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7191 If N is negative, print the N previous articles. If N is nil and articles |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7192 have been marked with the process mark, print these instead. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7193 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7194 If the optional first argument FILENAME is nil, send the image to the |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7195 printer. If FILENAME is a string, save the PostScript image in a file with |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7196 that name. If FILENAME is a number, prompt the user for the name of the file |
17493 | 7197 to save in." |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7198 (interactive (list (ps-print-preprint current-prefix-arg) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7199 current-prefix-arg)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7200 (dolist (article (gnus-summary-work-articles n)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7201 (gnus-summary-select-article nil nil 'pseudo article) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7202 (gnus-eval-in-buffer-window gnus-article-buffer |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7203 (let ((buffer (generate-new-buffer " *print*"))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7204 (unwind-protect |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7205 (progn |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7206 (copy-to-buffer buffer (point-min) (point-max)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7207 (set-buffer buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7208 (gnus-article-delete-invisible-text) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7209 (let ((ps-left-header |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7210 (list |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7211 (concat "(" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7212 (mail-header-subject gnus-current-headers) ")") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7213 (concat "(" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7214 (mail-header-from gnus-current-headers) ")"))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7215 (ps-right-header |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7216 (list |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7217 "/pagenumberstring load" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7218 (concat "(" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7219 (mail-header-date gnus-current-headers) ")")))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7220 (gnus-run-hooks 'gnus-ps-print-hook) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7221 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7222 (ps-print-buffer-with-faces filename)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7223 (kill-buffer buffer)))))) |
17493 | 7224 |
7225 (defun gnus-summary-show-article (&optional arg) | |
7226 "Force re-fetching of the current article. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7227 If ARG (the prefix) is a number, show the article with the charset |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7228 defined in `gnus-summary-show-article-charset-alist', or the charset |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7229 inputed. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7230 If ARG (the prefix) is non-nil and not a number, show the raw article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7231 without any article massaging functions being run." |
17493 | 7232 (interactive "P") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7233 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7234 ((numberp arg) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7235 (let ((gnus-newsgroup-charset |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7236 (or (cdr (assq arg gnus-summary-show-article-charset-alist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7237 (read-coding-system "Charset: "))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7238 (gnus-newsgroup-ignored-charsets 'gnus-all)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7239 (gnus-summary-select-article nil 'force))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7240 ((not arg) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7241 ;; Select the article the normal way. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7242 (gnus-summary-select-article nil 'force)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7243 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7244 ;; We have to require this here to make sure that the following |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7245 ;; dynamic binding isn't shadowed by autoloading. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7246 (require 'gnus-async) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7247 (require 'gnus-art) |
17493 | 7248 ;; Bind the article treatment functions to nil. |
7249 (let ((gnus-have-all-headers t) | |
7250 gnus-article-prepare-hook | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7251 gnus-article-decode-hook |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7252 gnus-display-mime-function |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7253 gnus-break-pages) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7254 ;; Destroy any MIME parts. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7255 (when (gnus-buffer-live-p gnus-article-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7256 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7257 (set-buffer gnus-article-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7258 (mm-destroy-parts gnus-article-mime-handles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7259 ;; Set it to nil for safety reason. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7260 (setq gnus-article-mime-handle-alist nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7261 (setq gnus-article-mime-handles nil))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7262 (gnus-summary-select-article nil 'force)))) |
17493 | 7263 (gnus-summary-goto-subject gnus-current-article) |
7264 (gnus-summary-position-point)) | |
7265 | |
7266 (defun gnus-summary-verbose-headers (&optional arg) | |
7267 "Toggle permanent full header display. | |
7268 If ARG is a positive number, turn header display on. | |
7269 If ARG is a negative number, turn header display off." | |
7270 (interactive "P") | |
7271 (setq gnus-show-all-headers | |
7272 (cond ((or (not (numberp arg)) | |
7273 (zerop arg)) | |
7274 (not gnus-show-all-headers)) | |
7275 ((natnump arg) | |
7276 t))) | |
7277 (gnus-summary-show-article)) | |
7278 | |
7279 (defun gnus-summary-toggle-header (&optional arg) | |
7280 "Show the headers if they are hidden, or hide them if they are shown. | |
7281 If ARG is a positive number, show the entire header. | |
7282 If ARG is a negative number, hide the unwanted header lines." | |
7283 (interactive "P") | |
7284 (save-excursion | |
7285 (set-buffer gnus-article-buffer) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7286 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7287 (let* ((buffer-read-only nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7288 (inhibit-point-motion-hooks t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7289 hidden e) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7290 (setq hidden |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7291 (if (numberp arg) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7292 (>= arg 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7293 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7294 (article-narrow-to-head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7295 (gnus-article-hidden-text-p 'headers)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7296 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7297 (when (search-forward "\n\n" nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7298 (delete-region (point-min) (1- (point)))) |
17493 | 7299 (goto-char (point-min)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7300 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7301 (set-buffer gnus-original-article-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7302 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7303 (setq e (1- (or (search-forward "\n\n" nil t) (point-max))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7304 (insert-buffer-substring gnus-original-article-buffer 1 e) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7305 (save-restriction |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7306 (narrow-to-region (point-min) (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7307 (article-decode-encoded-words) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7308 (if hidden |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7309 (let ((gnus-treat-hide-headers nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7310 (gnus-treat-hide-boring-headers nil)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7311 (setq gnus-article-wash-types |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7312 (delq 'headers gnus-article-wash-types)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7313 (gnus-treat-article 'head)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7314 (gnus-treat-article 'head))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7315 (gnus-set-mode-line 'article))))) |
17493 | 7316 |
7317 (defun gnus-summary-show-all-headers () | |
7318 "Make all header lines visible." | |
7319 (interactive) | |
7320 (gnus-article-show-all-headers)) | |
7321 | |
7322 (defun gnus-summary-caesar-message (&optional arg) | |
7323 "Caesar rotate the current article by 13. | |
7324 The numerical prefix specifies how many places to rotate each letter | |
7325 forward." | |
7326 (interactive "P") | |
7327 (gnus-summary-select-article) | |
7328 (let ((mail-header-separator "")) | |
7329 (gnus-eval-in-buffer-window gnus-article-buffer | |
7330 (save-restriction | |
7331 (widen) | |
7332 (let ((start (window-start)) | |
7333 buffer-read-only) | |
7334 (message-caesar-buffer-body arg) | |
7335 (set-window-start (get-buffer-window (current-buffer)) start)))))) | |
7336 | |
7337 (defun gnus-summary-stop-page-breaking () | |
7338 "Stop page breaking in the current article." | |
7339 (interactive) | |
7340 (gnus-summary-select-article) | |
7341 (gnus-eval-in-buffer-window gnus-article-buffer | |
7342 (widen) | |
7343 (when (gnus-visual-p 'page-marker) | |
7344 (let ((buffer-read-only nil)) | |
7345 (gnus-remove-text-with-property 'gnus-prev) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7346 (gnus-remove-text-with-property 'gnus-next)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7347 (setq gnus-page-broken nil)))) |
17493 | 7348 |
7349 (defun gnus-summary-move-article (&optional n to-newsgroup | |
7350 select-method action) | |
7351 "Move the current article to a different newsgroup. | |
7352 If N is a positive number, move the N next articles. | |
7353 If N is a negative number, move the N previous articles. | |
7354 If N is nil and any articles have been marked with the process mark, | |
7355 move those articles instead. | |
7356 If TO-NEWSGROUP is string, do not prompt for a newsgroup to move to. | |
7357 If SELECT-METHOD is non-nil, do not move to a specific newsgroup, but | |
7358 re-spool using this method. | |
7359 | |
7360 For this function to work, both the current newsgroup and the | |
7361 newsgroup that you want to move to have to support the `request-move' | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7362 and `request-accept' functions. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7363 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7364 ACTION can be either `move' (the default), `crosspost' or `copy'." |
17493 | 7365 (interactive "P") |
7366 (unless action | |
7367 (setq action 'move)) | |
7368 ;; Disable marking as read. | |
7369 (let (gnus-mark-article-hook) | |
7370 (save-window-excursion | |
7371 (gnus-summary-select-article))) | |
7372 ;; Check whether the source group supports the required functions. | |
7373 (cond ((and (eq action 'move) | |
7374 (not (gnus-check-backend-function | |
7375 'request-move-article gnus-newsgroup-name))) | |
7376 (error "The current group does not support article moving")) | |
7377 ((and (eq action 'crosspost) | |
7378 (not (gnus-check-backend-function | |
7379 'request-replace-article gnus-newsgroup-name))) | |
7380 (error "The current group does not support article editing"))) | |
7381 (let ((articles (gnus-summary-work-articles n)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7382 (prefix (if (gnus-check-backend-function |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7383 'request-move-article gnus-newsgroup-name) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7384 (gnus-group-real-prefix gnus-newsgroup-name) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7385 "")) |
17493 | 7386 (names '((move "Move" "Moving") |
7387 (copy "Copy" "Copying") | |
7388 (crosspost "Crosspost" "Crossposting"))) | |
7389 (copy-buf (save-excursion | |
7390 (nnheader-set-temp-buffer " *copy article*"))) | |
7391 art-group to-method new-xref article to-groups) | |
7392 (unless (assq action names) | |
7393 (error "Unknown action %s" action)) | |
7394 ;; Read the newsgroup name. | |
7395 (when (and (not to-newsgroup) | |
7396 (not select-method)) | |
7397 (setq to-newsgroup | |
7398 (gnus-read-move-group-name | |
7399 (cadr (assq action names)) | |
7400 (symbol-value (intern (format "gnus-current-%s-group" action))) | |
7401 articles prefix)) | |
7402 (set (intern (format "gnus-current-%s-group" action)) to-newsgroup)) | |
7403 (setq to-method (or select-method | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7404 (gnus-server-to-method |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7405 (gnus-group-method to-newsgroup)))) |
17493 | 7406 ;; Check the method we are to move this article to... |
7407 (unless (gnus-check-backend-function | |
7408 'request-accept-article (car to-method)) | |
7409 (error "%s does not support article copying" (car to-method))) | |
7410 (unless (gnus-check-server to-method) | |
7411 (error "Can't open server %s" (car to-method))) | |
7412 (gnus-message 6 "%s to %s: %s..." | |
7413 (caddr (assq action names)) | |
7414 (or (car select-method) to-newsgroup) articles) | |
7415 (while articles | |
7416 (setq article (pop articles)) | |
7417 (setq | |
7418 art-group | |
7419 (cond | |
7420 ;; Move the article. | |
7421 ((eq action 'move) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
7422 ;; Remove this article from future suppression. |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
7423 (gnus-dup-unsuppress-article article) |
17493 | 7424 (gnus-request-move-article |
7425 article ; Article to move | |
7426 gnus-newsgroup-name ; From newsgroup | |
7427 (nth 1 (gnus-find-method-for-group | |
7428 gnus-newsgroup-name)) ; Server | |
7429 (list 'gnus-request-accept-article | |
7430 to-newsgroup (list 'quote select-method) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7431 (not articles) t) ; Accept form |
17493 | 7432 (not articles))) ; Only save nov last time |
7433 ;; Copy the article. | |
7434 ((eq action 'copy) | |
7435 (save-excursion | |
7436 (set-buffer copy-buf) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7437 (when (gnus-request-article-this-buffer article gnus-newsgroup-name) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7438 (gnus-request-accept-article |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7439 to-newsgroup select-method (not articles) t)))) |
17493 | 7440 ;; Crosspost the article. |
7441 ((eq action 'crosspost) | |
7442 (let ((xref (message-tokenize-header | |
7443 (mail-header-xref (gnus-summary-article-header article)) | |
7444 " "))) | |
7445 (setq new-xref (concat (gnus-group-real-name gnus-newsgroup-name) | |
7446 ":" article)) | |
7447 (unless xref | |
7448 (setq xref (list (system-name)))) | |
7449 (setq new-xref | |
7450 (concat | |
7451 (mapconcat 'identity | |
7452 (delete "Xref:" (delete new-xref xref)) | |
7453 " ") | |
7454 " " new-xref)) | |
7455 (save-excursion | |
7456 (set-buffer copy-buf) | |
7457 ;; First put the article in the destination group. | |
7458 (gnus-request-article-this-buffer article gnus-newsgroup-name) | |
7459 (when (consp (setq art-group | |
7460 (gnus-request-accept-article | |
7461 to-newsgroup select-method (not articles)))) | |
7462 (setq new-xref (concat new-xref " " (car art-group) | |
7463 ":" (cdr art-group))) | |
7464 ;; Now we have the new Xrefs header, so we insert | |
7465 ;; it and replace the new article. | |
7466 (nnheader-replace-header "Xref" new-xref) | |
7467 (gnus-request-replace-article | |
7468 (cdr art-group) to-newsgroup (current-buffer)) | |
7469 art-group)))))) | |
7470 (cond | |
7471 ((not art-group) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7472 (gnus-message 1 "Couldn't %s article %s: %s" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7473 (cadr (assq action names)) article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7474 (nnheader-get-report (car to-method)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7475 ((eq art-group 'junk) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7476 (when (eq action 'move) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7477 (gnus-summary-mark-article article gnus-canceled-mark) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7478 (gnus-message 4 "Deleted article %s" article))) |
17493 | 7479 (t |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7480 (let* ((pto-group (gnus-group-prefixed-name |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7481 (car art-group) to-method)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7482 (entry |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7483 (gnus-gethash pto-group gnus-newsrc-hashtb)) |
17493 | 7484 (info (nth 2 entry)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7485 (to-group (gnus-info-group info)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7486 to-marks) |
17493 | 7487 ;; Update the group that has been moved to. |
7488 (when (and info | |
7489 (memq action '(move copy))) | |
7490 (unless (member to-group to-groups) | |
7491 (push to-group to-groups)) | |
7492 | |
7493 (unless (memq article gnus-newsgroup-unreads) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7494 (push 'read to-marks) |
17493 | 7495 (gnus-info-set-read |
7496 info (gnus-add-to-range (gnus-info-read info) | |
7497 (list (cdr art-group))))) | |
7498 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7499 ;; See whether the article is to be put in the cache. |
17493 | 7500 (let ((marks gnus-article-mark-lists) |
7501 (to-article (cdr art-group))) | |
7502 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7503 ;; Enter the article into the cache in the new group, |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7504 ;; if that is required. |
17493 | 7505 (when gnus-use-cache |
7506 (gnus-cache-possibly-enter-article | |
7507 to-group to-article | |
7508 (memq article gnus-newsgroup-marked) | |
7509 (memq article gnus-newsgroup-dormant) | |
7510 (memq article gnus-newsgroup-unreads))) | |
7511 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7512 (when gnus-preserve-marks |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7513 ;; Copy any marks over to the new group. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7514 (when (and (equal to-group gnus-newsgroup-name) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7515 (not (memq article gnus-newsgroup-unreads))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7516 ;; Mark this article as read in this group. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7517 (push (cons to-article gnus-read-mark) gnus-newsgroup-reads) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7518 (setcdr (gnus-active to-group) to-article) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7519 (setcdr gnus-newsgroup-active to-article)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7520 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7521 (while marks |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7522 (when (memq article (symbol-value |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7523 (intern (format "gnus-newsgroup-%s" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7524 (caar marks))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7525 (push (cdar marks) to-marks) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7526 ;; If the other group is the same as this group, |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7527 ;; then we have to add the mark to the list. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7528 (when (equal to-group gnus-newsgroup-name) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7529 (set (intern (format "gnus-newsgroup-%s" (caar marks))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7530 (cons to-article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7531 (symbol-value |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7532 (intern (format "gnus-newsgroup-%s" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7533 (caar marks))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7534 ;; Copy the marks to other group. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7535 (gnus-add-marked-articles |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7536 to-group (cdar marks) (list to-article) info)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7537 (setq marks (cdr marks))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7538 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7539 (gnus-request-set-mark to-group (list (list (list to-article) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7540 'set |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7541 to-marks)))) |
17493 | 7542 |
7543 (gnus-dribble-enter | |
7544 (concat "(gnus-group-set-info '" | |
7545 (gnus-prin1-to-string (gnus-get-info to-group)) | |
7546 ")")))) | |
7547 | |
7548 ;; Update the Xref header in this article to point to | |
7549 ;; the new crossposted article we have just created. | |
7550 (when (eq action 'crosspost) | |
7551 (save-excursion | |
7552 (set-buffer copy-buf) | |
7553 (gnus-request-article-this-buffer article gnus-newsgroup-name) | |
7554 (nnheader-replace-header "Xref" new-xref) | |
7555 (gnus-request-replace-article | |
7556 article gnus-newsgroup-name (current-buffer))))) | |
7557 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7558 ;;;!!!Why is this necessary? |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7559 (set-buffer gnus-summary-buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7560 |
17493 | 7561 (gnus-summary-goto-subject article) |
7562 (when (eq action 'move) | |
7563 (gnus-summary-mark-article article gnus-canceled-mark)))) | |
7564 (gnus-summary-remove-process-mark article)) | |
7565 ;; Re-activate all groups that have been moved to. | |
7566 (while to-groups | |
7567 (save-excursion | |
7568 (set-buffer gnus-group-buffer) | |
7569 (when (gnus-group-goto-group (car to-groups) t) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
7570 (gnus-group-get-new-news-this-group 1 t)) |
17493 | 7571 (pop to-groups))) |
7572 | |
7573 (gnus-kill-buffer copy-buf) | |
7574 (gnus-summary-position-point) | |
7575 (gnus-set-mode-line 'summary))) | |
7576 | |
7577 (defun gnus-summary-copy-article (&optional n to-newsgroup select-method) | |
7578 "Move the current article to a different newsgroup. | |
7579 If TO-NEWSGROUP is string, do not prompt for a newsgroup to move to. | |
7580 If SELECT-METHOD is non-nil, do not move to a specific newsgroup, but | |
7581 re-spool using this method." | |
7582 (interactive "P") | |
7583 (gnus-summary-move-article n to-newsgroup select-method 'copy)) | |
7584 | |
7585 (defun gnus-summary-crosspost-article (&optional n) | |
7586 "Crosspost the current article to some other group." | |
7587 (interactive "P") | |
7588 (gnus-summary-move-article n nil nil 'crosspost)) | |
7589 | |
7590 (defcustom gnus-summary-respool-default-method nil | |
7591 "Default method for respooling an article. | |
7592 If nil, use to the current newsgroup method." | |
23363
41843e16f6ac
(gnus-summary-respool-default-method): Fix type.
Karl Heuer <kwzh@gnu.org>
parents:
20117
diff
changeset
|
7593 :type '(choice (gnus-select-method :value (nnml "")) |
41843e16f6ac
(gnus-summary-respool-default-method): Fix type.
Karl Heuer <kwzh@gnu.org>
parents:
20117
diff
changeset
|
7594 (const nil)) |
17493 | 7595 :group 'gnus-summary-mail) |
7596 | |
7597 (defun gnus-summary-respool-article (&optional n method) | |
7598 "Respool the current article. | |
7599 The article will be squeezed through the mail spooling process again, | |
7600 which means that it will be put in some mail newsgroup or other | |
7601 depending on `nnmail-split-methods'. | |
7602 If N is a positive number, respool the N next articles. | |
7603 If N is a negative number, respool the N previous articles. | |
7604 If N is nil and any articles have been marked with the process mark, | |
7605 respool those articles instead. | |
7606 | |
7607 Respooling can be done both from mail groups and \"real\" newsgroups. | |
7608 In the former case, the articles in question will be moved from the | |
7609 current group into whatever groups they are destined to. In the | |
7610 latter case, they will be copied into the relevant groups." | |
7611 (interactive | |
7612 (list current-prefix-arg | |
7613 (let* ((methods (gnus-methods-using 'respool)) | |
7614 (methname | |
7615 (symbol-name (or gnus-summary-respool-default-method | |
7616 (car (gnus-find-method-for-group | |
7617 gnus-newsgroup-name))))) | |
7618 (method | |
7619 (gnus-completing-read | |
7620 methname "What backend do you want to use when respooling?" | |
7621 methods nil t nil 'gnus-mail-method-history)) | |
7622 ms) | |
7623 (cond | |
7624 ((zerop (length (setq ms (gnus-servers-using-backend | |
7625 (intern method))))) | |
7626 (list (intern method) "")) | |
7627 ((= 1 (length ms)) | |
7628 (car ms)) | |
7629 (t | |
7630 (let ((ms-alist (mapcar (lambda (m) (cons (cadr m) m)) ms))) | |
7631 (cdr (assoc (completing-read "Server name: " ms-alist nil t) | |
7632 ms-alist)))))))) | |
7633 (unless method | |
7634 (error "No method given for respooling")) | |
7635 (if (assoc (symbol-name | |
7636 (car (gnus-find-method-for-group gnus-newsgroup-name))) | |
7637 (gnus-methods-using 'respool)) | |
7638 (gnus-summary-move-article n nil method) | |
7639 (gnus-summary-copy-article n nil method))) | |
7640 | |
7641 (defun gnus-summary-import-article (file) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7642 "Import an arbitrary file into a mail newsgroup." |
17493 | 7643 (interactive "fImport file: ") |
7644 (let ((group gnus-newsgroup-name) | |
7645 (now (current-time)) | |
7646 atts lines) | |
7647 (unless (gnus-check-backend-function 'request-accept-article group) | |
7648 (error "%s does not support article importing" group)) | |
7649 (or (file-readable-p file) | |
7650 (not (file-regular-p file)) | |
7651 (error "Can't read %s" file)) | |
7652 (save-excursion | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7653 (set-buffer (gnus-get-buffer-create " *import file*")) |
17493 | 7654 (erase-buffer) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7655 (nnheader-insert-file-contents file) |
17493 | 7656 (goto-char (point-min)) |
7657 (unless (nnheader-article-p) | |
7658 ;; This doesn't look like an article, so we fudge some headers. | |
7659 (setq atts (file-attributes file) | |
7660 lines (count-lines (point-min) (point-max))) | |
7661 (insert "From: " (read-string "From: ") "\n" | |
7662 "Subject: " (read-string "Subject: ") "\n" | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7663 "Date: " (message-make-date (nth 5 atts)) |
17493 | 7664 "\n" |
7665 "Message-ID: " (message-make-message-id) "\n" | |
7666 "Lines: " (int-to-string lines) "\n" | |
7667 "Chars: " (int-to-string (nth 7 atts)) "\n\n")) | |
7668 (gnus-request-accept-article group nil t) | |
7669 (kill-buffer (current-buffer))))) | |
7670 | |
7671 (defun gnus-summary-article-posted-p () | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7672 "Say whether the current (mail) article is available from news as well. |
17493 | 7673 This will be the case if the article has both been mailed and posted." |
7674 (interactive) | |
7675 (let ((id (mail-header-references (gnus-summary-article-header))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7676 (gnus-override-method (car (gnus-refer-article-methods)))) |
17493 | 7677 (if (gnus-request-head id "") |
7678 (gnus-message 2 "The current message was found on %s" | |
7679 gnus-override-method) | |
7680 (gnus-message 2 "The current message couldn't be found on %s" | |
7681 gnus-override-method) | |
7682 nil))) | |
7683 | |
7684 (defun gnus-summary-expire-articles (&optional now) | |
7685 "Expire all articles that are marked as expirable in the current group." | |
7686 (interactive) | |
7687 (when (gnus-check-backend-function | |
7688 'request-expire-articles gnus-newsgroup-name) | |
7689 ;; This backend supports expiry. | |
7690 (let* ((total (gnus-group-total-expirable-p gnus-newsgroup-name)) | |
7691 (expirable (if total | |
7692 (progn | |
7693 ;; We need to update the info for | |
7694 ;; this group for `gnus-list-of-read-articles' | |
7695 ;; to give us the right answer. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7696 (gnus-run-hooks 'gnus-exit-group-hook) |
17493 | 7697 (gnus-summary-update-info) |
7698 (gnus-list-of-read-articles gnus-newsgroup-name)) | |
7699 (setq gnus-newsgroup-expirable | |
7700 (sort gnus-newsgroup-expirable '<)))) | |
7701 (expiry-wait (if now 'immediate | |
7702 (gnus-group-find-parameter | |
7703 gnus-newsgroup-name 'expiry-wait))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7704 (nnmail-expiry-target |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7705 (or (gnus-group-find-parameter gnus-newsgroup-name 'expiry-target) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7706 nnmail-expiry-target)) |
17493 | 7707 es) |
7708 (when expirable | |
7709 ;; There are expirable articles in this group, so we run them | |
7710 ;; through the expiry process. | |
7711 (gnus-message 6 "Expiring articles...") | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7712 (unless (gnus-check-group gnus-newsgroup-name) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7713 (error "Can't open server for %s" gnus-newsgroup-name)) |
17493 | 7714 ;; The list of articles that weren't expired is returned. |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7715 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7716 (if expiry-wait |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7717 (let ((nnmail-expiry-wait-function nil) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7718 (nnmail-expiry-wait expiry-wait)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7719 (setq es (gnus-request-expire-articles |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7720 expirable gnus-newsgroup-name))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7721 (setq es (gnus-request-expire-articles |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7722 expirable gnus-newsgroup-name)))) |
17493 | 7723 (unless total |
7724 (setq gnus-newsgroup-expirable es)) | |
7725 ;; We go through the old list of expirable, and mark all | |
7726 ;; really expired articles as nonexistent. | |
7727 (unless (eq es expirable) ;If nothing was expired, we don't mark. | |
7728 (let ((gnus-use-cache nil)) | |
7729 (while expirable | |
7730 (unless (memq (car expirable) es) | |
7731 (when (gnus-data-find (car expirable)) | |
7732 (gnus-summary-mark-article | |
7733 (car expirable) gnus-canceled-mark))) | |
7734 (setq expirable (cdr expirable))))) | |
7735 (gnus-message 6 "Expiring articles...done"))))) | |
7736 | |
7737 (defun gnus-summary-expire-articles-now () | |
7738 "Expunge all expirable articles in the current group. | |
7739 This means that *all* articles that are marked as expirable will be | |
7740 deleted forever, right now." | |
7741 (interactive) | |
7742 (or gnus-expert-user | |
7743 (gnus-yes-or-no-p | |
7744 "Are you really, really, really sure you want to delete all these messages? ") | |
7745 (error "Phew!")) | |
7746 (gnus-summary-expire-articles t)) | |
7747 | |
7748 ;; Suggested by Jack Vinson <vinson@unagi.cis.upenn.edu>. | |
7749 (defun gnus-summary-delete-article (&optional n) | |
7750 "Delete the N next (mail) articles. | |
7751 This command actually deletes articles. This is not a marking | |
7752 command. The article will disappear forever from your life, never to | |
7753 return. | |
7754 If N is negative, delete backwards. | |
7755 If N is nil and articles have been marked with the process mark, | |
7756 delete these instead." | |
7757 (interactive "P") | |
7758 (unless (gnus-check-backend-function 'request-expire-articles | |
7759 gnus-newsgroup-name) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
7760 (error "The current newsgroup does not support article deletion")) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7761 (unless (gnus-check-server (gnus-find-method-for-group gnus-newsgroup-name)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7762 (error "Couldn't open server")) |
17493 | 7763 ;; Compute the list of articles to delete. |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7764 (let ((articles (sort (copy-sequence (gnus-summary-work-articles n)) '<)) |
17493 | 7765 not-deleted) |
7766 (if (and gnus-novice-user | |
7767 (not (gnus-yes-or-no-p | |
7768 (format "Do you really want to delete %s forever? " | |
7769 (if (> (length articles) 1) | |
7770 (format "these %s articles" (length articles)) | |
7771 "this article"))))) | |
7772 () | |
7773 ;; Delete the articles. | |
7774 (setq not-deleted (gnus-request-expire-articles | |
7775 articles gnus-newsgroup-name 'force)) | |
7776 (while articles | |
7777 (gnus-summary-remove-process-mark (car articles)) | |
7778 ;; The backend might not have been able to delete the article | |
7779 ;; after all. | |
7780 (unless (memq (car articles) not-deleted) | |
7781 (gnus-summary-mark-article (car articles) gnus-canceled-mark)) | |
7782 (setq articles (cdr articles))) | |
7783 (when not-deleted | |
7784 (gnus-message 4 "Couldn't delete articles %s" not-deleted))) | |
7785 (gnus-summary-position-point) | |
7786 (gnus-set-mode-line 'summary) | |
7787 not-deleted)) | |
7788 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7789 (defun gnus-summary-edit-article (&optional arg) |
17493 | 7790 "Edit the current article. |
7791 This will have permanent effect only in mail groups. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7792 If ARG is nil, edit the decoded articles. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7793 If ARG is 1, edit the raw articles. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7794 If ARG is 2, edit the raw articles even in read-only groups. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7795 Otherwise, allow editing of articles even in read-only |
17493 | 7796 groups." |
7797 (interactive "P") | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7798 (let (force raw) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7799 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7800 ((null arg)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7801 ((eq arg 1) (setq raw t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7802 ((eq arg 2) (setq raw t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7803 force t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7804 (t (setq force t))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7805 (if (and raw (not force) (equal gnus-newsgroup-name "nndraft:drafts")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7806 (error "Can't edit the raw article in group nndraft:drafts.")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7807 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7808 (set-buffer gnus-summary-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7809 (let ((mail-parse-charset gnus-newsgroup-charset) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7810 (mail-parse-ignored-charsets gnus-newsgroup-ignored-charsets)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7811 (gnus-set-global-variables) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7812 (when (and (not force) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7813 (gnus-group-read-only-p)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7814 (error "The current newsgroup does not support article editing")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7815 (gnus-summary-show-article t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7816 (when (and (not raw) (gnus-buffer-live-p gnus-article-buffer)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7817 (with-current-buffer gnus-article-buffer |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7818 (mm-enable-multibyte))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7819 (if (equal gnus-newsgroup-name "nndraft:drafts") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7820 (setq raw t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7821 (gnus-article-edit-article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7822 (if raw 'ignore |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7823 #'(lambda () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7824 (let ((mbl mml-buffer-list)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7825 (setq mml-buffer-list nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7826 (mime-to-mml) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7827 (make-local-hook 'kill-buffer-hook) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7828 (let ((mml-buffer-list mml-buffer-list)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7829 (setq mml-buffer-list mbl) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7830 (make-local-variable 'mml-buffer-list)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7831 (add-hook 'kill-buffer-hook 'mml-destroy-buffers t t)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7832 `(lambda (no-highlight) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7833 (let ((mail-parse-charset ',gnus-newsgroup-charset) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7834 (mail-parse-ignored-charsets |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7835 ',gnus-newsgroup-ignored-charsets)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7836 ,(if (not raw) '(progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7837 (mml-to-mime) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7838 (mml-destroy-buffers) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7839 (remove-hook 'kill-buffer-hook |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7840 'mml-destroy-buffers t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7841 (kill-local-variable 'mml-buffer-list))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7842 (gnus-summary-edit-article-done |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7843 ,(or (mail-header-references gnus-current-headers) "") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7844 ,(gnus-group-read-only-p) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7845 ,gnus-summary-buffer no-highlight)))))))) |
17493 | 7846 |
7847 (defalias 'gnus-summary-edit-article-postpone 'gnus-article-edit-exit) | |
7848 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7849 (defun gnus-summary-edit-article-done (&optional references read-only buffer |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7850 no-highlight) |
17493 | 7851 "Make edits to the current article permanent." |
7852 (interactive) | |
7853 ;; Replace the article. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7854 (let ((buf (current-buffer))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7855 (with-temp-buffer |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7856 (insert-buffer-substring buf) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7857 (if (and (not read-only) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7858 (not (gnus-request-replace-article |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7859 (cdr gnus-article-current) (car gnus-article-current) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7860 (current-buffer) t))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7861 (error "Couldn't replace article") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7862 ;; Update the summary buffer. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7863 (if (and references |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7864 (equal (message-tokenize-header references " ") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7865 (message-tokenize-header |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7866 (or (message-fetch-field "references") "") " "))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7867 ;; We only have to update this line. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7868 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7869 (save-restriction |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7870 (message-narrow-to-head) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7871 (let ((head (buffer-string)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7872 header) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7873 (with-temp-buffer |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7874 (insert (format "211 %d Article retrieved.\n" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7875 (cdr gnus-article-current))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7876 (insert head) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7877 (insert ".\n") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7878 (let ((nntp-server-buffer (current-buffer))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7879 (setq header (car (gnus-get-newsgroup-headers |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7880 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7881 (set-buffer gnus-summary-buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7882 gnus-newsgroup-dependencies) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7883 t)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7884 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7885 (set-buffer gnus-summary-buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7886 (gnus-data-set-header |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7887 (gnus-data-find (cdr gnus-article-current)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7888 header) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7889 (gnus-summary-update-article-line |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7890 (cdr gnus-article-current) header)))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7891 ;; Update threads. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7892 (set-buffer (or buffer gnus-summary-buffer)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7893 (gnus-summary-update-article (cdr gnus-article-current))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7894 ;; Prettify the article buffer again. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7895 (unless no-highlight |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7896 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7897 (set-buffer gnus-article-buffer) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7898 ;;;!!! Fix this -- article should be rehighlighted. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
7899 ;;;(gnus-run-hooks 'gnus-article-display-hook) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7900 (set-buffer gnus-original-article-buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7901 (gnus-request-article |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7902 (cdr gnus-article-current) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7903 (car gnus-article-current) (current-buffer)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7904 ;; Prettify the summary buffer line. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7905 (when (gnus-visual-p 'summary-highlight 'highlight) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7906 (gnus-run-hooks 'gnus-visual-mark-article-hook)))))) |
17493 | 7907 |
7908 (defun gnus-summary-edit-wash (key) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7909 "Perform editing command KEY in the article buffer." |
17493 | 7910 (interactive |
7911 (list | |
7912 (progn | |
7913 (message "%s" (concat (this-command-keys) "- ")) | |
7914 (read-char)))) | |
7915 (message "") | |
7916 (gnus-summary-edit-article) | |
7917 (execute-kbd-macro (concat (this-command-keys) key)) | |
7918 (gnus-article-edit-done)) | |
7919 | |
7920 ;;; Respooling | |
7921 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7922 (defun gnus-summary-respool-query (&optional silent trace) |
17493 | 7923 "Query where the respool algorithm would put this article." |
7924 (interactive) | |
7925 (let (gnus-mark-article-hook) | |
7926 (gnus-summary-select-article) | |
7927 (save-excursion | |
7928 (set-buffer gnus-original-article-buffer) | |
7929 (save-restriction | |
7930 (message-narrow-to-head) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7931 (let ((groups (nnmail-article-group 'identity trace))) |
17493 | 7932 (unless silent |
7933 (if groups | |
7934 (message "This message would go to %s" | |
7935 (mapconcat 'car groups ", ")) | |
7936 (message "This message would go to no groups")) | |
7937 groups)))))) | |
7938 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7939 (defun gnus-summary-respool-trace () |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7940 "Trace where the respool algorithm would put this article. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7941 Display a buffer showing all fancy splitting patterns which matched." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7942 (interactive) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7943 (gnus-summary-respool-query nil t)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
7944 |
17493 | 7945 ;; Summary marking commands. |
7946 | |
7947 (defun gnus-summary-kill-same-subject-and-select (&optional unmark) | |
7948 "Mark articles which has the same subject as read, and then select the next. | |
7949 If UNMARK is positive, remove any kind of mark. | |
7950 If UNMARK is negative, tick articles." | |
7951 (interactive "P") | |
7952 (when unmark | |
7953 (setq unmark (prefix-numeric-value unmark))) | |
7954 (let ((count | |
7955 (gnus-summary-mark-same-subject | |
7956 (gnus-summary-article-subject) unmark))) | |
7957 ;; Select next unread article. If auto-select-same mode, should | |
7958 ;; select the first unread article. | |
7959 (gnus-summary-next-article t (and gnus-auto-select-same | |
7960 (gnus-summary-article-subject))) | |
7961 (gnus-message 7 "%d article%s marked as %s" | |
7962 count (if (= count 1) " is" "s are") | |
7963 (if unmark "unread" "read")))) | |
7964 | |
7965 (defun gnus-summary-kill-same-subject (&optional unmark) | |
7966 "Mark articles which has the same subject as read. | |
7967 If UNMARK is positive, remove any kind of mark. | |
7968 If UNMARK is negative, tick articles." | |
7969 (interactive "P") | |
7970 (when unmark | |
7971 (setq unmark (prefix-numeric-value unmark))) | |
7972 (let ((count | |
7973 (gnus-summary-mark-same-subject | |
7974 (gnus-summary-article-subject) unmark))) | |
7975 ;; If marked as read, go to next unread subject. | |
7976 (when (null unmark) | |
7977 ;; Go to next unread subject. | |
7978 (gnus-summary-next-subject 1 t)) | |
7979 (gnus-message 7 "%d articles are marked as %s" | |
7980 count (if unmark "unread" "read")))) | |
7981 | |
7982 (defun gnus-summary-mark-same-subject (subject &optional unmark) | |
7983 "Mark articles with same SUBJECT as read, and return marked number. | |
7984 If optional argument UNMARK is positive, remove any kinds of marks. | |
7985 If optional argument UNMARK is negative, mark articles as unread instead." | |
7986 (let ((count 1)) | |
7987 (save-excursion | |
7988 (cond | |
7989 ((null unmark) ; Mark as read. | |
7990 (while (and | |
7991 (progn | |
7992 (gnus-summary-mark-article-as-read gnus-killed-mark) | |
7993 (gnus-summary-show-thread) t) | |
7994 (gnus-summary-find-subject subject)) | |
7995 (setq count (1+ count)))) | |
7996 ((> unmark 0) ; Tick. | |
7997 (while (and | |
7998 (progn | |
7999 (gnus-summary-mark-article-as-unread gnus-ticked-mark) | |
8000 (gnus-summary-show-thread) t) | |
8001 (gnus-summary-find-subject subject)) | |
8002 (setq count (1+ count)))) | |
8003 (t ; Mark as unread. | |
8004 (while (and | |
8005 (progn | |
8006 (gnus-summary-mark-article-as-unread gnus-unread-mark) | |
8007 (gnus-summary-show-thread) t) | |
8008 (gnus-summary-find-subject subject)) | |
8009 (setq count (1+ count))))) | |
8010 (gnus-set-mode-line 'summary) | |
8011 ;; Return the number of marked articles. | |
8012 count))) | |
8013 | |
8014 (defun gnus-summary-mark-as-processable (n &optional unmark) | |
8015 "Set the process mark on the next N articles. | |
8016 If N is negative, mark backward instead. If UNMARK is non-nil, remove | |
8017 the process mark instead. The difference between N and the actual | |
8018 number of articles marked is returned." | |
8019 (interactive "p") | |
8020 (let ((backward (< n 0)) | |
8021 (n (abs n))) | |
8022 (while (and | |
8023 (> n 0) | |
8024 (if unmark | |
8025 (gnus-summary-remove-process-mark | |
8026 (gnus-summary-article-number)) | |
8027 (gnus-summary-set-process-mark (gnus-summary-article-number))) | |
8028 (zerop (gnus-summary-next-subject (if backward -1 1) nil t))) | |
8029 (setq n (1- n))) | |
8030 (when (/= 0 n) | |
8031 (gnus-message 7 "No more articles")) | |
8032 (gnus-summary-recenter) | |
8033 (gnus-summary-position-point) | |
8034 n)) | |
8035 | |
8036 (defun gnus-summary-unmark-as-processable (n) | |
8037 "Remove the process mark from the next N articles. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8038 If N is negative, unmark backward instead. The difference between N and |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8039 the actual number of articles unmarked is returned." |
17493 | 8040 (interactive "p") |
8041 (gnus-summary-mark-as-processable n t)) | |
8042 | |
8043 (defun gnus-summary-unmark-all-processable () | |
8044 "Remove the process mark from all articles." | |
8045 (interactive) | |
8046 (save-excursion | |
8047 (while gnus-newsgroup-processable | |
8048 (gnus-summary-remove-process-mark (car gnus-newsgroup-processable)))) | |
8049 (gnus-summary-position-point)) | |
8050 | |
8051 (defun gnus-summary-mark-as-expirable (n) | |
8052 "Mark N articles forward as expirable. | |
8053 If N is negative, mark backward instead. The difference between N and | |
8054 the actual number of articles marked is returned." | |
8055 (interactive "p") | |
8056 (gnus-summary-mark-forward n gnus-expirable-mark)) | |
8057 | |
8058 (defun gnus-summary-mark-article-as-replied (article) | |
8059 "Mark ARTICLE replied and update the summary line." | |
8060 (push article gnus-newsgroup-replied) | |
8061 (let ((buffer-read-only nil)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8062 (when (gnus-summary-goto-subject article nil t) |
17493 | 8063 (gnus-summary-update-secondary-mark article)))) |
8064 | |
8065 (defun gnus-summary-set-bookmark (article) | |
8066 "Set a bookmark in current article." | |
8067 (interactive (list (gnus-summary-article-number))) | |
8068 (when (or (not (get-buffer gnus-article-buffer)) | |
8069 (not gnus-current-article) | |
8070 (not gnus-article-current) | |
8071 (not (equal gnus-newsgroup-name (car gnus-article-current)))) | |
8072 (error "No current article selected")) | |
8073 ;; Remove old bookmark, if one exists. | |
8074 (let ((old (assq article gnus-newsgroup-bookmarks))) | |
8075 (when old | |
8076 (setq gnus-newsgroup-bookmarks | |
8077 (delq old gnus-newsgroup-bookmarks)))) | |
8078 ;; Set the new bookmark, which is on the form | |
8079 ;; (article-number . line-number-in-body). | |
8080 (push | |
8081 (cons article | |
8082 (save-excursion | |
8083 (set-buffer gnus-article-buffer) | |
8084 (count-lines | |
8085 (min (point) | |
8086 (save-excursion | |
8087 (goto-char (point-min)) | |
8088 (search-forward "\n\n" nil t) | |
8089 (point))) | |
8090 (point)))) | |
8091 gnus-newsgroup-bookmarks) | |
8092 (gnus-message 6 "A bookmark has been added to the current article.")) | |
8093 | |
8094 (defun gnus-summary-remove-bookmark (article) | |
8095 "Remove the bookmark from the current article." | |
8096 (interactive (list (gnus-summary-article-number))) | |
8097 ;; Remove old bookmark, if one exists. | |
8098 (let ((old (assq article gnus-newsgroup-bookmarks))) | |
8099 (if old | |
8100 (progn | |
8101 (setq gnus-newsgroup-bookmarks | |
8102 (delq old gnus-newsgroup-bookmarks)) | |
8103 (gnus-message 6 "Removed bookmark.")) | |
8104 (gnus-message 6 "No bookmark in current article.")))) | |
8105 | |
8106 ;; Suggested by Daniel Quinlan <quinlan@best.com>. | |
8107 (defun gnus-summary-mark-as-dormant (n) | |
8108 "Mark N articles forward as dormant. | |
8109 If N is negative, mark backward instead. The difference between N and | |
8110 the actual number of articles marked is returned." | |
8111 (interactive "p") | |
8112 (gnus-summary-mark-forward n gnus-dormant-mark)) | |
8113 | |
8114 (defun gnus-summary-set-process-mark (article) | |
8115 "Set the process mark on ARTICLE and update the summary line." | |
8116 (setq gnus-newsgroup-processable | |
8117 (cons article | |
8118 (delq article gnus-newsgroup-processable))) | |
8119 (when (gnus-summary-goto-subject article) | |
8120 (gnus-summary-show-thread) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8121 (gnus-summary-goto-subject article) |
17493 | 8122 (gnus-summary-update-secondary-mark article))) |
8123 | |
8124 (defun gnus-summary-remove-process-mark (article) | |
8125 "Remove the process mark from ARTICLE and update the summary line." | |
8126 (setq gnus-newsgroup-processable (delq article gnus-newsgroup-processable)) | |
8127 (when (gnus-summary-goto-subject article) | |
8128 (gnus-summary-show-thread) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8129 (gnus-summary-goto-subject article) |
17493 | 8130 (gnus-summary-update-secondary-mark article))) |
8131 | |
8132 (defun gnus-summary-set-saved-mark (article) | |
8133 "Set the process mark on ARTICLE and update the summary line." | |
8134 (push article gnus-newsgroup-saved) | |
8135 (when (gnus-summary-goto-subject article) | |
8136 (gnus-summary-update-secondary-mark article))) | |
8137 | |
8138 (defun gnus-summary-mark-forward (n &optional mark no-expire) | |
8139 "Mark N articles as read forwards. | |
8140 If N is negative, mark backwards instead. Mark with MARK, ?r by default. | |
8141 The difference between N and the actual number of articles marked is | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8142 returned. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8143 Iff NO-EXPIRE, auto-expiry will be inhibited." |
17493 | 8144 (interactive "p") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8145 (gnus-summary-show-thread) |
17493 | 8146 (let ((backward (< n 0)) |
8147 (gnus-summary-goto-unread | |
8148 (and gnus-summary-goto-unread | |
8149 (not (eq gnus-summary-goto-unread 'never)) | |
8150 (not (memq mark (list gnus-unread-mark | |
8151 gnus-ticked-mark gnus-dormant-mark))))) | |
8152 (n (abs n)) | |
8153 (mark (or mark gnus-del-mark))) | |
8154 (while (and (> n 0) | |
8155 (gnus-summary-mark-article nil mark no-expire) | |
8156 (zerop (gnus-summary-next-subject | |
8157 (if backward -1 1) | |
8158 (and gnus-summary-goto-unread | |
8159 (not (eq gnus-summary-goto-unread 'never))) | |
8160 t))) | |
8161 (setq n (1- n))) | |
8162 (when (/= 0 n) | |
8163 (gnus-message 7 "No more %sarticles" (if mark "" "unread "))) | |
8164 (gnus-summary-recenter) | |
8165 (gnus-summary-position-point) | |
8166 (gnus-set-mode-line 'summary) | |
8167 n)) | |
8168 | |
8169 (defun gnus-summary-mark-article-as-read (mark) | |
8170 "Mark the current article quickly as read with MARK." | |
8171 (let ((article (gnus-summary-article-number))) | |
8172 (setq gnus-newsgroup-unreads (delq article gnus-newsgroup-unreads)) | |
8173 (setq gnus-newsgroup-marked (delq article gnus-newsgroup-marked)) | |
8174 (setq gnus-newsgroup-dormant (delq article gnus-newsgroup-dormant)) | |
8175 (push (cons article mark) gnus-newsgroup-reads) | |
8176 ;; Possibly remove from cache, if that is used. | |
8177 (when gnus-use-cache | |
8178 (gnus-cache-enter-remove-article article)) | |
8179 ;; Allow the backend to change the mark. | |
8180 (setq mark (gnus-request-update-mark gnus-newsgroup-name article mark)) | |
8181 ;; Check for auto-expiry. | |
8182 (when (and gnus-newsgroup-auto-expire | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8183 (memq mark gnus-auto-expirable-marks)) |
17493 | 8184 (setq mark gnus-expirable-mark) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8185 ;; Let the backend know about the mark change. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8186 (setq mark (gnus-request-update-mark gnus-newsgroup-name article mark)) |
17493 | 8187 (push article gnus-newsgroup-expirable)) |
8188 ;; Set the mark in the buffer. | |
8189 (gnus-summary-update-mark mark 'unread) | |
8190 t)) | |
8191 | |
8192 (defun gnus-summary-mark-article-as-unread (mark) | |
8193 "Mark the current article quickly as unread with MARK." | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8194 (let* ((article (gnus-summary-article-number)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8195 (old-mark (gnus-summary-article-mark article))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8196 ;; Allow the backend to change the mark. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8197 (setq mark (gnus-request-update-mark gnus-newsgroup-name article mark)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8198 (if (eq mark old-mark) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8199 t |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8200 (if (<= article 0) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8201 (progn |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8202 (gnus-error 1 "Can't mark negative article numbers") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8203 nil) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8204 (setq gnus-newsgroup-marked (delq article gnus-newsgroup-marked)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8205 (setq gnus-newsgroup-dormant (delq article gnus-newsgroup-dormant)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8206 (setq gnus-newsgroup-expirable (delq article gnus-newsgroup-expirable)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8207 (setq gnus-newsgroup-reads (delq article gnus-newsgroup-reads)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8208 (cond ((= mark gnus-ticked-mark) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8209 (push article gnus-newsgroup-marked)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8210 ((= mark gnus-dormant-mark) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8211 (push article gnus-newsgroup-dormant)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8212 (t |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8213 (push article gnus-newsgroup-unreads))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8214 (gnus-pull article gnus-newsgroup-reads) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8215 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8216 ;; See whether the article is to be put in the cache. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8217 (and gnus-use-cache |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8218 (vectorp (gnus-summary-article-header article)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8219 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8220 (gnus-cache-possibly-enter-article |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8221 gnus-newsgroup-name article |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8222 (= mark gnus-ticked-mark) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8223 (= mark gnus-dormant-mark) (= mark gnus-unread-mark)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8224 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8225 ;; Fix the mark. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8226 (gnus-summary-update-mark mark 'unread) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8227 t)))) |
17493 | 8228 |
8229 (defun gnus-summary-mark-article (&optional article mark no-expire) | |
8230 "Mark ARTICLE with MARK. MARK can be any character. | |
8231 Four MARK strings are reserved: `? ' (unread), `?!' (ticked), | |
8232 `??' (dormant) and `?E' (expirable). | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8233 If MARK is nil, then the default character `?r' is used. |
17493 | 8234 If ARTICLE is nil, then the article on the current line will be |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8235 marked. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8236 Iff NO-EXPIRE, auto-expiry will be inhibited." |
17493 | 8237 ;; The mark might be a string. |
8238 (when (stringp mark) | |
8239 (setq mark (aref mark 0))) | |
8240 ;; If no mark is given, then we check auto-expiring. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8241 (when (null mark) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8242 (setq mark gnus-del-mark)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8243 (when (and (not no-expire) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8244 gnus-newsgroup-auto-expire |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8245 (memq mark gnus-auto-expirable-marks)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8246 (setq mark gnus-expirable-mark)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8247 (let ((article (or article (gnus-summary-article-number))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8248 (old-mark (gnus-summary-article-mark article))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8249 ;; Allow the backend to change the mark. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8250 (setq mark (gnus-request-update-mark gnus-newsgroup-name article mark)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8251 (if (eq mark old-mark) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8252 t |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8253 (unless article |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8254 (error "No article on current line")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8255 (if (not (if (or (= mark gnus-unread-mark) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8256 (= mark gnus-ticked-mark) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8257 (= mark gnus-dormant-mark)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8258 (gnus-mark-article-as-unread article mark) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8259 (gnus-mark-article-as-read article mark))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8260 t |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8261 ;; See whether the article is to be put in the cache. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8262 (and gnus-use-cache |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8263 (not (= mark gnus-canceled-mark)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8264 (vectorp (gnus-summary-article-header article)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8265 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8266 (gnus-cache-possibly-enter-article |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8267 gnus-newsgroup-name article |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8268 (= mark gnus-ticked-mark) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8269 (= mark gnus-dormant-mark) (= mark gnus-unread-mark)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8270 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8271 (when (gnus-summary-goto-subject article nil t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8272 (let ((buffer-read-only nil)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8273 (gnus-summary-show-thread) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8274 ;; Fix the mark. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8275 (gnus-summary-update-mark mark 'unread) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8276 t)))))) |
17493 | 8277 |
8278 (defun gnus-summary-update-secondary-mark (article) | |
8279 "Update the secondary (read, process, cache) mark." | |
8280 (gnus-summary-update-mark | |
8281 (cond ((memq article gnus-newsgroup-processable) | |
8282 gnus-process-mark) | |
8283 ((memq article gnus-newsgroup-cached) | |
8284 gnus-cached-mark) | |
8285 ((memq article gnus-newsgroup-replied) | |
8286 gnus-replied-mark) | |
8287 ((memq article gnus-newsgroup-saved) | |
8288 gnus-saved-mark) | |
8289 (t gnus-unread-mark)) | |
8290 'replied) | |
8291 (when (gnus-visual-p 'summary-highlight 'highlight) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8292 (gnus-run-hooks 'gnus-summary-update-hook)) |
17493 | 8293 t) |
8294 | |
8295 (defun gnus-summary-update-mark (mark type) | |
8296 (let ((forward (cdr (assq type gnus-summary-mark-positions))) | |
8297 (buffer-read-only nil)) | |
8298 (re-search-backward "[\n\r]" (gnus-point-at-bol) 'move-to-limit) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8299 (when forward |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8300 (when (looking-at "\r") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8301 (incf forward)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8302 (when (<= (+ forward (point)) (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8303 ;; Go to the right position on the line. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8304 (goto-char (+ forward (point))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8305 ;; Replace the old mark with the new mark. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8306 (subst-char-in-region (point) (1+ (point)) (char-after) mark) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8307 ;; Optionally update the marks by some user rule. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8308 (when (eq type 'unread) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8309 (gnus-data-set-mark |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8310 (gnus-data-find (gnus-summary-article-number)) mark) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8311 (gnus-summary-update-line (eq mark gnus-unread-mark))))))) |
17493 | 8312 |
8313 (defun gnus-mark-article-as-read (article &optional mark) | |
8314 "Enter ARTICLE in the pertinent lists and remove it from others." | |
8315 ;; Make the article expirable. | |
8316 (let ((mark (or mark gnus-del-mark))) | |
8317 (if (= mark gnus-expirable-mark) | |
8318 (push article gnus-newsgroup-expirable) | |
8319 (setq gnus-newsgroup-expirable (delq article gnus-newsgroup-expirable))) | |
8320 ;; Remove from unread and marked lists. | |
8321 (setq gnus-newsgroup-unreads (delq article gnus-newsgroup-unreads)) | |
8322 (setq gnus-newsgroup-marked (delq article gnus-newsgroup-marked)) | |
8323 (setq gnus-newsgroup-dormant (delq article gnus-newsgroup-dormant)) | |
8324 (push (cons article mark) gnus-newsgroup-reads) | |
8325 ;; Possibly remove from cache, if that is used. | |
8326 (when gnus-use-cache | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8327 (gnus-cache-enter-remove-article article)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8328 t)) |
17493 | 8329 |
8330 (defun gnus-mark-article-as-unread (article &optional mark) | |
8331 "Enter ARTICLE in the pertinent lists and remove it from others." | |
8332 (let ((mark (or mark gnus-ticked-mark))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8333 (if (<= article 0) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8334 (progn |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8335 (gnus-error 1 "Can't mark negative article numbers") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8336 nil) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8337 (setq gnus-newsgroup-marked (delq article gnus-newsgroup-marked) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8338 gnus-newsgroup-dormant (delq article gnus-newsgroup-dormant) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8339 gnus-newsgroup-expirable (delq article gnus-newsgroup-expirable) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8340 gnus-newsgroup-unreads (delq article gnus-newsgroup-unreads)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8341 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8342 ;; Unsuppress duplicates? |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8343 (when gnus-suppress-duplicates |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8344 (gnus-dup-unsuppress-article article)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8345 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8346 (cond ((= mark gnus-ticked-mark) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8347 (push article gnus-newsgroup-marked)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8348 ((= mark gnus-dormant-mark) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8349 (push article gnus-newsgroup-dormant)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8350 (t |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8351 (push article gnus-newsgroup-unreads))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8352 (gnus-pull article gnus-newsgroup-reads) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8353 t))) |
17493 | 8354 |
8355 (defalias 'gnus-summary-mark-as-unread-forward | |
8356 'gnus-summary-tick-article-forward) | |
8357 (make-obsolete 'gnus-summary-mark-as-unread-forward | |
8358 'gnus-summary-tick-article-forward) | |
8359 (defun gnus-summary-tick-article-forward (n) | |
8360 "Tick N articles forwards. | |
8361 If N is negative, tick backwards instead. | |
8362 The difference between N and the number of articles ticked is returned." | |
8363 (interactive "p") | |
8364 (gnus-summary-mark-forward n gnus-ticked-mark)) | |
8365 | |
8366 (defalias 'gnus-summary-mark-as-unread-backward | |
8367 'gnus-summary-tick-article-backward) | |
8368 (make-obsolete 'gnus-summary-mark-as-unread-backward | |
8369 'gnus-summary-tick-article-backward) | |
8370 (defun gnus-summary-tick-article-backward (n) | |
8371 "Tick N articles backwards. | |
8372 The difference between N and the number of articles ticked is returned." | |
8373 (interactive "p") | |
8374 (gnus-summary-mark-forward (- n) gnus-ticked-mark)) | |
8375 | |
8376 (defalias 'gnus-summary-mark-as-unread 'gnus-summary-tick-article) | |
8377 (make-obsolete 'gnus-summary-mark-as-unread 'gnus-summary-tick-article) | |
8378 (defun gnus-summary-tick-article (&optional article clear-mark) | |
8379 "Mark current article as unread. | |
8380 Optional 1st argument ARTICLE specifies article number to be marked as unread. | |
8381 Optional 2nd argument CLEAR-MARK remove any kinds of mark." | |
8382 (interactive) | |
8383 (gnus-summary-mark-article article (if clear-mark gnus-unread-mark | |
8384 gnus-ticked-mark))) | |
8385 | |
8386 (defun gnus-summary-mark-as-read-forward (n) | |
8387 "Mark N articles as read forwards. | |
8388 If N is negative, mark backwards instead. | |
8389 The difference between N and the actual number of articles marked is | |
8390 returned." | |
8391 (interactive "p") | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8392 (gnus-summary-mark-forward n gnus-del-mark gnus-inhibit-user-auto-expire)) |
17493 | 8393 |
8394 (defun gnus-summary-mark-as-read-backward (n) | |
8395 "Mark the N articles as read backwards. | |
8396 The difference between N and the actual number of articles marked is | |
8397 returned." | |
8398 (interactive "p") | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8399 (gnus-summary-mark-forward |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8400 (- n) gnus-del-mark gnus-inhibit-user-auto-expire)) |
17493 | 8401 |
8402 (defun gnus-summary-mark-as-read (&optional article mark) | |
8403 "Mark current article as read. | |
8404 ARTICLE specifies the article to be marked as read. | |
8405 MARK specifies a string to be inserted at the beginning of the line." | |
8406 (gnus-summary-mark-article article mark)) | |
8407 | |
8408 (defun gnus-summary-clear-mark-forward (n) | |
8409 "Clear marks from N articles forward. | |
8410 If N is negative, clear backward instead. | |
8411 The difference between N and the number of marks cleared is returned." | |
8412 (interactive "p") | |
8413 (gnus-summary-mark-forward n gnus-unread-mark)) | |
8414 | |
8415 (defun gnus-summary-clear-mark-backward (n) | |
8416 "Clear marks from N articles backward. | |
8417 The difference between N and the number of marks cleared is returned." | |
8418 (interactive "p") | |
8419 (gnus-summary-mark-forward (- n) gnus-unread-mark)) | |
8420 | |
8421 (defun gnus-summary-mark-unread-as-read () | |
8422 "Intended to be used by `gnus-summary-mark-article-hook'." | |
8423 (when (memq gnus-current-article gnus-newsgroup-unreads) | |
8424 (gnus-summary-mark-article gnus-current-article gnus-read-mark))) | |
8425 | |
8426 (defun gnus-summary-mark-read-and-unread-as-read () | |
8427 "Intended to be used by `gnus-summary-mark-article-hook'." | |
8428 (let ((mark (gnus-summary-article-mark))) | |
8429 (when (or (gnus-unread-mark-p mark) | |
8430 (gnus-read-mark-p mark)) | |
8431 (gnus-summary-mark-article gnus-current-article gnus-read-mark)))) | |
8432 | |
8433 (defun gnus-summary-mark-region-as-read (point mark all) | |
8434 "Mark all unread articles between point and mark as read. | |
8435 If given a prefix, mark all articles between point and mark as read, | |
8436 even ticked and dormant ones." | |
8437 (interactive "r\nP") | |
8438 (save-excursion | |
8439 (let (article) | |
8440 (goto-char point) | |
8441 (beginning-of-line) | |
8442 (while (and | |
8443 (< (point) mark) | |
8444 (progn | |
8445 (when (or all | |
8446 (memq (setq article (gnus-summary-article-number)) | |
8447 gnus-newsgroup-unreads)) | |
8448 (gnus-summary-mark-article article gnus-del-mark)) | |
8449 t) | |
8450 (gnus-summary-find-next)))))) | |
8451 | |
8452 (defun gnus-summary-mark-below (score mark) | |
8453 "Mark articles with score less than SCORE with MARK." | |
8454 (interactive "P\ncMark: ") | |
8455 (setq score (if score | |
8456 (prefix-numeric-value score) | |
8457 (or gnus-summary-default-score 0))) | |
8458 (save-excursion | |
8459 (set-buffer gnus-summary-buffer) | |
8460 (goto-char (point-min)) | |
8461 (while | |
8462 (progn | |
8463 (and (< (gnus-summary-article-score) score) | |
8464 (gnus-summary-mark-article nil mark)) | |
8465 (gnus-summary-find-next))))) | |
8466 | |
8467 (defun gnus-summary-kill-below (&optional score) | |
8468 "Mark articles with score below SCORE as read." | |
8469 (interactive "P") | |
8470 (gnus-summary-mark-below score gnus-killed-mark)) | |
8471 | |
8472 (defun gnus-summary-clear-above (&optional score) | |
8473 "Clear all marks from articles with score above SCORE." | |
8474 (interactive "P") | |
8475 (gnus-summary-mark-above score gnus-unread-mark)) | |
8476 | |
8477 (defun gnus-summary-tick-above (&optional score) | |
8478 "Tick all articles with score above SCORE." | |
8479 (interactive "P") | |
8480 (gnus-summary-mark-above score gnus-ticked-mark)) | |
8481 | |
8482 (defun gnus-summary-mark-above (score mark) | |
8483 "Mark articles with score over SCORE with MARK." | |
8484 (interactive "P\ncMark: ") | |
8485 (setq score (if score | |
8486 (prefix-numeric-value score) | |
8487 (or gnus-summary-default-score 0))) | |
8488 (save-excursion | |
8489 (set-buffer gnus-summary-buffer) | |
8490 (goto-char (point-min)) | |
8491 (while (and (progn | |
8492 (when (> (gnus-summary-article-score) score) | |
8493 (gnus-summary-mark-article nil mark)) | |
8494 t) | |
8495 (gnus-summary-find-next))))) | |
8496 | |
8497 ;; Suggested by Daniel Quinlan <quinlan@best.com>. | |
8498 (defalias 'gnus-summary-show-all-expunged 'gnus-summary-limit-include-expunged) | |
8499 (defun gnus-summary-limit-include-expunged (&optional no-error) | |
8500 "Display all the hidden articles that were expunged for low scores." | |
8501 (interactive) | |
8502 (let ((buffer-read-only nil)) | |
8503 (let ((scored gnus-newsgroup-scored) | |
8504 headers h) | |
8505 (while scored | |
8506 (unless (gnus-summary-goto-subject (caar scored)) | |
8507 (and (setq h (gnus-summary-article-header (caar scored))) | |
8508 (< (cdar scored) gnus-summary-expunge-below) | |
8509 (push h headers))) | |
8510 (setq scored (cdr scored))) | |
8511 (if (not headers) | |
8512 (when (not no-error) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
8513 (error "No expunged articles hidden")) |
17493 | 8514 (goto-char (point-min)) |
8515 (gnus-summary-prepare-unthreaded (nreverse headers)) | |
8516 (goto-char (point-min)) | |
8517 (gnus-summary-position-point) | |
8518 t)))) | |
8519 | |
8520 (defun gnus-summary-catchup (&optional all quietly to-here not-mark) | |
8521 "Mark all unread articles in this newsgroup as read. | |
8522 If prefix argument ALL is non-nil, ticked and dormant articles will | |
8523 also be marked as read. | |
8524 If QUIETLY is non-nil, no questions will be asked. | |
8525 If TO-HERE is non-nil, it should be a point in the buffer. All | |
8526 articles before this point will be marked as read. | |
8527 Note that this function will only catch up the unread article | |
8528 in the current summary buffer limitation. | |
8529 The number of articles marked as read is returned." | |
8530 (interactive "P") | |
8531 (prog1 | |
8532 (save-excursion | |
8533 (when (or quietly | |
8534 (not gnus-interactive-catchup) ;Without confirmation? | |
8535 gnus-expert-user | |
8536 (gnus-y-or-n-p | |
8537 (if all | |
8538 "Mark absolutely all articles as read? " | |
8539 "Mark all unread articles as read? "))) | |
8540 (if (and not-mark | |
8541 (not gnus-newsgroup-adaptive) | |
8542 (not gnus-newsgroup-auto-expire) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
8543 (not gnus-suppress-duplicates) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
8544 (or (not gnus-use-cache) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8545 (eq gnus-use-cache 'passive))) |
17493 | 8546 (progn |
8547 (when all | |
8548 (setq gnus-newsgroup-marked nil | |
8549 gnus-newsgroup-dormant nil)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8550 (setq gnus-newsgroup-unreads gnus-newsgroup-downloadable)) |
17493 | 8551 ;; We actually mark all articles as canceled, which we |
8552 ;; have to do when using auto-expiry or adaptive scoring. | |
8553 (gnus-summary-show-all-threads) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8554 (when (gnus-summary-first-subject (not all) t) |
17493 | 8555 (while (and |
8556 (if to-here (< (point) to-here) t) | |
8557 (gnus-summary-mark-article-as-read gnus-catchup-mark) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8558 (gnus-summary-find-next (not all) nil nil t)))) |
17493 | 8559 (gnus-set-mode-line 'summary)) |
8560 t)) | |
8561 (gnus-summary-position-point))) | |
8562 | |
8563 (defun gnus-summary-catchup-to-here (&optional all) | |
8564 "Mark all unticked articles before the current one as read. | |
8565 If ALL is non-nil, also mark ticked and dormant articles as read." | |
8566 (interactive "P") | |
8567 (save-excursion | |
8568 (gnus-save-hidden-threads | |
8569 (let ((beg (point))) | |
8570 ;; We check that there are unread articles. | |
8571 (when (or all (gnus-summary-find-prev)) | |
8572 (gnus-summary-catchup all t beg))))) | |
8573 (gnus-summary-position-point)) | |
8574 | |
8575 (defun gnus-summary-catchup-all (&optional quietly) | |
8576 "Mark all articles in this newsgroup as read." | |
8577 (interactive "P") | |
8578 (gnus-summary-catchup t quietly)) | |
8579 | |
8580 (defun gnus-summary-catchup-and-exit (&optional all quietly) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8581 "Mark all unread articles in this group as read, then exit. |
17493 | 8582 If prefix argument ALL is non-nil, all articles are marked as read." |
8583 (interactive "P") | |
8584 (when (gnus-summary-catchup all quietly nil 'fast) | |
8585 ;; Select next newsgroup or exit. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8586 (if (and (not (gnus-group-quit-config gnus-newsgroup-name)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8587 (eq gnus-auto-select-next 'quietly)) |
17493 | 8588 (gnus-summary-next-group nil) |
8589 (gnus-summary-exit)))) | |
8590 | |
8591 (defun gnus-summary-catchup-all-and-exit (&optional quietly) | |
8592 "Mark all articles in this newsgroup as read, and then exit." | |
8593 (interactive "P") | |
8594 (gnus-summary-catchup-and-exit t quietly)) | |
8595 | |
8596 (defun gnus-summary-catchup-and-goto-next-group (&optional all) | |
8597 "Mark all articles in this group as read and select the next group. | |
8598 If given a prefix, mark all articles, unread as well as ticked, as | |
8599 read." | |
8600 (interactive "P") | |
8601 (save-excursion | |
8602 (gnus-summary-catchup all)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8603 (gnus-summary-next-group)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8604 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8605 ;;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8606 ;;; with article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8607 ;;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8608 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8609 (defmacro gnus-with-article (article &rest forms) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8610 "Select ARTICLE and perform FORMS in the original article buffer. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8611 Then replace the article with the result." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8612 `(progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8613 ;; We don't want the article to be marked as read. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8614 (let (gnus-mark-article-hook) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8615 (gnus-summary-select-article t t nil ,article)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8616 (set-buffer gnus-original-article-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8617 ,@forms |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8618 (if (not (gnus-check-backend-function |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8619 'request-replace-article (car gnus-article-current))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8620 (gnus-message 5 "Read-only group; not replacing") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8621 (unless (gnus-request-replace-article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8622 ,article (car gnus-article-current) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8623 (current-buffer) t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8624 (error "Couldn't replace article"))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8625 ;; The cache and backlog have to be flushed somewhat. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8626 (when gnus-keep-backlog |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8627 (gnus-backlog-remove-article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8628 (car gnus-article-current) (cdr gnus-article-current))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8629 (when gnus-use-cache |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8630 (gnus-cache-update-article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8631 (car gnus-article-current) (cdr gnus-article-current))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8632 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8633 (put 'gnus-with-article 'lisp-indent-function 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8634 (put 'gnus-with-article 'edebug-form-spec '(form body)) |
17493 | 8635 |
8636 ;; Thread-based commands. | |
8637 | |
8638 (defun gnus-summary-articles-in-thread (&optional article) | |
8639 "Return a list of all articles in the current thread. | |
8640 If ARTICLE is non-nil, return all articles in the thread that starts | |
8641 with that article." | |
8642 (let* ((article (or article (gnus-summary-article-number))) | |
8643 (data (gnus-data-find-list article)) | |
8644 (top-level (gnus-data-level (car data))) | |
8645 (top-subject | |
8646 (cond ((null gnus-thread-operation-ignore-subject) | |
8647 (gnus-simplify-subject-re | |
8648 (mail-header-subject (gnus-data-header (car data))))) | |
8649 ((eq gnus-thread-operation-ignore-subject 'fuzzy) | |
8650 (gnus-simplify-subject-fuzzy | |
8651 (mail-header-subject (gnus-data-header (car data))))) | |
8652 (t nil))) | |
8653 (end-point (save-excursion | |
8654 (if (gnus-summary-go-to-next-thread) | |
8655 (point) (point-max)))) | |
8656 articles) | |
8657 (while (and data | |
8658 (< (gnus-data-pos (car data)) end-point)) | |
8659 (when (or (not top-subject) | |
8660 (string= top-subject | |
8661 (if (eq gnus-thread-operation-ignore-subject 'fuzzy) | |
8662 (gnus-simplify-subject-fuzzy | |
8663 (mail-header-subject | |
8664 (gnus-data-header (car data)))) | |
8665 (gnus-simplify-subject-re | |
8666 (mail-header-subject | |
8667 (gnus-data-header (car data))))))) | |
8668 (push (gnus-data-number (car data)) articles)) | |
8669 (unless (and (setq data (cdr data)) | |
8670 (> (gnus-data-level (car data)) top-level)) | |
8671 (setq data nil))) | |
8672 ;; Return the list of articles. | |
8673 (nreverse articles))) | |
8674 | |
8675 (defun gnus-summary-rethread-current () | |
8676 "Rethread the thread the current article is part of." | |
8677 (interactive) | |
8678 (let* ((gnus-show-threads t) | |
8679 (article (gnus-summary-article-number)) | |
8680 (id (mail-header-id (gnus-summary-article-header))) | |
8681 (gnus-newsgroup-threads (list (gnus-id-to-thread (gnus-root-id id))))) | |
8682 (unless id | |
8683 (error "No article on the current line")) | |
8684 (gnus-rebuild-thread id) | |
8685 (gnus-summary-goto-subject article))) | |
8686 | |
8687 (defun gnus-summary-reparent-thread () | |
8688 "Make the current article child of the marked (or previous) article. | |
8689 | |
8690 Note that the re-threading will only work if `gnus-thread-ignore-subject' | |
8691 is non-nil or the Subject: of both articles are the same." | |
8692 (interactive) | |
8693 (unless (not (gnus-group-read-only-p)) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
8694 (error "The current newsgroup does not support article editing")) |
17493 | 8695 (unless (<= (length gnus-newsgroup-processable) 1) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
8696 (error "No more than one article may be marked")) |
17493 | 8697 (save-window-excursion |
8698 (let ((gnus-article-buffer " *reparent*") | |
8699 (current-article (gnus-summary-article-number)) | |
8700 ;; First grab the marked article, otherwise one line up. | |
8701 (parent-article (if (not (null gnus-newsgroup-processable)) | |
8702 (car gnus-newsgroup-processable) | |
8703 (save-excursion | |
8704 (if (eq (forward-line -1) 0) | |
8705 (gnus-summary-article-number) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
8706 (error "Beginning of summary buffer")))))) |
17493 | 8707 (unless (not (eq current-article parent-article)) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
8708 (error "An article may not be self-referential")) |
17493 | 8709 (let ((message-id (mail-header-id |
8710 (gnus-summary-article-header parent-article)))) | |
8711 (unless (and message-id (not (equal message-id ""))) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
8712 (error "No message-id in desired parent")) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8713 (gnus-with-article current-article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8714 (save-restriction |
17493 | 8715 (goto-char (point-min)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8716 (message-narrow-to-head) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8717 (if (re-search-forward "^References: " nil t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8718 (progn |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8719 (re-search-forward "^[^ \t]" nil t) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8720 (forward-line -1) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8721 (end-of-line) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8722 (insert " " message-id)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8723 (insert "References: " message-id "\n")))) |
17493 | 8724 (set-buffer gnus-summary-buffer) |
8725 (gnus-summary-unmark-all-processable) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
8726 (gnus-summary-update-article current-article) |
17493 | 8727 (gnus-summary-rethread-current) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
8728 (gnus-message 3 "Article %d is now the child of article %d" |
17493 | 8729 current-article parent-article))))) |
8730 | |
8731 (defun gnus-summary-toggle-threads (&optional arg) | |
8732 "Toggle showing conversation threads. | |
8733 If ARG is positive number, turn showing conversation threads on." | |
8734 (interactive "P") | |
8735 (let ((current (or (gnus-summary-article-number) gnus-newsgroup-end))) | |
8736 (setq gnus-show-threads | |
8737 (if (null arg) (not gnus-show-threads) | |
8738 (> (prefix-numeric-value arg) 0))) | |
8739 (gnus-summary-prepare) | |
8740 (gnus-summary-goto-subject current) | |
8741 (gnus-message 6 "Threading is now %s" (if gnus-show-threads "on" "off")) | |
8742 (gnus-summary-position-point))) | |
8743 | |
8744 (defun gnus-summary-show-all-threads () | |
8745 "Show all threads." | |
8746 (interactive) | |
8747 (save-excursion | |
8748 (let ((buffer-read-only nil)) | |
8749 (subst-char-in-region (point-min) (point-max) ?\^M ?\n t))) | |
8750 (gnus-summary-position-point)) | |
8751 | |
8752 (defun gnus-summary-show-thread () | |
8753 "Show thread subtrees. | |
8754 Returns nil if no thread was there to be shown." | |
8755 (interactive) | |
8756 (let ((buffer-read-only nil) | |
8757 (orig (point)) | |
8758 ;; first goto end then to beg, to have point at beg after let | |
8759 (end (progn (end-of-line) (point))) | |
8760 (beg (progn (beginning-of-line) (point)))) | |
8761 (prog1 | |
8762 ;; Any hidden lines here? | |
8763 (search-forward "\r" end t) | |
8764 (subst-char-in-region beg end ?\^M ?\n t) | |
8765 (goto-char orig) | |
8766 (gnus-summary-position-point)))) | |
8767 | |
8768 (defun gnus-summary-hide-all-threads () | |
8769 "Hide all thread subtrees." | |
8770 (interactive) | |
8771 (save-excursion | |
8772 (goto-char (point-min)) | |
8773 (gnus-summary-hide-thread) | |
8774 (while (zerop (gnus-summary-next-thread 1 t)) | |
8775 (gnus-summary-hide-thread))) | |
8776 (gnus-summary-position-point)) | |
8777 | |
8778 (defun gnus-summary-hide-thread () | |
8779 "Hide thread subtrees. | |
8780 Returns nil if no threads were there to be hidden." | |
8781 (interactive) | |
8782 (let ((buffer-read-only nil) | |
8783 (start (point)) | |
8784 (article (gnus-summary-article-number))) | |
8785 (goto-char start) | |
8786 ;; Go forward until either the buffer ends or the subthread | |
8787 ;; ends. | |
8788 (when (and (not (eobp)) | |
8789 (or (zerop (gnus-summary-next-thread 1 t)) | |
8790 (goto-char (point-max)))) | |
8791 (prog1 | |
8792 (if (and (> (point) start) | |
8793 (search-backward "\n" start t)) | |
8794 (progn | |
8795 (subst-char-in-region start (point) ?\n ?\^M) | |
8796 (gnus-summary-goto-subject article)) | |
8797 (goto-char start) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8798 nil))))) |
17493 | 8799 |
8800 (defun gnus-summary-go-to-next-thread (&optional previous) | |
8801 "Go to the same level (or less) next thread. | |
8802 If PREVIOUS is non-nil, go to previous thread instead. | |
8803 Return the article number moved to, or nil if moving was impossible." | |
8804 (let ((level (gnus-summary-thread-level)) | |
8805 (way (if previous -1 1)) | |
8806 (beg (point))) | |
8807 (forward-line way) | |
8808 (while (and (not (eobp)) | |
8809 (< level (gnus-summary-thread-level))) | |
8810 (forward-line way)) | |
8811 (if (eobp) | |
8812 (progn | |
8813 (goto-char beg) | |
8814 nil) | |
8815 (setq beg (point)) | |
8816 (prog1 | |
8817 (gnus-summary-article-number) | |
8818 (goto-char beg))))) | |
8819 | |
8820 (defun gnus-summary-next-thread (n &optional silent) | |
8821 "Go to the same level next N'th thread. | |
8822 If N is negative, search backward instead. | |
8823 Returns the difference between N and the number of skips actually | |
8824 done. | |
8825 | |
8826 If SILENT, don't output messages." | |
8827 (interactive "p") | |
8828 (let ((backward (< n 0)) | |
8829 (n (abs n))) | |
8830 (while (and (> n 0) | |
8831 (gnus-summary-go-to-next-thread backward)) | |
8832 (decf n)) | |
8833 (unless silent | |
8834 (gnus-summary-position-point)) | |
8835 (when (and (not silent) (/= 0 n)) | |
8836 (gnus-message 7 "No more threads")) | |
8837 n)) | |
8838 | |
8839 (defun gnus-summary-prev-thread (n) | |
8840 "Go to the same level previous N'th thread. | |
8841 Returns the difference between N and the number of skips actually | |
8842 done." | |
8843 (interactive "p") | |
8844 (gnus-summary-next-thread (- n))) | |
8845 | |
8846 (defun gnus-summary-go-down-thread () | |
8847 "Go down one level in the current thread." | |
8848 (let ((children (gnus-summary-article-children))) | |
8849 (when children | |
8850 (gnus-summary-goto-subject (car children))))) | |
8851 | |
8852 (defun gnus-summary-go-up-thread () | |
8853 "Go up one level in the current thread." | |
8854 (let ((parent (gnus-summary-article-parent))) | |
8855 (when parent | |
8856 (gnus-summary-goto-subject parent)))) | |
8857 | |
8858 (defun gnus-summary-down-thread (n) | |
8859 "Go down thread N steps. | |
8860 If N is negative, go up instead. | |
8861 Returns the difference between N and how many steps down that were | |
8862 taken." | |
8863 (interactive "p") | |
8864 (let ((up (< n 0)) | |
8865 (n (abs n))) | |
8866 (while (and (> n 0) | |
8867 (if up (gnus-summary-go-up-thread) | |
8868 (gnus-summary-go-down-thread))) | |
8869 (setq n (1- n))) | |
8870 (gnus-summary-position-point) | |
8871 (when (/= 0 n) | |
8872 (gnus-message 7 "Can't go further")) | |
8873 n)) | |
8874 | |
8875 (defun gnus-summary-up-thread (n) | |
8876 "Go up thread N steps. | |
8877 If N is negative, go up instead. | |
8878 Returns the difference between N and how many steps down that were | |
8879 taken." | |
8880 (interactive "p") | |
8881 (gnus-summary-down-thread (- n))) | |
8882 | |
8883 (defun gnus-summary-top-thread () | |
8884 "Go to the top of the thread." | |
8885 (interactive) | |
8886 (while (gnus-summary-go-up-thread)) | |
8887 (gnus-summary-article-number)) | |
8888 | |
8889 (defun gnus-summary-kill-thread (&optional unmark) | |
8890 "Mark articles under current thread as read. | |
8891 If the prefix argument is positive, remove any kinds of marks. | |
8892 If the prefix argument is negative, tick articles instead." | |
8893 (interactive "P") | |
8894 (when unmark | |
8895 (setq unmark (prefix-numeric-value unmark))) | |
8896 (let ((articles (gnus-summary-articles-in-thread))) | |
8897 (save-excursion | |
8898 ;; Expand the thread. | |
8899 (gnus-summary-show-thread) | |
8900 ;; Mark all the articles. | |
8901 (while articles | |
8902 (gnus-summary-goto-subject (car articles)) | |
8903 (cond ((null unmark) | |
8904 (gnus-summary-mark-article-as-read gnus-killed-mark)) | |
8905 ((> unmark 0) | |
8906 (gnus-summary-mark-article-as-unread gnus-unread-mark)) | |
8907 (t | |
8908 (gnus-summary-mark-article-as-unread gnus-ticked-mark))) | |
8909 (setq articles (cdr articles)))) | |
8910 ;; Hide killed subtrees. | |
8911 (and (null unmark) | |
8912 gnus-thread-hide-killed | |
8913 (gnus-summary-hide-thread)) | |
8914 ;; If marked as read, go to next unread subject. | |
8915 (when (null unmark) | |
8916 ;; Go to next unread subject. | |
8917 (gnus-summary-next-subject 1 t))) | |
8918 (gnus-set-mode-line 'summary)) | |
8919 | |
8920 ;; Summary sorting commands | |
8921 | |
8922 (defun gnus-summary-sort-by-number (&optional reverse) | |
8923 "Sort the summary buffer by article number. | |
8924 Argument REVERSE means reverse order." | |
8925 (interactive "P") | |
8926 (gnus-summary-sort 'number reverse)) | |
8927 | |
8928 (defun gnus-summary-sort-by-author (&optional reverse) | |
8929 "Sort the summary buffer by author name alphabetically. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8930 If `case-fold-search' is non-nil, case of letters is ignored. |
17493 | 8931 Argument REVERSE means reverse order." |
8932 (interactive "P") | |
8933 (gnus-summary-sort 'author reverse)) | |
8934 | |
8935 (defun gnus-summary-sort-by-subject (&optional reverse) | |
8936 "Sort the summary buffer by subject alphabetically. `Re:'s are ignored. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8937 If `case-fold-search' is non-nil, case of letters is ignored. |
17493 | 8938 Argument REVERSE means reverse order." |
8939 (interactive "P") | |
8940 (gnus-summary-sort 'subject reverse)) | |
8941 | |
8942 (defun gnus-summary-sort-by-date (&optional reverse) | |
8943 "Sort the summary buffer by date. | |
8944 Argument REVERSE means reverse order." | |
8945 (interactive "P") | |
8946 (gnus-summary-sort 'date reverse)) | |
8947 | |
8948 (defun gnus-summary-sort-by-score (&optional reverse) | |
8949 "Sort the summary buffer by score. | |
8950 Argument REVERSE means reverse order." | |
8951 (interactive "P") | |
8952 (gnus-summary-sort 'score reverse)) | |
8953 | |
8954 (defun gnus-summary-sort-by-lines (&optional reverse) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8955 "Sort the summary buffer by the number of lines. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8956 Argument REVERSE means reverse order." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8957 (interactive "P") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8958 (gnus-summary-sort 'lines reverse)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8959 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8960 (defun gnus-summary-sort-by-chars (&optional reverse) |
17493 | 8961 "Sort the summary buffer by article length. |
8962 Argument REVERSE means reverse order." | |
8963 (interactive "P") | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8964 (gnus-summary-sort 'chars reverse)) |
17493 | 8965 |
8966 (defun gnus-summary-sort (predicate reverse) | |
8967 "Sort summary buffer by PREDICATE. REVERSE means reverse order." | |
8968 (let* ((thread (intern (format "gnus-thread-sort-by-%s" predicate))) | |
8969 (article (intern (format "gnus-article-sort-by-%s" predicate))) | |
8970 (gnus-thread-sort-functions | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8971 (if (not reverse) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8972 thread |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8973 `(lambda (t1 t2) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8974 (,thread t2 t1)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8975 (gnus-sort-gathered-threads-function |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8976 gnus-thread-sort-functions) |
17493 | 8977 (gnus-article-sort-functions |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8978 (if (not reverse) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8979 article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8980 `(lambda (t1 t2) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
8981 (,article t2 t1)))) |
17493 | 8982 (buffer-read-only) |
8983 (gnus-summary-prepare-hook nil)) | |
8984 ;; We do the sorting by regenerating the threads. | |
8985 (gnus-summary-prepare) | |
8986 ;; Hide subthreads if needed. | |
8987 (when (and gnus-show-threads gnus-thread-hide-subtree) | |
8988 (gnus-summary-hide-all-threads)))) | |
8989 | |
8990 ;; Summary saving commands. | |
8991 | |
8992 (defun gnus-summary-save-article (&optional n not-saved) | |
8993 "Save the current article using the default saver function. | |
8994 If N is a positive number, save the N next articles. | |
8995 If N is a negative number, save the N previous articles. | |
8996 If N is nil and any articles have been marked with the process mark, | |
8997 save those articles instead. | |
8998 The variable `gnus-default-article-saver' specifies the saver function." | |
8999 (interactive "P") | |
9000 (let* ((articles (gnus-summary-work-articles n)) | |
9001 (save-buffer (save-excursion | |
9002 (nnheader-set-temp-buffer " *Gnus Save*"))) | |
9003 (num (length articles)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9004 header file) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9005 (dolist (article articles) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9006 (setq header (gnus-summary-article-header article)) |
17493 | 9007 (if (not (vectorp header)) |
9008 ;; This is a pseudo-article. | |
9009 (if (assq 'name header) | |
9010 (gnus-copy-file (cdr (assq 'name header))) | |
9011 (gnus-message 1 "Article %d is unsaveable" article)) | |
9012 ;; This is a real article. | |
9013 (save-window-excursion | |
9014 (gnus-summary-select-article t nil nil article)) | |
9015 (save-excursion | |
9016 (set-buffer save-buffer) | |
9017 (erase-buffer) | |
9018 (insert-buffer-substring gnus-original-article-buffer)) | |
9019 (setq file (gnus-article-save save-buffer file num)) | |
9020 (gnus-summary-remove-process-mark article) | |
9021 (unless not-saved | |
9022 (gnus-summary-set-saved-mark article)))) | |
9023 (gnus-kill-buffer save-buffer) | |
9024 (gnus-summary-position-point) | |
9025 (gnus-set-mode-line 'summary) | |
9026 n)) | |
9027 | |
9028 (defun gnus-summary-pipe-output (&optional arg) | |
9029 "Pipe the current article to a subprocess. | |
9030 If N is a positive number, pipe the N next articles. | |
9031 If N is a negative number, pipe the N previous articles. | |
9032 If N is nil and any articles have been marked with the process mark, | |
9033 pipe those articles instead." | |
9034 (interactive "P") | |
9035 (let ((gnus-default-article-saver 'gnus-summary-save-in-pipe)) | |
9036 (gnus-summary-save-article arg t)) | |
9037 (gnus-configure-windows 'pipe)) | |
9038 | |
9039 (defun gnus-summary-save-article-mail (&optional arg) | |
9040 "Append the current article to an mail file. | |
9041 If N is a positive number, save the N next articles. | |
9042 If N is a negative number, save the N previous articles. | |
9043 If N is nil and any articles have been marked with the process mark, | |
9044 save those articles instead." | |
9045 (interactive "P") | |
9046 (let ((gnus-default-article-saver 'gnus-summary-save-in-mail)) | |
9047 (gnus-summary-save-article arg))) | |
9048 | |
9049 (defun gnus-summary-save-article-rmail (&optional arg) | |
9050 "Append the current article to an rmail file. | |
9051 If N is a positive number, save the N next articles. | |
9052 If N is a negative number, save the N previous articles. | |
9053 If N is nil and any articles have been marked with the process mark, | |
9054 save those articles instead." | |
9055 (interactive "P") | |
9056 (let ((gnus-default-article-saver 'gnus-summary-save-in-rmail)) | |
9057 (gnus-summary-save-article arg))) | |
9058 | |
9059 (defun gnus-summary-save-article-file (&optional arg) | |
9060 "Append the current article to a file. | |
9061 If N is a positive number, save the N next articles. | |
9062 If N is a negative number, save the N previous articles. | |
9063 If N is nil and any articles have been marked with the process mark, | |
9064 save those articles instead." | |
9065 (interactive "P") | |
9066 (let ((gnus-default-article-saver 'gnus-summary-save-in-file)) | |
9067 (gnus-summary-save-article arg))) | |
9068 | |
9069 (defun gnus-summary-write-article-file (&optional arg) | |
9070 "Write the current article to a file, deleting the previous file. | |
9071 If N is a positive number, save the N next articles. | |
9072 If N is a negative number, save the N previous articles. | |
9073 If N is nil and any articles have been marked with the process mark, | |
9074 save those articles instead." | |
9075 (interactive "P") | |
9076 (let ((gnus-default-article-saver 'gnus-summary-write-to-file)) | |
9077 (gnus-summary-save-article arg))) | |
9078 | |
9079 (defun gnus-summary-save-article-body-file (&optional arg) | |
9080 "Append the current article body to a file. | |
9081 If N is a positive number, save the N next articles. | |
9082 If N is a negative number, save the N previous articles. | |
9083 If N is nil and any articles have been marked with the process mark, | |
9084 save those articles instead." | |
9085 (interactive "P") | |
9086 (let ((gnus-default-article-saver 'gnus-summary-save-body-in-file)) | |
9087 (gnus-summary-save-article arg))) | |
9088 | |
9089 (defun gnus-summary-pipe-message (program) | |
9090 "Pipe the current article through PROGRAM." | |
9091 (interactive "sProgram: ") | |
9092 (gnus-summary-select-article) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
9093 (let ((mail-header-separator "")) |
17493 | 9094 (gnus-eval-in-buffer-window gnus-article-buffer |
9095 (save-restriction | |
9096 (widen) | |
9097 (let ((start (window-start)) | |
9098 buffer-read-only) | |
9099 (message-pipe-buffer-body program) | |
9100 (set-window-start (get-buffer-window (current-buffer)) start)))))) | |
9101 | |
9102 (defun gnus-get-split-value (methods) | |
9103 "Return a value based on the split METHODS." | |
9104 (let (split-name method result match) | |
9105 (when methods | |
9106 (save-excursion | |
9107 (set-buffer gnus-original-article-buffer) | |
9108 (save-restriction | |
9109 (nnheader-narrow-to-headers) | |
9110 (while methods | |
9111 (goto-char (point-min)) | |
9112 (setq method (pop methods)) | |
9113 (setq match (car method)) | |
9114 (when (cond | |
9115 ((stringp match) | |
9116 ;; Regular expression. | |
9117 (ignore-errors | |
9118 (re-search-forward match nil t))) | |
9119 ((gnus-functionp match) | |
9120 ;; Function. | |
9121 (save-restriction | |
9122 (widen) | |
9123 (setq result (funcall match gnus-newsgroup-name)))) | |
9124 ((consp match) | |
9125 ;; Form. | |
9126 (save-restriction | |
9127 (widen) | |
9128 (setq result (eval match))))) | |
9129 (setq split-name (append (cdr method) split-name)) | |
9130 (cond ((stringp result) | |
9131 (push (expand-file-name | |
9132 result gnus-article-save-directory) | |
9133 split-name)) | |
9134 ((consp result) | |
9135 (setq split-name (append result split-name))))))))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9136 (nreverse split-name))) |
17493 | 9137 |
9138 (defun gnus-valid-move-group-p (group) | |
9139 (and (boundp group) | |
9140 (symbol-name group) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9141 (symbol-value group) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9142 (gnus-get-function (gnus-find-method-for-group |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9143 (symbol-name group)) 'request-accept-article t))) |
17493 | 9144 |
9145 (defun gnus-read-move-group-name (prompt default articles prefix) | |
9146 "Read a group name." | |
9147 (let* ((split-name (gnus-get-split-value gnus-move-split-methods)) | |
9148 (minibuffer-confirm-incomplete nil) ; XEmacs | |
9149 (prom | |
9150 (format "%s %s to:" | |
9151 prompt | |
9152 (if (> (length articles) 1) | |
9153 (format "these %d articles" (length articles)) | |
9154 "this article"))) | |
9155 (to-newsgroup | |
9156 (cond | |
9157 ((null split-name) | |
9158 (gnus-completing-read default prom | |
9159 gnus-active-hashtb | |
9160 'gnus-valid-move-group-p | |
9161 nil prefix | |
9162 'gnus-group-history)) | |
9163 ((= 1 (length split-name)) | |
9164 (gnus-completing-read (car split-name) prom | |
9165 gnus-active-hashtb | |
9166 'gnus-valid-move-group-p | |
9167 nil nil | |
9168 'gnus-group-history)) | |
9169 (t | |
9170 (gnus-completing-read nil prom | |
9171 (mapcar (lambda (el) (list el)) | |
9172 (nreverse split-name)) | |
9173 nil nil nil | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9174 'gnus-group-history)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9175 (to-method (gnus-server-to-method (gnus-group-method to-newsgroup)))) |
17493 | 9176 (when to-newsgroup |
9177 (if (or (string= to-newsgroup "") | |
9178 (string= to-newsgroup prefix)) | |
9179 (setq to-newsgroup default)) | |
9180 (unless to-newsgroup | |
9181 (error "No group name entered")) | |
9182 (or (gnus-active to-newsgroup) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9183 (gnus-activate-group to-newsgroup nil nil to-method) |
17493 | 9184 (if (gnus-y-or-n-p (format "No such group: %s. Create it? " |
9185 to-newsgroup)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9186 (or (and (gnus-request-create-group to-newsgroup to-method) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9187 (gnus-activate-group |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9188 to-newsgroup nil nil to-method) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9189 (gnus-subscribe-group to-newsgroup)) |
17493 | 9190 (error "Couldn't create group %s" to-newsgroup))) |
9191 (error "No such group: %s" to-newsgroup))) | |
9192 to-newsgroup)) | |
9193 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9194 (defun gnus-summary-save-parts (type dir n &optional reverse) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9195 "Save parts matching TYPE to DIR. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9196 If REVERSE, save parts that do not match TYPE." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9197 (interactive |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9198 (list (read-string "Save parts of type: " "image/.*") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9199 (read-file-name "Save to directory: " nil nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9200 current-prefix-arg)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9201 (gnus-summary-iterate n |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9202 (let ((gnus-display-mime-function nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9203 (gnus-inhibit-treatment t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9204 (gnus-summary-select-article)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9205 (save-excursion |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9206 (set-buffer gnus-article-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9207 (let ((handles (or gnus-article-mime-handles |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9208 (mm-dissect-buffer) (mm-uu-dissect)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9209 (when handles |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9210 (gnus-summary-save-parts-1 type dir handles reverse) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9211 (unless gnus-article-mime-handles ;; Don't destroy this case. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9212 (mm-destroy-parts handles))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9213 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9214 (defun gnus-summary-save-parts-1 (type dir handle reverse) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9215 (if (stringp (car handle)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9216 (mapcar (lambda (h) (gnus-summary-save-parts-1 type dir h reverse)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9217 (cdr handle)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9218 (when (if reverse |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9219 (not (string-match type (mm-handle-media-type handle))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9220 (string-match type (mm-handle-media-type handle))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9221 (let ((file (expand-file-name |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9222 (file-name-nondirectory |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9223 (or |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9224 (mail-content-type-get |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9225 (mm-handle-disposition handle) 'filename) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9226 (concat gnus-newsgroup-name |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9227 "." (number-to-string |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9228 (cdr gnus-article-current))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9229 dir))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9230 (unless (file-exists-p file) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9231 (mm-save-part-to-file handle file)))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9232 |
17493 | 9233 ;; Summary extract commands |
9234 | |
9235 (defun gnus-summary-insert-pseudos (pslist &optional not-view) | |
9236 (let ((buffer-read-only nil) | |
9237 (article (gnus-summary-article-number)) | |
9238 after-article b e) | |
9239 (unless (gnus-summary-goto-subject article) | |
9240 (error "No such article: %d" article)) | |
9241 (gnus-summary-position-point) | |
9242 ;; If all commands are to be bunched up on one line, we collect | |
9243 ;; them here. | |
9244 (unless gnus-view-pseudos-separately | |
9245 (let ((ps (setq pslist (sort pslist 'gnus-pseudos<))) | |
9246 files action) | |
9247 (while ps | |
9248 (setq action (cdr (assq 'action (car ps)))) | |
9249 (setq files (list (cdr (assq 'name (car ps))))) | |
9250 (while (and ps (cdr ps) | |
9251 (string= (or action "1") | |
9252 (or (cdr (assq 'action (cadr ps))) "2"))) | |
9253 (push (cdr (assq 'name (cadr ps))) files) | |
9254 (setcdr ps (cddr ps))) | |
9255 (when files | |
9256 (when (not (string-match "%s" action)) | |
9257 (push " " files)) | |
9258 (push " " files) | |
9259 (when (assq 'execute (car ps)) | |
9260 (setcdr (assq 'execute (car ps)) | |
9261 (funcall (if (string-match "%s" action) | |
9262 'format 'concat) | |
9263 action | |
9264 (mapconcat | |
9265 (lambda (f) | |
9266 (if (equal f " ") | |
9267 f | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9268 (mm-quote-arg f))) |
17493 | 9269 files " "))))) |
9270 (setq ps (cdr ps))))) | |
9271 (if (and gnus-view-pseudos (not not-view)) | |
9272 (while pslist | |
9273 (when (assq 'execute (car pslist)) | |
9274 (gnus-execute-command (cdr (assq 'execute (car pslist))) | |
9275 (eq gnus-view-pseudos 'not-confirm))) | |
9276 (setq pslist (cdr pslist))) | |
9277 (save-excursion | |
9278 (while pslist | |
9279 (setq after-article (or (cdr (assq 'article (car pslist))) | |
9280 (gnus-summary-article-number))) | |
9281 (gnus-summary-goto-subject after-article) | |
9282 (forward-line 1) | |
9283 (setq b (point)) | |
9284 (insert " " (file-name-nondirectory | |
9285 (cdr (assq 'name (car pslist)))) | |
9286 ": " (or (cdr (assq 'execute (car pslist))) "") "\n") | |
9287 (setq e (point)) | |
9288 (forward-line -1) ; back to `b' | |
9289 (gnus-add-text-properties | |
9290 b (1- e) (list 'gnus-number gnus-reffed-article-number | |
9291 gnus-mouse-face-prop gnus-mouse-face)) | |
9292 (gnus-data-enter | |
9293 after-article gnus-reffed-article-number | |
9294 gnus-unread-mark b (car pslist) 0 (- e b)) | |
9295 (push gnus-reffed-article-number gnus-newsgroup-unreads) | |
9296 (setq gnus-reffed-article-number (1- gnus-reffed-article-number)) | |
9297 (setq pslist (cdr pslist))))))) | |
9298 | |
9299 (defun gnus-pseudos< (p1 p2) | |
9300 (let ((c1 (cdr (assq 'action p1))) | |
9301 (c2 (cdr (assq 'action p2)))) | |
9302 (and c1 c2 (string< c1 c2)))) | |
9303 | |
9304 (defun gnus-request-pseudo-article (props) | |
9305 (cond ((assq 'execute props) | |
9306 (gnus-execute-command (cdr (assq 'execute props))))) | |
9307 (let ((gnus-current-article (gnus-summary-article-number))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
9308 (gnus-run-hooks 'gnus-mark-article-hook))) |
17493 | 9309 |
9310 (defun gnus-execute-command (command &optional automatic) | |
9311 (save-excursion | |
9312 (gnus-article-setup-buffer) | |
9313 (set-buffer gnus-article-buffer) | |
9314 (setq buffer-read-only nil) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
9315 (let ((command (if automatic command |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
9316 (read-string "Command: " (cons command 0))))) |
17493 | 9317 (erase-buffer) |
9318 (insert "$ " command "\n\n") | |
9319 (if gnus-view-pseudo-asynchronously | |
9320 (start-process "gnus-execute" (current-buffer) shell-file-name | |
9321 shell-command-switch command) | |
9322 (call-process shell-file-name nil t nil | |
9323 shell-command-switch command))))) | |
9324 | |
9325 ;; Summary kill commands. | |
9326 | |
9327 (defun gnus-summary-edit-global-kill (article) | |
9328 "Edit the \"global\" kill file." | |
9329 (interactive (list (gnus-summary-article-number))) | |
9330 (gnus-group-edit-global-kill article)) | |
9331 | |
9332 (defun gnus-summary-edit-local-kill () | |
9333 "Edit a local kill file applied to the current newsgroup." | |
9334 (interactive) | |
9335 (setq gnus-current-headers (gnus-summary-article-header)) | |
9336 (gnus-group-edit-local-kill | |
9337 (gnus-summary-article-number) gnus-newsgroup-name)) | |
9338 | |
9339 ;;; Header reading. | |
9340 | |
9341 (defun gnus-read-header (id &optional header) | |
9342 "Read the headers of article ID and enter them into the Gnus system." | |
9343 (let ((group gnus-newsgroup-name) | |
9344 (gnus-override-method | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9345 (or |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9346 gnus-override-method |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9347 (and (gnus-news-group-p gnus-newsgroup-name) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9348 (car (gnus-refer-article-methods))))) |
17493 | 9349 where) |
9350 ;; First we check to see whether the header in question is already | |
9351 ;; fetched. | |
9352 (if (stringp id) | |
9353 ;; This is a Message-ID. | |
9354 (setq header (or header (gnus-id-to-header id))) | |
9355 ;; This is an article number. | |
9356 (setq header (or header (gnus-summary-article-header id)))) | |
9357 (if (and header | |
9358 (not (gnus-summary-article-sparse-p (mail-header-number header)))) | |
9359 ;; We have found the header. | |
9360 header | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
9361 ;; If this is a sparse article, we have to nix out its |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
9362 ;; previous entry in the thread hashtb. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
9363 (when (and header |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
9364 (gnus-summary-article-sparse-p (mail-header-number header))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
9365 (let* ((parent (gnus-parent-id (mail-header-references header))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
9366 (thread (and parent (gnus-id-to-thread parent)))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
9367 (when thread |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
9368 (delq (assq header thread) thread)))) |
17493 | 9369 ;; We have to really fetch the header to this article. |
9370 (save-excursion | |
9371 (set-buffer nntp-server-buffer) | |
9372 (when (setq where (gnus-request-head id group)) | |
9373 (nnheader-fold-continuation-lines) | |
9374 (goto-char (point-max)) | |
9375 (insert ".\n") | |
9376 (goto-char (point-min)) | |
9377 (insert "211 ") | |
9378 (princ (cond | |
9379 ((numberp id) id) | |
9380 ((cdr where) (cdr where)) | |
9381 (header (mail-header-number header)) | |
9382 (t gnus-reffed-article-number)) | |
9383 (current-buffer)) | |
9384 (insert " Article retrieved.\n")) | |
9385 (if (or (not where) | |
9386 (not (setq header (car (gnus-get-newsgroup-headers nil t))))) | |
9387 () ; Malformed head. | |
9388 (unless (gnus-summary-article-sparse-p (mail-header-number header)) | |
9389 (when (and (stringp id) | |
9390 (not (string= (gnus-group-real-name group) | |
9391 (car where)))) | |
9392 ;; If we fetched by Message-ID and the article came | |
9393 ;; from a different group, we fudge some bogus article | |
9394 ;; numbers for this article. | |
9395 (mail-header-set-number header gnus-reffed-article-number)) | |
9396 (save-excursion | |
9397 (set-buffer gnus-summary-buffer) | |
9398 (decf gnus-reffed-article-number) | |
9399 (gnus-remove-header (mail-header-number header)) | |
9400 (push header gnus-newsgroup-headers) | |
9401 (setq gnus-current-headers header) | |
9402 (push (mail-header-number header) gnus-newsgroup-limit))) | |
9403 header))))) | |
9404 | |
9405 (defun gnus-remove-header (number) | |
9406 "Remove header NUMBER from `gnus-newsgroup-headers'." | |
9407 (if (and gnus-newsgroup-headers | |
9408 (= number (mail-header-number (car gnus-newsgroup-headers)))) | |
9409 (pop gnus-newsgroup-headers) | |
9410 (let ((headers gnus-newsgroup-headers)) | |
9411 (while (and (cdr headers) | |
9412 (not (= number (mail-header-number (cadr headers))))) | |
9413 (pop headers)) | |
9414 (when (cdr headers) | |
9415 (setcdr headers (cddr headers)))))) | |
9416 | |
9417 ;;; | |
9418 ;;; summary highlights | |
9419 ;;; | |
9420 | |
9421 (defun gnus-highlight-selected-summary () | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9422 "Highlight selected article in summary buffer." |
17493 | 9423 ;; Added by Per Abrahamsen <amanda@iesd.auc.dk>. |
9424 (when gnus-summary-selected-face | |
9425 (save-excursion | |
9426 (let* ((beg (progn (beginning-of-line) (point))) | |
9427 (end (progn (end-of-line) (point))) | |
9428 ;; Fix by Mike Dugan <dugan@bucrf16.bu.edu>. | |
9429 (from (if (get-text-property beg gnus-mouse-face-prop) | |
9430 beg | |
9431 (or (next-single-property-change | |
9432 beg gnus-mouse-face-prop nil end) | |
9433 beg))) | |
9434 (to | |
9435 (if (= from end) | |
9436 (- from 2) | |
9437 (or (next-single-property-change | |
9438 from gnus-mouse-face-prop nil end) | |
9439 end)))) | |
9440 ;; If no mouse-face prop on line we will have to = from = end, | |
9441 ;; so we highlight the entire line instead. | |
9442 (when (= (+ to 2) from) | |
9443 (setq from beg) | |
9444 (setq to end)) | |
9445 (if gnus-newsgroup-selected-overlay | |
9446 ;; Move old overlay. | |
9447 (gnus-move-overlay | |
9448 gnus-newsgroup-selected-overlay from to (current-buffer)) | |
9449 ;; Create new overlay. | |
9450 (gnus-overlay-put | |
9451 (setq gnus-newsgroup-selected-overlay (gnus-make-overlay from to)) | |
9452 'face gnus-summary-selected-face)))))) | |
9453 | |
9454 ;; New implementation by Christian Limpach <Christian.Limpach@nice.ch>. | |
9455 (defun gnus-summary-highlight-line () | |
9456 "Highlight current line according to `gnus-summary-highlight'." | |
9457 (let* ((list gnus-summary-highlight) | |
9458 (p (point)) | |
9459 (end (progn (end-of-line) (point))) | |
9460 ;; now find out where the line starts and leave point there. | |
9461 (beg (progn (beginning-of-line) (point))) | |
9462 (article (gnus-summary-article-number)) | |
9463 (score (or (cdr (assq (or article gnus-current-article) | |
9464 gnus-newsgroup-scored)) | |
9465 gnus-summary-default-score 0)) | |
9466 (mark (or (gnus-summary-article-mark) gnus-unread-mark)) | |
9467 (inhibit-read-only t)) | |
9468 ;; Eval the cars of the lists until we find a match. | |
9469 (let ((default gnus-summary-default-score)) | |
9470 (while (and list | |
9471 (not (eval (caar list)))) | |
9472 (setq list (cdr list)))) | |
9473 (let ((face (cdar list))) | |
9474 (unless (eq face (get-text-property beg 'face)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
9475 (gnus-put-text-property-excluding-characters-with-faces |
17493 | 9476 beg end 'face |
9477 (setq face (if (boundp face) (symbol-value face) face))) | |
9478 (when gnus-summary-highlight-line-function | |
9479 (funcall gnus-summary-highlight-line-function article face)))) | |
9480 (goto-char p))) | |
9481 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
9482 (defun gnus-update-read-articles (group unread &optional compute) |
17493 | 9483 "Update the list of read articles in GROUP." |
9484 (let* ((active (or gnus-newsgroup-active (gnus-active group))) | |
9485 (entry (gnus-gethash group gnus-newsrc-hashtb)) | |
9486 (info (nth 2 entry)) | |
9487 (prev 1) | |
9488 (unread (sort (copy-sequence unread) '<)) | |
9489 read) | |
9490 (if (or (not info) (not active)) | |
9491 ;; There is no info on this group if it was, in fact, | |
9492 ;; killed. Gnus stores no information on killed groups, so | |
9493 ;; there's nothing to be done. | |
9494 ;; One could store the information somewhere temporarily, | |
9495 ;; perhaps... Hmmm... | |
9496 () | |
9497 ;; Remove any negative articles numbers. | |
9498 (while (and unread (< (car unread) 0)) | |
9499 (setq unread (cdr unread))) | |
9500 ;; Remove any expired article numbers | |
9501 (while (and unread (< (car unread) (car active))) | |
9502 (setq unread (cdr unread))) | |
9503 ;; Compute the ranges of read articles by looking at the list of | |
9504 ;; unread articles. | |
9505 (while unread | |
9506 (when (/= (car unread) prev) | |
9507 (push (if (= prev (1- (car unread))) prev | |
9508 (cons prev (1- (car unread)))) | |
9509 read)) | |
9510 (setq prev (1+ (car unread))) | |
9511 (setq unread (cdr unread))) | |
9512 (when (<= prev (cdr active)) | |
9513 (push (cons prev (cdr active)) read)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9514 (setq read (if (> (length read) 1) (nreverse read) read)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
9515 (if compute |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9516 read |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
9517 (save-excursion |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9518 (let (setmarkundo) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9519 ;; Propagate the read marks to the backend. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9520 (when (gnus-check-backend-function 'request-set-mark group) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9521 (let ((del (gnus-remove-from-range (gnus-info-read info) read)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9522 (add (gnus-remove-from-range read (gnus-info-read info)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9523 (when (or add del) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9524 (unless (gnus-check-group group) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9525 (error "Can't open server for %s" group)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9526 (gnus-request-set-mark |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9527 group (delq nil (list (if add (list add 'add '(read))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9528 (if del (list del 'del '(read)))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9529 (setq setmarkundo |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9530 `(gnus-request-set-mark |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9531 ,group |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9532 ',(delq nil (list |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9533 (if del (list del 'add '(read))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9534 (if add (list add 'del '(read)))))))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9535 (set-buffer gnus-group-buffer) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9536 (gnus-undo-register |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9537 `(progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9538 (gnus-info-set-marks ',info ',(gnus-info-marks info) t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9539 (gnus-info-set-read ',info ',(gnus-info-read info)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9540 (gnus-get-unread-articles-in-group ',info |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9541 (gnus-active ,group)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9542 (gnus-group-update-group ,group t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9543 ,setmarkundo)))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
9544 ;; Enter this list into the group info. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9545 (gnus-info-set-read info read) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
9546 ;; Set the number of unread articles in gnus-newsrc-hashtb. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
9547 (gnus-get-unread-articles-in-group info (gnus-active group)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
9548 t)))) |
17493 | 9549 |
9550 (defun gnus-offer-save-summaries () | |
9551 "Offer to save all active summary buffers." | |
9552 (save-excursion | |
9553 (let ((buflist (buffer-list)) | |
9554 buffers bufname) | |
9555 ;; Go through all buffers and find all summaries. | |
9556 (while buflist | |
9557 (and (setq bufname (buffer-name (car buflist))) | |
9558 (string-match "Summary" bufname) | |
9559 (save-excursion | |
9560 (set-buffer bufname) | |
9561 ;; We check that this is, indeed, a summary buffer. | |
9562 (and (eq major-mode 'gnus-summary-mode) | |
9563 ;; Also make sure this isn't bogus. | |
9564 gnus-newsgroup-prepared | |
9565 ;; Also make sure that this isn't a dead summary buffer. | |
9566 (not gnus-dead-summary-mode))) | |
9567 (push bufname buffers)) | |
9568 (setq buflist (cdr buflist))) | |
9569 ;; Go through all these summary buffers and offer to save them. | |
9570 (when buffers | |
9571 (map-y-or-n-p | |
9572 "Update summary buffer %s? " | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
9573 (lambda (buf) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
9574 (switch-to-buffer buf) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23363
diff
changeset
|
9575 (gnus-summary-exit)) |
17493 | 9576 buffers))))) |
9577 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9578 (defun gnus-summary-setup-default-charset () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9579 "Setup newsgroup default charset." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9580 (if (equal gnus-newsgroup-name "nndraft:drafts") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9581 (setq gnus-newsgroup-charset nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9582 (let* ((name (and gnus-newsgroup-name |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9583 (gnus-group-real-name gnus-newsgroup-name))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9584 (ignored-charsets |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9585 (or gnus-newsgroup-ephemeral-ignored-charsets |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9586 (append |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9587 (and gnus-newsgroup-name |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9588 (or (gnus-group-find-parameter gnus-newsgroup-name |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9589 'ignored-charsets t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9590 (let ((alist gnus-group-ignored-charsets-alist) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9591 elem (charsets nil)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9592 (while (setq elem (pop alist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9593 (when (and name |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9594 (string-match (car elem) name)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9595 (setq alist nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9596 charsets (cdr elem)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9597 charsets))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9598 gnus-newsgroup-ignored-charsets)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9599 (setq gnus-newsgroup-charset |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9600 (or gnus-newsgroup-ephemeral-charset |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9601 (and gnus-newsgroup-name |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9602 (or (gnus-group-find-parameter gnus-newsgroup-name 'charset) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9603 (let ((alist gnus-group-charset-alist) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9604 elem charset) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9605 (while (setq elem (pop alist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9606 (when (and name |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9607 (string-match (car elem) name)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9608 (setq alist nil |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9609 charset (cadr elem)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9610 charset))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9611 gnus-default-charset)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9612 (set (make-local-variable 'gnus-newsgroup-ignored-charsets) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9613 ignored-charsets)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9614 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9615 ;;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9616 ;;; Mime Commands |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9617 ;;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9618 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9619 (defun gnus-summary-display-buttonized (&optional show-all-parts) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9620 "Display the current article buffer fully MIME-buttonized. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9621 If SHOW-ALL-PARTS (the prefix) is non-nil, all multipart/* parts are |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9622 treated as multipart/mixed." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9623 (interactive "P") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9624 (require 'gnus-art) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9625 (let ((gnus-unbuttonized-mime-types nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9626 (gnus-mime-display-multipart-as-mixed show-all-parts)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9627 (gnus-summary-show-article))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9628 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9629 (defun gnus-summary-repair-multipart (article) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9630 "Add a Content-Type header to a multipart article without one." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9631 (interactive (list (gnus-summary-article-number))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9632 (gnus-with-article article |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9633 (message-narrow-to-head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9634 (goto-char (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9635 (widen) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9636 (when (search-forward "\n--" nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9637 (let ((separator (buffer-substring (point) (gnus-point-at-eol)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9638 (message-narrow-to-head) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9639 (message-remove-header "Mime-Version") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9640 (message-remove-header "Content-Type") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9641 (goto-char (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9642 (insert (format "Content-Type: multipart/mixed; boundary=\"%s\"\n" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9643 separator)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9644 (insert "Mime-Version: 1.0\n") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9645 (widen)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9646 (let (gnus-mark-article-hook) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9647 (gnus-summary-select-article t t nil article))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9648 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9649 (defun gnus-summary-toggle-display-buttonized () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9650 "Toggle the buttonizing of the article buffer." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9651 (interactive) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9652 (require 'gnus-art) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9653 (if (setq gnus-inhibit-mime-unbuttonizing |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9654 (not gnus-inhibit-mime-unbuttonizing)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9655 (let ((gnus-unbuttonized-mime-types nil)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9656 (gnus-summary-show-article)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9657 (gnus-summary-show-article))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9658 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9659 ;;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9660 ;;; Generic summary marking commands |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9661 ;;; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9662 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9663 (defvar gnus-summary-marking-alist |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9664 '((read gnus-del-mark "d") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9665 (unread gnus-unread-mark "u") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9666 (ticked gnus-ticked-mark "!") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9667 (dormant gnus-dormant-mark "?") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9668 (expirable gnus-expirable-mark "e")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9669 "An alist of names/marks/keystrokes.") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9670 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9671 (defvar gnus-summary-generic-mark-map (make-sparse-keymap)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9672 (defvar gnus-summary-mark-map) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9673 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9674 (defun gnus-summary-make-all-marking-commands () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9675 (define-key gnus-summary-mark-map "M" gnus-summary-generic-mark-map) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9676 (dolist (elem gnus-summary-marking-alist) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9677 (apply 'gnus-summary-make-marking-command elem))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9678 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9679 (defun gnus-summary-make-marking-command (name mark keystroke) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9680 (let ((map (make-sparse-keymap))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9681 (define-key gnus-summary-generic-mark-map keystroke map) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9682 (dolist (lway `((next "next" next nil "n") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9683 (next-unread "next unread" next t "N") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9684 (prev "previous" prev nil "p") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9685 (prev-unread "previous unread" prev t "P") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9686 (nomove "" nil nil ,keystroke))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9687 (let ((func (gnus-summary-make-marking-command-1 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9688 mark (car lway) lway name))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9689 (setq func (eval func)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9690 (define-key map (nth 4 lway) func))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9691 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9692 (defun gnus-summary-make-marking-command-1 (mark way lway name) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9693 `(defun ,(intern |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9694 (format "gnus-summary-put-mark-as-%s%s" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9695 name (if (eq way 'nomove) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9696 "" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9697 (concat "-" (symbol-name way))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9698 (n) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9699 ,(format |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9700 "Mark the current article as %s%s. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9701 If N, the prefix, then repeat N times. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9702 If N is negative, move in reverse order. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9703 The difference between N and the actual number of articles marked is |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9704 returned." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9705 name (cadr lway)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9706 (interactive "p") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9707 (gnus-summary-generic-mark n ,mark ',(nth 2 lway) ,(nth 3 lway)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9708 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9709 (defun gnus-summary-generic-mark (n mark move unread) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9710 "Mark N articles with MARK." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9711 (unless (eq major-mode 'gnus-summary-mode) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9712 (error "This command can only be used in the summary buffer")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9713 (gnus-summary-show-thread) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9714 (let ((nummove |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9715 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9716 ((eq move 'next) 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9717 ((eq move 'prev) -1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9718 (t 0)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9719 (if (zerop nummove) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9720 (setq n 1) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9721 (when (< n 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9722 (setq n (abs n) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9723 nummove (* -1 nummove)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9724 (while (and (> n 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9725 (gnus-summary-mark-article nil mark) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9726 (zerop (gnus-summary-next-subject nummove unread t))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9727 (setq n (1- n))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9728 (when (/= 0 n) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9729 (gnus-message 7 "No more %sarticles" (if mark "" "unread "))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9730 (gnus-summary-recenter) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9731 (gnus-summary-position-point) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9732 (gnus-set-mode-line 'summary) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9733 n)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9734 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9735 (gnus-summary-make-all-marking-commands) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24552
diff
changeset
|
9736 |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
9737 (gnus-ems-redefine) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19912
diff
changeset
|
9738 |
17493 | 9739 (provide 'gnus-sum) |
9740 | |
9741 (run-hooks 'gnus-sum-load-hook) | |
9742 | |
9743 ;;; gnus-sum.el ends here |