Mercurial > emacs
comparison lisp/gnus/nndiary.el @ 85712:a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-911
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sun, 28 Oct 2007 09:18:39 +0000 |
parents | b98604865ea0 |
children | 1cdfc94602cb |
comparison
equal
deleted
inserted
replaced
85711:b6f5dc84b2e1 | 85712:a3c27999decb |
---|---|
604 (nnmail-save-active nndiary-group-alist nndiary-active-file)) | 604 (nnmail-save-active nndiary-group-alist nndiary-active-file)) |
605 (nndiary-save-nov) | 605 (nndiary-save-nov) |
606 (nconc rest articles))) | 606 (nconc rest articles))) |
607 | 607 |
608 (deffoo nndiary-request-move-article | 608 (deffoo nndiary-request-move-article |
609 (article group server accept-form &optional last) | 609 (article group server accept-form &optional last move-is-internal) |
610 (let ((buf (get-buffer-create " *nndiary move*")) | 610 (let ((buf (get-buffer-create " *nndiary move*")) |
611 result) | 611 result) |
612 (nndiary-possibly-change-directory group server) | 612 (nndiary-possibly-change-directory group server) |
613 (nndiary-update-file-alist) | 613 (nndiary-update-file-alist) |
614 (and | 614 (and |
873 (nnheader-insert-file-contents nov) | 873 (nnheader-insert-file-contents nov) |
874 (while (and (not found) | 874 (while (and (not found) |
875 (search-forward id nil t)) ; We find the ID. | 875 (search-forward id nil t)) ; We find the ID. |
876 ;; And the id is in the fourth field. | 876 ;; And the id is in the fourth field. |
877 (if (not (and (search-backward "\t" nil t 4) | 877 (if (not (and (search-backward "\t" nil t 4) |
878 (not (search-backward"\t" (gnus-point-at-bol) t)))) | 878 (not (search-backward"\t" (point-at-bol) t)))) |
879 (forward-line 1) | 879 (forward-line 1) |
880 (beginning-of-line) | 880 (beginning-of-line) |
881 (setq found t) | 881 (setq found t) |
882 ;; We return the article number. | 882 ;; We return the article number. |
883 (setq number | 883 (setq number |
1094 (last (or (caadr entry) 0))) | 1094 (last (or (caadr entry) 0))) |
1095 (setq nndiary-group-alist (delq entry nndiary-group-alist)) | 1095 (setq nndiary-group-alist (delq entry nndiary-group-alist)) |
1096 (push (list group | 1096 (push (list group |
1097 (cons (or (caar files) (1+ last)) | 1097 (cons (or (caar files) (1+ last)) |
1098 (max last | 1098 (max last |
1099 (or (let ((f files)) | 1099 (or (caar (last files)) |
1100 (while (cdr f) (setq f (cdr f))) | |
1101 (caar f)) | |
1102 0)))) | 1100 0)))) |
1103 nndiary-group-alist))) | 1101 nndiary-group-alist))) |
1104 | 1102 |
1105 (defun nndiary-generate-nov-file (dir files) | 1103 (defun nndiary-generate-nov-file (dir files) |
1106 (let* ((dir (file-name-as-directory dir)) | 1104 (let* ((dir (file-name-as-directory dir)) |
1575 (nnheader-report 'nndiary "Could not read file %s" file) | 1573 (nnheader-report 'nndiary "Could not read file %s" file) |
1576 nil)) | 1574 nil)) |
1577 | 1575 |
1578 ;; The end... =============================================================== | 1576 ;; The end... =============================================================== |
1579 | 1577 |
1580 (mapcar | 1578 (dolist (header nndiary-headers) |
1581 (lambda (elt) | 1579 (setq header (intern (format "X-Diary-%s" (car header)))) |
1582 (let ((header (intern (format "X-Diary-%s" (car elt))))) | 1580 ;; Required for building NOV databases and some other stuff. |
1583 ;; Required for building NOV databases and some other stuff | 1581 (add-to-list 'gnus-extra-headers header) |
1584 (add-to-list 'gnus-extra-headers header) | 1582 (add-to-list 'nnmail-extra-headers header)) |
1585 (add-to-list 'nnmail-extra-headers header))) | |
1586 nndiary-headers) | |
1587 | 1583 |
1588 (unless (assoc "nndiary" gnus-valid-select-methods) | 1584 (unless (assoc "nndiary" gnus-valid-select-methods) |
1589 (gnus-declare-backend "nndiary" 'post-mail 'respool 'address)) | 1585 (gnus-declare-backend "nndiary" 'post-mail 'respool 'address)) |
1590 | 1586 |
1591 (provide 'nndiary) | 1587 (provide 'nndiary) |