GNU bug report logs - #27141
26.0.50; mml-generate-mime-1 broken

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Katsumi Yamaoka <yamaoka@HIDDEN>; dated Tue, 30 May 2017 06:11:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 27141 <at> debbugs.gnu.org:


Received: (at 27141) by debbugs.gnu.org; 13 Sep 2017 18:45:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 13 14:45:16 2017
Received: from localhost ([127.0.0.1]:38790 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dsCey-0006nU-Mf
	for submit <at> debbugs.gnu.org; Wed, 13 Sep 2017 14:45:16 -0400
Received: from hermes.netfonds.no ([80.91.224.195]:57046)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1dsCew-0006kq-Sg
 for 27141 <at> debbugs.gnu.org; Wed, 13 Sep 2017 14:45:15 -0400
Received: from cm-84.209.243.26.getinternet.no ([84.209.243.26] helo=mouse)
 by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <larsi@HIDDEN>)
 id 1dsCeu-0004Zp-2b; Wed, 13 Sep 2017 20:45:13 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#27141: 26.0.50; mml-generate-mime-1 broken
References: <b4mwp8y98pz.fsf@HIDDEN> <b4mr2z4ehnu.fsf@HIDDEN>
 <m3d1aos2r6.fsf@stories> <b4m60ggmdwi.fsf@HIDDEN>
 <m3wp8wqirx.fsf@stories> <b4ma85skszu.fsf@HIDDEN>
 <83ziadxkku.fsf@HIDDEN> <b4mtw0j5p6x.fsf@HIDDEN>
 <87fubqzej4.fsf@HIDDEN> <83k212o2zp.fsf@HIDDEN>
Date: Wed, 13 Sep 2017 20:45:11 +0200
In-Reply-To: <83k212o2zp.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 13 Sep
 2017 21:41:30 +0300")
Message-ID: <87zi9ycua0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 27141
Cc: 27141 <at> debbugs.gnu.org, yamaoka@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

Eli Zaretskii <eliz@HIDDEN> writes:

> Thanks, I'm unblocking it.  Though I hope this will be fixed before
> 26.1 is out.

Yup.  Does anybody happen to know what the original bug report number
is?  I seem to remember that it had a nice test case that demonstrated
the problem...  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27141; Package emacs. Full text available.
Removed indication that bug 27141 blocks Request was from Eli Zaretskii <eliz@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 27141 <at> debbugs.gnu.org:


Received: (at 27141) by debbugs.gnu.org; 13 Sep 2017 18:42:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 13 14:42:25 2017
Received: from localhost ([127.0.0.1]:38780 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dsCcA-0006SG-Al
	for submit <at> debbugs.gnu.org; Wed, 13 Sep 2017 14:42:25 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55198)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1dsCc3-0006Rp-Jf
 for 27141 <at> debbugs.gnu.org; Wed, 13 Sep 2017 14:42:21 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1dsCbu-0005UM-NJ
 for 27141 <at> debbugs.gnu.org; Wed, 13 Sep 2017 14:42:10 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54087)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1dsCbi-0005Lk-1k; Wed, 13 Sep 2017 14:41:54 -0400
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3780
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1dsCbg-0000j1-67; Wed, 13 Sep 2017 14:41:53 -0400
Date: Wed, 13 Sep 2017 21:41:30 +0300
Message-Id: <83k212o2zp.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
In-reply-to: <87fubqzej4.fsf@HIDDEN> (message from Lars Ingebrigtsen
 on Wed, 13 Sep 2017 19:36:47 +0200)
Subject: Re: bug#27141: 26.0.50; mml-generate-mime-1 broken
References: <b4mwp8y98pz.fsf@HIDDEN> <b4mr2z4ehnu.fsf@HIDDEN>
 <m3d1aos2r6.fsf@stories> <b4m60ggmdwi.fsf@HIDDEN>
 <m3wp8wqirx.fsf@stories> <b4ma85skszu.fsf@HIDDEN>
 <83ziadxkku.fsf@HIDDEN> <b4mtw0j5p6x.fsf@HIDDEN>
 <87fubqzej4.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 27141
Cc: 27141 <at> debbugs.gnu.org, yamaoka@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

unblock 24655 by 27141
thanks

> From: Lars Ingebrigtsen <larsi@HIDDEN>
> Cc: Eli Zaretskii <eliz@HIDDEN>,  27141 <at> debbugs.gnu.org
> Date: Wed, 13 Sep 2017 19:36:47 +0200
> 
> I seem to have forgotten to tag my patch with the corresponding bug
> report?  Annoying.  Anyway, the problem my patch fixed was dealing with
> text files included in Message with mml tags -- they would (under some
> circumstances; there was a test case in the original bug report) be
> corrupted.
> 
> But my fix was obviously a mistake, since it resulted in pretty much all
> multibyte buffers being mishandled when forwarding, so the original
> problem will have to be fixed in a different way.
> 
> But I don't think this should be a release blocker.

Thanks, I'm unblocking it.  Though I hope this will be fixed before
26.1 is out.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27141; Package emacs. Full text available.

Message received at 27141 <at> debbugs.gnu.org:


Received: (at 27141) by debbugs.gnu.org; 13 Sep 2017 17:36:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 13 13:36:52 2017
Received: from localhost ([127.0.0.1]:38662 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dsBam-000328-4w
	for submit <at> debbugs.gnu.org; Wed, 13 Sep 2017 13:36:52 -0400
Received: from hermes.netfonds.no ([80.91.224.195]:56201)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1dsBak-000321-Gv
 for 27141 <at> debbugs.gnu.org; Wed, 13 Sep 2017 13:36:50 -0400
Received: from cm-84.209.243.26.getinternet.no ([84.209.243.26] helo=mouse)
 by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <larsi@HIDDEN>)
 id 1dsBah-0004XA-Fw; Wed, 13 Sep 2017 19:36:49 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Katsumi Yamaoka <yamaoka@HIDDEN>
Subject: Re: bug#27141: 26.0.50; mml-generate-mime-1 broken
References: <b4mwp8y98pz.fsf@HIDDEN> <b4mr2z4ehnu.fsf@HIDDEN>
 <m3d1aos2r6.fsf@stories> <b4m60ggmdwi.fsf@HIDDEN>
 <m3wp8wqirx.fsf@stories> <b4ma85skszu.fsf@HIDDEN>
 <83ziadxkku.fsf@HIDDEN> <b4mtw0j5p6x.fsf@HIDDEN>
Date: Wed, 13 Sep 2017 19:36:47 +0200
In-Reply-To: <b4mtw0j5p6x.fsf@HIDDEN> (Katsumi Yamaoka's message of "Mon, 04
 Sep 2017 08:37:26 +0900")
Message-ID: <87fubqzej4.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 27141
Cc: 27141 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

Katsumi Yamaoka <yamaoka@HIDDEN> writes:

> Oh, I forgot to write the bottom line, sorry.  It happend when I
> forward a message in which the header contains non-ASCII letters.
> What I did then (revno 8130d91) was reverting Lars' change.  I'm
> using the current version with no problem so far.  Though I don't
> know what Lars tried to fix, I think it is not a stopper for the
> next release as there seems to be no bug report brought up about
> it.  Lars?

I seem to have forgotten to tag my patch with the corresponding bug
report?  Annoying.  Anyway, the problem my patch fixed was dealing with
text files included in Message with mml tags -- they would (under some
circumstances; there was a test case in the original bug report) be
corrupted.

But my fix was obviously a mistake, since it resulted in pretty much all
multibyte buffers being mishandled when forwarding, so the original
problem will have to be fixed in a different way.

But I don't think this should be a release blocker.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27141; Package emacs. Full text available.

Message received at 27141 <at> debbugs.gnu.org:


Received: (at 27141) by debbugs.gnu.org; 3 Sep 2017 23:37:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 03 19:37:38 2017
Received: from localhost ([127.0.0.1]:47108 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1doeSQ-0002Ws-JI
	for submit <at> debbugs.gnu.org; Sun, 03 Sep 2017 19:37:38 -0400
Received: from mail-hampton.hostforweb.net ([205.234.186.191]:36477
 helo=hampton.hostforweb.net)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <yamaoka@HIDDEN>) id 1doeSP-0002Wf-CC
 for 27141 <at> debbugs.gnu.org; Sun, 03 Sep 2017 19:37:37 -0400
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 <yamaoka@HIDDEN>)
 id 1doeSH-000EZz-7e; Sun, 03 Sep 2017 18:37:30 -0500
Date: Mon, 04 Sep 2017 08:37:26 +0900
Message-ID: <b4mtw0j5p6x.fsf@HIDDEN>
From: Katsumi Yamaoka <yamaoka@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#27141: 26.0.50; mml-generate-mime-1 broken
References: <b4mwp8y98pz.fsf@HIDDEN> <b4mr2z4ehnu.fsf@HIDDEN>
 <m3d1aos2r6.fsf@stories> <b4m60ggmdwi.fsf@HIDDEN> <m3wp8wqirx.fsf@stories>
 <b4ma85skszu.fsf@HIDDEN> <83ziadxkku.fsf@HIDDEN>
Organization: Emacsen advocacy group
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.13 (Gnus v5.13) Emacs/26.0.50 (i686-pc-cygwin)
Cancel-Lock: sha1:D5V0FCkUZDBMpjjRMVVna7iF7z4=
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
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@HIDDEN
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 27141
Cc: 27141 <at> debbugs.gnu.org, larsi@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On Sat, 02 Sep 2017 17:05:05 +0300, Eli Zaretskii wrote:
> Ping!  Any news on this issue?  It currently indicated as blocking the
> release of Emacs 26.1, so can we please expedite its resolution?

The version Lars modified was obviously broken at least for the
problem I brought up:

> I noticed this when I forwarded a mail using Gnus.  The problem
> is that non-ASCII letters contained in the header of the original
> mail will not be encoded properly.

Oh, I forgot to write the bottom line, sorry.  It happend when I
forward a message in which the header contains non-ASCII letters.
What I did then (revno 8130d91) was reverting Lars' change.  I'm
using the current version with no problem so far.  Though I don't
know what Lars tried to fix, I think it is not a stopper for the
next release as there seems to be no bug report brought up about
it.  Lars?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27141; Package emacs. Full text available.

Message received at 27141 <at> debbugs.gnu.org:


Received: (at 27141) by debbugs.gnu.org; 2 Sep 2017 14:05:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 02 10:05:27 2017
Received: from localhost ([127.0.0.1]:43509 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1do938-0003Bs-O2
	for submit <at> debbugs.gnu.org; Sat, 02 Sep 2017 10:05:26 -0400
Received: from eggs.gnu.org ([208.118.235.92]:58187)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1do937-0003Bd-4c
 for 27141 <at> debbugs.gnu.org; Sat, 02 Sep 2017 10:05:25 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1do92x-0005Dk-17
 for 27141 <at> debbugs.gnu.org; Sat, 02 Sep 2017 10:05:19 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50410)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1do92w-0005DX-Th; Sat, 02 Sep 2017 10:05:14 -0400
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2253
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1do92w-0001aE-9l; Sat, 02 Sep 2017 10:05:14 -0400
Date: Sat, 02 Sep 2017 17:05:05 +0300
Message-Id: <83ziadxkku.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Katsumi Yamaoka <yamaoka@HIDDEN>
In-reply-to: <b4ma85skszu.fsf@HIDDEN> (message from Katsumi Yamaoka on Thu,
 01 Jun 2017 17:32:53 +0900)
Subject: Re: bug#27141: 26.0.50; mml-generate-mime-1 broken
References: <b4mwp8y98pz.fsf@HIDDEN> <b4mr2z4ehnu.fsf@HIDDEN>
 <m3d1aos2r6.fsf@stories> <b4m60ggmdwi.fsf@HIDDEN> <m3wp8wqirx.fsf@stories>
 <b4ma85skszu.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 27141
Cc: 27141 <at> debbugs.gnu.org, larsi@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> Date: Thu, 01 Jun 2017 17:32:53 +0900
> From: Katsumi Yamaoka <yamaoka@HIDDEN>
> Cc: 27141 <at> debbugs.gnu.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.

Ping!  Any news on this issue?  It currently indicated as blocking the
release of Emacs 26.1, so can we please expedite its resolution?

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27141; Package emacs. Full text available.

Message received at 27141 <at> debbugs.gnu.org:


Received: (at 27141) by debbugs.gnu.org; 1 Jun 2017 08:33:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 01 04:33:05 2017
Received: from localhost ([127.0.0.1]:48407 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dGLXV-0001wi-0n
	for submit <at> debbugs.gnu.org; Thu, 01 Jun 2017 04:33:05 -0400
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 <yamaoka@HIDDEN>) id 1dGLXT-0001wE-Ej
 for 27141 <at> debbugs.gnu.org; Thu, 01 Jun 2017 04:33:03 -0400
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 <yamaoka@HIDDEN>)
 id 1dGLXL-004LVg-OG; Thu, 01 Jun 2017 03:32:56 -0500
Date: Thu, 01 Jun 2017 17:32:53 +0900
Message-ID: <b4ma85skszu.fsf@HIDDEN>
From: Katsumi Yamaoka <yamaoka@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#27141: 26.0.50; mml-generate-mime-1 broken
References: <b4mwp8y98pz.fsf@HIDDEN> <b4mr2z4ehnu.fsf@HIDDEN>
 <m3d1aos2r6.fsf@stories> <b4m60ggmdwi.fsf@HIDDEN> <m3wp8wqirx.fsf@stories>
Organization: Emacsen advocacy group
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.13 (Gnus v5.13) Emacs/26.0.50 (i686-pc-cygwin)
Cancel-Lock: sha1:hYP0Q40cLCPDVoCDCKmmJKPUoD0=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
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@HIDDEN
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 27141
Cc: 27141 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27141; Package emacs. Full text available.

Message received at 27141 <at> debbugs.gnu.org:


Received: (at 27141) by debbugs.gnu.org; 1 Jun 2017 07:17:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 01 03:17:17 2017
Received: from localhost ([127.0.0.1]:48344 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dGKM9-0006oQ-NP
	for submit <at> debbugs.gnu.org; Thu, 01 Jun 2017 03:17:17 -0400
Received: from hermes.netfonds.no ([80.91.224.195]:59452)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1dGKM8-0006oH-4S
 for 27141 <at> debbugs.gnu.org; Thu, 01 Jun 2017 03:17:16 -0400
Received: from cm-84.209.243.26.getinternet.no ([84.209.243.26] helo=stories)
 by hermes.netfonds.no with esmtpsa
 (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>)
 id 1dGKLz-00054s-50; Thu, 01 Jun 2017 09:17:10 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Katsumi Yamaoka <yamaoka@HIDDEN>
Subject: Re: bug#27141: 26.0.50; mml-generate-mime-1 broken
References: <b4mwp8y98pz.fsf@HIDDEN> <b4mr2z4ehnu.fsf@HIDDEN>
 <m3d1aos2r6.fsf@stories> <b4m60ggmdwi.fsf@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEXIyMdTU1Pg4OCbm5r/
 ///v7+/5+PheMqksAAACXUlEQVQ4jU1UsZbbIBBE6Mk1mCT13sqoBvOcOvGTVes4o/qiE/z/J2TB
 ZwsKFYx2doZZYOO+QmIuLzPb1rJ9f0ujL8DFGNnvwLQkxAK0vTCyqvCcmQKAfRemAlbNoLQ4WPd+
 rICJ8dLj3P+Srq8rmO4LUyt/yKbugbo0Z/LLXmq5KwAvYp3850QF6E/WZbF/j0591HLTH54B7pqj
 alzt/I8muWcuXXMR3xW3LcWAiMAZdug+uCsGU4ocOHIddGWKfkcPyL1G7+P20k7AlICBXw8YuzXQ
 WhJ9WAEO0GHeWuOL6pqBAJzPw4r3ce8x5h7QGo7B8xDmbla87c7sXFRtwPgSQQcPrDVkzrrvQ7zy
 iGkDj6x/c068W9uop/MV/UwSfovGOWWF2o8ETvMKcVbCMiek2w/xepqTxoYp08o3Z/egbgHHgI3t
 hS1cO+D1jEw09uOoMtcO6GUNTP20Razbo53u03praQ5yA+J6Adt9uyLY/iFWvFRN4zDOAzj55RSJ
 bV5UWzqtoOFII1K4nqqmaaOgEns7PsS+DKZtAg4JXP8QK7+pEl0NoNC8bK3NXO2jYlrGqFHPI1zI
 gc1cjx6fXOuIHYxghCpcTb4GE7EYHYKmmwPOqNY1TTE4ITds5p4NKTxdLSlnfqfxCSHqeEvPqRpC
 rrgTVwgDrsyHmGgufRhKhaZBQKQODPN2WLg/lfHJw+wPVz5QVo80hwKUMAh0rJt9RzPvPXRL9QCQ
 3F7ZhmbHkuTq4izxfqP0rBDCtaoGxrgW21KYKlryua0s523flHH1k4H37rPkLemVkf8BmDTustxP
 2bMAAAAASUVORK5CYII=
Date: Thu, 01 Jun 2017 09:17:06 +0200
In-Reply-To: <b4m60ggmdwi.fsf@HIDDEN> (Katsumi Yamaoka's message of "Thu, 01
 Jun 2017 15:15:57 +0900")
Message-ID: <m3wp8wqirx.fsf@stories>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 27141
Cc: 27141 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

Katsumi Yamaoka <yamaoka@HIDDEN> writes:

> OK, could you please re-revert and fix it?  I did have no idea
> to fix the bug in this construction...
>
> (with-temp-buffer
>   (set-buffer-multibyte nil)
>   (insert
>    (with-temp-buffer ;; <- unibyte

Hm...  why is this buffer unibyte here?  And if it is, won't
(set-buffer-multibyte t) fix that?

>      (insert something) ;; <- multibyte
>      (encode-coding ...)
>      (buffer-string))))

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27141; Package emacs. Full text available.

Message received at 27141 <at> debbugs.gnu.org:


Received: (at 27141) by debbugs.gnu.org; 1 Jun 2017 06:16:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 01 02:16:08 2017
Received: from localhost ([127.0.0.1]:48317 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dGJOy-0005Qf-8G
	for submit <at> debbugs.gnu.org; Thu, 01 Jun 2017 02:16:08 -0400
Received: from mail-hampton.hostforweb.net ([205.234.186.191]:54725
 helo=hampton.hostforweb.net)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <yamaoka@HIDDEN>) id 1dGJOw-0005Pu-Fl
 for 27141 <at> debbugs.gnu.org; Thu, 01 Jun 2017 02:16:07 -0400
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 <yamaoka@HIDDEN>)
 id 1dGJOn-001qfz-PI; Thu, 01 Jun 2017 01:15:58 -0500
Date: Thu, 01 Jun 2017 15:15:57 +0900
Message-ID: <b4m60ggmdwi.fsf@HIDDEN>
From: Katsumi Yamaoka <yamaoka@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#27141: 26.0.50; mml-generate-mime-1 broken
References: <b4mwp8y98pz.fsf@HIDDEN> <b4mr2z4ehnu.fsf@HIDDEN>
 <m3d1aos2r6.fsf@stories>
Organization: Emacsen advocacy group
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.13 (Gnus v5.13) Emacs/26.0.50 (i686-pc-cygwin)
Cancel-Lock: sha1:OlXXXoH+bxpud+u0/ItJ4aLXzZg=
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
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@HIDDEN
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 27141
Cc: 27141 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On Thu, 01 Jun 2017 07:20:13 +0200, Lars Ingebrigtsen wrote:
> Katsumi Yamaoka <yamaoka@HIDDEN> writes:

>> On Tue, 30 May 2017 15:09:28 +0900, Katsumi Yamaoka wrote:
>>> So, as for at least mail forwarding, `mml-generate-mime-1' is
>>> seriously broken.

>> I've reverted it to the emacs-25 version (with some modifications)
>> for a emergency fix.

> Well, the function was reworked because it destroys files when
> forwarding them, I seem to recall?  So this seems like it's just
> changing one bug for another...

OK, could you please re-revert and fix it?  I did have no idea
to fix the bug in this construction...

(with-temp-buffer
  (set-buffer-multibyte nil)
  (insert
   (with-temp-buffer ;; <- unibyte
     (insert something) ;; <- multibyte
     (encode-coding ...)
     (buffer-string))))

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27141; Package emacs. Full text available.

Message received at 27141 <at> debbugs.gnu.org:


Received: (at 27141) by debbugs.gnu.org; 1 Jun 2017 05:20:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 01 01:20:27 2017
Received: from localhost ([127.0.0.1]:48283 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dGIX5-00045a-56
	for submit <at> debbugs.gnu.org; Thu, 01 Jun 2017 01:20:27 -0400
Received: from hermes.netfonds.no ([80.91.224.195]:55393)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1dGIX3-00045Q-0O
 for 27141 <at> debbugs.gnu.org; Thu, 01 Jun 2017 01:20:25 -0400
Received: from cm-84.209.243.26.getinternet.no ([84.209.243.26] helo=stories)
 by hermes.netfonds.no with esmtpsa
 (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>)
 id 1dGIWr-0001pP-Rn; Thu, 01 Jun 2017 07:20:15 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Katsumi Yamaoka <yamaoka@HIDDEN>
Subject: Re: bug#27141: 26.0.50; mml-generate-mime-1 broken
References: <b4mwp8y98pz.fsf@HIDDEN> <b4mr2z4ehnu.fsf@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEUKBAJfWljT0tASCggN
 BgOopqWSkI9tamcPBwQwKid/fXsUDQrFk4wNAAACQElEQVQ4jXWUsW7bMBCGb/CQlUMruKOB9AW4
 qNBioBy4xoD8AAGkANqUhYCmANJAoJOngMjUoRKiVUsDvVz/O1JJmqI/YFO+7+6/I02b1v+I0los
 cV0+gqUo1lUvWusPgFM5XAAgZVloK0CI48lKa0odkKlz7TenxacKHdO03prn1E2T6+YoB/FzXZUl
 Hd6rZMXHv8C1gNO/oCzfSl7BSfIrtj+9gZR6rqFUQpszVNfvwWsmC5OyF5uRZN5lM0ehESUV1xCn
 N896vaRNgqDodCAxeF7XF+fSxrmIwThPrtX6m1JKEPeBPzV8RC0qlChz21nNXKBwnhGI21gLmFuV
 QOZaqRibupaKDSAdoGGzmrifUku/XjajKAawCiEwUK2AqXOOYs99CGmqkZ1cN0UQQirJMBF6T+NM
 ks3aXyQ+MwgzgxhHgeuauRnrpmla7rF/YQ+06EZMOsopt04BXC4qa0MmQ+KksS+ek1T2+NjN076S
 r6uJlwsWlLkvn6u6/Cm358ybQBzz0Fh/ur8+HW7SnWgmFdbcWE3l4dc9Yjd8Z76q8Nvn3mu/63FL
 KgG3d+oJMcjw6zvfq9vDuX1a/MLRYRiM2XlTUDnt1yX3P/I89z1+B/3greEettd97xFj7+jF75qu
 ZPW9jea+z/3gh6Ol3dFa2Fq4C0Ab6w1ZGo7GXBnE8BGYubXmSGQfyOwwiIlePBSiEHyOZIzZfMwG
 toedZRNpFgGniNDRWGEUK/hoWHE26CECi38DncedDdi1H2L8D4NZyX/+VZ9tAAAAAElFTkSuQmCC
Date: Thu, 01 Jun 2017 07:20:13 +0200
In-Reply-To: <b4mr2z4ehnu.fsf@HIDDEN> (Katsumi Yamaoka's message of "Thu, 01
 Jun 2017 08:21:57 +0900")
Message-ID: <m3d1aos2r6.fsf@stories>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 27141
Cc: 27141 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

Katsumi Yamaoka <yamaoka@HIDDEN> writes:

> On Tue, 30 May 2017 15:09:28 +0900, Katsumi Yamaoka wrote:
>> So, as for at least mail forwarding, `mml-generate-mime-1' is
>> seriously broken.
>
> I've reverted it to the emacs-25 version (with some modifications)
> for a emergency fix.

Well, the function was reworked because it destroys files when
forwarding them, I seem to recall?  So this seems like it's just
changing one bug for another...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27141; Package emacs. Full text available.

Message received at 27141 <at> debbugs.gnu.org:


Received: (at 27141) by debbugs.gnu.org; 31 May 2017 23:22:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 31 19:22:07 2017
Received: from localhost ([127.0.0.1]:48111 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dGCwJ-0000iA-4R
	for submit <at> debbugs.gnu.org; Wed, 31 May 2017 19:22:07 -0400
Received: from mail-hampton.hostforweb.net ([205.234.186.191]:53241
 helo=hampton.hostforweb.net)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <yamaoka@HIDDEN>) id 1dGCwI-0000hf-0O
 for 27141 <at> debbugs.gnu.org; Wed, 31 May 2017 19:22:06 -0400
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 <yamaoka@HIDDEN>)
 id 1dGCwA-003A8N-7B; Wed, 31 May 2017 18:21:59 -0500
Date: Thu, 01 Jun 2017 08:21:57 +0900
Message-ID: <b4mr2z4ehnu.fsf@HIDDEN>
From: Katsumi Yamaoka <yamaoka@HIDDEN>
To: 27141 <at> debbugs.gnu.org
Subject: Re: bug#27141: 26.0.50; mml-generate-mime-1 broken
References: <b4mwp8y98pz.fsf@HIDDEN>
Organization: Emacsen advocacy group
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.13 (Gnus v5.13) Emacs/26.0.50 (i686-pc-cygwin)
Cancel-Lock: sha1:DUFvQqna3K6di01f/NnVHRrPcR8=
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-OutGoing-Spam-Status: No, score=-1.0
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@HIDDEN
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 27141
Cc: larsi@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On Tue, 30 May 2017 15:09:28 +0900, Katsumi Yamaoka wrote:
> So, as for at least mail forwarding, `mml-generate-mime-1' is
> seriously broken.

I've reverted it to the emacs-25 version (with some modifications)
for a emergency fix.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27141; Package emacs. Full text available.
Added indication that bug 27141 blocks24655 Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 30 May 2017 06:10:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 30 02:10:30 2017
Received: from localhost ([127.0.0.1]:44065 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dFaMQ-000798-5V
	for submit <at> debbugs.gnu.org; Tue, 30 May 2017 02:10:30 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60711)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <yamaoka@HIDDEN>) id 1dFaMP-00078w-6w
 for submit <at> debbugs.gnu.org; Tue, 30 May 2017 02:10:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <yamaoka@HIDDEN>) id 1dFaMJ-0005yH-9W
 for submit <at> debbugs.gnu.org; Tue, 30 May 2017 02:10:24 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:39551)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <yamaoka@HIDDEN>) id 1dFaMJ-0005yD-56
 for submit <at> debbugs.gnu.org; Tue, 30 May 2017 02:10:23 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51682)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <yamaoka@HIDDEN>) id 1dFaMI-0006Gu-34
 for bug-gnu-emacs@HIDDEN; Tue, 30 May 2017 02:10:22 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <yamaoka@HIDDEN>) id 1dFaMB-0005xU-OK
 for bug-gnu-emacs@HIDDEN; Tue, 30 May 2017 02:10:22 -0400
Received: from mail-hampton.hostforweb.net ([205.234.186.191]:37186
 helo=hampton.hostforweb.net)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <yamaoka@HIDDEN>) id 1dFaMB-0005bs-IA
 for bug-gnu-emacs@HIDDEN; Tue, 30 May 2017 02:10:15 -0400
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 <yamaoka@HIDDEN>)
 id 1dFaLS-001oAQ-7O; Tue, 30 May 2017 01:09:31 -0500
Date: Tue, 30 May 2017 15:09:28 +0900
Message-ID: <b4mwp8y98pz.fsf@HIDDEN>
From: Katsumi Yamaoka <yamaoka@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 26.0.50; mml-generate-mime-1 broken
Organization: Emacsen advocacy group
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.13 (Gnus v5.13) Emacs/26.0.50 (i686-pc-cygwin)
Cancel-Lock: sha1:hudDZQbGZP5Axpd67xsf4E682o8=
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
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 - 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@HIDDEN
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (barebone)
 [generic] [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
Cc: larsi@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hi,

I noticed this when I forwarded a mail using Gnus.  The problem
is that non-ASCII letters contained in the header of the original
mail will not be encoded properly.  The rough outline of what
`mml-generate-mime-1' does then are:

=E3=83=BBInsert the original mail (decoded) into a unibyte buffer
  (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.  So, as for at least mail
forwarding, `mml-generate-mime-1' is seriously broken.

The current code looks like WIP to me.  How about reverting it
to the emacs-25 version?  Slightly modernized[1] one is attached.

[1] Don't use old compat functions and string-as-(multi|uni)byte.

In GNU Emacs 26.0.50 (build 1, i686-pc-cygwin, GTK+ Version 3.18.9)
 of 2017-05-30 built on localhost
Windowing system distributor 'The Cygwin/X Project', version 11.0.11900000

--=-=-=
Content-Type: application/emacs-lisp
Content-Disposition: attachment
Content-Transfer-Encoding: quoted-printable

(defun mml-generate-mime-1 (cont)
  (let ((mm-use-ultra-safe-encoding
	 (or mm-use-ultra-safe-encoding (assq 'sign cont))))
    (save-restriction
      (narrow-to-region (point) (point))
      (mml-tweak-part cont)
      (cond
       ((or (eq (car cont) 'part) (eq (car cont) 'mml))
	(let* ((raw (cdr (assq 'raw cont)))
	       (filename (cdr (assq 'filename cont)))
	       (type (or (cdr (assq 'type cont))
			 (if filename
			     (or (mm-default-file-encoding filename)
				 "application/octet-stream")
			   "text/plain")))
	       (charset (cdr (assq 'charset cont)))
	       (coding (mm-charset-to-coding-system charset))
	       encoding flowed coded)
	  (cond ((eq coding 'ascii)
		 (setq charset nil
		       coding nil))
		(charset
		 ;; The value of `charset' might be a bogus alias that
		 ;; `mm-charset-synonym-alist' provides, like `utf8',
		 ;; so we prefer the MIME charset that Emacs knows for
		 ;; the coding system `coding'.
		 (setq charset (or (mm-coding-system-to-mime-charset coding)
				   (intern (downcase charset))))))
	  (if (and (not raw)
		   (member (car (split-string type "/")) '("text" "message")))
	      (progn
		(with-temp-buffer
		  (cond
		   ((cdr (assq 'buffer cont))
		    (insert-buffer-substring (cdr (assq 'buffer cont))))
		   ((and filename
			 (not (equal (cdr (assq 'nofile cont)) "yes")))
		    (let ((coding-system-for-read coding))
		      (mm-insert-file-contents filename)))
		   ((eq 'mml (car cont))
		    (insert (cdr (assq 'contents cont))))
		   (t
		    (save-restriction
		      (narrow-to-region (point) (point))
		      (insert (cdr (assq 'contents cont)))
		      ;; Remove quotes from quoted tags.
		      (goto-char (point-min))
		      (while (re-search-forward
			      "<#!+/?\\(part\\|multipart\\|external\\|mml\\|secure\\)"
			      nil t)
			(delete-region (+ (match-beginning 0) 2)
				       (+ (match-beginning 0) 3))))))
		  (cond
		   ((eq (car cont) 'mml)
		    (let ((mml-boundary (mml-compute-boundary cont))
			  ;; It is necessary for the case where this
			  ;; function is called recursively since
			  ;; `m-g-d-t' will be bound to "message/rfc822"
			  ;; when encoding an article to be forwarded.
			  (mml-generate-default-type "text/plain"))
		      (mml-to-mime)
		      ;; Update handle so mml-compute-boundary can
		      ;; detect collisions with the nested parts.
		      (unless mml-inhibit-compute-boundary
			(setcdr (assoc 'contents cont) (buffer-string))))
		    (let ((mm-7bit-chars (concat mm-7bit-chars "\x1b")))
		      ;; ignore 0x1b, it is part of iso-2022-jp
		      (setq encoding (mm-body-7-or-8))))
		   ((string=3D (car (split-string type "/")) "message")
		    (let ((mm-7bit-chars (concat mm-7bit-chars "\x1b")))
		      ;; ignore 0x1b, it is part of iso-2022-jp
		      (setq encoding (mm-body-7-or-8))))
		   (t
		    ;; Only perform format=3Dflowed filling on text/plain
		    ;; parts where there either isn't a format parameter
		    ;; in the mml tag or it says "flowed" and there
		    ;; actually are hard newlines in the text.
		    (let (use-hard-newlines)
		      (when (and mml-enable-flowed
				 (string=3D type "text/plain")
				 (not (string=3D (cdr (assq 'sign cont)) "pgp"))
				 (or (null (assq 'format cont))
				     (string=3D (cdr (assq 'format cont))
					      "flowed"))
				 (setq use-hard-newlines
				       (text-property-any
					(point-min) (point-max) 'hard 't)))
			(fill-flowed-encode)
			;; Indicate that `mml-insert-mime-headers' should
			;; insert a "; format=3Dflowed" string unless the
			;; user has already specified it.
			(setq flowed (null (assq 'format cont)))))
		    ;; Prefer `utf-8' for text/calendar parts.
		    (if (or charset
			    (not (string=3D type "text/calendar")))
			(setq charset (mm-encode-body charset))
		      (let ((mm-coding-system-priorities
			     (cons 'utf-8 mm-coding-system-priorities)))
			(setq charset (mm-encode-body))))
		    (setq encoding (mm-body-encoding
				    charset (cdr (assq 'encoding cont))))))
		  (setq coded (buffer-string)))
		(mml-insert-mime-headers cont type charset encoding flowed)
		(insert "\n")
		(insert coded))
	    (with-temp-buffer
	      (set-buffer-multibyte nil)
	      (cond
	       ((cdr (assq 'buffer cont))
		;; multibyte string that inserted to a unibyte buffer
		;; will be converted to the unibyte version safely.
		(insert (with-current-buffer (cdr (assq 'buffer cont))
			  (buffer-string))))
	       ((and filename
		     (not (equal (cdr (assq 'nofile cont)) "yes")))
		(let ((coding-system-for-read mm-binary-coding-system))
		  (mm-insert-file-contents filename nil nil nil nil t))
		(unless charset
		  (setq charset (mm-coding-system-to-mime-charset
				 (mm-find-buffer-file-coding-system
				  filename)))))
	       (t
		(let ((contents (cdr (assq 'contents cont))))
		  (if (if (featurep 'xemacs)
			  (string-match "[^\000-\377]" contents)
			(multibyte-string-p contents))
		      (progn
			(set-buffer-multibyte t)
			(insert contents)
			(unless raw
			  (setq charset	(mm-encode-body charset))))
		    (insert contents)))))
	      (if (setq encoding (cdr (assq 'encoding cont)))
		  (setq encoding (intern (downcase encoding))))
	      (setq encoding (mm-encode-buffer type encoding))
	      (setq coded (decode-coding-string (buffer-string) 'us-ascii)))
	    (mml-insert-mime-headers cont type charset encoding nil)
	    (insert "\n" coded))))
       ((eq (car cont) 'external)
	(insert "Content-Type: message/external-body")
	(let ((parameters (mml-parameter-string
			   cont '(expiration size permission)))
	      (name (cdr (assq 'name cont)))
	      (url (cdr (assq 'url cont))))
	  (when name
	    (setq name (mml-parse-file-name name))
	    (if (stringp name)
		(mml-insert-parameter
		 (mail-header-encode-parameter "name" name)
		 "access-type=3Dlocal-file")
	      (mml-insert-parameter
	       (mail-header-encode-parameter
		"name" (file-name-nondirectory (nth 2 name)))
	       (mail-header-encode-parameter "site" (nth 1 name))
	       (mail-header-encode-parameter
		"directory" (file-name-directory (nth 2 name))))
	      (mml-insert-parameter
	       (concat "access-type=3D"
		       (if (member (nth 0 name) '("ftp@" "anonymous@"))
			   "anon-ftp"
			 "ftp")))))
	  (when url
	    (mml-insert-parameter
	     (mail-header-encode-parameter "url" url)
	     "access-type=3Durl"))
	  (when parameters
	    (mml-insert-parameter-string
	     cont '(expiration size permission)))
	  (insert "\n\n")
	  (insert "Content-Type: "
		  (or (cdr (assq 'type cont))
		      (if name
			  (or (mm-default-file-encoding name)
			      "application/octet-stream")
			"text/plain"))
		  "\n")
	  (insert "Content-ID: " (message-make-message-id) "\n")
	  (insert "Content-Transfer-Encoding: "
		  (or (cdr (assq 'encoding cont)) "binary"))
	  (insert "\n\n")
	  (insert (or (cdr (assq 'contents cont))))
	  (insert "\n")))
       ((eq (car cont) 'multipart)
	(let* ((type (or (cdr (assq 'type cont)) "mixed"))
	       (mml-generate-default-type (if (equal type "digest")
					      "message/rfc822"
					    "text/plain"))
	       (handler (assoc type mml-generate-multipart-alist)))
	  (if handler
	      (funcall (cdr handler) cont)
	    ;; No specific handler.  Use default one.
	    (let ((mml-boundary (mml-compute-boundary cont)))
	      (insert (format "Content-Type: multipart/%s; boundary=3D\"%s\""
			      type mml-boundary)
		      (if (cdr (assq 'start cont))
			  (format "; start=3D\"%s\"\n" (cdr (assq 'start cont)))
			"\n"))
	      (let ((cont cont) part)
		(while (setq part (pop cont))
		  ;; Skip `multipart' and attributes.
		  (when (and (consp part) (consp (cdr part)))
		    (insert "\n--" mml-boundary "\n")
		    (mml-generate-mime-1 part)
		    (goto-char (point-max)))))
	      (insert "\n--" mml-boundary "--\n")))))
       (t
	(error "Invalid element: %S" cont)))
      ;; handle sign & encrypt tags in a semi-smart way.
      (let ((sign-item (assoc (cdr (assq 'sign cont)) mml-sign-alist))
	    (encrypt-item (assoc (cdr (assq 'encrypt cont))
				 mml-encrypt-alist))
	    sender recipients)
	(when (or sign-item encrypt-item)
	  (when (setq sender (cdr (assq 'sender cont)))
	    (message-options-set 'mml-sender sender)
	    (message-options-set 'message-sender sender))
	  (if (setq recipients (cdr (assq 'recipients cont)))
	      (message-options-set 'message-recipients recipients))
	  (let ((style (mml-signencrypt-style
			(first (or sign-item encrypt-item)))))
	    ;; check if: we're both signing & encrypting, both methods
	    ;; are the same (why would they be different?!), and that
	    ;; the signencrypt style allows for combined operation.
	    (if (and sign-item encrypt-item (equal (first sign-item)
						   (first encrypt-item))
		     (equal style 'combined))
		(funcall (nth 1 encrypt-item) cont t)
	      ;; otherwise, revert to the old behavior.
	      (when sign-item
		(funcall (nth 1 sign-item) cont))
	      (when encrypt-item
		(funcall (nth 1 encrypt-item) cont)))))))))

--=-=-=--




Acknowledgement sent to Katsumi Yamaoka <yamaoka@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#27141; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 13 Sep 2017 18:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.