GNU bug report logs -
#21870
25.0.50; image now shown after decrypting image file
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 21870 in the body.
You can then email your comments to 21870 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21870
; Package
emacs
.
(Tue, 10 Nov 2015 08:35:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Dirk-Jan C. Binnema <djcb <at> djcbsoftware.nl>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 10 Nov 2015 08:35:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
It seems the auto-decryption functionality does not work correctly for
encrypted images - that is, decryption works, but then the image is not
shown.
Steps to reproduce:
1) Open an encrypted image file (say, test.jpeg.gpg)
2) Enter the passphrase, when asked (by easypg I assume)
3) Now, see a small rectangle in the upper left of the current window;
instead of the expected image
Expected behavior would be to see the image, just as if opening
test.jpeg directly.
The mentioned rectangle does seem to point the correct data (when
looking at it with image-toggle-display.
In GNU Emacs 25.0.50.129 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.2)
of 2015-11-02
Repository revision: d4352f813a0703cc7f7a873525131b272ef0c105
Windowing system distributor 'Fedora Project', version 11.0.11799902
System Description: Fedora release 23 (Twenty Three)
Configured using:
'configure
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/pkgconfig::/usr/local/Cellar/sqlite/3.7.15.1/lib/pkgconfig/'
Configured features:
XPM JPEG TIFF GIF PNG IMAGEMAGICK SOUND DBUS GSETTINGS NOTIFY ACL
LIBSELINUX GNUTLS LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21870
; Package
emacs
.
(Tue, 10 Nov 2015 16:24:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 21870 <at> debbugs.gnu.org (full text, mbox):
> From: Dirk-Jan C. Binnema <djcb <at> djcbsoftware.nl>
> Date: Tue, 10 Nov 2015 10:30:44 +0200
>
> It seems the auto-decryption functionality does not work correctly for
> encrypted images - that is, decryption works, but then the image is not
> shown.
>
> Steps to reproduce:
> 1) Open an encrypted image file (say, test.jpeg.gpg)
> 2) Enter the passphrase, when asked (by easypg I assume)
> 3) Now, see a small rectangle in the upper left of the current window;
> instead of the expected image
>
> Expected behavior would be to see the image, just as if opening
> test.jpeg directly.
If you do the same with a different kind of file, does Emacs activate
the correct major mode after decrypting the file?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21870
; Package
emacs
.
(Tue, 10 Nov 2015 17:14:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 21870 <at> debbugs.gnu.org (full text, mbox):
On Tuesday Nov 10 2015, Eli Zaretskii wrote:
>> From: Dirk-Jan C. Binnema <djcb <at> djcbsoftware.nl>
>> Date: Tue, 10 Nov 2015 10:30:44 +0200
>>
>> It seems the auto-decryption functionality does not work correctly for
>> encrypted images - that is, decryption works, but then the image is not
>> shown.
>>
>> Steps to reproduce:
>> 1) Open an encrypted image file (say, test.jpeg.gpg)
>> 2) Enter the passphrase, when asked (by easypg I assume)
>> 3) Now, see a small rectangle in the upper left of the current window;
>> instead of the expected image
>>
>> Expected behavior would be to see the image, just as if opening
>> test.jpeg directly.
>
> If you do the same with a different kind of file, does Emacs activate
> the correct major mode after decrypting the file?
Yes - e.g. opening test.org.gpg will decrypt, then activate org-mode.
(and note that this is reproducible with emacs -Q)
Kind regards,
Dirk.
--
Dirk-Jan C. Binnema Helsinki, Finland
e:djcb <at> djcbsoftware.nl w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21870
; Package
emacs
.
(Sat, 14 Nov 2015 14:35:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 21870 <at> debbugs.gnu.org (full text, mbox):
> From: Dirk-Jan C. Binnema <djcb <at> djcbsoftware.nl>
> Cc: 21870 <at> debbugs.gnu.org
> Date: Tue, 10 Nov 2015 19:12:51 +0200
>
> On Tuesday Nov 10 2015, Eli Zaretskii wrote:
>
> >> From: Dirk-Jan C. Binnema <djcb <at> djcbsoftware.nl>
> >> Date: Tue, 10 Nov 2015 10:30:44 +0200
> >>
> >> It seems the auto-decryption functionality does not work correctly for
> >> encrypted images - that is, decryption works, but then the image is not
> >> shown.
> >>
> >> Steps to reproduce:
> >> 1) Open an encrypted image file (say, test.jpeg.gpg)
> >> 2) Enter the passphrase, when asked (by easypg I assume)
> >> 3) Now, see a small rectangle in the upper left of the current window;
> >> instead of the expected image
> >>
> >> Expected behavior would be to see the image, just as if opening
> >> test.jpeg directly.
> >
> > If you do the same with a different kind of file, does Emacs activate
> > the correct major mode after decrypting the file?
>
> Yes - e.g. opening test.org.gpg will decrypt, then activate org-mode.
>
> (and note that this is reproducible with emacs -Q)
Looks like epa-file.el doesn't run normal-mode after decrypting the
file?
Daiki, would you please look into this? If you want to install a fix,
please do that on the emacs-25 branch.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21870
; Package
emacs
.
(Mon, 16 Nov 2015 06:11:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 21870 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
>> >> It seems the auto-decryption functionality does not work correctly for
>> >> encrypted images - that is, decryption works, but then the image is not
>> >> shown.
>> >>
>> >> Steps to reproduce:
>> >> 1) Open an encrypted image file (say, test.jpeg.gpg)
>> >> 2) Enter the passphrase, when asked (by easypg I assume)
>> >> 3) Now, see a small rectangle in the upper left of the current window;
>> >> instead of the expected image
>> >>
>> >> Expected behavior would be to see the image, just as if opening
>> >> test.jpeg directly.
>> >
>> > If you do the same with a different kind of file, does Emacs activate
>> > the correct major mode after decrypting the file?
>>
>> Yes - e.g. opening test.org.gpg will decrypt, then activate org-mode.
>>
>> (and note that this is reproducible with emacs -Q)
>
> Looks like epa-file.el doesn't run normal-mode after decrypting the
> file?
Thanks for forwarding. Hmm, it seems that normal-mode is actually
called, but image-mode tries to load the contents from the file, not
from the buffer. Does the following hack look correct?
(It seems reading test.jpeg.gz works because ImageMagick supports
compressed files.)
Regards,
--
Daiki Ueno
[image-mode.el.diff (text/x-patch, inline)]
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index e6d6a3e..12c8b95 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -658,7 +658,11 @@ image-toggle-display-image
(not (and (boundp 'archive-superior-buffer)
archive-superior-buffer))
(not (and (boundp 'tar-superior-buffer)
- tar-superior-buffer)))))
+ tar-superior-buffer))
+ (not (eq (find-file-name-handler
+ filename
+ 'insert-file-contents)
+ 'epa-file-handler)))))
(file-or-data (if data-p
(string-make-unibyte
(buffer-substring-no-properties (point-min) (point-max)))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21870
; Package
emacs
.
(Mon, 16 Nov 2015 07:51:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 21870 <at> debbugs.gnu.org (full text, mbox):
On Monday Nov 16 2015, Daiki Ueno wrote:
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>>> >> It seems the auto-decryption functionality does not work correctly for
>>> >> encrypted images - that is, decryption works, but then the image is not
>>> >> shown.
[...]
>> Looks like epa-file.el doesn't run normal-mode after decrypting the
>> file?
>
> Thanks for forwarding. Hmm, it seems that normal-mode is actually
> called, but image-mode tries to load the contents from the file, not
> from the buffer. Does the following hack look correct?
>
> (It seems reading test.jpeg.gz works because ImageMagick supports
> compressed files.)
Yes -- seems that did the trick. Just tried it with the patch and the
image is now shown as expected.
Thanks!
Dirk.
--
Dirk-Jan C. Binnema Helsinki, Finland
e:djcb <at> djcbsoftware.nl w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C
Reply sent
to
Daiki Ueno <ueno <at> gnu.org>
:
You have taken responsibility.
(Tue, 17 Nov 2015 02:54:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Dirk-Jan C. Binnema <djcb <at> djcbsoftware.nl>
:
bug acknowledged by developer.
(Tue, 17 Nov 2015 02:54:03 GMT)
Full text and
rfc822 format available.
Message #25 received at 21870-done <at> debbugs.gnu.org (full text, mbox):
Dirk-Jan C. Binnema <djcb <at> djcbsoftware.nl> writes:
>> Thanks for forwarding. Hmm, it seems that normal-mode is actually
>> called, but image-mode tries to load the contents from the file, not
>> from the buffer. Does the following hack look correct?
>>
>> (It seems reading test.jpeg.gz works because ImageMagick supports
>> compressed files.)
>
> Yes -- seems that did the trick. Just tried it with the patch and the
> image is now shown as expected.
Thanks for testing. Since the check was brittle, I have installed a
slightly modified version to both master and emacs-25:
http://git.sv.gnu.org/cgit/emacs.git/commit/?id=58e62350
Regards,
--
Daiki Ueno
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 15 Dec 2015 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 9 years and 186 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.