Gnus development mailing list
 help / color / mirror / Atom feed
From: Fabrice POPINEAU <popineau@ese-metz.fr>
Cc: ding@gnus.org
Subject: Re: weirdness wrt file-coding
Date: 14 Dec 1998 14:29:21 +0100	[thread overview]
Message-ID: <uemq2am32.fsf@ese-metz.fr> (raw)
In-Reply-To: Shenghuo ZHU's message of "09 Dec 1998 13:58:22 -0500"

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

> Try this patch. 
> 
> A new variable mm-text-coding-system is added. It is no-conversion in
> XEmacs (Unix or NT), raw-text in Emacs, raw-text-dos in NTEmacs (I
> guess raw-text != raw-text-dos in NTEmacs).

Great ! I was looking for something along these lines, and it seems to 
work ok. Not extensively tested, but got some hundred of messages
tight as expected.

Thanks,

Fabrice

> ChangeLog:
> 
> Wed Dec  9 13:30:29 1998  Shenghuo ZHU  <zsh@cs.rochester.edu>
> 
> 	* mm-util.el (mm-running-ntemacs): New variable.
> 	(mm-text-coding-system): Ditto.
> 	* nnmail.el (nnmail-incoming-coding-system): Ditto.
> 	(nnmail-split-incoming): Use nnmail-incoming-coding-system.
> 
> :- cut -------------
> --- mm-util.el	1998/12/09 16:40:43	1.1
> +++ mm-util.el	1998/12/09 18:30:18
> @@ -26,10 +26,25 @@
>  
>  (defvar mm-running-xemacs (string-match "XEmacs" emacs-version))
>  
> +(defvar mm-running-ntemacs 
> +  (and (not mm-running-xemacs) 
> +       (string-match "nt" system-configuration)))
> +
>  (defvar mm-binary-coding-system 
>      (if mm-running-xemacs
>  	'binary 'no-conversion)
>      "100% binary coding system.")   
> +
> +(defvar mm-text-coding-system 
> +  (cond 
> +   ((not (fboundp 'coding-system-p)) nil)
> +   (mm-running-xemacs  ;; XEmacs
> +    (and (coding-system-p 'no-conversion) 'no-conversion))
> +   (mm-running-ntemacs ;; NTEmacs
> +    (and (coding-system-p 'raw-text-dos) 'raw-text-dos))
> +   ((coding-system-p 'raw-text) 'raw-text) ;; Emacs
> +   (t nil))
> +  "100% text coding system, for removing ^M.")
>  
>  (defvar mm-default-coding-system nil
>    "The default coding system to use.")  
> 
> --- nnmail.el	1998/12/09 18:31:41	1.1
> +++ nnmail.el	1998/12/09 18:36:06
> @@ -501,6 +501,10 @@
>        'raw-text-dos 'binary)
>    "Another coding system used in nnmail.")
>  
> +(defvar nnmail-incoming-coding-system
> +  mm-text-coding-system
> +  "Coding system used in reading inbox")
> +
>  (defun nnmail-find-file (file)
>    "Insert FILE in server buffer safely."
>    (set-buffer nntp-server-buffer)
> @@ -1007,7 +1011,8 @@
>        ;; Insert the incoming file.
>        (set-buffer (get-buffer-create " *nnmail incoming*"))
>        (erase-buffer)
> -      (nnheader-insert-file-contents incoming)
> +      (let ((nnheader-file-coding-system nnmail-incoming-coding-system))
> +	(nnheader-insert-file-contents incoming))
>        (unless (zerop (buffer-size))
>  	(goto-char (point-min))
>  	(save-excursion (run-hooks 'nnmail-prepare-incoming-hook))
> 



  reply	other threads:[~1998-12-14 13:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-09 13:26 Fabrice POPINEAU
1998-12-09 18:58 ` Shenghuo ZHU
1998-12-14 13:29   ` Fabrice POPINEAU [this message]
     [not found] <162AE4075794A2D6852566D5006B60E1.004BF1EF802566D5@notes.teradyne.com>
1998-12-09 16:52 ` Adrian Aichner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uemq2am32.fsf@ese-metz.fr \
    --to=popineau@ese-metz.fr \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).