From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 2FD876DE014D for ; Fri, 22 Jul 2016 09:47:33 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.72 X-Spam-Level: X-Spam-Status: No, score=-0.72 tagged_above=-999 required=5 tests=[AWL=0.000, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id R3ms9OYYbA-e for ; Fri, 22 Jul 2016 09:47:25 -0700 (PDT) Received: from avasout07.plus.net (avasout07.plus.net [84.93.230.235]) by arlo.cworth.org (Postfix) with ESMTPS id 365C16DE00C8 for ; Fri, 22 Jul 2016 09:47:25 -0700 (PDT) Received: from webmail04.plus.net ([84.93.228.66]) by avasout07 with smtp id MsnN1t0071SbfYc01snNBn; Fri, 22 Jul 2016 17:47:23 +0100 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.2 cv=UYYTc+aN c=1 sm=1 tr=0 a=C5+YawzV8SR07mwocaP9vA==:117 a=6WEHsjNRvCJYAr8w9WnCiA==:17 a=cAmyUtKerLwA:10 a=H4IEW4q-AAAA:8 a=mEHJS5tcBp7mKnBcrAgA:9 a=kz_rP2hIBAIkRpJ1_vYA:9 a=Nf2LC8gUDJIA:10 a=CdiWusdWvyIA:10 a=AS9mAr_Iad8o7WnExNUa:22 Received: from localhost ([127.0.0.1] helo=webmail.plus.net) by webmail04.plus.net with esmtp (Exim 4.76) (envelope-from ) id 1bQdbe-00057U-Hn; Fri, 22 Jul 2016 17:47:22 +0100 Received: from 80.82.130.242 (SquirrelMail authenticated user bubblegen+matt) by webmail.plus.net with HTTP; Fri, 22 Jul 2016 17:47:22 +0100 Message-ID: <3d06c4bede0643230bea93cb5d58ca6d.squirrel@webmail.plus.net> In-Reply-To: <87lh4wj4kq.fsf@zancas.localnet> References: <56DD48B3.90604@bubblegen.co.uk> <87mvqatr6y.fsf@zancas.localnet> <87h9gigfyz.fsf@bubblegen.co.uk> <87pov58b9y.fsf@zancas.localnet> <87wpp76ctq.fsf@zancas.localnet> <87h9fm315q.fsf@bubblegen.co.uk> <87oa9timv7.fsf@zancas.localnet> <575b60a1d39a1ecc7d06e5c0d625be61.squirrel@webmail.plus.net> <87bn5tjw5e.fsf@tesseract.cs.unb.ca> <5ed42cd5aafdc045b5d9e1b918d10748.squirrel@webmail.plus.net> <87mvpdgp38.fsf@bubblegen.co.uk> <87lh4wj4kq.fsf@zancas.localnet> Date: Fri, 22 Jul 2016 17:47:22 +0100 Subject: Re: (emacs) Parsing problems replying to encrypted html From: "Matthew Lear" To: "David Bremner" Cc: "Matthew Lear" , notmuch@notmuchmail.org, "David Edmondson" , "Mark Walters" Reply-To: matt@bubblegen.co.uk User-Agent: SquirrelMail MIME-Version: 1.0 Content-Type: multipart/mixed;boundary="----=_20160722174722_30667" X-Priority: 3 (Normal) Importance: Normal X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jul 2016 16:47:33 -0000 ------=_20160722174722_30667 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Hi David, > OK, with that setting I can duplicate the problem replying to encrypted > HTML mail. > > It's also true that notmuch-reply doesn't include the content in the > html version of the multipart/alternative. Unlike notmuch show, it > doesn't have the ability to send parts later, so I guess that's a > problem there. > > The following patch seems to fix it for me. What I haven't worked out is > if it will break other things. Perhaps David E or Mark (in copy) can > comment on whether this is a sensible change, given that we now give the > user control of showing the part on the emacs side. > > diff --git a/notmuch-reply.c b/notmuch-reply.c > index 3c6d685..cd88d79 100644 > --- a/notmuch-reply.c > +++ b/notmuch-reply.c > @@ -690,7 +690,7 @@ notmuch_reply_format_sprinter(void *ctx, > > /* Start the original */ > sp->map_key (sp, "original"); > - format_part_sprinter (ctx, sp, node, TRUE, TRUE, FALSE); > + format_part_sprinter (ctx, sp, node, TRUE, TRUE, TRUE); > > /* End */ > sp->end (sp); I could have sworn that I replied to this thread months ago but can't find a record it in the archives... I think I also missed David E's reply to yours mentioning the patch from id:1459708823-1852-1-git-send-email-dme at dme.org, so I'm following up... With David E's patch, the decryption problem I reported is resolved. However, I notice that this change hasn't yet been committed / pushed. Is there a particular reason for this? I'm currently maintaining a version of this patch compatible with the current master which makes this change to notmuch-mua.el notmuch-mua-reply() by adding (notmuch-show-process-crypto process-crypto) before doing the show. I've attached that patch here. I just wondered if we were going to see this pushed to master any time soon? Cheers, -- Matt ------=_20160722174722_30667 Content-Type: text/x-patch; name="fix-encrypted-html.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="fix-encrypted-html.patch" diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index 0445975..0dcdb06 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -250,7 +250,11 @@ mutiple parts get a header." ;; Don't omit long parts. (notmuch-show-max-text-part-size 0) ;; Insert headers for parts as appropriate for replying. - (notmuch-show-insert-header-p-function notmuch-mua-reply-insert-header-p-function) + (notmuch-show-insert-header-p-function notmuch-mua-reply-insert-header-p-function) + ;; Ensure that any encrypted parts are + ;; decrypted during the generation of the reply + ;; text. + (notmuch-show-process-crypto process-crypto) ;; Don't indent multipart sub-parts. (notmuch-show-indent-multipart nil)) (notmuch-show-insert-body original (plist-get original :body) 0) ------=_20160722174722_30667--