From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/51395 Path: main.gmane.org!not-for-mail From: Reiner Steib <4.uce.03.r.s@nurfuerspam.de> Newsgroups: gmane.emacs.gnus.general Subject: Re: mm-coding-system-priorities Date: Sun, 13 Apr 2003 22:44:36 +0200 Organization: Dept. of Theoretical Physics, University of Ulm Sender: owner-ding@hpc.uh.edu Message-ID: References: Reply-To: reiner.steib@gmx.de NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1050268334 24685 80.91.224.249 (13 Apr 2003 21:12:14 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 13 Apr 2003 21:12:14 +0000 (UTC) Original-X-From: owner-ding@hpc.uh.edu Sun Apr 13 23:12:12 2003 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 194olo-0006Px-00 for ; Sun, 13 Apr 2003 23:12:12 +0200 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 194om5-00029p-00; Sun, 13 Apr 2003 16:12:29 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sun, 13 Apr 2003 16:13:35 -0500 (CDT) Original-Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id QAA20155 for ; Sun, 13 Apr 2003 16:13:22 -0500 (CDT) Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 194olA-0006O0-00 for ; Sun, 13 Apr 2003 23:11:32 +0200 Mail-Followup-To: ding@hpc.uh.edu X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@hpc.uh.edu Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 194ol9-0006Nq-00 for ; Sun, 13 Apr 2003 23:11:31 +0200 Original-Lines: 56 Original-X-Complaints-To: usenet@main.gmane.org X-Face: .*T0'iU(sujq_j9\J>-d4fg;N/1++U#U$_5ii6k.=|"-n'?5O:Hyz&wi'-!I~,}7~GgT=0S /&-R5sbkNy5+Xo1y{Tw2KKxi@Xh"g@]Qc|.U<*]WDd)qvGowFDvfU1F]{EDho:7P0@|oOD=Bc{K4?> WP68K[Mx:}=`ZT'6g4'f+g?;`vri2!)xGy}3:=l'(/Cea0l4lo^H5#@/Z3ev Mail-Copies-To: nobody User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:+siE/VksnXobrP3aN/KX7tnUnak= Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:51395 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:51395 On Sat, Apr 12 2003, Lars Magne Ingebrigtsen wrote: > Reiner Steib <4.uce.03.r.s@nurfuerspam.de> writes: >> ,----[ M-x describe-coding-system utf-8 RET ] >> | u -- utf-8 (alias of mule-utf-8) >> `---- >> >> Hm, does it even expect the original name of the coding-system and >> *not* an alias? If so, I think this should be made more clear in the >> documentation. > > utf-8 is both a coding system and a charset, I think. AFAICS, we need to distinguish between "base coding-system", "aliased/subsidiary coding-system" and mime-charset. utf-8 is both, an "aliased/subsidiary coding-system" and a mime-charset, but not a "base coding-system". The problem is, that using utf-8 in `mm-coding-system-priorities' has no effect[1] at all: You need to use a non-aliased coding-system, as returned by `coding-system-base': ,----[ C-h f coding-system-base RET ] | coding-system-base is a compiled Lisp function in `international/mule'. | (coding-system-base CODING-SYSTEM) | | Return the base coding system of CODING-SYSTEM. | A base coding system is what made by `make-coding-system'. | Any alias nor subsidiary coding systems are not base coding system. `---- The doc-string of `mm-coding-system-priorities' doesn't mention this. Even the default value for users with "current-language-environment = Japanese" contains the bogus entry utf-8. > (And I don't think it should matter whether you use the name or an > alias.) Changing `mm-sort-coding-systems-predicate' should achieve it (I have committed this): (defun mm-sort-coding-systems-predicate (a b) (let ((priorities (mapcar (lambda (cs) ;; Note: invalid entries are dropped silently (and (coding-system-p cs) (coding-system-base cs))) mm-coding-system-priorities))) (> (length (memq a priorities)) (length (memq b priorities))))) Bye, Reiner. [1] See my test in -- ,,, (o o) ---ooO-(_)-Ooo--- PGP key available via WWW http://rsteib.home.pages.de/