projects
/
elisp
/
gnus.git-
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* nnshimbun.el (nnshimbun-request-expire-articles): Prefer the group parameter
[elisp/gnus.git-]
/
lisp
/
nneething.el
diff --git
a/lisp/nneething.el
b/lisp/nneething.el
index
2c6fb78
..
1d83717
100644
(file)
--- a/
lisp/nneething.el
+++ b/
lisp/nneething.el
@@
-1,5
+1,7
@@
;;; nneething.el --- arbitrary file access for Gnus
;;; nneething.el --- arbitrary file access for Gnus
-;; Copyright (C) 1995,96,97,98,99 Free Software Foundation, Inc.
+
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001
+;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
@@
-107,7
+109,7
@@
included.")
(and large
(zerop (% count 20))
(nnheader-message 5 "nneething: Receiving headers... %d%%"
(and large
(zerop (% count 20))
(nnheader-message 5 "nneething: Receiving headers... %d%%"
- (/ (* count 100) number))))
+ (/ (* count 100) number))))
(when large
(nnheader-message 5 "nneething: Receiving headers...done"))
(when large
(nnheader-message 5 "nneething: Receiving headers...done"))
@@
-231,13
+233,13
@@
included.")
(let ((map nneething-map)
prev)
(while map
(let ((map nneething-map)
prev)
(while map
- (if (and (member (cadar map) files)
+ (if (and (member (cadr (car map)) files)
;; We also remove files that have changed mod times.
(equal (nth 5 (file-attributes
;; We also remove files that have changed mod times.
(equal (nth 5 (file-attributes
- (nneething-file-name (cadar map))))
- (caddar map)))
+ (nneething-file-name (cadr (car map)))))
+ (cadr (cdar map))))
(progn
(progn
- (push (cadar map) map-files)
+ (push (cadr (car map)) map-files)
(setq prev map))
(setq touched t)
(if prev
(setq prev map))
(setq touched t)
(if prev
@@
-270,11
+272,11
@@
included.")
(insert-buffer-substring nneething-work-buffer)
(goto-char (point-max))))
(insert-buffer-substring nneething-work-buffer)
(goto-char (point-max))))
-(defun nneething-make-head (file &optional buffer)
+(defun nneething-make-head (file &optional buffer extra-msg)
"Create a head by looking at the file attributes of FILE."
(let ((atts (file-attributes file)))
(insert
"Create a head by looking at the file attributes of FILE."
(let ((atts (file-attributes file)))
(insert
- "Subject: " (file-name-nondirectory file) "\n"
+ "Subject: " (file-name-nondirectory file) (or extra-msg "") "\n"
"Message-ID: <nneething-"
(int-to-string (incf nneething-message-id-number))
"@" (system-name) ">\n"
"Message-ID: <nneething-"
(int-to-string (incf nneething-message-id-number))
"@" (system-name) ">\n"
@@
-295,8
+297,7
@@
included.")
(concat "Lines: " (int-to-string
(count-lines (point-min) (point-max)))
"\n"))
(concat "Lines: " (int-to-string
(count-lines (point-min) (point-max)))
"\n"))
- "")
- )))
+ ""))))
(defun nneething-from-line (uid &optional file)
"Return a From header based of UID."
(defun nneething-from-line (uid &optional file)
"Return a From header based of UID."
@@
-343,18
+344,22
@@
included.")
(nneething-make-head file) t)
(t
;; We examine the file.
(nneething-make-head file) t)
(t
;; We examine the file.
- (nnheader-insert-head file)
- (if (nnheader-article-p)
- (delete-region
- (progn
- (goto-char (point-min))
- (or (and (search-forward "\n\n" nil t)
+ (condition-case ()
+ (progn
+ (nnheader-insert-head file)
+ (if (nnheader-article-p)
+ (delete-region
+ (progn
+ (goto-char (point-min))
+ (or (and (search-forward "\n\n" nil t)
(1- (point)))
(1- (point)))
- (point-max)))
- (point-max))
- (goto-char (point-min))
- (nneething-make-head file (current-buffer))
- (delete-region (point) (point-max)))
+ (point-max)))
+ (point-max))
+ (goto-char (point-min))
+ (nneething-make-head file (current-buffer))
+ (delete-region (point) (point-max))))
+ (file-error
+ (nneething-make-head file (current-buffer) " (unreadable)")))
t))))
(defun nneething-file-name (article)
t))))
(defun nneething-file-name (article)
@@
-363,9
+368,9
@@
included.")
fname)
(if (numberp article)
(if (setq fname (cadr (assq article nneething-map)))
fname)
(if (numberp article)
(if (setq fname (cadr (assq article nneething-map)))
- (concat dir fname)
- (make-temp-name (concat dir "nneething")))
- (concat dir article))))
+ (expand-file-name fname dir)
+ (make-temp-name (expand-file-name "nneething" dir)))
+ (expand-file-name article dir))))
(provide 'nneething)
(provide 'nneething)