From 616c79ae92d01c52aa4f85be8d5a38dacb483e93 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Tue, 5 Mar 2002 08:21:09 +0000 Subject: [PATCH] Synch with Oort Gnus. --- lisp/ChangeLog | 6 ++++++ lisp/nnmaildir.el | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2fcb956..d58c256 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2002-03-04 Paul Jarc + + * message.el (nnmaildir-article-number-to-base-name): New + function. + (nnmaildir-base-name-to-article-number): New function. + 2002-03-04 Katsumi Yamaoka * smime.el (smime-make-temp-file): Don't quote diff --git a/lisp/nnmaildir.el b/lisp/nnmaildir.el index 094704a..b87cf4f 100644 --- a/lisp/nnmaildir.el +++ b/lisp/nnmaildir.el @@ -505,6 +505,42 @@ by nnmaildir-request-article.") (nnmaildir--art-set-nov article nil) nil)))) +(defun nnmaildir-article-number-to-base-name + (number group-name server-address-string) + (let ((group (nnmaildir--prepare server-address-string group-name)) + list article suffix dir filename) + (catch 'return + (if (null group) + ;; The given group or server does not exist. + (throw 'return nil)) + (setq list (nnmaildir--grp-get-lists group) + list (nnmaildir--lists-get-nlist list) + article (nnmaildir--nlist-art list number)) + (if (null article) + ;; The given article number does not exist in this group. + (throw 'return nil)) + (setq suffix (nnmaildir--art-get-suffix article)) + (if (not (stringp suffix)) + ;; The article has expired. + (throw 'return nil)) + (cons (nnmaildir--art-get-prefix article) suffix)))) + +(defun nnmaildir-base-name-to-article-number + (base-name group-name server-address-string) + (let ((group (nnmaildir--prepare server-address-string group-name)) + list article suffix dir filename) + (catch 'return + (if (null group) + ;; The given group or server does not exist. + (throw 'return nil)) + (setq list (nnmaildir--grp-get-lists group) + list (nnmaildir--lists-get-flist list) + article (nnmaildir--flist-art list base-name)) + (if (null article) + ;; The given article number does not exist in this group. + (throw 'return nil)) + (nnmaildir--art-get-num article)))) + (defun nnmaildir-request-type (group &optional article) 'mail) -- 1.7.10.4