Package: emacs;
Reported by: 16emacsbug <at> nospam.scs.stanford.edu
Date: Tue, 27 Sep 2016 09:08:01 UTC
Severity: normal
Found in version 25.1
Fixed in version 26.1
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24553 in the body.
You can then email your comments to 24553 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
bug-gnu-emacs <at> gnu.org
:bug#24553
; Package emacs
.
(Tue, 27 Sep 2016 09:08:01 GMT) Full text and rfc822 format available.16emacsbug <at> nospam.scs.stanford.edu
:bug-gnu-emacs <at> gnu.org
.
(Tue, 27 Sep 2016 09:08:01 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: 16emacsbug <at> nospam.scs.stanford.edu To: bug-gnu-emacs <at> gnu.org Subject: 25.1; epa ignores epg-gpg-program in very confusing way Date: Tue, 27 Sep 2016 01:15:40 -0700
I need to edit some files that decrypt properly with gpg 1.4 but not gpg 2.1. I have both installed on my system, with 1.4 as /usr/bin/gpg1 and 2.1 as /usr/bin/gpg2. The bug is that emacs ignores the epg-gpg-program variable *except* in error messages, which is very confusing. To reproduce this problem, do the following: * Run strace -o /tmp/log emacs -Q * Eval expression (setq epg-gpg-program "/usr/bin/gpg1") * Open a gpg-encrypted file By examining /tmp/log, or running ps, you can see that emacs is executing a command like the following: /usr/bin/gpg2 --no-tty --status-fd 1 --yes --enable-progress-filter --command-fd 0 --output /tmp/epg-output6602ygi --decrypt -- /tmp/x.gpg However, when it fails to decrypt, it prints the message: Error while decrypting with "/usr/bin/gpg1." This is obviously very frustrating since gpg1 can in fact decrypt the file. Ideally emacs should obey epg-gpg-program, but if it doesn't, it should properly report what failed. In GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.20.9) of 2016-09-18 built on juergen Windowing system distributor 'The X.Org Foundation', version 11.0.11804000 System Description: Arch Linux Configured using: 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=gtk3 --with-xft 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 Important settings: value of $LANG: C locale-coding-system: nil Major mode: Lisp Interaction Minor modes in effect: diff-auto-refine-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: Loading /u/dm/.emacs.local...done For information about GNU Emacs and the GNU system, type <f1> C-a. Source file ‘/usr/share/emacs/site-lisp/notmuch-parser.el’ newer than byte-compiled file Loading ~/.dot/elisp/my-notmuch (compiled; note, source file is newer)... Loading /u/dm/.dot/elisp/notmuch-identities.el (source)...done calling notmuch-address-message-insinuate is no longer needed Loading ~/.dot/elisp/my-notmuch (compiled; note, source file is newer)...done Load-path shadows: /usr/share/emacs/site-lisp/haskell-mode/haskell-modules hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-modules /usr/share/emacs/site-lisp/haskell-mode/haskell-utils hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-utils /usr/share/emacs/site-lisp/haskell-mode/w3m-haddock hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/w3m-haddock /usr/share/emacs/site-lisp/haskell-mode/haskell-presentation-mode hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-presentation-mode /usr/share/emacs/site-lisp/haskell-mode/haskell-checkers hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-checkers /usr/share/emacs/site-lisp/haskell-mode/inf-haskell hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/inf-haskell /usr/share/emacs/site-lisp/haskell-mode/haskell-align-imports hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-align-imports /usr/share/emacs/site-lisp/haskell-mode/haskell-customize hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-customize /usr/share/emacs/site-lisp/haskell-mode/haskell-cabal hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-cabal /usr/share/emacs/site-lisp/haskell-mode/haskell-collapse hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-collapse /usr/share/emacs/site-lisp/haskell-mode/haskell-load hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-load /usr/share/emacs/site-lisp/haskell-mode/haskell hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell /usr/share/emacs/site-lisp/haskell-mode/haskell-commands hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-commands /usr/share/emacs/site-lisp/haskell-mode/haskell-hoogle hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-hoogle /usr/share/emacs/site-lisp/haskell-mode/haskell-decl-scan hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-decl-scan /usr/share/emacs/site-lisp/haskell-mode/haskell-navigate-imports hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-navigate-imports /usr/share/emacs/site-lisp/haskell-mode/haskell-sort-imports hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-sort-imports /usr/share/emacs/site-lisp/haskell-mode/haskell-completions hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-completions /usr/share/emacs/site-lisp/haskell-mode/haskell-unicode-input-method hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-unicode-input-method /usr/share/emacs/site-lisp/haskell-mode/haskell-repl hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-repl /usr/share/emacs/site-lisp/haskell-mode/haskell-process hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-process /usr/share/emacs/site-lisp/haskell-mode/haskell-sandbox hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-sandbox /usr/share/emacs/site-lisp/haskell-mode/highlight-uses-mode hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/highlight-uses-mode /usr/share/emacs/site-lisp/haskell-mode/haskell-c2hs hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-c2hs /usr/share/emacs/site-lisp/haskell-mode/haskell-compat hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-compat /usr/share/emacs/site-lisp/haskell-mode/haskell-font-lock hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-font-lock /usr/share/emacs/site-lisp/haskell-mode/haskell-compile hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-compile /usr/share/emacs/site-lisp/haskell-mode/haskell-move-nested hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-move-nested /usr/share/emacs/site-lisp/haskell-mode/haskell-indent hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-indent /usr/share/emacs/site-lisp/haskell-mode/haskell-menu hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-menu /usr/share/emacs/site-lisp/haskell-mode/haskell-session hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-session /usr/share/emacs/site-lisp/haskell-mode/haskell-string hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-string /usr/share/emacs/site-lisp/haskell-mode/haskell-doc hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-doc /usr/share/emacs/site-lisp/haskell-mode/ghci-script-mode hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/ghci-script-mode /usr/share/emacs/site-lisp/haskell-mode/haskell-lexeme hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-lexeme /usr/share/emacs/site-lisp/haskell-mode/haskell-interactive-mode hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-interactive-mode /usr/share/emacs/site-lisp/haskell-mode/ghc-core hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/ghc-core /usr/share/emacs/site-lisp/haskell-mode/haskell-indentation hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-indentation /usr/share/emacs/site-lisp/haskell-mode/haskell-complete-module hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-complete-module /usr/share/emacs/site-lisp/haskell-mode/haskell-debug hides /usr/share/emacs/site-lisp/haskell-mode/build-24.5.1/haskell-debug /usr/share/emacs/site-lisp/flim/hex-util hides /usr/share/emacs/25.1/lisp/hex-util /usr/share/emacs/site-lisp/flim/md4 hides /usr/share/emacs/25.1/lisp/md4 /usr/share/emacs/site-lisp/flim/sasl-ntlm hides /usr/share/emacs/25.1/lisp/net/sasl-ntlm /usr/share/emacs/site-lisp/flim/hmac-md5 hides /usr/share/emacs/25.1/lisp/net/hmac-md5 /usr/share/emacs/site-lisp/flim/sasl hides /usr/share/emacs/25.1/lisp/net/sasl /usr/share/emacs/site-lisp/flim/ntlm hides /usr/share/emacs/25.1/lisp/net/ntlm /usr/share/emacs/site-lisp/flim/hmac-def hides /usr/share/emacs/25.1/lisp/net/hmac-def /usr/share/emacs/site-lisp/flim/sasl-cram hides /usr/share/emacs/25.1/lisp/net/sasl-cram /usr/share/emacs/site-lisp/flim/sasl-digest hides /usr/share/emacs/25.1/lisp/net/sasl-digest /usr/share/emacs/site-lisp/semi/smime hides /usr/share/emacs/25.1/lisp/gnus/smime /usr/share/emacs/site-lisp/semi/pgg-parse hides /usr/share/emacs/25.1/lisp/obsolete/pgg-parse /usr/share/emacs/site-lisp/semi/pgg-def hides /usr/share/emacs/25.1/lisp/obsolete/pgg-def /usr/share/emacs/site-lisp/semi/pgg-pgp5 hides /usr/share/emacs/25.1/lisp/obsolete/pgg-pgp5 /usr/share/emacs/site-lisp/semi/pgg-gpg hides /usr/share/emacs/25.1/lisp/obsolete/pgg-gpg /usr/share/emacs/site-lisp/semi/pgg hides /usr/share/emacs/25.1/lisp/obsolete/pgg /usr/share/emacs/site-lisp/semi/pgg-pgp hides /usr/share/emacs/25.1/lisp/obsolete/pgg-pgp Features: (shadow sort flyspell ispell mail-extr emacsbug sendmail notmuch hl-line notmuch-message notmuch-maildir-fcc notmuch-hello edmacro kmacro wid-edit notmuch-tree notmuch-show notmuch-print notmuch-crypto notmuch-mua notmuch-address notmuch-company notmuch-parser notmuch-wash diff-mode easy-mmode coolj notmuch-query goto-addr thingatpt icalendar diary-lib diary-loaddefs cal-menu calendar cal-loaddefs notmuch-tag crm notmuch-lib notmuch-version cl message idna dired format-spec rfc822 mml mailabbrev mail-utils gmm-utils mailheader mm-view mml-smime mml-sec password-cache epg gnus-util smime mel mime-def alist mcharset mcs-20 mcs-e20 pces pces-e20 pces-20 broken pcustom path-util poe pym static apel-ver product mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr warnings server time-date finder-inf package epg-config seq byte-opt gv bytecomp byte-compile cl-extra help-mode easymenu cconv viper viper-ex viper-macs viper-mous viper-cmd viper-keym ring viper-util viper-init advice proof-site proof-autoloads pg-vars haskell-mode-autoloads cc-styles cc-align cc-engine cc-vars cc-defs cl-loaddefs pcase cl-lib mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 208677 7152) (symbols 48 31752 0) (miscs 40 214 946) (strings 32 52762 7347) (string-bytes 1 1545196) (vectors 16 24034) (vector-slots 8 573560 5264) (floats 8 217 6) (intervals 56 543 318) (buffers 976 158))
bug-gnu-emacs <at> gnu.org
:bug#24553
; Package emacs
.
(Thu, 29 Sep 2016 03:09:02 GMT) Full text and rfc822 format available.Message #8 received at 24553 <at> debbugs.gnu.org (full text, mbox):
From: Nick Helm <nick <at> tenpoint.co.nz> To: <24553 <at> debbugs.gnu.org> Subject: Re: bug#24553: 25.1; epa ignores epg-gpg-program in very confusing way Date: Thu, 29 Sep 2016 16:07:43 +1300
> I need to edit some files that decrypt properly with gpg 1.4 but not gpg > 2.1. I have both installed on my system, with 1.4 as /usr/bin/gpg1 and > 2.1 as /usr/bin/gpg2. The bug is that emacs ignores the epg-gpg-program > variable *except* in error messages, which is very confusing. > Ideally emacs should obey epg-gpg-program ... I have a similar problem with epg-gpg-program. See bug#24229 (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24229) for some discussion that might be relevant.
bug-gnu-emacs <at> gnu.org
:bug#24553
; Package emacs
.
(Thu, 29 Sep 2016 15:54:01 GMT) Full text and rfc822 format available.Message #11 received at 24553 <at> debbugs.gnu.org (full text, mbox):
From: Daiki Ueno <ueno <at> gnu.org> To: Nick Helm <nick <at> tenpoint.co.nz> Cc: 24553 <at> debbugs.gnu.org Subject: Re: bug#24553: 25.1; epa ignores epg-gpg-program in very confusing way Date: Thu, 29 Sep 2016 17:53:09 +0200
Nick Helm <nick <at> tenpoint.co.nz> writes: >> I need to edit some files that decrypt properly with gpg 1.4 but not gpg >> 2.1. I have both installed on my system, with 1.4 as /usr/bin/gpg1 and >> 2.1 as /usr/bin/gpg2. The bug is that emacs ignores the epg-gpg-program >> variable *except* in error messages, which is very confusing. > >> Ideally emacs should obey epg-gpg-program ... > > I have a similar problem with epg-gpg-program. See bug#24229 > (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24229) for some > discussion that might be relevant. And I want to close this as a duplicate of that bug. Is there still anything we can technically do for this? Isn't it enough to suggest: M-: (custom-set-variables '(epg-gpg-program "gpg1" t)) instead of setq?
bug-gnu-emacs <at> gnu.org
:bug#24553
; Package emacs
.
(Mon, 03 Oct 2016 17:42:01 GMT) Full text and rfc822 format available.Message #14 received at 24553 <at> debbugs.gnu.org (full text, mbox):
From: Ted Zlatanov <tzz <at> lifelogs.com> To: Daiki Ueno <ueno <at> gnu.org> Cc: 24553 <at> debbugs.gnu.org, Nick Helm <nick <at> tenpoint.co.nz> Subject: Re: bug#24553: 25.1; epa ignores epg-gpg-program in very confusing way Date: Mon, 03 Oct 2016 13:41:19 -0400
On Thu, 29 Sep 2016 17:53:09 +0200 Daiki Ueno <ueno <at> gnu.org> wrote: DU> Nick Helm <nick <at> tenpoint.co.nz> writes: >>> I need to edit some files that decrypt properly with gpg 1.4 but not gpg >>> 2.1. I have both installed on my system, with 1.4 as /usr/bin/gpg1 and >>> 2.1 as /usr/bin/gpg2. The bug is that emacs ignores the epg-gpg-program >>> variable *except* in error messages, which is very confusing. >> >>> Ideally emacs should obey epg-gpg-program ... >> >> I have a similar problem with epg-gpg-program. See bug#24229 >> (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24229) for some >> discussion that might be relevant. DU> And I want to close this as a duplicate of that bug. Is there still DU> anything we can technically do for this? Isn't it enough to suggest: DU> M-: (custom-set-variables '(epg-gpg-program "gpg1" t)) DU> instead of setq? Respectfully, the usability bug here is different: EPA/EPG only uses the customized value, while the log message only uses the actual value in the variable. So the log messages should be adjusted, if you want to keep using the customized value only in EPA/EPG. And perhaps they should catch and mention the case where the customized value is not the same as the variable value, again for usability's sake. HTH Ted
Glenn Morris <rgm <at> gnu.org>
:16emacsbug <at> nospam.scs.stanford.edu
:Message #19 received at 24553-done <at> debbugs.gnu.org (full text, mbox):
From: Glenn Morris <rgm <at> gnu.org> To: 24553-done <at> debbugs.gnu.org Subject: Re: bug#24553: 25.1; epa ignores epg-gpg-program in very confusing way Date: Fri, 10 Mar 2017 15:16:57 -0500
Version: 26.1 16emacsbug <at> nospam.scs.stanford.edu wrote: > However, when it fails to decrypt, it prints the message: Error while > decrypting with "/usr/bin/gpg1." This is obviously very frustrating > since gpg1 can in fact decrypt the file. Ideally emacs should obey > epg-gpg-program, but if it doesn't, it should properly report what > failed. Thanks for the report. The following improves the error message. commit b2f20aa (HEAD, master) Date: Fri Mar 10 15:14:33 2017 -0500 Small improvement for epa-display-error (bug#24553) * lisp/epa.el (epa-display-error): Report the actual program in use. diff --git a/lisp/epa.el b/lisp/epa.el index 4378c09..52963b6 100644 --- a/lisp/epa.el +++ b/lisp/epa.el @@ -628,7 +628,7 @@ If SECRET is non-nil, list secret keys instead of public keys." (`import-keys "Error while importing keys with \"%s\":") (`export-keys "Error while exporting keys with \"%s\":") (_ "Error while executing \"%s\":\n\n")) - epg-gpg-program) + (epg-context-program context)) "\n\n" (epg-context-error-output context))) (epa-info-mode)
Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Sat, 08 Apr 2017 11:24:05 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.