(mm-display-external): For `copiousoutput' methods,
authorSimon Josefsson <jas@extundo.com>
Mon, 29 Nov 1999 21:43:54 +0000 (21:43 +0000)
committerSimon Josefsson <jas@extundo.com>
Mon, 29 Nov 1999 21:43:54 +0000 (21:43 +0000)
switch to buffer after calling program.

lisp/ChangeLog
lisp/mm-decode.el

index 4f93206..a1aa287 100644 (file)
@@ -1,3 +1,8 @@
+1999-11-29  Simon Josefsson  <jas@pdc.kth.se>
+
+       * mm-decode.el (mm-display-external): For `copiousoutput' methods,
+       switch to buffer after calling program.
+
 1999-11-27 15:21:25  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * nnultimate.el (nnultimate-possibly-change-server): Don't always
@@ -1100,7 +1105,7 @@ Fri Aug 27 13:17:48 1999  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
        * gnus-agent.el (gnus-agent-get-undownloaded-list): Don't
        mark cached articles as `undownloaded'.
 
-Tue Jul 20 02:39:56 1999  Peter von der Ah\e-A\ ei\ f  <peter@ahe.dk>
+Tue Jul 20 02:39:56 1999  Peter von der Ah\ ei\ f  <peter@ahe.dk>
 
        * gnus-sum.el (gnus-summary-exit): Allow gnus-use-adaptive-scoring
        to have buffer local values.
@@ -3652,7 +3657,7 @@ Mon Nov 30 23:38:02 1998  Shenghuo ZHU  <zsh@cs.rochester.edu>
 
        * mm-uu.el (mm-uu-dissect): Use mm-make-handle.
 
-1998-12-01 01:53:49  Fran\e-A\ eg\ fois Pinard  <pinard@iro.umontreal.ca>
+1998-12-01 01:53:49  Fran\ eg\ fois Pinard  <pinard@iro.umontreal.ca>
 
        * nndoc.el (nndoc-mime-parts-type-p): Do related.
 
@@ -5398,7 +5403,7 @@ Mon Sep 14 18:55:38 1998  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
 
        * rfc2047.el (rfc2047-q-encode-region): Would bug out.
 
-1998-09-13  Fran\e-A\ eg\ fois Pinard  <pinard@iro.umontreal.ca>
+1998-09-13  Fran\ eg\ fois Pinard  <pinard@iro.umontreal.ca>
 
        * nndoc.el: Make nndoc-dissection-alist simpler for MIME, adjust all
           related functions.  Handle message/rfc822 parts.  Display subject on
index 72ce0c2..07b85ec 100644 (file)
@@ -348,6 +348,7 @@ external if displayed external."
                         (mm-handle-media-type handle) t))
             (needsterm (or (assoc "needsterm" mime-info)
                            (assoc "needsterminal" mime-info)))
+            (copiousoutput (assoc "copiousoutput" mime-info))
             process file buffer)
        ;; We create a private sub-directory where we store our files.
        (make-directory dir)
@@ -361,18 +362,29 @@ external if displayed external."
        (message "Viewing with %s" method)
        (unwind-protect
            (setq process
-                 (if needsterm
-                     (start-process "*display*" nil
-                                    "xterm"
-                                    "-e" shell-file-name "-c"
-                                    (mm-mailcap-command
-                                     method file (mm-handle-type handle)))
-                   (start-process "*display*"
-                                  (setq buffer (generate-new-buffer "*mm*"))
-                                  shell-file-name
-                                  "-c"
-                                  (mm-mailcap-command
-                                   method file (mm-handle-type handle)))))
+                 (cond (needsterm
+                        (start-process "*display*" nil
+                                       "xterm"
+                                       "-e" shell-file-name "-c"
+                                       (mm-mailcap-command
+                                        method file (mm-handle-type handle))))
+                       (copiousoutput
+                        (start-process "*display*"
+                                       (setq buffer 
+                                             (generate-new-buffer "*mm*"))
+                                       shell-file-name
+                                       "-c"
+                                       (mm-mailcap-command
+                                        method file (mm-handle-type handle)))
+                        (switch-to-buffer buffer))
+                       (t
+                        (start-process "*display*"
+                                       (setq buffer
+                                             (generate-new-buffer "*mm*"))
+                                       shell-file-name
+                                       "-c"
+                                       (mm-mailcap-command
+                                        method file (mm-handle-type handle))))))
          (mm-handle-set-undisplayer handle (cons file buffer)))
        (message "Displaying %s..." (format method file))))))