Pop up a buffer showing the "popclient" output so that it is visible
authorChris Hanson <org/chris-hanson/cph>
Sat, 11 May 1996 08:46:52 +0000 (08:46 +0000)
committerChris Hanson <org/chris-hanson/cph>
Sat, 11 May 1996 08:46:52 +0000 (08:46 +0000)
while "popclient" is running.  Use new popped-up buffer features to
keep it visible if an error occurs.

v7/src/edwin/os2.scm
v7/src/edwin/unix.scm

index 6042338a171917867f17609ac39c27b0178aed97..e74be91e22db8b7da7eab3e8d583e6dc60ff26f9 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Id: os2.scm,v 1.30 1996/05/04 17:38:12 cph Exp $
+;;;    $Id: os2.scm,v 1.31 1996/05/11 08:46:35 cph Exp $
 ;;;
 ;;;    Copyright (c) 1994-96 Massachusetts Institute of Technology
 ;;;
@@ -335,24 +335,27 @@ filename suffix \".gz\"."
                               "popmail.tmp")
                           directory))))
     (let ((buffer (temporary-buffer "*popclient*")))
-      (let ((status.reason
-            (let ((args
-                   (list "-u" user-name
-                         "-p" (os2-pop-client-password password)
-                         "-o" target
-                         server)))
-              (apply run-synchronous-process #f (buffer-end buffer) #f #f
-                     "popclient"
-                     "-3"
-                     (if (ref-variable rmail-pop-delete)
-                         args
-                         (cons "-k" args))))))
-       (if (and (eq? 'EXITED (car status.reason))
-                (memv (cdr status.reason) '(0 1)))
-           (kill-buffer buffer)
-           (begin
-             (pop-up-buffer buffer)
-             (editor-error "Error getting mail from POP server.")))))
+      (cleanup-pop-up-buffers
+       (lambda ()
+        (pop-up-buffer buffer)
+        (let ((status.reason
+               (let ((args
+                      (list "-u" user-name
+                            "-p" (os2-pop-client-password password)
+                            "-o" target
+                            server)))
+                 (apply run-synchronous-process #f (buffer-end buffer) #f #f
+                        "popclient"
+                        "-3"
+                        (if (ref-variable rmail-pop-delete)
+                            args
+                            (cons "-k" args))))))
+          (if (and (eq? 'EXITED (car status.reason))
+                   (memv (cdr status.reason) '(0 1)))
+              (kill-pop-up-buffer buffer)
+              (begin
+                (keep-pop-up-buffer buffer)
+                (editor-error "Error getting mail from POP server.")))))))
     target))
 
 (define (os2-pop-client-password password)
index c3b9bb10c45c7827a66913cbb577475a922a956f..aa24e3a17a4cd8f46c9d0deaf631287fa247ef8d 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Id: unix.scm,v 1.69 1996/05/04 17:38:55 cph Exp $
+;;;    $Id: unix.scm,v 1.70 1996/05/11 08:46:52 cph Exp $
 ;;;
 ;;;    Copyright (c) 1989-96 Massachusetts Institute of Technology
 ;;;
@@ -713,25 +713,29 @@ option, instead taking -P <filename>."
 (define (unix/pop-client server user-name password directory)
   (let ((target (->namestring (merge-pathnames ".popmail" directory))))
     (let ((buffer (temporary-buffer "*popclient*")))
-      (let ((status.reason
-            (unix/call-with-pop-client-password-options password
-              (lambda (password-options)
-                (let ((args
-                       (append (list "-u" user-name)
-                               password-options
-                               (list "-o" target server))))
-                  (apply run-synchronous-process #f (buffer-end buffer) #f #f
-                         "popclient"
-                         "-3"
-                         (if (ref-variable rmail-pop-delete)
-                             args
-                             (cons "-k" args))))))))
-       (if (and (eq? 'EXITED (car status.reason))
-                (memv (cdr status.reason) '(0 1)))
-           (kill-buffer buffer)
-           (begin
-             (pop-up-buffer buffer)
-             (editor-error "Error getting mail from POP server.")))))
+      (cleanup-pop-up-buffers
+       (lambda ()
+        (pop-up-buffer buffer)
+        (let ((status.reason
+               (unix/call-with-pop-client-password-options password
+                 (lambda (password-options)
+                   (let ((args
+                          (append (list "-u" user-name)
+                                  password-options
+                                  (list "-o" target server))))
+                     (apply run-synchronous-process
+                            #f (buffer-end buffer) #f #f
+                            "popclient"
+                            "-3"
+                            (if (ref-variable rmail-pop-delete)
+                                args
+                                (cons "-k" args))))))))
+          (if (and (eq? 'EXITED (car status.reason))
+                   (memv (cdr status.reason) '(0 1)))
+              (kill-pop-up-buffer buffer)
+              (begin
+                (keep-pop-up-buffer buffer)
+                (editor-error "Error getting mail from POP server.")))))))
     target))
 
 (define (unix/call-with-pop-client-password-options password receiver)