[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mm-util.el question
From: |
Katsumi Yamaoka |
Subject: |
Re: mm-util.el question |
Date: |
Tue, 12 Apr 2005 09:26:08 +0900 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux) |
>>>>> In <address@hidden> 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.