[Mew-Win32 00325] Re: lisp MsgDB (Re: C-uZ)

GOTOH at example.com GOTOH at example.com
1998年 3月 2日 (月) 19:03:42 JST


Œã“¡—‘¾—zŒv‘ª‚Å‚·

>>>>> From: "YAMAGUCHI, Shuhei" <yamagus at example.com>
>   himi> ‚Ê‚¤A‚»‚¤ŠÈ’P‚É“Š‚°o‚³‚ê‚é‚Æ...;_;
> 
> ‚²‚ß‚ñ‚È‚³‚¢A‚Å‚àA‚Ü‚Á‚½‚­“Š‚°o‚µ‚Ä‚µ‚Ü‚Á‚½‚킯‚Å‚Í‚È‚¢‚Ì‚Å‚·B
> ‰A‚ŃRƒbƒ\ƒŠŽŽ‚µ‚Ă݂悤‚Æ‚ÍŽ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

‚¤‚£‚ñAAA
Ž„‚à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"


‚¿‚Ⴄ‚Ì‚©‚È‚ŸBBB

P.S.
Å‹ßA’·‚¢‚±‚Æ‘±‚¢‚Ä‚¢‚½ŽdŽ–‚ªˆê’i—Ž‚‚¢‚Ä‚«‚½‚̂ŁA
‚â‚Á‚ƃƒCƒ“‚̍ì‹ÆŠÂ‹«‚ðMeadow‚Ɉڍs’†B(^o^)

--- Regards,
 Shun-ichi Goto  <gotoh at example.com>
   R&D Group, TAIYO Corp., Tokyo, JAPAN



Mew-win32 メーリングリストの案内