From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#25155: 25.1.90; Gnus: Sending a GnuPG-signed message executes the signing operation twice when using gcc field in the message (annoyance with smartcards) Date: Mon, 23 Sep 2019 02:16:37 +0200 Message-ID: <878sqfeuje.fsf@gnus.org> References: <871sxgw4aj.fsf@iki.fi> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="242985"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 25155@debbugs.gnu.org To: Teemu Likonen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 23 02:17:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iCC2Q-00114g-DP for geb-bug-gnu-emacs@m.gmane.org; Mon, 23 Sep 2019 02:17:10 +0200 Original-Received: from localhost ([::1]:51478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCC2P-0003oV-AV for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Sep 2019 20:17:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51265) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCC2J-0003oO-FD for bug-gnu-emacs@gnu.org; Sun, 22 Sep 2019 20:17:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCC2I-0000yi-BN for bug-gnu-emacs@gnu.org; Sun, 22 Sep 2019 20:17:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54111) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iCC2I-0000ye-8O for bug-gnu-emacs@gnu.org; Sun, 22 Sep 2019 20:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iCC2I-0002gI-0n for bug-gnu-emacs@gnu.org; Sun, 22 Sep 2019 20:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Sep 2019 00:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25155 X-GNU-PR-Package: emacs Original-Received: via spool by 25155-submit@debbugs.gnu.org id=B25155.156919780310274 (code B ref 25155); Mon, 23 Sep 2019 00:17:01 +0000 Original-Received: (at 25155) by debbugs.gnu.org; 23 Sep 2019 00:16:43 +0000 Original-Received: from localhost ([127.0.0.1]:34699 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCC1z-0002fd-7W for submit@debbugs.gnu.org; Sun, 22 Sep 2019 20:16:43 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:49818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCC1y-0002fW-Bk for 25155@debbugs.gnu.org; Sun, 22 Sep 2019 20:16:42 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iCC1u-0004i6-56; Mon, 23 Sep 2019 02:16:40 +0200 In-Reply-To: <871sxgw4aj.fsf@iki.fi> (Teemu Likonen's message of "Sat, 10 Dec 2016 10:56:36 +0200") 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: 209.51.188.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:166955 Archived-At: Teemu Likonen writes: > Would a single sign operation suffice in Gnus? After all, it's just two > copies of the same message? Indeed. But, man, was this difficult to debug, because putting a `debug' statement into any of the mml functions just didn't work. It turns out you had to say (let ((inhibit-redisplay nil)) (debug)) to get it to debug. (I've now amended the doc string.) So that took like nine hours, and it turns out that (logically enough) the second call to the encoding function is done from `gnus-inews-do-gcc'. It doesn't really know anything about what may have happened before -- it just interprets the Gcc header, and then calls `message-encode-message-body', which will encode the data again. So to avoid the double encoding, Message needs some way to tell this function not do to that, but instead cache the encoded value and make `gnus-inews-do-gcc' use that instead. Hm... Perhaps a buffer-local variable will do the trick... I think I'll have a look at that tomorrow. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no