[Mew-Win32 00325] Re: lisp MsgDB (Re: C-uZ)
GOTOH at example.com
GOTOH at example.com
1998年 3月 2日 (月) 19:03:42 JST
㡾zvªÅ·
>>>>> From: "YAMAGUCHI, Shuhei" <yamagus at example.com>
> himi> ʤA»¤ÈPÉ°o³êéÆ...;_;
>
> ²ßñȳ¢AÅàAÜÁ½°oµÄµÜÁ½í¯ÅÍÈ¢ÌÅ·B
> AÅRb\µÄÝæ¤ÆÍvÁÄ¢½ÌÅ·B ^^;
me too! :-)
ÌêAâéÈçÎ IM¤ÆÌA®ðà éÌÅAIM¤à»êÈèÉ
¢¶ÁÄâë¤ÆvÁ¿áÁÄ¢éàÌÅAÈ©È©Cª[
µÈ¢Á·B(^^;
> ¡ÌƱëA(setq msgid-db (make-vector 511 0))Ìæ¤È´¶Å 究
> ßvectorð쬵Ĩ«A
> Message-ID: <19980302003957W.yamagus at example.com>
> t@CÌê: +inbox/1
> È[ðMsgDBÉo^·éÍA
> (setq sym-msgid
> (intern "<19980302003957W.yamagus at example.com>" msgid-db))
> (put 'msgid-db sym-msgid "+inbox/1")
> Ìæ¤ÉµA±Ì[Ìîñðæ¾·éÍA
> (get 'msgid-db
> (intern-soft "<19980302003957W.yamagus at example.com>" msgid-db))
> Æ·éAÆ¢¤æ¤ÉðµÄ¢Ü·B
¤£ñAAA
àobarrayìÍEmacs18Ì}j
AÅ¿åÁÆÇñ¾öxÈÌÅ
ðÍRµ¢ÌÅ·ªA
himi³ñÌ¢ÁĽû@AMessage-Id:¶ñð¼OÉÂV{óÔ
ƵÄÌobarrayÌg¢ûÈñ¶áȢŵ天H
ÅàÁÄA»ÌÅK»³ê½õ(intern)ÍA¬xÊŨ©ß¾ÆB
ïÌIÉͱñÈ´¶©ÈÆvÁÄéÌÅ·ªÇ§Åµå¤B
;; initialize
(defvar mew-msgid-ob (make-vector 511 0))
;; entry
(defun msgdb-add-message ( msgid folder msg)
(let (sym fld)
(setq sym (intern msgid mew-msgid-ob))
(setq fld (intern folder mew-msgid-ob))
(put sym 'folder fld)
(put sym 'message msg)
)
)
;; extraction
(defun msgdb-get-message (msgid)
(let (sym fn)
(setq sym (intern-soft msgid mew-msgid-ob))
(if sym
(concat (symbol-name (get sym 'folder)) "/" (get sym 'message))))
)
;; example:
;; (msgdb-get-message "<19980302123456X.gotoh at example.com>")
;; => nil
;; (msgdb-add-message "<19980302123456X.gotoh at example.com>") "+inbox" 3)
;; (msgdb-get-message "<19980302123456X.gotoh at example.com>")
;; => "+inbox/3"
¿á¤Ì©ÈBBB
P.S.
ÅßA·¢±Æ±¢Ä¢½dªêi¢ī½ÌÅA
âÁÆCÌìÆ«ðMeadowÉÚsB(^o^)
--- Regards,
Shun-ichi Goto <gotoh at example.com>
R&D Group, TAIYO Corp., Tokyo, JAPAN
Mew-win32 メーリングリストの案内