From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Pierre =?UTF-8?Q?T=C3=A9choueyres?= Newsgroups: gmane.emacs.bugs Subject: bug#33040: 26.1.50; Epg prompt on Microsoft Windows differ from the GNU/Linux on when asking passphrase Date: Sun, 14 Oct 2018 17:53:50 +0200 Message-ID: <87y3b0cynl.fsf@killashandra.ballybran.fr> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1539532386 31793 195.159.176.226 (14 Oct 2018 15:53:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 14 Oct 2018 15:53:06 +0000 (UTC) User-Agent: mu4e 1.1.0; emacs 26.1.50 To: 33040@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 14 17:53:01 2018 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 1gBihR-00089U-Do for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Oct 2018 17:53:01 +0200 Original-Received: from localhost ([::1]:48777 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBijX-0003eU-TE for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Oct 2018 11:55:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40226) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBijR-0003eD-Tj for bug-gnu-emacs@gnu.org; Sun, 14 Oct 2018 11:55:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gBijO-000266-LH for bug-gnu-emacs@gnu.org; Sun, 14 Oct 2018 11:55:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45203) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gBijO-00025y-FR for bug-gnu-emacs@gnu.org; Sun, 14 Oct 2018 11:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gBijO-0001QU-9F for bug-gnu-emacs@gnu.org; Sun, 14 Oct 2018 11:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pierre =?UTF-8?Q?T=C3=A9choueyres?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Oct 2018 15:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 33040 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15395324465409 (code B ref -1); Sun, 14 Oct 2018 15:55:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Oct 2018 15:54:06 +0000 Original-Received: from localhost ([127.0.0.1]:49461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gBiiT-0001PB-W5 for submit@debbugs.gnu.org; Sun, 14 Oct 2018 11:54:06 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58523) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gBiiS-0001Ob-8i for submit@debbugs.gnu.org; Sun, 14 Oct 2018 11:54:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gBiiM-0001Dp-73 for submit@debbugs.gnu.org; Sun, 14 Oct 2018 11:53:58 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:51895) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gBiiM-0001Dl-2e for submit@debbugs.gnu.org; Sun, 14 Oct 2018 11:53:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBiiL-0003TC-9U for bug-gnu-emacs@gnu.org; Sun, 14 Oct 2018 11:53:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gBiiI-0001Be-45 for bug-gnu-emacs@gnu.org; Sun, 14 Oct 2018 11:53:57 -0400 Original-Received: from smtp3-g21.free.fr ([212.27.42.3]:61197) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gBiiH-0001AN-Sz for bug-gnu-emacs@gnu.org; Sun, 14 Oct 2018 11:53:54 -0400 Original-Received: from killashandra.ballybran.fr.free.fr (unknown [IPv6:2a01:e35:2e14:eab0:d4dc:72c5:daba:b8ca]) by smtp3-g21.free.fr (Postfix) with ESMTPS id CA12F13F8DA for ; Sun, 14 Oct 2018 17:53:50 +0200 (CEST) X-detected-operating-system: by eggs.gnu.org: Windows NT kernel [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:151243 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello everyone, I've noticed an anoying problem when I need to decrypt a file from Emacs on Windows. The prompt asking my passphrase is two lines whereas on Gnu/Linux it's only one. I've tracked this bug down to the epg--start fuction and try the attached patch from some time now without noticing anything wrong. The step to reproduce the bug are below: 1) Start Emacs with: emacs -Q 2) Execute the following commands in scratch buffer #+BEGIN_SRC emacs-lisp (require 'epg) (setq epg-gpg-program "gpg2" epa-pinentry-mode 'loopback) ;; open a gnupg encrypted file : (find-file "~/.emacs.d/authinfo.gpg") #+END_SRC The result vary between Emacs on Microsoft windows and on GNU/Linux. On Microsoft Windows: #+BEGIN_VERSE Passphrase for 7F4B4084DFC4EBD2 Pierre T=C3=A9choueyres : #+END_VERSE Note the cariage return before the colon. On GNU/Linux: #+BEGIN_VERSE Passphrase for 7F4B4084DFC4EBD2 Pierre T=C3=A9choueyres : #+END_VERSE --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Unify-prompt-for-gnupg-passphrase-between-GNU-Linux-.patch Content-Description: 0001-Unify-prompt-for-gnupg-passphrase-between-GNU-Linux-and-Microsoft-Windows >From 6e3935351b3e681fbb531818d3b2ae6db32e7b2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20T=C3=A9choueyres?= Date: Sun, 14 Oct 2018 17:49:12 +0200 Subject: [PATCH] Unify prompt for gnupg passphrase between GNU/Linux and Windows. * lisp/epg.el (epg--start): Use native locale coding system instead of binary for Microsoft Windows and DOS. --- lisp/epg.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/epg.el b/lisp/epg.el index 8f26cd34ee..000366d76a 100644 --- a/lisp/epg.el +++ b/lisp/epg.el @@ -655,7 +655,9 @@ epg--start :command (cons (epg-context-program context) args) :connection-type 'pipe - :coding '(binary . binary) + :coding (if (memq system-type '(ms-dos windows-nt)) + (cons locale-coding-system locale-coding-system) + '(binary . binary)) :filter #'epg--process-filter :stderr error-process :noquery t))) -- 2.17.2 --=-=-= Content-Type: text/plain Pierre. --=-=-=--