[Mew-dist 11433] Re: flush queue

Kazu Yamamoto ( 山本和彦 ) kazu at example.com
1999年 11月 24日 (水) 21:43:41 JST


From: nara at example.com
Subject: [Mew-dist 11430] Re: flush queue

> 同期/非同期で呼出し方が、かわるのですか。(どのようにすれば良いのでしょ
> か)

call-process を start-process に変えると説明すればいいんでしょうか。

以下のパッチを当てて下さい。

--かず
-------------- next part --------------
===================================================================
RCS file: /usr/home/kazu/cvsroot/Mew/mew/mew-draft.el,v
retrieving revision 1.158
retrieving revision 1.159
diff -c -r1.158 -r1.159
*** mew-draft.el	1999/11/22 07:31:37	1.158
--- mew-draft.el	1999/11/24 11:50:38	1.159
***************
*** 1005,1011 ****
  	 (msg (file-name-nondirectory fld-msg)))
      (mew-encode privacy)
      (mew-encode-send-message fld msg 'justqueuing)
!     (message "This message is queued in %s." mew-queue-folder)))
  
  (defun mew-draft-send-message ()
    (interactive)
--- 1005,1011 ----
  	 (msg (file-name-nondirectory fld-msg)))
      (mew-encode privacy)
      (mew-encode-send-message fld msg 'justqueuing)
!     (message "This message has been queued in %s." mew-queue-folder)))
  
  (defun mew-draft-send-message ()
    (interactive)
Index: mew-encode.el
===================================================================
RCS file: /usr/home/kazu/cvsroot/Mew/mew/mew-encode.el,v
retrieving revision 1.122
retrieving revision 1.124
diff -c -r1.122 -r1.124
*** mew-encode.el	1999/11/22 07:43:43	1.122
--- mew-encode.el	1999/11/24 11:50:38	1.124
***************
*** 882,892 ****
        (setq mew-watch-buffer-process
  	    (mew-im-start-process mew-prog-imput
  				  "Send"
  				  "-draftfolder" fld
  				  "-draftmessage" msg
  				  (if justqueuing
  				      "--justqueuing=on"
! 				    "--justqueuing=off")
  				  "-watch" "-verbose"))
        (mew-set-process-cs mew-watch-buffer-process
  			  mew-cs-autoconv mew-cs-dummy)
--- 882,893 ----
        (setq mew-watch-buffer-process
  	    (mew-im-start-process mew-prog-imput
  				  "Send"
+ 				  'current-buffer
  				  "-draftfolder" fld
  				  "-draftmessage" msg
  				  (if justqueuing
  				      "--justqueuing=on"
! 				    "--queuing=on")
  				  "-watch" "-verbose"))
        (mew-set-process-cs mew-watch-buffer-process
  			  mew-cs-autoconv mew-cs-dummy)
Index: mew-func.el
===================================================================
RCS file: /usr/home/kazu/cvsroot/Mew/mew/mew-func.el,v
retrieving revision 1.95
retrieving revision 1.97
diff -c -r1.95 -r1.97
*** mew-func.el	1999/11/23 04:43:13	1.95
--- mew-func.el	1999/11/24 11:50:38	1.97
***************
*** 208,213 ****
--- 208,226 ----
  	       (throw 'loop (setcar var (, value))))
  	   (setq var (cdr var)))))))
  
+ (defmacro mew-remove (variable key)
+   (` (let* ((crn (, variable)) prv)
+        (if (equal (nth 0 (car crn)) (, key))
+ 	   (setq (, variable) (cdr crn))
+ 	 (setq prv crn)
+ 	 (setq crn (cdr crn))
+ 	 (catch 'loop
+ 	   (while crn
+ 	     (if (equal (nth 0 (car crn)) (, key))
+ 		 (throw 'loop (setcdr prv (cdr crn))))
+ 	     (setq prv crn)
+ 	     (setq crn (cdr crn))))))))
+ 
  ;;
  ;; Generic extract functions
  ;;
***************
*** 762,770 ****
        (if msg (message "%s ... failed" msg) (message "failed"))
        nil)))
  
! (defun mew-im-start-process (prog name &rest arg)
    (apply (function start-process)
! 	 name (current-buffer) prog
  	 (append arg mew-prog-im-arg)))
  
  (defconst mew-im-boundary-begin "^---BEGIN-IMGET-MESSAGE---\n")
--- 775,783 ----
        (if msg (message "%s ... failed" msg) (message "failed"))
        nil)))
  
! (defun mew-im-start-process (prog name cbufp &rest arg)
    (apply (function start-process)
! 	 name (if cbufp (current-buffer) nil) prog
  	 (append arg mew-prog-im-arg)))
  
  (defconst mew-im-boundary-begin "^---BEGIN-IMGET-MESSAGE---\n")
Index: mew-summary.el
===================================================================
RCS file: /usr/home/kazu/cvsroot/Mew/mew/mew-summary.el,v
retrieving revision 1.249
retrieving revision 1.251
diff -c -r1.249 -r1.251
*** mew-summary.el	1999/11/23 08:46:27	1.249
--- mew-summary.el	1999/11/24 11:50:38	1.251
***************
*** 1671,1679 ****
    "Flush the mail queue explicitly."
    (interactive)
    (if (or (not mew-ask-flush-queue) (y-or-n-p "Flush queue? "))
!       (progn
! 	(mew-im-call-process-no-output "Sending message" mew-prog-imput "-q")
  	(mew-summary-clean-folder-cache mew-queue-folder))))
  
  (provide 'mew-summary)
  
--- 1671,1684 ----
    "Flush the mail queue explicitly."
    (interactive)
    (if (or (not mew-ask-flush-queue) (y-or-n-p "Flush queue? "))
!       (let (pro)
! 	(message "Flushing the queue ... ")
! 	(setq pro (mew-im-start-process mew-prog-imput "Send" nil "-q"))
! 	(set-process-sentinel pro 'mew-flush-sentinel)
  	(mew-summary-clean-folder-cache mew-queue-folder))))
+ 
+ (defun mew-flush-sentinel (process event)
+   (message "Flushing the queue ... done"))
  
  (provide 'mew-summary)
  


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