From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.bugs Subject: bug#27141: 26.0.50; mml-generate-mime-1 broken Date: Thu, 01 Jun 2017 17:32:53 +0900 Organization: Emacsen advocacy group Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1496306055 10810 195.159.176.226 (1 Jun 2017 08:34:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 1 Jun 2017 08:34:15 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (i686-pc-cygwin) Cc: 27141@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 01 10:34:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dGLYX-0002Vm-PR for geb-bug-gnu-emacs@m.gmane.org; Thu, 01 Jun 2017 10:34:09 +0200 Original-Received: from localhost ([::1]:36019 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGLYc-0002pD-T1 for geb-bug-gnu-emacs@m.gmane.org; Thu, 01 Jun 2017 04:34:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38660) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGLYT-0002no-Pb for bug-gnu-emacs@gnu.org; Thu, 01 Jun 2017 04:34:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dGLYQ-0003JB-Or for bug-gnu-emacs@gnu.org; Thu, 01 Jun 2017 04:34:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45732) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dGLYQ-0003J1-LH for bug-gnu-emacs@gnu.org; Thu, 01 Jun 2017 04:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dGLYQ-0001xs-82 for bug-gnu-emacs@gnu.org; Thu, 01 Jun 2017 04:34:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Katsumi Yamaoka Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Jun 2017 08:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27141 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27141-submit@debbugs.gnu.org id=B27141.14963059857489 (code B ref 27141); Thu, 01 Jun 2017 08:34:02 +0000 Original-Received: (at 27141) by debbugs.gnu.org; 1 Jun 2017 08:33:05 +0000 Original-Received: from localhost ([127.0.0.1]:48407 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dGLXV-0001wi-0n for submit@debbugs.gnu.org; Thu, 01 Jun 2017 04:33:05 -0400 Original-Received: from mail-hampton.hostforweb.net ([205.234.186.191]:56105 helo=hampton.hostforweb.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dGLXT-0001wE-Ej for 27141@debbugs.gnu.org; Thu, 01 Jun 2017 04:33:03 -0400 Original-Received: from s70.gtokyofl21.vectant.ne.jp ([202.215.75.70]:60000 helo=localhost) by hampton.hostforweb.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89) (envelope-from ) id 1dGLXL-004LVg-OG; Thu, 01 Jun 2017 03:32:56 -0500 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&( Cancel-Lock: sha1:hYP0Q40cLCPDVoCDCKmmJKPUoD0= X-OutGoing-Spam-Status: No, score=-2.9 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hampton.hostforweb.net X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Get-Message-Sender-Via: hampton.hostforweb.net: authenticated_id: yamaoka/from_h X-Authenticated-Sender: hampton.hostforweb.net: yamaoka@jpl.org X-Source: X-Source-Args: X-Source-Dir: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:133131 Archived-At: 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)) =3D> t > And if it is, won't (set-buffer-multibyte t) fix that? No, it doesn't help. As I wrote the first post, > =E3=83=BBInsert the original mail (decoded) into a unibyte buffer ^^^^^^^ multibyte > (that with-temp-buffer of mml.el-[line:619] generates). > =E3=83=BBDetect the charset of the contents. > =E3=83=BBEncode the contents by that detected charset. > =E3=83=BBInsert the encoded contsnts into the other unibyte buffer > (that with-temp-buffer of mml.el-[line:612] generates). > =E3=83=BBRun `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.