Gnus development mailing list
 help / color / mirror / Atom feed
* Viewing faxes produces strange prompt
@ 1998-11-24 18:05 Kai.Grossjohann
  1998-11-24 19:14 ` Shenghuo ZHU
  1998-11-24 20:23 ` Shenghuo ZHU
  0 siblings, 2 replies; 5+ messages in thread
From: Kai.Grossjohann @ 1998-11-24 18:05 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 874 bytes --]

I just hit `2 b' to view a fax (MIME type image/g3), and pgnus-0.54
asked me the following question:

,-----
| The target text contains the following non ASCII character(s):
|                     ascii: š€...
| These can't be encoded safely by the coding system binary.
| 
| Please select one from the following safe coding systems:
|   iso-2022-7bit iso-2022-7bit-lock iso-2022-8bit-ss2 emacs-mule
|   raw-text iso-2022-7bit-ss2 compound-text
`-----

I chose `emacs-mule' which seemed to work -- the resulting g3view
process displayed the image just fine.

I'm not sure what to make of this.  Hm.

The message had three parts.  The first and last part were
content-type text/plain (charset=us-ascii), content-transfer-encoding
7bit.  The middle part was content-type image/g3n,
content-transfer-encoding base64.

What's the story?

kai
-- 
Life is hard and then you die.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Viewing faxes produces strange prompt
  1998-11-24 18:05 Viewing faxes produces strange prompt Kai.Grossjohann
@ 1998-11-24 19:14 ` Shenghuo ZHU
  1998-11-24 19:17   ` Hrvoje Niksic
  1998-11-24 19:21   ` Kai.Grossjohann
  1998-11-24 20:23 ` Shenghuo ZHU
  1 sibling, 2 replies; 5+ messages in thread
From: Shenghuo ZHU @ 1998-11-24 19:14 UTC (permalink / raw)


>>>>> "KG" == Kai Grossjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> writes:

KG> What's the story?

Blame me. I am really frustrated by coding system. :-(

GNU Emacs says

DOC> = -- binary (alias of no-conversion)
DOC>   Do no conversion
DOC> Type: nil (do no conversion)
DOC> EOL type: LF

But it seems not. XEmacs' no-conversion is different from Gnus Emacs'.

I think we should create

(defvar gnus-binary-coding-system 
    (if (string-match "XEmacs\\|Lucid" emacs-version)
	'binary 'no-conversion)
    "100% binary coding system")   

to replace the "binary". 

I will send the patch soon.

Sorry for inconvenience.

-- 
Shenghuo


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Viewing faxes produces strange prompt
  1998-11-24 19:14 ` Shenghuo ZHU
@ 1998-11-24 19:17   ` Hrvoje Niksic
  1998-11-24 19:21   ` Kai.Grossjohann
  1 sibling, 0 replies; 5+ messages in thread
From: Hrvoje Niksic @ 1998-11-24 19:17 UTC (permalink / raw)


Shenghuo ZHU <zsh@cs.rochester.edu> writes:

>     (if (string-match "XEmacs\\|Lucid" emacs-version)

I think we can definitely drop the `Lucid' part for this.  :-)

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
The Lord protects children and fools...  But don't push it.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Viewing faxes produces strange prompt
  1998-11-24 19:14 ` Shenghuo ZHU
  1998-11-24 19:17   ` Hrvoje Niksic
@ 1998-11-24 19:21   ` Kai.Grossjohann
  1 sibling, 0 replies; 5+ messages in thread
From: Kai.Grossjohann @ 1998-11-24 19:21 UTC (permalink / raw)


Shenghuo ZHU <zsh@cs.rochester.edu> writes:

  > Blame me. I am really frustrated by coding system. :-(

Poor you.  I was having difficulties understanding all the problems
people had with MULE.  But having read your descriptions of the stuff
you have had to deal with made me understand these problems better.

Not that it will make you feel any better that you have made me
smarter, though ;-)

kai
-- 
Life is hard and then you die.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Viewing faxes produces strange prompt
  1998-11-24 18:05 Viewing faxes produces strange prompt Kai.Grossjohann
  1998-11-24 19:14 ` Shenghuo ZHU
@ 1998-11-24 20:23 ` Shenghuo ZHU
  1 sibling, 0 replies; 5+ messages in thread
From: Shenghuo ZHU @ 1998-11-24 20:23 UTC (permalink / raw)



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  <zsh@cs.rochester.edu>
+
+	* 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  <larsi@menja.ifi.uio.no>
 
 	* 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))))


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1998-11-24 20:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-11-24 18:05 Viewing faxes produces strange prompt Kai.Grossjohann
1998-11-24 19:14 ` Shenghuo ZHU
1998-11-24 19:17   ` Hrvoje Niksic
1998-11-24 19:21   ` Kai.Grossjohann
1998-11-24 20:23 ` Shenghuo ZHU

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).