[Mew-dist 10055] Re: Cache Password on b48b

Kazu Yamamoto ( 山本和彦 ) kazu at example.com
1999年 8月 14日 (土) 12:13:56 JST


From: Hiromichi Kawachi <hirom at example.com>
Subject: [Mew-dist 10053] Cache Password on b48b
Date: Sat, 14 Aug 1999 06:21:48 +0900

> のいずれかがケースバイケースでかわる,という状況です.(なんどか,
> XEmacs を立ち上げ直して確認してますが.)
> また,(1) となった後は,
> 双方のサーバーから順番にメールを落すことには,まだ一度も成功していま
> せん.

ああ、やっぱり同時に動かす人がいるんですね。排他制御をサボっていた性だ
と思います。以下のパッチを当てて試して下さい。

--かず@雨嫌い

Index: mew-mark.el
===================================================================
RCS file: /usr/home/kazu/cvsroot/Mew/mew/mew-mark.el,v
retrieving revision 1.75
retrieving revision 1.76
diff -c -r1.75 -r1.76
*** mew-mark.el	1999/08/13 09:23:37	1.75
--- mew-mark.el	1999/08/14 03:17:58	1.76
***************
*** 714,719 ****
--- 714,720 ----
      (or (listp dsts) (setq dsts (list dsts)))
      (or (listp msgs) (setq msgs (list msgs)))
      (setq mew-summary-imap-string nil)
+     (setq mew-summary-imap-config mew-config-imget)
      (setq mew-summary-imap-process (apply (function start-process)
  					    imprg nil imprg
  					    (format "--src=%s" src)
***************
*** 743,749 ****
      (and mew-summary-imap-string
  	 (string-match (format "^%s: \\([^\n]*\\)" prog)
  		       mew-summary-imap-string)
! 	 (mew-passwd-set-passwd mew-config-imget nil)
  	 (message "Refile error: %s"
  		  (mew-match 1 mew-summary-imap-string)))
      (setq mew-summary-imap-process nil)
--- 744,750 ----
      (and mew-summary-imap-string
  	 (string-match (format "^%s: \\([^\n]*\\)" prog)
  		       mew-summary-imap-string)
! 	 (mew-passwd-set-passwd mew-summary-imap-config nil)
  	 (message "Refile error: %s"
  		  (mew-match 1 mew-summary-imap-string)))
      (setq mew-summary-imap-process nil)
Index: mew-scan.el
===================================================================
RCS file: /usr/home/kazu/cvsroot/Mew/mew/mew-scan.el,v
retrieving revision 1.53
retrieving revision 1.54
diff -c -r1.53 -r1.54
*** mew-scan.el	1999/08/13 12:00:33	1.53
--- mew-scan.el	1999/08/14 03:17:58	1.54
***************
*** 118,123 ****
--- 118,124 ----
  		  (mew-erase-buffer))))
  	    (setq mew-summary-buffer-start-point (point))
  	    (setq mew-summary-buffer-string nil) ;; just in case
+ 	    (setq mew-summary-buffer-config mew-config-imget)
  	    (mew-piolet read mew-cs-pick
  	     (setq mew-summary-buffer-process
  		   (apply (function start-process) 
***************
*** 136,142 ****
  				   ((string-match  mew-prog-imget prog)
  				    (append
  				     (list (concat "--config="
! 						   mew-config-imget))
  				     mew-prog-imget-arg-list))
  				   ((string-match  mew-prog-imls prog)
  				    (cond
--- 137,143 ----
  				   ((string-match  mew-prog-imget prog)
  				    (append
  				     (list (concat "--config="
! 						   mew-summary-buffer-config))
  				     mew-prog-imget-arg-list))
  				   ((string-match  mew-prog-imls prog)
  				    (cond
***************
*** 170,180 ****
  
  (defun mew-summary-scan-passwd ()
    (let ((prompt "Enter password"))
!     (if (not (equal mew-config-imget mew-config-default))
! 	(setq prompt (format "%s (%s)" prompt mew-config-imget)))
      (setq prompt (concat prompt " : "))
      (if mew-use-cached-passwd
! 	(mew-input-passwd prompt mew-config-imget)
        (mew-input-passwd prompt))))
  
  (defun mew-summary-scan-filter (process string)
--- 171,181 ----
  
  (defun mew-summary-scan-passwd ()
    (let ((prompt "Enter password"))
!     (if (not (equal mew-summary-buffer-config mew-config-default))
! 	(setq prompt (format "%s (%s)" prompt mew-summary-buffer-config)))
      (setq prompt (concat prompt " : "))
      (if mew-use-cached-passwd
! 	(mew-input-passwd prompt mew-summary-buffer-config)
        (mew-input-passwd prompt))))
  
  (defun mew-summary-scan-filter (process string)
***************
*** 234,244 ****
  	    (message "No new message"))
  	   ((string-match (format "^%s: ERROR: invalid password" prog)
  			  mew-summary-buffer-string)
! 	    (mew-passwd-set-passwd mew-config-imget nil)
  	    (message "Password is wrong!"))
  	   ((string-match (format "^%s: ERROR: \\([^\n]*\\)" prog)
  			  mew-summary-buffer-string)
! 	    (mew-passwd-set-passwd mew-config-imget nil)
  	    (message "Get error: %s" (mew-match 1 mew-summary-buffer-string)))
  	   ((string-match (format "^%s: \\([0-9]+\\) message" prog)
  			  mew-summary-buffer-string)
--- 235,245 ----
  	    (message "No new message"))
  	   ((string-match (format "^%s: ERROR: invalid password" prog)
  			  mew-summary-buffer-string)
! 	    (mew-passwd-set-passwd mew-summary-buffer-config nil)
  	    (message "Password is wrong!"))
  	   ((string-match (format "^%s: ERROR: \\([^\n]*\\)" prog)
  			  mew-summary-buffer-string)
! 	    (mew-passwd-set-passwd mew-summary-buffer-config nil)
  	    (message "Get error: %s" (mew-match 1 mew-summary-buffer-string)))
  	   ((string-match (format "^%s: \\([0-9]+\\) message" prog)
  			  mew-summary-buffer-string)
***************
*** 252,258 ****
  	  (cond
  	   ((string-match (format "^%s: ERROR: \\([^\n]*\\)" prog)
  			  mew-summary-buffer-string)
! 	    (mew-passwd-set-passwd mew-config-imget nil) ;; xxx
  	    (message "List error: %s" (mew-match 1 mew-summary-buffer-string)))
  	   (t
  	    (if (mew-folder-imapp folder)
--- 253,259 ----
  	  (cond
  	   ((string-match (format "^%s: ERROR: \\([^\n]*\\)" prog)
  			  mew-summary-buffer-string)
! 	    (mew-passwd-set-passwd mew-summary-buffer-config nil)
  	    (message "List error: %s" (mew-match 1 mew-summary-buffer-string)))
  	   (t
  	    (if (mew-folder-imapp folder)
Index: mew-vars.el
===================================================================
RCS file: /usr/home/kazu/cvsroot/Mew/mew/mew-vars.el,v
retrieving revision 1.161
retrieving revision 1.162
diff -c -r1.161 -r1.162
*** mew-vars.el	1999/08/13 09:23:37	1.161
--- mew-vars.el	1999/08/14 03:17:58	1.162
***************
*** 174,182 ****
--- 174,184 ----
  (defvar mew-summary-buffer-start-point nil)
  (defvar mew-summary-buffer-process nil)
  (defvar mew-summary-buffer-string nil)
+ (defvar mew-summary-buffer-config nil)
  (defvar mew-summary-buffer-reviews nil)
  (defvar mew-summary-imap-process nil)
  (defvar mew-summary-imap-string nil)
+ (defvar mew-summary-imap-config nil)
  (defvar mew-summary-buffer-direction nil)
  (defvar mew-summary-buffer-folder-cache-time nil)
  (defvar mew-summary-buffer-refile nil)
***************
*** 202,210 ****
--- 204,214 ----
  	(list 'mew-summary-buffer-start-point
  	      'mew-summary-buffer-process
  	      'mew-summary-buffer-string
+ 	      'mew-summary-buffer-config
  	      'mew-summary-buffer-reviews
  	      'mew-summary-imap-process
  	      'mew-summary-imap-string
+ 	      'mew-summary-imap-config
  	      'mew-summary-buffer-direction
  	      'mew-summary-buffer-folder-cache-time
  	      'mew-summary-buffer-refile




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