From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/47490 Path: main.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: coding-system for drafts Date: Thu, 31 Oct 2002 13:44:25 +0900 Organization: Emacsen advocacy group Sender: owner-ding@hpc.uh.edu Message-ID: References: <84adl2llk6.fsf@crybaby.uni-duisburg.de> <84y98htj5s.fsf@crybaby.uni-duisburg.de> <84ptts6xm8.fsf@crybaby.uni-duisburg.de> <84znsv52f5.fsf@crybaby.uni-duisburg.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp-2 X-Trace: main.gmane.org 1036039730 2583 80.91.224.249 (31 Oct 2002 04:48:50 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 31 Oct 2002 04:48:50 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1877GC-0000fX-00 for ; Thu, 31 Oct 2002 05:48:48 +0100 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1877CX-0006Fm-00; Wed, 30 Oct 2002 22:45:01 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 30 Oct 2002 22:45:46 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id WAA15912 for ; Wed, 30 Oct 2002 22:45:30 -0600 (CST) Original-Received: (qmail 8945 invoked by alias); 31 Oct 2002 04:44:37 -0000 Original-Received: (qmail 8940 invoked from network); 31 Oct 2002 04:44:37 -0000 Original-Received: from unknown (HELO mars.web-hosting.com) (207.228.244.150) by gnus.org with SMTP; 31 Oct 2002 04:44:37 -0000 Original-Received: from localhost ([207.228.245.242]) by mars.web-hosting.com (8.11.1/8.11.1) with ESMTP id g9V4iYG27846 for ; Wed, 30 Oct 2002 23:44:34 -0500 (EST) Original-To: ding@gnus.org X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (sparc-sun-solaris2.6) Cancel-Lock: sha1:tgHHJmNpN90CtHxqFI0VQMI83YM= X-Hashcash: 021031:ding@gnus.org:21962c8d9150bb49 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:47490 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:47490 >>>>> In <84znsv52f5.fsf@crybaby.uni-duisburg.de> >>>>> kai.grossjohann@uni-duisburg.de (Kai Gro.AN_johann) wrote: > Katsumi Yamaoka writes: >> I see. That's a good idea. Perhaps we can abolish the variable >> mm-auto-save-coding-system and set the default value for >> message-draft-coding-system to frumple (or iso-2022-7bit). > Yes, maybe. Hm. Oh, yes, new auto-saves will always have the > cookie. So no problem. > (But what happens for XEmacsen which do not interpret the cookie? > Are there such versions?) It works from the early stage of XEmacs 20 with Mule. However, I don't know about the recent XEmacs 21.5 beta (I'm discouraged, it is something broken in the coding-system handling). >> Since not to bind the value for coding-system-for-read is >> required to utilize that function, what should we do if there is >> no such header? Or isn't there nothing to do? > Binding coding-system-for-read is not good because it takes > precedence over everything else. But if we could find a way to > specify the coding system that has LOWER precedence than the coding > cookie, then we can do that. > Maybe it works via auto-coding-alist? No, that takes precedence. So > we should use file-coding-system-alist. Do you think that might work? I've confirmed that the following example works: (let ((file-coding-system-alist (cons (cons (concat "\\`" (regexp-quote (expand-file-name FILE)) "\\'") 'frumple) file-coding-system-alist)) (nnmail-file-coding-system nil)) (nnmail-find-file (expand-file-name FILE))) We can also set the value for file-coding-system-alist rigidly. However, I get confused. Isn't there any difference in this and the next example? (let ((nnmail-file-coding-system 'frumple)) (nnmail-find-file (expand-file-name FILE))) >> In addition, it is required that the coding header should be >> untouchable by a user. In order to ensure it, we will add the >> header using write-contents-hooks and remove it before starting >> edit of a draft. Haven't I made a mistake in my idea? > That would work. > Another idea is to narrow the buffer so that point-min is after the > header. But that might be more fragile. Hm, each is hard to be called good idea. The hidden area might be exposed in the future like message-strip-forbidden-properties does. > Does auto-saving run write-contents-hooks? I've confirmed no. We have to use auto-save-hook together. -- Katsumi Yamaoka