Mercurial > emacs
annotate lisp/gnus/nnkiboze.el @ 31772:2d2c0153a04d
(TIT-GB, TIT-BIG5, NON-TIT-GB, NON-TIT-BIG5)
(NON-TIT-CNS, JAPANESE, KOREAN, THAI, VIETNAMESE, LAO, INDIAN)
(TIBETAN, LATIN, SLAVIC, GREEK, RUSSIAN, MISC): Rename all .el
files to .elc.
(${TIT}): Adjusted for the above change.
(clean mostlyclean): Likewise.
(.el.elc): New target.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Wed, 20 Sep 2000 16:14:47 +0000 |
parents | 9968f55ad26e |
children | 51cea22fd2aa |
rev | line source |
---|---|
17493 | 1 ;;; nnkiboze.el --- select virtual news access for Gnus |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
2 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
3 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999,.2000 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
4 ;; Free Software Foundation, Inc. |
17493 | 5 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
6 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> |
17493 | 7 ;; Keywords: news |
8 | |
9 ;; This file is part of GNU Emacs. | |
10 | |
11 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
12 ;; it under the terms of the GNU General Public License as published by | |
13 ;; the Free Software Foundation; either version 2, or (at your option) | |
14 ;; any later version. | |
15 | |
16 ;; GNU Emacs is distributed in the hope that it will be useful, | |
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 ;; GNU General Public License for more details. | |
20 | |
21 ;; You should have received a copy of the GNU General Public License | |
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
24 ;; Boston, MA 02111-1307, USA. | |
25 | |
26 ;;; Commentary: | |
27 | |
28 ;; The other access methods (nntp, nnspool, etc) are general news | |
29 ;; access methods. This module relies on Gnus and can't be used | |
30 ;; separately. | |
31 | |
32 ;;; Code: | |
33 | |
34 (require 'nntp) | |
35 (require 'nnheader) | |
36 (require 'gnus) | |
37 (require 'gnus-score) | |
38 (require 'nnoo) | |
39 (eval-when-compile (require 'cl)) | |
40 | |
41 (nnoo-declare nnkiboze) | |
42 (defvoo nnkiboze-directory (nnheader-concat gnus-directory "kiboze/") | |
43 "nnkiboze will put its files in this directory.") | |
44 | |
45 (defvoo nnkiboze-level 9 | |
46 "The maximum level to be searched for articles.") | |
47 | |
48 (defvoo nnkiboze-remove-read-articles t | |
49 "If non-nil, nnkiboze will remove read articles from the kiboze group.") | |
50 | |
51 (defvoo nnkiboze-ephemeral nil | |
52 "If non-nil, don't store any data anywhere.") | |
53 | |
54 (defvoo nnkiboze-scores nil | |
55 "Score rules for generating the nnkiboze group.") | |
56 | |
57 (defvoo nnkiboze-regexp nil | |
58 "Regexp for matching component groups.") | |
59 | |
60 | |
61 | |
62 (defconst nnkiboze-version "nnkiboze 1.0") | |
63 | |
64 (defvoo nnkiboze-current-group nil) | |
65 (defvoo nnkiboze-status-string "") | |
66 | |
67 (defvoo nnkiboze-headers nil) | |
68 | |
69 | |
70 | |
71 ;;; Interface functions. | |
72 | |
73 (nnoo-define-basics nnkiboze) | |
74 | |
75 (deffoo nnkiboze-retrieve-headers (articles &optional group server fetch-old) | |
76 (nnkiboze-possibly-change-group group) | |
77 (unless gnus-nov-is-evil | |
78 (if (stringp (car articles)) | |
79 'headers | |
80 (let ((nov (nnkiboze-nov-file-name))) | |
81 (when (file-exists-p nov) | |
82 (save-excursion | |
83 (set-buffer nntp-server-buffer) | |
84 (erase-buffer) | |
85 (nnheader-insert-file-contents nov) | |
86 (nnheader-nov-delete-outside-range | |
87 (car articles) (car (last articles))) | |
88 'nov)))))) | |
89 | |
90 (deffoo nnkiboze-request-article (article &optional newsgroup server buffer) | |
91 (nnkiboze-possibly-change-group newsgroup) | |
92 (if (not (numberp article)) | |
93 ;; This is a real kludge. It might not work at times, but it | |
94 ;; does no harm I think. The only alternative is to offer no | |
95 ;; article fetching by message-id at all. | |
96 (nntp-request-article article newsgroup gnus-nntp-server buffer) | |
97 (let* ((header (gnus-summary-article-header article)) | |
98 (xref (mail-header-xref header))) | |
99 (unless xref | |
100 (error "nnkiboze: No xref")) | |
101 (unless (string-match " \\([^ ]+\\):\\([0-9]+\\)" xref) | |
102 (error "nnkiboze: Malformed xref")) | |
103 (gnus-request-article (string-to-int (match-string 2 xref)) | |
104 (match-string 1 xref) | |
105 buffer)))) | |
106 | |
107 (deffoo nnkiboze-request-scan (&optional group server) | |
108 (nnkiboze-generate-group (concat "nnkiboze:" group))) | |
109 | |
110 (deffoo nnkiboze-request-group (group &optional server dont-check) | |
111 "Make GROUP the current newsgroup." | |
112 (nnkiboze-possibly-change-group group) | |
113 (if dont-check | |
114 t | |
115 (let ((nov-file (nnkiboze-nov-file-name)) | |
116 beg end total) | |
117 (save-excursion | |
118 (set-buffer nntp-server-buffer) | |
119 (erase-buffer) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
120 (unless (file-exists-p nov-file) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
121 (nnkiboze-request-scan group)) |
17493 | 122 (if (not (file-exists-p nov-file)) |
123 (nnheader-report 'nnkiboze "Can't select group %s" group) | |
124 (nnheader-insert-file-contents nov-file) | |
125 (if (zerop (buffer-size)) | |
126 (nnheader-insert "211 0 0 0 %s\n" group) | |
127 (goto-char (point-min)) | |
128 (when (looking-at "[0-9]+") | |
129 (setq beg (read (current-buffer)))) | |
130 (goto-char (point-max)) | |
131 (when (re-search-backward "^[0-9]" nil t) | |
132 (setq end (read (current-buffer)))) | |
133 (setq total (count-lines (point-min) (point-max))) | |
134 (nnheader-insert "211 %d %d %d %s\n" total beg end group))))))) | |
135 | |
136 (deffoo nnkiboze-close-group (group &optional server) | |
137 (nnkiboze-possibly-change-group group) | |
138 ;; Remove NOV lines of articles that are marked as read. | |
139 (when (and (file-exists-p (nnkiboze-nov-file-name)) | |
140 nnkiboze-remove-read-articles) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
141 (with-temp-file (nnkiboze-nov-file-name) |
17493 | 142 (let ((cur (current-buffer))) |
143 (nnheader-insert-file-contents (nnkiboze-nov-file-name)) | |
144 (goto-char (point-min)) | |
145 (while (not (eobp)) | |
146 (if (not (gnus-article-read-p (read cur))) | |
147 (forward-line 1) | |
148 (gnus-delete-line)))))) | |
149 (setq nnkiboze-current-group nil)) | |
150 | |
151 (deffoo nnkiboze-open-server (server &optional defs) | |
152 (unless (assq 'nnkiboze-regexp defs) | |
153 (push `(nnkiboze-regexp ,server) | |
154 defs)) | |
155 (nnoo-change-server 'nnkiboze server defs)) | |
156 | |
157 (deffoo nnkiboze-request-delete-group (group &optional force server) | |
158 (nnkiboze-possibly-change-group group) | |
159 (when force | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
160 (let ((files (nconc |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
161 (nnkiboze-score-file group) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
162 (list (nnkiboze-nov-file-name) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
163 (nnkiboze-nov-file-name ".newsrc"))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
164 (while files |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
165 (and (file-exists-p (car files)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
166 (file-writable-p (car files)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
167 (delete-file (car files))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
168 (setq files (cdr files))))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
169 (setq nnkiboze-current-group nil) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
170 t) |
17493 | 171 |
172 (nnoo-define-skeleton nnkiboze) | |
173 | |
174 | |
175 ;;; Internal functions. | |
176 | |
177 (defun nnkiboze-possibly-change-group (group) | |
178 (setq nnkiboze-current-group group)) | |
179 | |
180 (defun nnkiboze-prefixed-name (group) | |
181 (gnus-group-prefixed-name group '(nnkiboze ""))) | |
182 | |
183 ;;;###autoload | |
184 (defun nnkiboze-generate-groups () | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
185 "\"Usage: emacs -batch -l nnkiboze -f nnkiboze-generate-groups\". |
17493 | 186 Finds out what articles are to be part of the nnkiboze groups." |
187 (interactive) | |
188 (let ((nnmail-spool-file nil) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
189 (mail-sources nil) |
17493 | 190 (gnus-use-dribble-file nil) |
191 (gnus-read-active-file t) | |
192 (gnus-expert-user t)) | |
193 (gnus)) | |
194 (let* ((gnus-newsrc-alist (gnus-copy-sequence gnus-newsrc-alist)) | |
195 (newsrc (cdr gnus-newsrc-alist)) | |
196 gnus-newsrc-hashtb info) | |
197 (gnus-make-hashtable-from-newsrc-alist) | |
198 ;; We have copied all the newsrc alist info over to local copies | |
199 ;; so that we can mess all we want with these lists. | |
200 (while (setq info (pop newsrc)) | |
201 (when (string-match "nnkiboze" (gnus-info-group info)) | |
202 ;; For each kiboze group, we call this function to generate | |
203 ;; it. | |
204 (nnkiboze-generate-group (gnus-info-group info)))))) | |
205 | |
206 (defun nnkiboze-score-file (group) | |
207 (list (expand-file-name | |
208 (concat (file-name-as-directory gnus-kill-files-directory) | |
209 (nnheader-translate-file-chars | |
210 (concat (nnkiboze-prefixed-name nnkiboze-current-group) | |
211 "." gnus-score-file-suffix)))))) | |
212 | |
213 (defun nnkiboze-generate-group (group) | |
214 (let* ((info (nth 2 (gnus-gethash group gnus-newsrc-hashtb))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
215 (newsrc-file (concat nnkiboze-directory |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
216 (nnheader-translate-file-chars |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
217 (concat group ".newsrc")))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
218 (nov-file (concat nnkiboze-directory |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
219 (nnheader-translate-file-chars |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
220 (concat group ".nov")))) |
17493 | 221 method nnkiboze-newsrc gname newsrc active |
222 ginfo lowest glevel orig-info nov-buffer | |
223 ;; Bind various things to nil to make group entry faster. | |
224 (gnus-expert-user t) | |
225 (gnus-large-newsgroup nil) | |
226 (gnus-score-find-score-files-function 'nnkiboze-score-file) | |
227 (gnus-verbose (min gnus-verbose 3)) | |
228 gnus-select-group-hook gnus-summary-prepare-hook | |
229 gnus-thread-sort-functions gnus-show-threads | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
230 gnus-visual gnus-suppress-duplicates num-unread) |
17493 | 231 (unless info |
232 (error "No such group: %s" group)) | |
233 ;; Load the kiboze newsrc file for this group. | |
234 (when (file-exists-p newsrc-file) | |
235 (load newsrc-file)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
236 (with-temp-file nov-file |
17493 | 237 (when (file-exists-p nov-file) |
238 (insert-file-contents nov-file)) | |
239 (setq nov-buffer (current-buffer)) | |
240 ;; Go through the active hashtb and add new all groups that match the | |
241 ;; kiboze regexp. | |
242 (mapatoms | |
243 (lambda (group) | |
244 (and (string-match nnkiboze-regexp | |
245 (setq gname (symbol-name group))) ; Match | |
246 (not (assoc gname nnkiboze-newsrc)) ; It isn't registered | |
247 (numberp (car (symbol-value group))) ; It is active | |
248 (or (> nnkiboze-level 7) | |
249 (and (setq glevel (nth 1 (nth 2 (gnus-gethash | |
250 gname gnus-newsrc-hashtb)))) | |
251 (>= nnkiboze-level glevel))) | |
252 (not (string-match "^nnkiboze:" gname)) ; Exclude kibozes | |
253 (push (cons gname (1- (car (symbol-value group)))) | |
254 nnkiboze-newsrc))) | |
255 gnus-active-hashtb) | |
256 ;; `newsrc' is set to the list of groups that possibly are | |
257 ;; component groups to this kiboze group. This list has elements | |
258 ;; on the form `(GROUP . NUMBER)', where NUMBER is the highest | |
259 ;; number that has been kibozed in GROUP in this kiboze group. | |
260 (setq newsrc nnkiboze-newsrc) | |
261 (while newsrc | |
262 (if (not (setq active (gnus-gethash | |
263 (caar newsrc) gnus-active-hashtb))) | |
264 ;; This group isn't active after all, so we remove it from | |
265 ;; the list of component groups. | |
266 (setq nnkiboze-newsrc (delq (car newsrc) nnkiboze-newsrc)) | |
267 (setq lowest (cdar newsrc)) | |
268 ;; Ok, we have a valid component group, so we jump to it. | |
269 (switch-to-buffer gnus-group-buffer) | |
270 (gnus-group-jump-to-group (caar newsrc)) | |
271 (gnus-message 3 "nnkiboze: Checking %s..." (caar newsrc)) | |
272 (setq ginfo (gnus-get-info (gnus-group-group-name)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
273 orig-info (gnus-copy-sequence ginfo) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
274 num-unread (car (gnus-gethash (caar newsrc) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
275 gnus-newsrc-hashtb))) |
17493 | 276 (unwind-protect |
277 (progn | |
278 ;; We set all list of article marks to nil. Since we operate | |
279 ;; on copies of the real lists, we can destroy anything we | |
280 ;; want here. | |
281 (when (nth 3 ginfo) | |
282 (setcar (nthcdr 3 ginfo) nil)) | |
283 ;; We set the list of read articles to be what we expect for | |
284 ;; this kiboze group -- either nil or `(1 . LOWEST)'. | |
285 (when ginfo | |
286 (setcar (nthcdr 2 ginfo) | |
287 (and (not (= lowest 1)) (cons 1 lowest)))) | |
288 (when (and (or (not ginfo) | |
289 (> (length (gnus-list-of-unread-articles | |
290 (car ginfo))) | |
291 0)) | |
292 (progn | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
293 (ignore-errors |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
294 (gnus-group-select-group nil)) |
17493 | 295 (eq major-mode 'gnus-summary-mode))) |
296 ;; We are now in the group where we want to be. | |
297 (setq method (gnus-find-method-for-group | |
298 gnus-newsgroup-name)) | |
299 (when (eq method gnus-select-method) | |
300 (setq method nil)) | |
301 ;; We go through the list of scored articles. | |
302 (while gnus-newsgroup-scored | |
303 (when (> (caar gnus-newsgroup-scored) lowest) | |
304 ;; If it has a good score, then we enter this article | |
305 ;; into the kiboze group. | |
306 (nnkiboze-enter-nov | |
307 nov-buffer | |
308 (gnus-summary-article-header | |
309 (caar gnus-newsgroup-scored)) | |
310 gnus-newsgroup-name)) | |
311 (setq gnus-newsgroup-scored (cdr gnus-newsgroup-scored))) | |
312 ;; That's it. We exit this group. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
313 (when (eq major-mode 'gnus-summary-mode) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
314 (kill-buffer (current-buffer))))) |
17493 | 315 ;; Restore the proper info. |
316 (when ginfo | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
317 (setcdr ginfo (cdr orig-info))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
318 (setcar (gnus-gethash (caar newsrc) gnus-newsrc-hashtb) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
319 num-unread))) |
17493 | 320 (setcdr (car newsrc) (car active)) |
321 (gnus-message 3 "nnkiboze: Checking %s...done" (caar newsrc)) | |
322 (setq newsrc (cdr newsrc)))) | |
323 ;; We save the kiboze newsrc for this group. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
324 (with-temp-file newsrc-file |
17493 | 325 (insert "(setq nnkiboze-newsrc '") |
326 (gnus-prin1 nnkiboze-newsrc) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
327 (insert ")\n"))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
328 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
329 (set-buffer gnus-group-buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
330 (gnus-group-list-groups)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
331 t) |
17493 | 332 |
333 (defun nnkiboze-enter-nov (buffer header group) | |
334 (save-excursion | |
335 (set-buffer buffer) | |
336 (goto-char (point-max)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
337 (let ((prefix (gnus-group-real-prefix group)) |
17493 | 338 (oheader (copy-sequence header)) |
339 article) | |
340 (if (zerop (forward-line -1)) | |
341 (progn | |
342 (setq article (1+ (read (current-buffer)))) | |
343 (forward-line 1)) | |
344 (setq article 1)) | |
345 (mail-header-set-number oheader article) | |
346 (nnheader-insert-nov oheader) | |
347 (search-backward "\t" nil t 2) | |
348 (if (re-search-forward " [^ ]+:[0-9]+" nil t) | |
349 (goto-char (match-beginning 0)) | |
350 (forward-char 1)) | |
351 ;; The first Xref has to be the group this article | |
352 ;; really came for - this is the article nnkiboze | |
353 ;; will request when it is asked for the article. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
354 (insert " " group ":" |
17493 | 355 (int-to-string (mail-header-number header)) " ") |
356 (while (re-search-forward " [^ ]+:[0-9]+" nil t) | |
357 (goto-char (1+ (match-beginning 0))) | |
358 (insert prefix))))) | |
359 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
360 (defun nnkiboze-nov-file-name (&optional suffix) |
17493 | 361 (concat (file-name-as-directory nnkiboze-directory) |
362 (nnheader-translate-file-chars | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
363 (concat (nnkiboze-prefixed-name nnkiboze-current-group) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
364 (or suffix ".nov"))))) |
17493 | 365 |
366 (provide 'nnkiboze) | |
367 | |
368 ;;; nnkiboze.el ends here |