GNU bug report logs -
#3829
23.0.96; Cannot read gpg file
Previous Next
Reported by: Андрей Парамонов <cmr.pent <at> gmail.com>
Date: Sun, 12 Jul 2009 12:55:05 UTC
Severity: wishlist
Tags: fixed
Merged with 4077,
8129
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.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 3829 in the body.
You can then email your comments to 3829 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#3829
; Package
emacs
.
(Sun, 12 Jul 2009 12:55:05 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Андрей Парамонов <cmr.pent <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Sun, 12 Jul 2009 12:55:06 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
[Message part 1 (text/plain, inline)]
To reproduce:
0) emacs -Q
1) C-x C-f attached file
2) Emacs says:
File exists, but cannot be read
I'm ready to provide any additional info,
Andrey Paramonov
In GNU Emacs 23.0.96.1 (i486-pc-linux-gnu, GTK+ Version 2.16.4)
of 2009-07-11 on elegiac, modified by Debian
(emacs-snapshot package, version 1:20090710-1)
Windowing system distributor `The X.Org Foundation', version 11.0.10402000
configured using `configure '--build' 'i486-linux-gnu' '--host'
'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib'
'--libexecdir=/usr/lib' '--localstatedir=/var'
'--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes'
'--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/23.0.96/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.0.96/site-lisp:/usr/share/emacs/site-lisp'
'--with-x=yes' '--with-x-toolkit=gtk' 'build_alias=i486-linux-gnu'
'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN
-DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed'
'CPPFLAGS=''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: ru_RU.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default-enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect:
delete-selection-mode: t
show-paren-mode: t
pc-selection-mode: t
pretty-control-l-mode: t
shell-dirtrack-mode: t
tooltip-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
global-auto-composition-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
global-visual-line-mode: t
visual-line-mode: t
transient-mark-mode: t
Recent messages:
File exists, but cannot be read
===File ~/trusted.gpg=======================================
============================================================
[trusted.gpg (application/octet-stream, attachment)]
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#3829
; Package
emacs
.
(Sun, 12 Jul 2009 17:40:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Chong Yidong <cyd <at> stupidchicken.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Sun, 12 Jul 2009 17:40:04 GMT)
Full text and
rfc822 format available.
Message #10 received at 3829 <at> emacsbugs.donarmstrong.com (full text, mbox):
Hi Daiki,
Could you take a look at bug#3829? Thanks:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3829
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#3829
; Package
emacs
.
(Sun, 12 Jul 2009 21:50:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Daiki Ueno <ueno <at> unixuser.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Sun, 12 Jul 2009 21:50:04 GMT)
Full text and
rfc822 format available.
Message #15 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
>>>>> In <5f0660120907120547o33e6480an6eab53a9a79b4a2e <at> mail.gmail.com>
>>>>> Андрей Парамонов <cmr.pent <at> gmail.com> wrote:
> To reproduce:
> 0) emacs -Q
> 1) C-x C-f attached file
> 2) Emacs says:
> File exists, but cannot be read
That is because the file contains only public keys instead of encrypted
content. Handling such a file in a fancy way would be a feature request
after the release.
How about M-x find-file-literally if you just want to see the binary
content?
Regards,
--
Daiki Ueno
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#3829
; Package
emacs
.
(Sun, 12 Jul 2009 21:50:06 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Daiki Ueno <ueno <at> unixuser.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Sun, 12 Jul 2009 21:50:06 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#3829
; Package
emacs
.
(Mon, 13 Jul 2009 07:05:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Андрей Парамонов <cmr.pent <at> gmail.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Mon, 13 Jul 2009 07:05:04 GMT)
Full text and
rfc822 format available.
Message #25 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
2009/7/13 Daiki Ueno <ueno <at> unixuser.org>:
> How about M-x find-file-literally if you just want to see the binary
> content?
>
Yes, this works (that's the behavior I expected). However, some other
functions (i.e. mail-attach-file) do not work. Also, the message "File
exists, but cannot be read" is a bit vague to me (file could not be
read due to many reasons, i.e. file permissions).
Is it possible to fall back to find-file-literally behavior, if a gpg
file cannot be opened with the new method?
Andrey
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#3829
; Package
emacs
.
(Mon, 13 Jul 2009 07:05:07 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Андрей Парамонов <cmr.pent <at> gmail.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Mon, 13 Jul 2009 07:05:07 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#3829
; Package
emacs
.
(Tue, 14 Jul 2009 03:15:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Daiki Ueno <ueno <at> unixuser.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Tue, 14 Jul 2009 03:15:04 GMT)
Full text and
rfc822 format available.
Message #35 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
severity 3829 wishlist
thanks
>>>>> In <5f0660120907130001v1c9b83e9nb278e847140653a8 <at> mail.gmail.com>
>>>>> Андрей Парамонов <cmr.pent <at> gmail.com> wrote:
> 2009/7/13 Daiki Ueno <ueno <at> unixuser.org>:
> > How about M-x find-file-literally if you just want to see the binary
> > content?
> >
> Yes, this works (that's the behavior I expected). However, some other
> functions (i.e. mail-attach-file) do not work.
Well, please elaborate what is your problem... Do you really want to
attach binary files with mail-attach-file? I think it is not feasible
and most people use uuencode before attaching.
I believe that Emacs commands which read binary contents are carefully
designed whether or not to do automatic decoding (i.e. mml-attach-file
in Gnus). If you find _real problems_, please let me know.
> Also, the message "File exists, but cannot be read" is a bit vague to
> me (file could not be read due to many reasons, i.e. file
> permissions).
Agreed. Unfortunatelly the improvement is not as easy to implement as
expected. This would also be a feature request.
> Is it possible to fall back to find-file-literally behavior, if a gpg
> file cannot be opened with the new method?
Though there is no fall back mechanism, you can stop it manually by:
C-u -1 M-x auto-encryption-mode
Regards,
--
Daiki Ueno
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#3829
; Package
emacs
.
(Tue, 14 Jul 2009 03:15:06 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Daiki Ueno <ueno <at> unixuser.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Tue, 14 Jul 2009 03:15:06 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#3829
; Package
emacs
.
(Tue, 14 Jul 2009 07:25:05 GMT)
Full text and
rfc822 format available.
Message #43 received at 3829 <at> emacsbugs.donarmstrong.com (full text, mbox):
severity 3829 wishlist
stop
Daiki Ueno wrote:
> severity 3829 wishlist
> thanks
Just in case you did not know, such commands have no effect unless you
cc the control server (bcc'd in this message).
Severity set to `wishlist' from `normal'
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> emacsbugs.donarmstrong.com
.
(Tue, 14 Jul 2009 07:25:07 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#3829
; Package
emacs
.
(Tue, 14 Jul 2009 11:00:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Андрей Парамонов <cmr.pent <at> gmail.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Tue, 14 Jul 2009 11:00:03 GMT)
Full text and
rfc822 format available.
Message #50 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
2009/7/14 Daiki Ueno <ueno <at> unixuser.org>:
> Well, please elaborate what is your problem... Do you really want to
> attach binary files with mail-attach-file? I think it is not feasible
> and most people use uuencode before attaching.
>
> I believe that Emacs commands which read binary contents are carefully
> designed whether or not to do automatic decoding (i.e. mml-attach-file
> in Gnus). If you find _real problems_, please let me know.
>
The real problem is that I couldn't even attach the problematic file
via Emacs, so I had to use Gmail web interface for reporting the bug.
Don't know if it can be considered "real" though.
Thanks for your effort,
Andrey
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#3829
; Package
emacs
.
(Tue, 14 Jul 2009 11:00:05 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Андрей Парамонов <cmr.pent <at> gmail.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Tue, 14 Jul 2009 11:00:05 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#3829
; Package
emacs
.
(Tue, 14 Jul 2009 20:05:05 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Tue, 14 Jul 2009 20:05:05 GMT)
Full text and
rfc822 format available.
Message #60 received at 3829 <at> emacsbugs.donarmstrong.com (full text, mbox):
> The real problem is that I couldn't even attach the problematic file
> via Emacs, so I had to use Gmail web interface for reporting the bug.
> Don't know if it can be considered "real" though.
That's actually a different problem: the default MUA to compose email
doesn't really know how to attach files. I've just changed it to
message-mode which can do it much better.
Stefan
Forcibly Merged 3829 4077.
Request was from
Juanma Barranquero <lekktu <at> gmail.com>
to
control <at> emacsbugs.donarmstrong.com
.
(Thu, 22 Oct 2009 10:00:05 GMT)
Full text and
rfc822 format available.
Forcibly Merged 3829 4077 8129.
Request was from
npostavs <at> users.sourceforge.net
to
control <at> debbugs.gnu.org
.
(Mon, 11 Jul 2016 03:02:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#3829
; Package
emacs
.
(Fri, 30 Aug 2019 11:21:01 GMT)
Full text and
rfc822 format available.
Message #67 received at 3829 <at> debbugs.gnu.org (full text, mbox):
Андрей Парамонов <cmr.pent <at> gmail.com> writes:
> To reproduce:
>
> 0) emacs -Q
>
> 1) C-x C-f attached file
>
> 2) Emacs says:
> File exists, but cannot be read
(The user included a trusted.gpg file; which is a key ring.)
The problem here is that there are two common uses of the .gpg suffix.
Emacs assumes that all files that end with .gpg are encrypted files, and
will error out dramatically when trying to read those files. The only
way the user has to look at them is with `M-x find-file-literally'.
But .gpg is also a common suffix for key ring files.
Emacs could be more helpful here and check the first few bytes of the
file to see what type it is.
https://lists.gnupg.org/pipermail/gnupg-users/2013-September/047725.html
But that doesn't seem to be totally trivial.
Should Emacs treat these as normal files if gpg gives an error message
when trying to open them?
---
Error while decrypting with "/usr/bin/gpg2":
gpg: decrypt_message failed: Unexpected error
---
That doesn't seem very logical, either...
Anybody got any ideas?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#3829
; Package
emacs
.
(Tue, 04 Aug 2020 19:28:02 GMT)
Full text and
rfc822 format available.
Message #70 received at 3829 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Emacs assumes that all files that end with .gpg are encrypted files, and
> will error out dramatically when trying to read those files. The only
> way the user has to look at them is with `M-x find-file-literally'.
>
> But .gpg is also a common suffix for key ring files.
I had a look at this again, and there doesn't really seem to be a good
set of magic bytes for these files. "\x01gpg" is used by some, and
"\x99\x01" for others, apparently, and ... a bunch of other two-byte
codes. But there apparently isn't anything that ensures what the byte
prefixes are in encoded files? (I'm trying to understand the logic in
"file"...)
On the other hand, we could just let gpg try to decrypt the data and if
we get
gpg -d /tmp/trusted.gpg
gpg: decrypt_message failed: Unexpected error
then we can just take that as a hint that it's not encrypted data and
then insert the bytes instead.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#3829
; Package
emacs
.
(Tue, 04 Aug 2020 19:44:01 GMT)
Full text and
rfc822 format available.
Message #73 received at 3829 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> On the other hand, we could just let gpg try to decrypt the data and if
> we get
>
> gpg -d /tmp/trusted.gpg
> gpg: decrypt_message failed: Unexpected error
>
> then we can just take that as a hint that it's not encrypted data and
> then insert the bytes instead.
I've now done this on the trunk. I think it's a better, less annoying
behaviour than before... probably.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 04 Aug 2020 19:45:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 28.1, send any further explanations to
3829 <at> debbugs.gnu.org and Андрей Парамонов <cmr.pent <at> gmail.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 04 Aug 2020 19:45:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 02 Sep 2020 11:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 236 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.