unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 27141@debbugs.gnu.org
Subject: bug#27141: 26.0.50; mml-generate-mime-1 broken
Date: Thu, 01 Jun 2017 17:32:53 +0900	[thread overview]
Message-ID: <b4ma85skszu.fsf@jpl.org> (raw)
In-Reply-To: <b4mwp8y98pz.fsf@jpl.org>

On Thu, 01 Jun 2017 09:17:06 +0200, Lars Ingebrigtsen wrote:
>> (with-temp-buffer
>>   (set-buffer-multibyte nil)
>>   (insert
>>    (with-temp-buffer ;; <- unibyte

> Hm...  why is this buffer unibyte here?

Oops, for years I misunderstood that the multibyteness of a newly
created buffer defaults to that of the current buffer.  But it's
wrong!

(with-temp-buffer
  (set-buffer-multibyte nil)
  (with-temp-buffer
    enable-multibyte-characters))
 => t

> And if it is, won't (set-buffer-multibyte t) fix that?

No, it doesn't help.  As I wrote the first post,

> ・Insert the original mail (decoded) into a unibyte buffer
                                              ^^^^^^^ multibyte
>   (that with-temp-buffer of mml.el-[line:619] generates).
> ・Detect the charset of the contents.
> ・Encode the contents by that detected charset.
> ・Insert the encoded contsnts into the other unibyte buffer
>   (that with-temp-buffer of mml.el-[line:612] generates).
> ・Run `mml-to-mime' that encodes the header of the original mail
>   using `mail-encode-encoded-word-buffer' (an alias to
>   `rfc2047-encode-message-header').

> rfc2047's encoder expects human readable text, however, there
> are encoded ones as described above.





  reply	other threads:[~2017-06-01  8:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-30  6:09 bug#27141: 26.0.50; mml-generate-mime-1 broken Katsumi Yamaoka
2017-05-31 23:21 ` Katsumi Yamaoka
2017-06-01  5:20   ` Lars Ingebrigtsen
2017-06-01  6:15     ` Katsumi Yamaoka
2017-06-01  7:17       ` Lars Ingebrigtsen
2017-06-01  8:32         ` Katsumi Yamaoka [this message]
2017-09-02 14:05           ` Eli Zaretskii
2017-09-03 23:37             ` Katsumi Yamaoka
2017-09-13 17:36               ` Lars Ingebrigtsen
2017-09-13 18:41                 ` Eli Zaretskii
2017-09-13 18:45                   ` Lars Ingebrigtsen
2017-09-13 19:14                     ` Eli Zaretskii
2017-09-13 19:18                       ` Lars Ingebrigtsen
2019-09-23 18:15                         ` Lars Ingebrigtsen

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=b4ma85skszu.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=27141@debbugs.gnu.org \
    --cc=larsi@gnus.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).