From: "Pierre Téchoueyres" <pierre.techoueyres@free.fr>
To: 33040@debbugs.gnu.org
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 [thread overview]
Message-ID: <87y3b0cynl.fsf@killashandra.ballybran.fr> (raw)
[-- Attachment #1: Type: text/plain, Size: 1025 bytes --]
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échoueyres <pierre.techoueyres@free.fr>
:
#+END_VERSE
Note the cariage return before the colon.
On GNU/Linux:
#+BEGIN_VERSE
Passphrase for 7F4B4084DFC4EBD2 Pierre Téchoueyres <pierre.techoueyres@free.fr>:
#+END_VERSE
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Unify-prompt-for-gnupg-passphrase-between-GNU-Linux-and-Microsoft-Windows --]
[-- Type: text/x-patch, Size: 1043 bytes --]
From 6e3935351b3e681fbb531818d3b2ae6db32e7b2b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre=20T=C3=A9choueyres?= <pierre.techoueyres@free.fr>
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
[-- Attachment #3: Type: text/plain, Size: 9 bytes --]
Pierre.
next reply other threads:[~2018-10-14 15:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-14 15:53 Pierre Téchoueyres [this message]
2018-10-20 10:17 ` bug#33040: 26.1.50; Epg prompt on Microsoft Windows differ from the GNU/Linux on when asking passphrase Eli Zaretskii
2018-10-24 16:55 ` Pierre Téchoueyres
2018-10-24 17:40 ` Eli Zaretskii
2018-10-24 18:08 ` Pierre Téchoueyres
2018-10-24 18:35 ` Eli Zaretskii
2018-10-24 19:21 ` Pierre Téchoueyres
2018-10-27 9:38 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y3b0cynl.fsf@killashandra.ballybran.fr \
--to=pierre.techoueyres@free.fr \
--cc=33040@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).