From: yamaoka Date: Tue, 5 Mar 2002 08:21:09 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_6-01-quimby~21 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=616c79ae92d01c52aa4f85be8d5a38dacb483e93;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- 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)