* bug#21598: 24.5; Auto-revert-mode loads images as text
@ 2015-10-01 15:17 Matthias Redies
2015-10-01 19:01 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Matthias Redies @ 2015-10-01 15:17 UTC (permalink / raw)
To: 21598
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: <8737xumxh1.fsf@linux.fritz.box>
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))
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#21598: 24.5; Auto-revert-mode loads images as text
2015-10-01 15:17 bug#21598: 24.5; Auto-revert-mode loads images as text Matthias Redies
@ 2015-10-01 19:01 ` Eli Zaretskii
2015-10-01 19:45 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2015-10-01 19:01 UTC (permalink / raw)
To: Matthias Redies; +Cc: 21598
> From: Matthias Redies <rediesmatthias@yahoo.de>
> Date: Thu, 1 Oct 2015 17:17:03 +0200
>
> 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 happens because autorevert.el calls revert-buffer with its 3rd
argument non-nil. It is easy to change that to nil for buffers under
image-mode, but I'm curious why doesn't autorevert.el do that for all
the other modes. Does anyone know?
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#21598: 24.5; Auto-revert-mode loads images as text
2015-10-01 19:01 ` Eli Zaretskii
@ 2015-10-01 19:45 ` Eli Zaretskii
2016-07-25 21:42 ` Nicolas Petton
0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2015-10-01 19:45 UTC (permalink / raw)
To: rediesmatthias; +Cc: 21598
> Date: Thu, 01 Oct 2015 22:01:57 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 21598@debbugs.gnu.org
>
> > From: Matthias Redies <rediesmatthias@yahoo.de>
> > Date: Thu, 1 Oct 2015 17:17:03 +0200
> >
> > 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 happens because autorevert.el calls revert-buffer with its 3rd
> argument non-nil. It is easy to change that to nil for buffers under
> image-mode, but I'm curious why doesn't autorevert.el do that for all
> the other modes. Does anyone know?
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#21598: 24.5; Auto-revert-mode loads images as text
2015-10-01 19:45 ` Eli Zaretskii
@ 2016-07-25 21:42 ` Nicolas Petton
0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Petton @ 2016-07-25 21:42 UTC (permalink / raw)
To: Eli Zaretskii, rediesmatthias; +Cc: 21598, 21598-done
[-- Attachment #1: Type: text/plain, Size: 500 bytes --]
Eli Zaretskii <eliz@gnu.org> 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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 512 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-07-25 21:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-01 15:17 bug#21598: 24.5; Auto-revert-mode loads images as text Matthias Redies
2015-10-01 19:01 ` Eli Zaretskii
2015-10-01 19:45 ` Eli Zaretskii
2016-07-25 21:42 ` Nicolas Petton
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.