From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general,gmane.emacs.devel Subject: Re: mm-util.el question Date: Tue, 12 Apr 2005 09:26:08 +0900 Organization: Emacsen advocacy group Message-ID: References: <61hdicykk7.fsf@fencepost.gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1113265588 8916 80.91.229.2 (12 Apr 2005 00:26:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 12 Apr 2005 00:26:28 +0000 (UTC) Cc: ding@gnus.org, emacs-devel@gnu.org Original-X-From: ding-owner+M8672@lists.math.uh.edu Tue Apr 12 02:26:24 2005 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DL9EO-0006Rg-9B for ding-account@gmane.org; Tue, 12 Apr 2005 02:26:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1DL9EZ-0002FB-00; Mon, 11 Apr 2005 19:26:28 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1DL9ER-0002F3-00 for ding@lists.math.uh.edu; Mon, 11 Apr 2005 19:26:19 -0500 Original-Received: from quimby.gnus.org ([80.91.224.244]) by util2.math.uh.edu with esmtp (Exim 4.30) id 1DL9EO-0002zQ-8K for ding@lists.math.uh.edu; Mon, 11 Apr 2005 19:26:16 -0500 Original-Received: from washington.hostforweb.net ([69.61.11.2]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1DL9EN-0001Tf-00 for ; Tue, 12 Apr 2005 02:26:15 +0200 Original-Received: from localhost ([127.0.0.1]) by washington.hostforweb.net with esmtpa (Exim 4.44) id 1DL9EQ-0000b6-8j; Mon, 11 Apr 2005 20:26:18 -0400 Original-To: Miles Bader 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.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:6WHs0EjmJocko8NFTwKvG6C1rFI= X-Hashcash: 1:20:050412:miles@gnu.org::D644fqrUpclAHcY1:00000fzA X-Hashcash: 1:20:050412:ding@gnus.org::KWNrNXw7pN3v4SZz:00000E9j X-Hashcash: 1:20:050412:emacs-devel@gnu.org::NUlpj+nV1UhiOsWu:0000000000000000000000000000000000000000003PIW X-Antivirus-Scanner: Clean mail though you should still use an Antivirus X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - washington.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -4.8 (----) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:60145 gmane.emacs.devel:35873 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:35873 >>>>> In <61hdicykk7.fsf@fencepost.gnu.org> Miles Bader wrote: > In merging some of Stefan's Gnus changes from the Emacs tree into the Gnus > trunk, I ran across this change, which I'm not sure about, in mm-util.el: > @@ -75,4 +93,5 @@ > (string-as-multibyte . identity) > + (string-to-multibyte . mm-string-as-multibyte) > (multibyte-string-p . ignore) > ;; It is not a MIME function, but some MIME functions use it. > (make-temp-file . (lambda (prefix &optional dir-flag) It cannot achieve the purpose in Emacs 21. Currently, it is used in `gnus-mime-inline-part' in the Gnus trunk to display binary data *as is*. For example: (let ((string (string-as-unibyte "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff")) (buffer (get-buffer-create "*testing*"))) (pop-to-buffer buffer) (erase-buffer) (set-buffer-multibyte t) (insert (mm-string-to-multibyte string))) The `string' have to be shown as `\370\371\372\373\374\375\376\377', not as some *characters*. > The Gnus trunk already has an entry for `string-to-multibyte': > (string-to-multibyte > . (lambda (string) > "Return a multibyte string with the same individual chars as string." > (mapconcat > (lambda (ch) (mm-string-as-multibyte (char-to-string ch))) > string ""))) > So is the more complicated Gnus version necessary, or would Stefan's version > (making `mm-string-to-multibyte' the same as `mm-string-as-multibyte') work > as well? The latter seems to me to be profitable for all.