view lisp/gnus/nndir.el @ 68129:6f5da26b0df1

Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690 Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 174-181) - Update from CVS - Update from CVS: texi/gnus.texi (RSS): Addition. 2006-01-10 Katsumi Yamaoka <yamaoka@jpl.org> * lisp/gnus/nnrss.el (nnrss-wash-html-in-text-plain-parts): New variable. (nnrss-request-article): Render text/plain parts as HTML. * lisp/gnus/gnus-art.el (gnus-article-wash-html-with-w3m): No need to narrow the buffer. 2006-01-08 Reiner Steib <Reiner.Steib@gmx.de> * lisp/gnus/gnus-cus.el (gnus-group-parameters): Sync posting-style with custom definition of `gnus-posting-styles'. * lisp/gnus/gnus-start.el (gnus-gnus-to-quick-newsrc-format): Bind print-circle. Suggested by Kalle Olavi Niemitalo <kon@iki.fi>. 2006-01-05 Reiner Steib <Reiner.Steib@gmx.de> * lisp/gnus/gnus-group.el (gnus-useful-groups): Use Gmane for ding. Use nntp for bug archive. 2006-01-05 Katsumi Yamaoka <yamaoka@jpl.org> * lisp/gnus/nnrss.el (nnrss-request-article): Fix the way to fill text/plain parts. (nnrss-normalize-date): New function converts ISO 8601 date into RFC822 style. Suggested by Mark Plaksin <happy@mcplaksin.org>. (nnrss-check-group): Use it. 2006-01-03 Rodrigo Ventura <yoda@isr.ist.utl.pt> (tiny change) * lisp/gnus/gnus-xmas.el (gnus-xmas-group-startup-message): Typo gnus-splash-face -> gnus-splash. Fixes starting from a TTY in XEmacs. 2006-01-01 Katsumi Yamaoka <yamaoka@jpl.org> * lisp/gnus/gnus-sum.el (gnus-summary-work-articles): Remove useless `min'. * lisp/gnus/nnrss.el (nnrss-fetch): Make it fail gracefully when it can't fetch a feed. Suggested by Mark Plaksin <happy@mcplaksin.org>. (nnrss-insert-w3): Ditto. 2005-12-21 Katsumi Yamaoka <yamaoka@jpl.org> * lisp/gnus/nnrss.el (nnrss-request-article): Fix last change; fill text/plain parts. 2005-12-20 Katsumi Yamaoka <yamaoka@jpl.org> * lisp/gnus/nnrss.el (nnrss-request-article): Replace <br />s with newlines in text/plain part. (nnrss-check-group): Don't add excessive newline to dc:subject. 2005-12-19 Katsumi Yamaoka <yamaoka@jpl.org> * lisp/gnus/gnus-art.el (gnus-article-delete-text-of-type): Enable it to remove MIME buttons associated with multipart/alternative parts. (gnus-mime-display-alternative): Tag buttons using `article-type' text property. * lisp/gnus/gnus-msg.el (gnus-copy-article-buffer): Remove MIME buttons associated with multipart/alternative parts. 2005-12-19 Mark Plaksin <happy@mcplaksin.org> (tiny change) * lisp/gnus/nnrss.el (nnrss-check-group): Put the RSS dc:subject in the article. 2005-12-18 Lars Magne Ingebrigtsen <larsi@gnus.org> * lisp/gnus/dns.el (query-dns): Make sure we check the buffer size before removing tcp headers. 2006-01-10 Katsumi Yamaoka <yamaoka@jpl.org> * man/gnus.texi (RSS): Document nnrss-wash-html-in-text-plain-parts. 2006-01-06 Katsumi Yamaoka <yamaoka@jpl.org> * man/gnus.texi (RSS): Addition. 2005-12-22 Katsumi Yamaoka <yamaoka@jpl.org> * man/gnus.texi (Summary Post Commands): Fix function bound to `S O p'. 2005-12-19 Katsumi Yamaoka <yamaoka@jpl.org> * man/emacs-mime.texi (Display Customization): Add setting example to mm-discouraged-alternatives.
author Miles Bader <miles@gnu.org>
date Wed, 11 Jan 2006 02:03:24 +0000
parents fafd692d1e40
children 1077b8039c32 2d92f5c9d6ae
line wrap: on
line source

;;; nndir.el --- single directory newsgroup access for Gnus

;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004,
;;   2005 Free Software Foundation, Inc.

;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news

;; This file is part of GNU Emacs.

;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.

;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING.  If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.

;;; Commentary:

;;; Code:

(require 'nnheader)
(require 'nnmh)
(require 'nnml)
(require 'nnoo)
(eval-when-compile (require 'cl))

(nnoo-declare nndir
  nnml nnmh)

(defvoo nndir-directory nil
  "Where nndir will look for groups."
  nnml-current-directory nnmh-current-directory)

(defvoo nndir-nov-is-evil nil
  "*Non-nil means that nndir will never retrieve NOV headers."
  nnml-nov-is-evil)



(defvoo nndir-current-group "" nil nnml-current-group nnmh-current-group)
(defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
(defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)

(defvoo nndir-status-string "" nil nnmh-status-string)
(defconst nndir-version "nndir 1.0")



;;; Interface functions.

(nnoo-define-basics nndir)

(deffoo nndir-open-server (server &optional defs)
  (setq nndir-directory
	(or (cadr (assq 'nndir-directory defs))
	    server))
  (unless (assq 'nndir-directory defs)
    (push `(nndir-directory ,server) defs))
  (push `(nndir-current-group
	  ,(file-name-nondirectory (directory-file-name nndir-directory)))
	defs)
  (push `(nndir-top-directory
	  ,(file-name-directory (directory-file-name nndir-directory)))
	defs)
  (nnoo-change-server 'nndir server defs)
  (let (err)
    (cond
     ((not (condition-case arg
	       (file-exists-p nndir-directory)
	     (ftp-error (setq err (format "%s" arg)))))
      (nndir-close-server)
      (nnheader-report
       'nndir (or err "No such file or directory: %s" nndir-directory)))
     ((not (file-directory-p (file-truename nndir-directory)))
      (nndir-close-server)
      (nnheader-report 'nndir "Not a directory: %s" nndir-directory))
     (t
      (nnheader-report 'nndir "Opened server %s using directory %s"
		       server nndir-directory)
      t))))

(nnoo-map-functions nndir
  (nnml-retrieve-headers 0 nndir-current-group 0 0)
  (nnml-request-article 0 nndir-current-group 0 0)
  (nnmh-request-group nndir-current-group 0 0)
  (nnml-close-group nndir-current-group 0)
  (nnml-request-list (nnoo-current-server 'nndir) nndir-directory)
  (nnml-request-newsgroups (nnoo-current-server 'nndir) nndir-directory))

(provide 'nndir)

;;; arch-tag: 56f09f68-0e4e-4816-818a-df80b4a394c8
;;; nndir.el ends here