From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/19167 Path: main.gmane.org!not-for-mail From: Shenghuo ZHU Newsgroups: gmane.emacs.gnus.general Subject: Re: Viewing faxes produces strange prompt Date: 24 Nov 1998 15:23:53 -0500 Organization: Computer Dept of U Rochester Sender: owner-ding@hpc.uh.edu Message-ID: <5baf1g4z6u.fsf@schnapps.cs.rochester.edu> References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 X-Trace: main.gmane.org 1035157567 10231 80.91.224.250 (20 Oct 2002 23:46:07 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 23:46:07 +0000 (UTC) Return-Path: Original-Received: from karazm.math.uh.edu (karazm.math.uh.edu [129.7.128.1]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id PAA06485 for ; Tue, 24 Nov 1998 15:24:40 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by karazm.math.uh.edu (8.9.1/8.9.1) with ESMTP id OAB17488; Tue, 24 Nov 1998 14:24:17 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 24 Nov 1998 14:24:15 -0600 (CST) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id OAA11718 for ; Tue, 24 Nov 1998 14:24:05 -0600 (CST) Original-Received: from cayuga.cs.rochester.edu (cayuga.cs.rochester.edu [192.5.53.209]) by sclp3.sclp.com (8.8.5/8.8.5) with SMTP id PAA06474 for ; Tue, 24 Nov 1998 15:23:56 -0500 (EST) Original-Received: from slate.cs.rochester.edu (slate.cs.rochester.edu [192.5.53.101]) by cayuga.cs.rochester.edu (8.6.9/O) with ESMTP id PAA12953 for ; Tue, 24 Nov 1998 15:23:55 -0500 Original-Received: from schnapps.cs.rochester.edu (schnapps.cs.rochester.edu [192.5.53.194]) by slate.cs.rochester.edu (8.6.9/O) with ESMTP id PAA11051 for ; Tue, 24 Nov 1998 15:23:54 -0500 Original-Received: (from zsh@localhost) by schnapps.cs.rochester.edu (SMI-8.6/N++) id PAA07986; Tue, 24 Nov 1998 15:23:54 -0500 Original-To: ding@gnus.org X-Attribution: ZSH X-Face: 'IF:e51ib'Qbl^(}l^&4-J`'P!@[4~O|&k#:@Gld#b/]oMq&`&FVY._3+b`mzp~Jeve~/#/ ERD!OTe<86UhyN=l`mrPY)M7_}`Ktt\K+58Z!hu7>qU,i.N7TotU[FYE(f1;}`g2xj!u*l`^&=Q!g{ *q|ddto|nkt"$r,K$[)"|6,elPH= GJ6Q In-Reply-To: Kai.Grossjohann@CS.Uni-Dortmund.DE's message of "24 Nov 1998 19:05:38 +0100" Original-Lines: 78 User-Agent: Gnus/5.070054 (Pterodactyl Gnus v0.54) Emacs/20.3 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:19167 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:19167 External viewing and saving are only tested in Gnu Emacs. Hope this patch does not bring more troubles for XEmacs and NTEmacs. -- Shenghuo :- cut ----- --- ChangeLog 1998/11/24 19:55:33 1.1 +++ ChangeLog 1998/11/24 20:08:37 @@ -1,3 +1,9 @@ +Tue Nov 24 14:57:41 1998 Shenghuo ZHU + + * mm-util.el (mm-binary-coding-system): New variable. + (mm-with-unibyte-buffer): Use mm-binary-coding-system. + * mm-decode.el (mm-display-external): Ditto. + Tue Nov 24 10:43:06 1998 Lars Magne Ingebrigtsen * gnus.el: Pterodactyl Gnus v0.54 is released. --- mm-decode.el 1998/11/24 19:34:48 1.1 +++ mm-decode.el 1998/11/24 20:07:55 @@ -241,7 +241,7 @@ (select-window win))) (switch-to-buffer (generate-new-buffer "*mm*"))) (buffer-disable-undo) - (mm-set-buffer-file-coding-system 'binary) + (mm-set-buffer-file-coding-system mm-binary-coding-system) (insert-buffer-substring cur) (message "Viewing with %s" method) (let ((mm (current-buffer))) @@ -264,8 +264,7 @@ (setq file (expand-file-name (file-name-nondirectory filename) dir)) (setq file (make-temp-name (expand-file-name "mm." dir)))) - (write-region (point-min) (point-max) - file nil 'nomesg nil 'binary) + (write-region (point-min) (point-max) file nil 'nomesg) (message "Viewing with %s" method) (unwind-protect (setq process @@ -451,6 +450,8 @@ (when (or (not (file-exists-p file)) (yes-or-no-p (format "File %s already exists; overwrite? " file))) + ;; Now every coding system is 100% binary within mm-with-unibyte-buffer + ;; Is text still special? (let ((coding-system-for-write (if (equal "text" (car (split-string (car (mm-handle-type handle)) "/"))) --- mm-util.el 1998/11/24 19:34:49 1.1 +++ mm-util.el 1998/11/24 20:00:03 @@ -24,6 +24,11 @@ ;;; Code: +(defvar mm-binary-coding-system + (if (string-match "XEmacs" emacs-version) + 'binary 'no-conversion) + "100% binary coding system.") + (defvar mm-default-coding-system nil "The default coding system to use.") @@ -220,7 +225,9 @@ (get-buffer-create (generate-new-buffer-name " *temp*"))) (unwind-protect (with-current-buffer ,temp-buffer - (let ((buffer-file-coding-system 'binary)) + (let ((buffer-file-coding-system mm-binary-coding-system) + (coding-system-for-read mm-binary-coding-system) + (coding-system-for-write mm-binary-coding-system)) ,@forms)) (and (buffer-name ,temp-buffer) (kill-buffer ,temp-buffer))))