annotate lisp/gnus/nnregistry.el @ 110934:a36fccf2a365

lisp/net/telnet.el (telnet-mode-map): Fix previous change.
author Juanma Barranquero <lekktu@gmail.com>
date Tue, 12 Oct 2010 03:48:58 +0200
parents 7aa4fdb60d57
children b1eac6d41a93
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
110699
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
1 ;;; nnregistry.el --- access to articles via Gnus' message-id registry
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
2 ;;; -*- coding: utf-8 -*-
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
3
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
4 ;; Copyright (C) 2010 Free Software Foundation, Inc.
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
5
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
6 ;; Authors: Ludovic Courtès <ludo@gnu.org>
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
7 ;; Keywords: news, mail
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
8
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
9 ;; This file is part of GNU Emacs.
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
10
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
11 ;; GNU Emacs is free software: you can redistribute it and/or modify
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
12 ;; it under the terms of the GNU General Public License as published by
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
13 ;; the Free Software Foundation, either version 3 of the License, or
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
14 ;; (at your option) any later version.
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
15
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
16 ;; GNU Emacs is distributed in the hope that it will be useful,
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
19 ;; GNU General Public License for more details.
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
20
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
23
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
24 ;;; Commentary:
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
25
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
26 ;; This file provides the `nnregistry' Gnus back-end. It can be used
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
27 ;; in `gnus-refer-article-method' to quickly search for a message by
110859
7aa4fdb60d57 shr.el (shr-insert): Don't insert double spaces.
Katsumi Yamaoka <yamaoka@jpl.org>
parents: 110699
diff changeset
28 ;; id, regardless of the back-end that stores it. See the Gnus manual
7aa4fdb60d57 shr.el (shr-insert): Don't insert double spaces.
Katsumi Yamaoka <yamaoka@jpl.org>
parents: 110699
diff changeset
29 ;; for usage examples and more information.
110699
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
30
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
31 ;;; Code:
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
32
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
33 (require 'nnoo)
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
34 (require 'gnus-registry)
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
35 (require 'gnus-int)
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
36
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
37 (nnoo-declare nnregistry)
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
38
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
39 (deffoo nnregistry-server-opened (server)
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
40 (eq gnus-registry-install t))
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
41
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
42 (deffoo nnregistry-close-server (server)
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
43 t)
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
44
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
45 (deffoo nnregistry-status-message (server)
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
46 nil)
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
47
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
48 (deffoo nnregistry-open-server (server &optional defs)
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
49 (eq gnus-registry-install t))
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
50
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
51 (defvar nnregistry-within-nnregistry nil)
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
52
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
53 (deffoo nnregistry-request-article (id &optional group server buffer)
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
54 (and (not nnregistry-within-nnregistry)
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
55 (let* ((nnregistry-within-nnregistry t)
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
56 (group (gnus-registry-fetch-group id))
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
57 (gnus-override-method nil))
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
58 (message "nnregistry: requesting article `%s' in group `%s'"
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
59 id group)
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
60 (and group
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
61 (gnus-check-group group)
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
62 (gnus-request-article id group buffer)))))
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
63
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
64 (provide 'nnregistry)
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
65
295298da2c13 Add lisp/gnus/nnregistry.el.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
66 ;;; nnregistry.el ends here