--- Begin Message ---
Subject: |
24.5; Auto-revert-mode loads images as text |
Date: |
Thu, 1 Oct 2015 17:17:03 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
description:
This is how I reproduce the Bug:
1. open image C-x C-f and select "output.png". This will display the
image as an image as it should.
2. change Image using an external program. This causes the
auto-revert-mode to reload the image(good), but as a text, although my
default (as in 1.) is to open the picture as an image
This forces me to redo C-x C-f, which makes auto-revert-mode pointless.
In GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.16.6)
of 2015-09-14 on buildvm-10.phx2.fedoraproject.org
Windowing system distributor `Fedora Project
Copy and paste whole report:
Date: Thu, 01 Oct 2015 17:15:22 +0200
Message-ID: <address@hidden>
description:
This is how I reproduce the Bug:
1. open image C-x C-f and select "output.png". This will display the
image as an image as it should.
2. change Image using an external program. This causes the
auto-revert-mode to reload the image(good), but as a text, although my
default (as in 1.) is to open the picture as an image
This forces me to redo C-x C-f, which makes auto-revert-mode pointless.
In GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.16.6)
of 2015-09-14 on buildvm-10.phx2.fedoraproject.org
Windowing system distributor `Fedora Project', version 11.0.11702000
System Description: Fedora release 22 (Twenty Two)
Configured using:
`configure --build=x86_64-redhat-linux-gnu
--host=x86_64-redhat-linux-gnu --program-prefix=
--disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
--bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
--datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
--libexecdir=/usr/libexec --localstatedir=/var
--sharedstatedir=/var/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png
--with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3
--with-gpm=no build_alias=x86_64-redhat-linux-gnu
host_alias=x86_64-redhat-linux-gnu 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g
-pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector-strong --param=ssp-buffer-size=4
-grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-m64 -mtune=generic' LDFLAGS=-Wl,-z,relro'
Important settings:
value of $LANG: de_DE.utf8
value of $XMODIFIERS: @im=none
locale-coding-system: utf-8-unix
Major mode: Image[png]
Minor modes in effect:
global-auto-revert-mode: t
shell-dirtrack-mode: t
tooltip-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-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
/usr/share/emacs/site-lisp/site-start.d/desktop-entry-mode-init.el
(source)...done
Finding all versions of R on your system...
Sorry, no version of R could be found on your system.
For information about GNU Emacs and the GNU system, type C-h C-a.
scroll-up-command: End of buffer
call-interactively: End of buffer
C-c C-f is undefined
Making completion list... [2 times]
Type C-c C-c to view the image as text.
Reverting buffer `output.png'.
Load-path shadows:
None found.
Features:
(shadow sort gnus-util mail-extr emacsbug message cl-macs rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils vc-git image-mode help-mode autorevert filenotify
ido ess-toolbar ess-mouse mouseme thingatpt browse-url ess-menu ess-swv
ess-noweb ess-noweb-font-lock-mode ess-bugs-l essd-els ess-sas-d
ess-sas-l ess-sas-a shell pcomplete ess-sta-d ess-sta-l cc-vars cc-defs
make-regexp ess-sp6-d ess-sp3-d ess-julia julia-mode ert find-func ewoc
debug ess-r-d ess-r-completion compile ess-tracebug format-spec ess-roxy
advice hideshow ess-help ess-developer eldoc help-fns ess-s-l ess
ess-inf comint ansi-color ring ess-mode ess-noweb-mode ess-utils cl gv
cl-loaddefs cl-lib ess-custom executable easymenu ess-compat ess-site
autumn-light-theme time-date tooltip electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer 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 make-network-process dbusbind
gfilenotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)
Memory information:
((conses 16 124278 7973)
(symbols 48 24280 0)
(miscs 40 52 112)
(strings 32 32508 4413)
(string-bytes 1 892807)
(vectors 16 15689)
(vector-slots 8 459570 5130)
(floats 8 124 266)
(intervals 56 262 0)
(buffers 960 15)
(heap 1024 53411 1010))
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#21598: 24.5; Auto-revert-mode loads images as text |
Date: |
Mon, 25 Jul 2016 23:42:26 +0200 |
User-agent: |
Notmuch/0.21 (https://notmuchmail.org) Emacs/25.1.50.1 (x86_64-unknown-linux-gnu) |
Eli Zaretskii <address@hidden> writes:
> Actually, I see that image-mode installs an after-revert-hook, bit the
> hook function, image-after-revert-hook, does nothing in this case
> because image-get-display-property returns nil.
It seems to return nil because `revert-buffer' is called with is called
with `preserve-modes' set to non-nil, so `image-mode' is not called
again, so `image-toggle-display-image' is never called on the updated
buffer.
I installed a fix in master, commit b176d16.
Nico
signature.asc
Description: PGP signature
--- End Message ---