[mew-dist 20892] Re: mew-pop-folder
KOIE Hidetaka ( 鯉江英隆 )
hide at example.com
2002年 5月 17日 (金) 14:46:16 JST
Message-Id: <20020515.181516.104044223.05 at example.com>
Date: Wed, 15 May 2002 18:15:16 +0900 (JST)
From: Tatsuya Kinoshita <tats at example.com>
Subject: [mew-dist 20882] Re: mew-pop-folder
| > > popキャッシュディレクトリのデフォルトは
| > > (defvar mew-pop-folder "+.pop")
| > > となっていますが、複数POPサーバを相手にするときは
| > > mew-config-alistに"pop-folder"を設定することになります。
| > >
| > > こういう機械的に生成できるものは自動設定されるべきだと思ったので
| > > デフォルトで "+.pop-user at example.com:port" となるような
| > > パッチを考えてみました。
|
| mew-nntp-folder, mew-imap-folderにも同様の仕組があるとよさそうに
| 思います。
imapとnntpについても同じように書き換えました。
| > ですので、コロンはちょっとまずいです。
|
| "+.pop-user at example.com@port"
| "+.pop-user at example.com(port)"
| "+.pop-user at example.com[port]"
括弧系はshellでのメタ文字なので避けたい。
netstatの出力ではアドレスとポートを dot で区切っているので
それにならいました。
"+.pop-user at example.com"
--
KOIE Hidetaka 鯉江英隆 <hide at example.com>
-------------- next part --------------
Index: mew-config.el
===================================================================
RCS file: /cvsmew/mew/mew-config.el,v
retrieving revision 1.47
diff -u -F^( -r1.47 mew-config.el
--- mew-config.el 2002/04/14 12:06:13 1.47
+++ mew-config.el 2002/05/17 05:40:28
@@ -210,7 +210,10 @@ (defun mew-pop-delete (&optional case)
(mew-cfent-value case "pop-delete" mew-pop-delete))
(defun mew-pop-folder (&optional case)
- (mew-cfent-value case "pop-folder" mew-pop-folder))
+ (let ((fld (mew-cfent-value case "pop-folder" mew-pop-folder)))
+ (if (functionp fld)
+ (funcall fld)
+ fld)))
(defun mew-pop-header-only (&optional case)
(mew-cfent-value case "pop-header-only" mew-pop-header-only))
@@ -239,7 +242,10 @@ (defun mew-imap-delete (&optional case)
(mew-cfent-value case "imap-delete" mew-imap-delete))
(defun mew-imap-folder (&optional case)
- (mew-cfent-value case "imap-folder" mew-imap-folder))
+ (let ((fld (mew-cfent-value case "imap-folder" mew-imap-folder)))
+ (if (functionp fld)
+ (funcall fld)
+ fld)))
(defun mew-imap-header-only (&optional case)
(mew-cfent-value case "imap-header-only" mew-imap-header-only))
@@ -262,7 +268,10 @@ (defun mew-nntp-size (&optional case)
(mew-cfent-value case "nntp-size" mew-nntp-size))
(defun mew-nntp-folder (&optional case)
- (mew-cfent-value case "nntp-folder" mew-nntp-folder))
+ (let ((fld (mew-cfent-value case "nntp-folder" mew-nntp-folder)))
+ (if (functionp fld)
+ (funcall fld)
+ fld)))
(defun mew-nntp-header-only (&optional case)
(mew-cfent-value case "nntp-header-only" mew-nntp-header-only))
Index: mew-vars.el
===================================================================
RCS file: /cvsmew/mew/mew-vars.el,v
retrieving revision 1.117
diff -u -F^( -r1.117 mew-vars.el
--- mew-vars.el 2002/04/15 23:55:46 1.117
+++ mew-vars.el 2002/05/17 05:40:28
@@ -517,7 +517,14 @@ (defcustom mew-biff-function (function m
;;; POP
;;;
-(defvar mew-pop-folder "+.pop")
+(defvar mew-pop-folder
+ (lambda ()
+ (format
+ (if (string= mew-pop-port (mew-pop-port case))
+ "+.pop-%s@%s" "+.pop-%s@%s.%s")
+ (mew-pop-user case)
+ (mew-pop-server case)
+ (mew-pop-port case))))
(defcustom mew-pop-server "localhost"
"*The POP server name. If you want to use a remote POP server,
@@ -583,7 +590,14 @@ (defvar mew-pop-timeout-time 4)
;;; IMAP
;;;
-(defvar mew-imap-folder "+.imap")
+(defvar mew-imap-folder
+ (lambda ()
+ (format
+ (if (string= mew-imap-port (mew-imap-port case))
+ "+.imap-%s@%s" "+.imap-%s@%s.%s")
+ (mew-imap-user case)
+ (mew-imap-server case)
+ (mew-imap-port case))))
(defvar mew-imap-server "localhost")
@@ -619,7 +633,14 @@ (defvar mew-imap-header-only nil)
;;; NNTP
;;;
-(defvar mew-nntp-folder "+.nntp")
+(defvar mew-nntp-folder
+ (lambda ()
+ (format
+ (if (string= mew-nntp-port (mew-nntp-port case))
+ "+.nntp-%s@%s" "+.nntp-%s@%s.%s")
+ (mew-nntp-user case)
+ (mew-nntp-server case)
+ (mew-nntp-port case))))
(defvar mew-nntp-server "newssvr")
Mew-dist メーリングリストの案内