From: Katsumi Yamaoka <yamaoka@jpl.org>
Cc: ding@gnus.org, emacs-devel@gnu.org
Subject: Re: mm-util.el question
Date: Tue, 12 Apr 2005 09:26:08 +0900 [thread overview]
Message-ID: <b9yekdgsuvz.fsf@jpl.org> (raw)
In-Reply-To: 61hdicykk7.fsf@fencepost.gnu.org
>>>>> 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.
next prev parent reply other threads:[~2005-04-12 0:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-11 23:12 mm-util.el question Miles Bader
2005-04-12 0:26 ` Katsumi Yamaoka [this message]
2005-04-12 0:39 ` Katsumi Yamaoka
2005-04-12 4:11 ` Miles Bader
2005-04-12 4:51 ` Katsumi Yamaoka
2005-04-13 6:41 ` Katsumi Yamaoka
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b9yekdgsuvz.fsf@jpl.org \
--to=yamaoka@jpl.org \
--cc=ding@gnus.org \
--cc=emacs-devel@gnu.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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).