From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pankaj Jangid Newsgroups: gmane.emacs.bugs Subject: bug#45916: 28.0.50; Inconsistent EasyPG behaviour when encrypting .gpg files Date: Sat, 16 Jan 2021 15:10:44 +0530 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24920"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) To: 45916@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 16 10:41:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l0i50-0006OJ-EW for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Jan 2021 10:41:10 +0100 Original-Received: from localhost ([::1]:53368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0i4y-0003IT-V6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Jan 2021 04:41:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51302) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0i4s-0003IN-UU for bug-gnu-emacs@gnu.org; Sat, 16 Jan 2021 04:41:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59103) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0i4s-0006eK-Lf for bug-gnu-emacs@gnu.org; Sat, 16 Jan 2021 04:41:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l0i4s-0003c2-Hx for bug-gnu-emacs@gnu.org; Sat, 16 Jan 2021 04:41:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Pankaj Jangid Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Jan 2021 09:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45916 X-GNU-PR-Package: emacs Original-Received: via spool by 45916-submit@debbugs.gnu.org id=B45916.161079005613868 (code B ref 45916); Sat, 16 Jan 2021 09:41:02 +0000 Original-Received: (at 45916) by debbugs.gnu.org; 16 Jan 2021 09:40:56 +0000 Original-Received: from localhost ([127.0.0.1]:42416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0i4m-0003bc-EF for submit@debbugs.gnu.org; Sat, 16 Jan 2021 04:40:56 -0500 Original-Received: from mail-pg1-f182.google.com ([209.85.215.182]:44081) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0i4j-0003bL-EO for 45916@debbugs.gnu.org; Sat, 16 Jan 2021 04:40:54 -0500 Original-Received: by mail-pg1-f182.google.com with SMTP id p18so7622549pgm.11 for <45916@debbugs.gnu.org>; Sat, 16 Jan 2021 01:40:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeisgreat-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-transfer-encoding; bh=v5AnWJrxOfDTdfizg3pASVP/TmpvsiaT86Fz68rDqys=; b=Gig6yM8IjF06FVoODtIuX5cMSdpHvMqTFg3hFS4i6FkpqA9FpKPtQRAxuOjj6qt4DY ZOdB1Mu5VcT5mtTTw+578ogR+Zletf5Rdu2Lsw9qEMxLA+SRrplQj3BroOIX6ULR1MNb qJtggGmEdyK8VEZRtQvE+DiBUCeq0ZHexwVdm8pfhzP06yDpmVCqnIUIxwEq5HJXCtHq 6YvXsSqzFYNLw7G5AOvKrrEA5zx46VHISVAqIM1EnBjHZfAXEtzUyP5GxOFCV9KKgFG0 Cos8XN8Gs0sucGQw2vUSSOCa4rDcOltmFejXecJwW3oCz32tCLRXjatIge7f/AawN2YK Qkww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=v5AnWJrxOfDTdfizg3pASVP/TmpvsiaT86Fz68rDqys=; b=O5vvaMwJMO/ZaPAMxq3SVH+eOZBsHyRV/NJabAz8VTtoXB4ZWeyfTqHOegiUJreP1B AeUsJnLtLGBIC8uoXnlFahJkgu+1M1dtbFpWTc5JdTlowlOma9adU1jYo9Ruz6KaR5qQ DzqTNWvcjqR5fUnBJgEZ07kDr+ygl83tzHgS/fC88jj+SdbRxMuDC/e3m9ZRrvvSGaVQ dZOjT3vqdN67FcyaaqxmLSs8clcgygTQS1wqKt3QCFLO67HH64sNJGWiv4SQNO+egvky We41k9cECCsyK71PYx/0G5chocGrG6QeUPsX0h3dHMo6GVRfqFpEGfqgiqHmMx5e7Z7D TZtQ== X-Gm-Message-State: AOAM531TrXpX+bVSPaZ21tyyKdRh/NTvMNLUJrI8IGtHu+0AsJCYjLjI DN53rbyE0+vwf/LShjlkU+GZWRyBXnmXtA== X-Google-Smtp-Source: ABdhPJwZwAae0HzJL0SRlC0Dg4V+bR2RF10xCzdv9sdLaZPR+E9sZYw6DeF3Ujvj0dq2Ti7LaAs65w== X-Received: by 2002:a65:644b:: with SMTP id s11mr495533pgv.4.1610790047231; Sat, 16 Jan 2021 01:40:47 -0800 (PST) Original-Received: from mb2.local ([2405:201:5c06:700a:d106:a69:7412:b72c]) by smtp.gmail.com with ESMTPSA id f92sm10954297pjk.54.2021.01.16.01.40.45 for <45916@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Jan 2021 01:40:46 -0800 (PST) In-Reply-To: (Pankaj Jangid's message of "Sat, 16 Jan 2021 13:35:33 +0530") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:198018 Archived-At: > 1. emacs -Q > 2. eval =E2=80=98(defvar epg-pinentry-mode 'loopback)=E2=80=99 > 3. C-c C-f ~/x.gpg RET > 4. Write some text > 5. C-x C-s ; this prompts for selecting key and saves using that. > 6. C-x k ; > 7. C-c C-f ~/x.gpg RET ; open again > 8. make some changes > 9. C-x C-s ; asks for passphrase for symmetric key encryption > Behaviour in step 5 and 9 should be same. _Or_ if the file was already > saved encrypted with a public-key then it should use the same key again. More info (it is fixed after invoking =E2=80=98M-x epa-file-select-keys=E2= =80=99) Now I opened ~/x.gpg again and invoke =E2=80=98M-x epa-file-select-keys=E2= =80=99 and selected the desired public key and saved (C-x C-s). Now it saved the file using the public key. I see that, when I open a .gpg file it sets a buffer-local variable =E2=80=98epa-file-encrypt-to=E2=80=99. Which makes it automatically use the= public key because the value of =E2=80=98epa-file-select-keys=E2=80=99 is nil (default= ). And after I invoked =E2=80=98M-x epa-file-select-keys=E2=80=99, it is consi= stently behaving as described in the manuals i.e. Step (9) is not asking for symmetric key encryption passphrase any more. Probably the =E2=80=98epa-file-encrypt-to=E2=80=99 was not being set earlie= r after opening a .gpg file. My question is - does invoking =E2=80=98M-x epa-file-select-keys=E2=80=99 s= ave the information somewhere on the filesystem? Only after invoking this the behaviour got fixed.