From unknown Sat Aug 16 14:29:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33040: 26.1.50; Epg prompt on Microsoft Windows differ from the GNU/Linux on when asking passphrase 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: To: 33040@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15395324465409 (code B ref -1); Sun, 14 Oct 2018 15:55:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 Oct 2018 15:54:06 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RECEIVED_FROM_WINDOWS_HOST autolearn=disabled version=3.3.2 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 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 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 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 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) User-agent: mu4e 1.1.0; emacs 26.1.50 From: Pierre =?UTF-8?Q?T=C3=A9choueyres?= Date: Sun, 14 Oct 2018 17:53:50 +0200 Message-ID: <87y3b0cynl.fsf@killashandra.ballybran.fr> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) --=-=-= 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. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 14 14:46:08 2018 Received: (at control) by debbugs.gnu.org; 14 Oct 2018 18:46:08 +0000 Received: from localhost ([127.0.0.1]:49546 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gBlOy-0005Z3-5Q for submit@debbugs.gnu.org; Sun, 14 Oct 2018 14:46:08 -0400 Received: from smtp3-g21.free.fr ([212.27.42.3]:41994) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gBlOv-0005Yu-UL for control@debbugs.gnu.org; Sun, 14 Oct 2018 14:46:06 -0400 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 DAEBC13F8DD for ; Sun, 14 Oct 2018 20:46:04 +0200 (CEST) Date: Sun, 14 Oct 2018 20:46:04 +0200 Message-Id: <87y3b074er.fsf@killashandra.ballybran.fr> To: control@debbugs.gnu.org From: pierre.techoueyres@free.fr (Pierre =?utf-8?Q?T=C3=A9choueyres?=) Subject: control message for bug #33040 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 33040 patch From unknown Sat Aug 16 14:29:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33040: 26.1.50; Epg prompt on Microsoft Windows differ from the GNU/Linux on when asking passphrase Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Oct 2018 10:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33040 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Pierre =?UTF-8?Q?T=C3=A9choueyres?= Cc: 33040@debbugs.gnu.org Received: via spool by 33040-submit@debbugs.gnu.org id=B33040.154003067819818 (code B ref 33040); Sat, 20 Oct 2018 10:18:01 +0000 Received: (at 33040) by debbugs.gnu.org; 20 Oct 2018 10:17:58 +0000 Received: from localhost ([127.0.0.1]:60285 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDoKS-00059Z-EG for submit@debbugs.gnu.org; Sat, 20 Oct 2018 06:17:58 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDoKP-00059L-VZ for 33040@debbugs.gnu.org; Sat, 20 Oct 2018 06:17:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gDoKG-0000Pn-Go for 33040@debbugs.gnu.org; Sat, 20 Oct 2018 06:17:48 -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.0 required=5.0 tests=BAYES_20 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37589) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDoKG-0000PD-C2; Sat, 20 Oct 2018 06:17:44 -0400 Received: from [176.228.60.248] (port=1199 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gDoKF-00053K-Us; Sat, 20 Oct 2018 06:17:44 -0400 Date: Sat, 20 Oct 2018 13:17:25 +0300 Message-Id: <838t2svs5m.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87y3b0cynl.fsf@killashandra.ballybran.fr> (message from Pierre =?UTF-8?Q?T=C3=A9choueyres?= on Sun, 14 Oct 2018 17:53:50 +0200) References: <87y3b0cynl.fsf@killashandra.ballybran.fr> 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Pierre Téchoueyres > Date: Sun, 14 Oct 2018 17:53:50 +0200 > > 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))) Thanks. I think a better solution is to use raw-text-unix on both Unix and DOS/Windows. Can you try that and see if doing so produces good results on both systems? From unknown Sat Aug 16 14:29:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33040: 26.1.50; Epg prompt on Microsoft Windows differ from the GNU/Linux on when asking passphrase Resent-From: pierre.techoueyres@free.fr (Pierre =?UTF-8?Q?T=C3=A9choueyres?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Oct 2018 16:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33040 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 33040@debbugs.gnu.org Received: via spool by 33040-submit@debbugs.gnu.org id=B33040.154040015825543 (code B ref 33040); Wed, 24 Oct 2018 16:56:01 +0000 Received: (at 33040) by debbugs.gnu.org; 24 Oct 2018 16:55:58 +0000 Received: from localhost ([127.0.0.1]:40436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFMRp-0006dv-Nm for submit@debbugs.gnu.org; Wed, 24 Oct 2018 12:55:57 -0400 Received: from smtp3-g21.free.fr ([212.27.42.3]:24845) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFMRn-0006dm-Ij for 33040@debbugs.gnu.org; Wed, 24 Oct 2018 12:55:55 -0400 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 884B513F8DB; Wed, 24 Oct 2018 18:55:53 +0200 (CEST) From: pierre.techoueyres@free.fr (Pierre =?UTF-8?Q?T=C3=A9choueyres?=) References: <87y3b0cynl.fsf@killashandra.ballybran.fr> <838t2svs5m.fsf@gnu.org> Date: Wed, 24 Oct 2018 18:55:53 +0200 In-Reply-To: <838t2svs5m.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 20 Oct 2018 13:17:25 +0300") Message-ID: <87in1rmgh2.fsf@killashandra.ballybran.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello Eli, I first tried your solution, but that didn't work as expected. Then I tried using 'raw-text unconditionnaly and everything seems to work as expected on Microsoft Windows and GNU/Linux. I do as follow because I think that '(raw-text . raw-text) is the same as 'raw-text for the :coding keyword. - :coding '(binary . binary) + :coding 'raw-text Should I prepare an ammended patch ? Eli Zaretskii writes: > Thanks. > > I think a better solution is to use raw-text-unix on both Unix and > DOS/Windows. Can you try that and see if doing so produces good > results on both systems? > From unknown Sat Aug 16 14:29:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33040: 26.1.50; Epg prompt on Microsoft Windows differ from the GNU/Linux on when asking passphrase Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Oct 2018 17:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33040 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: pierre.techoueyres@free.fr (Pierre =?UTF-8?Q?T=C3=A9choueyres?=) Cc: 33040@debbugs.gnu.org Received: via spool by 33040-submit@debbugs.gnu.org id=B33040.154040287429919 (code B ref 33040); Wed, 24 Oct 2018 17:42:02 +0000 Received: (at 33040) by debbugs.gnu.org; 24 Oct 2018 17:41:14 +0000 Received: from localhost ([127.0.0.1]:40446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFN9b-0007mS-U1 for submit@debbugs.gnu.org; Wed, 24 Oct 2018 13:41:14 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFN9a-0007mG-O7 for 33040@debbugs.gnu.org; Wed, 24 Oct 2018 13:41:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gFN9O-0007Yx-1u for 33040@debbugs.gnu.org; Wed, 24 Oct 2018 13:41:03 -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 fencepost.gnu.org ([2001:4830:134:3::e]:51599) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFN9M-0007Y0-A8; Wed, 24 Oct 2018 13:40:57 -0400 Received: from [176.228.60.248] (port=3162 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gFN9L-0007gw-JZ; Wed, 24 Oct 2018 13:40:56 -0400 Date: Wed, 24 Oct 2018 20:40:51 +0300 Message-Id: <837ei7s0nw.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87in1rmgh2.fsf@killashandra.ballybran.fr> (pierre.techoueyres@free.fr) References: <87y3b0cynl.fsf@killashandra.ballybran.fr> <838t2svs5m.fsf@gnu.org> <87in1rmgh2.fsf@killashandra.ballybran.fr> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: pierre.techoueyres@free.fr (Pierre Téchoueyres) > Cc: 33040@debbugs.gnu.org > Date: Wed, 24 Oct 2018 18:55:53 +0200 > > I first tried your solution, but that didn't work as expected. Then I > tried using 'raw-text unconditionnaly and everything seems to work as > expected on Microsoft Windows and GNU/Linux. > > I do as follow because I think that '(raw-text . raw-text) is the same > as 'raw-text for the :coding keyword. > > - :coding '(binary . binary) > + :coding 'raw-text > > Should I prepare an ammended patch ? Doesn't : coding 'raw-text-unix work on both Windows and GNU/Linux? Because I don't really understand what "unconditionally" means in this context: I didn't suggest using any conditions. Thanks. From unknown Sat Aug 16 14:29:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33040: 26.1.50; Epg prompt on Microsoft Windows differ from the GNU/Linux on when asking passphrase Resent-From: pierre.techoueyres@free.fr (Pierre =?UTF-8?Q?T=C3=A9choueyres?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Oct 2018 18:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33040 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 33040@debbugs.gnu.org Received: via spool by 33040-submit@debbugs.gnu.org id=B33040.154040449132377 (code B ref 33040); Wed, 24 Oct 2018 18:09:01 +0000 Received: (at 33040) by debbugs.gnu.org; 24 Oct 2018 18:08:11 +0000 Received: from localhost ([127.0.0.1]:40462 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFNZj-0008Q9-LI for submit@debbugs.gnu.org; Wed, 24 Oct 2018 14:08:11 -0400 Received: from smtp3-g21.free.fr ([212.27.42.3]:19585) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFNZi-0008Q1-Al for 33040@debbugs.gnu.org; Wed, 24 Oct 2018 14:08:10 -0400 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 03D3F13F846; Wed, 24 Oct 2018 20:08:07 +0200 (CEST) From: pierre.techoueyres@free.fr (Pierre =?UTF-8?Q?T=C3=A9choueyres?=) References: <87y3b0cynl.fsf@killashandra.ballybran.fr> <838t2svs5m.fsf@gnu.org> <87in1rmgh2.fsf@killashandra.ballybran.fr> <837ei7s0nw.fsf@gnu.org> Date: Wed, 24 Oct 2018 20:08:07 +0200 In-Reply-To: <837ei7s0nw.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 24 Oct 2018 20:40:51 +0300") Message-ID: <87d0rzmd4o.fsf@killashandra.ballybran.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > ... > Doesn't > > : coding 'raw-text-unix > > work on both Windows and GNU/Linux? No it doesn't on Windows. I guess it's because of the -unix part which results in adding the CR before the colon (:). > Because I don't really understand > what "unconditionally" means in this context: I didn't suggest using > any conditions. Sorry, when :coding 'raw-text-unix didn't work as expected I first try :coding (if (memq system-type '(ms-dos windows-nt)) 'raw-text-dos 'raw-text-unix) then I realized it was equivalent to : :coding 'raw-text From unknown Sat Aug 16 14:29:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33040: 26.1.50; Epg prompt on Microsoft Windows differ from the GNU/Linux on when asking passphrase Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Oct 2018 18:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33040 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: pierre.techoueyres@free.fr (Pierre =?UTF-8?Q?T=C3=A9choueyres?=) Cc: 33040@debbugs.gnu.org Received: via spool by 33040-submit@debbugs.gnu.org id=B33040.15404061422439 (code B ref 33040); Wed, 24 Oct 2018 18:36:02 +0000 Received: (at 33040) by debbugs.gnu.org; 24 Oct 2018 18:35:42 +0000 Received: from localhost ([127.0.0.1]:40481 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFO0K-0000dE-Q3 for submit@debbugs.gnu.org; Wed, 24 Oct 2018 14:35:42 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFO0H-0000d0-4y for 33040@debbugs.gnu.org; Wed, 24 Oct 2018 14:35:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gFO06-0004oz-N1 for 33040@debbugs.gnu.org; Wed, 24 Oct 2018 14:35:31 -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 fencepost.gnu.org ([2001:4830:134:3::e]:52526) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFNzy-0004ln-Ue; Wed, 24 Oct 2018 14:35:21 -0400 Received: from [176.228.60.248] (port=2535 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gFNzx-0007Dl-7d; Wed, 24 Oct 2018 14:35:18 -0400 Date: Wed, 24 Oct 2018 21:35:14 +0300 Message-Id: <831s8fry59.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87d0rzmd4o.fsf@killashandra.ballybran.fr> (pierre.techoueyres@free.fr) References: <87y3b0cynl.fsf@killashandra.ballybran.fr> <838t2svs5m.fsf@gnu.org> <87in1rmgh2.fsf@killashandra.ballybran.fr> <837ei7s0nw.fsf@gnu.org> <87d0rzmd4o.fsf@killashandra.ballybran.fr> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: pierre.techoueyres@free.fr (Pierre Téchoueyres) > Cc: 33040@debbugs.gnu.org > Date: Wed, 24 Oct 2018 20:08:07 +0200 > > > Doesn't > > > > : coding 'raw-text-unix > > > > work on both Windows and GNU/Linux? > > > No it doesn't on Windows. I guess it's because of the -unix part which > results in adding the CR before the colon (:). Right, I was confused and forgot that this was exactly the original problem. So raw-text it is. And yes, please prepare a patch. > Sorry, when :coding 'raw-text-unix didn't work as expected I first try > > :coding (if (memq system-type '(ms-dos windows-nt)) > 'raw-text-dos > 'raw-text-unix) > > then I realized it was equivalent to : > :coding 'raw-text Actually, no: it isn't equivalent. Just raw-text tells Emacs to use the default on encoding (thus -dos on Windows and -unix on GNU/Linux), and to _detect_ the EOL format on decoding. But I don't think this is a problem in this case, is it? From unknown Sat Aug 16 14:29:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33040: 26.1.50; Epg prompt on Microsoft Windows differ from the GNU/Linux on when asking passphrase Resent-From: pierre.techoueyres@free.fr (Pierre =?UTF-8?Q?T=C3=A9choueyres?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Oct 2018 19:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33040 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 33040@debbugs.gnu.org Received: via spool by 33040-submit@debbugs.gnu.org id=B33040.154040887122488 (code B ref 33040); Wed, 24 Oct 2018 19:22:02 +0000 Received: (at 33040) by debbugs.gnu.org; 24 Oct 2018 19:21:11 +0000 Received: from localhost ([127.0.0.1]:40504 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFOiN-0005qe-41 for submit@debbugs.gnu.org; Wed, 24 Oct 2018 15:21:11 -0400 Received: from smtp3-g21.free.fr ([212.27.42.3]:4875) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFOiL-0005qV-TP for 33040@debbugs.gnu.org; Wed, 24 Oct 2018 15:21:10 -0400 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 DD79513F88A; Wed, 24 Oct 2018 21:21:07 +0200 (CEST) From: pierre.techoueyres@free.fr (Pierre =?UTF-8?Q?T=C3=A9choueyres?=) References: <87y3b0cynl.fsf@killashandra.ballybran.fr> <838t2svs5m.fsf@gnu.org> <87in1rmgh2.fsf@killashandra.ballybran.fr> <837ei7s0nw.fsf@gnu.org> <87d0rzmd4o.fsf@killashandra.ballybran.fr> <831s8fry59.fsf@gnu.org> Date: Wed, 24 Oct 2018 21:21:07 +0200 In-Reply-To: <831s8fry59.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 24 Oct 2018 21:35:14 +0300") Message-ID: <878t2nm9r0.fsf@killashandra.ballybran.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Hello Eli, please find the patch bellow. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Unify-prompt-for-gnupg-passphrase-between-GNU-Linux-.patch Content-Description: epg prompt patch >From 32644ac1027114d3f4caaf2e25ae985241ab867b 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 `raw-text' for coding system instead of binary in order to avoid spurious carriage return on Microsoft Windows and DOS when prompting for a password. --- lisp/epg.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/epg.el b/lisp/epg.el index 8f26cd34ee..28afa59d8e 100644 --- a/lisp/epg.el +++ b/lisp/epg.el @@ -655,7 +655,7 @@ epg--start :command (cons (epg-context-program context) args) :connection-type 'pipe - :coding '(binary . binary) + :coding 'raw-text :filter #'epg--process-filter :stderr error-process :noquery t))) -- 2.17.2 --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> Sorry, when :coding 'raw-text-unix didn't work as expected I first try >> >> :coding (if (memq system-type '(ms-dos windows-nt)) >> 'raw-text-dos >> 'raw-text-unix) >> >> then I realized it was equivalent to : >> :coding 'raw-text > > Actually, no: it isn't equivalent. Just raw-text tells Emacs to use > the default on encoding (thus -dos on Windows and -unix on GNU/Linux), > and to _detect_ the EOL format on decoding. But I don't think this is > a problem in this case, is it? > No, it isn't a problem, and on the contrary it's exactly what I want : detect the EOL format for decoding. --=-=-=-- From unknown Sat Aug 16 14:29:44 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Pierre =?UTF-8?Q?T=C3=A9choueyres?= Subject: bug#33040: closed (Re: bug#33040: 26.1.50; Epg prompt on Microsoft Windows differ from the GNU/Linux on when asking passphrase) Message-ID: References: <83a7mzohkw.fsf@gnu.org> <87y3b0cynl.fsf@killashandra.ballybran.fr> X-Gnu-PR-Message: they-closed 33040 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 33040@debbugs.gnu.org Date: Sat, 27 Oct 2018 09:39:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1540633142-30770-1" This is a multi-part message in MIME format... ------------=_1540633142-30770-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #33040: 26.1.50; Epg prompt on Microsoft Windows differ from the GNU/Linux = on when asking passphrase which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 33040@debbugs.gnu.org. --=20 33040: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D33040 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1540633142-30770-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 33040-done) by debbugs.gnu.org; 27 Oct 2018 09:38:17 +0000 Received: from localhost ([127.0.0.1]:44571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGL2u-0007zM-TK for submit@debbugs.gnu.org; Sat, 27 Oct 2018 05:38:17 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGL2s-0007z9-P9 for 33040-done@debbugs.gnu.org; Sat, 27 Oct 2018 05:38:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gGL2i-00055V-EY for 33040-done@debbugs.gnu.org; Sat, 27 Oct 2018 05:38:09 -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 fencepost.gnu.org ([2001:4830:134:3::e]:53500) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gGL2i-00055P-Aa; Sat, 27 Oct 2018 05:38:04 -0400 Received: from [176.228.60.248] (port=2879 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gGL2h-0005yp-TM; Sat, 27 Oct 2018 05:38:04 -0400 Date: Sat, 27 Oct 2018 12:38:07 +0300 Message-Id: <83a7mzohkw.fsf@gnu.org> From: Eli Zaretskii To: pierre.techoueyres@free.fr (Pierre =?iso-8859-1?Q?T=E9choueyres?=) In-reply-to: <878t2nm9r0.fsf@killashandra.ballybran.fr> (pierre.techoueyres@free.fr) Subject: Re: bug#33040: 26.1.50; Epg prompt on Microsoft Windows differ from the GNU/Linux on when asking passphrase References: <87y3b0cynl.fsf@killashandra.ballybran.fr> <838t2svs5m.fsf@gnu.org> <87in1rmgh2.fsf@killashandra.ballybran.fr> <837ei7s0nw.fsf@gnu.org> <87d0rzmd4o.fsf@killashandra.ballybran.fr> <831s8fry59.fsf@gnu.org> <878t2nm9r0.fsf@killashandra.ballybran.fr> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 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: 33040-done Cc: 33040-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: pierre.techoueyres@free.fr (Pierre Téchoueyres) > Cc: 33040@debbugs.gnu.org > Date: Wed, 24 Oct 2018 21:21:07 +0200 > > Hello Eli, > please find the patch bellow. Thanks, pushed to the release branch. ------------=_1540633142-30770-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 14 Oct 2018 15:54:06 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RECEIVED_FROM_WINDOWS_HOST autolearn=disabled version=3.3.2 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 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 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 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 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) User-agent: mu4e 1.1.0; emacs 26.1.50 From: Pierre =?utf-8?Q?T=C3=A9choueyres?= To: bug-gnu-emacs@gnu.org Subject: 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> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) --=-=-= 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. --=-=-=-- ------------=_1540633142-30770-1--