GNU bug report logs - #16515
24.3; Images do not automatically revert on file modification when auto-revert mode enabled for image-mode.

Previous Next

Package: emacs;

Reported by: "Gooch, Allen" <agooch <at> bioware.com>

Date: Tue, 21 Jan 2014 18:16:02 UTC

Severity: normal

Tags: fixed, moreinfo

Found in version 24.3

Fixed in version 27.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 16515 in the body.
You can then email your comments to 16515 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


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#16515; Package emacs. (Tue, 21 Jan 2014 18:16:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Gooch, Allen" <agooch <at> bioware.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 21 Jan 2014 18:16:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Gooch, Allen" <agooch <at> bioware.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 24.3; Images do not automatically revert on file modification when
 auto-revert mode enabled for image-mode.
Date: Tue, 21 Jan 2014 17:42:26 +0000
[Message part 1 (text/plain, inline)]
After starting 'emacs -Q', eval the following:

(add-hook 'image-mode-hook (lambda ()
                             (auto-revert-mode 1)))

Next perform the following steps:
1) load a PNG file (opens in image-mode buffer)
2) modify PNG file
3) notice that PNG in image-mode buffer does NOT automatically revert

In GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601)
 of 2013-03-17 on MARVIN
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --with-gcc (4.7) --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-3.0.9/include
 -ID:/devel/emacs/libs/libiconv-1.13.1-1-dev/include
 -ID:/devel/emacs/libs/libxml2-2.7.8/include/libxml2'

Important settings:
  value of $LANG: ENU
  locale-coding-system: cp1252
  default enable-multibyte-characters: t

Major mode: Image[png]

Minor modes in effect:
  tooltip-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 input:
h e n SPC a u t o - r e v e r t SPC m o d e SPC i n
<backspace> <backspace> e n a b l e d SPC f o r SPC
i m e g a <backspace> <backspace> <backspace> a g -
<backspace> e - m o d e <C-left> <C-left> <C-left>
<C-left> <C-left> <C-left> <C-left> <C-left> o n SPC
f i l e SPC m o d i f i c a t i o n SPC <end> . <return>
S t a r t i n g SPC w i t h SPC ` e m a c s SPC - `
' : <return> <return> L a u n c h SPC e m a c s . SPC
SPC L o a d SPC a C-x k <return> y e s <return> C-x
C-g C-x o C-x o k q C-x b s c r <tab> <return> C-x
C-f ~ <backspace> . e m <tab> i n <tab> <return> <C-end>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <down> <down> <down> <down> <up>
<up> <delete> <delete> <delete> <down> <delete> <delete>
<tab> <up> <tab> <down> <tab> <up> <home> <S-down>
<S-down> <escape> w C-x b <return> C-y <left> C-x C-e
C-x b <tab> m a t <tab> <return> <return> C-x C-f C-g
C-x o C-x C-f S e <tab> u <return> <C-home> <down>
<down> <end> <left> <left> <left> <left> <left> <left>
<left> <left> a C-x C-s <down-mouse-1> <mouse-1> <down-mouse-1>
<mouse-1> <down-mouse-1> <mouse-1> <escape> x r e p
o <tab> r <tab> <return>

Recent messages:
Checking for load-path shadows...done
Loading vc-git...done
Mark set [3 times]
((lambda nil (auto-revert-mode 1)))
Making completion list...
Quit
Mark set
Saving file c:/Users/agooch/Projects/match-tdd/SeqDiag-0-User-initiates-match.pu...
Wrote c:/Users/agooch/Projects/match-tdd/SeqDiag-0-User-initiates-match.pu
Making completion list...

Load-path shadows:
None found.

Features:
(vc-git help-mode shadow sort gnus-util mail-extr emacsbug message
format-spec rfc822 mml easymenu 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 image-mode dired
time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel dos-w32
ls-lisp w32-common-fns disp-table w32-win w32-vars tool-bar dnd fontset
image regexp-opt fringe tabulated-list newcomment lisp-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 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 w32 multi-tty emacs)

[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16515; Package emacs. (Tue, 21 Jan 2014 19:58:02 GMT) Full text and rfc822 format available.

Message #8 received at 16515 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: "Gooch\, Allen" <agooch <at> bioware.com>
Cc: 16515 <at> debbugs.gnu.org
Subject: Re: bug#16515: 24.3;
 Images do not automatically revert on file modification when
 auto-revert mode enabled for image-mode.
Date: Tue, 21 Jan 2014 20:56:50 +0100
"Gooch, Allen" <agooch <at> bioware.com> writes:

> (add-hook 'image-mode-hook (lambda ()
>                               (auto-revert-mode 1)))
>  
> Next perform the following steps:
> 1) load a PNG file (opens in image-mode buffer)
> 2) modify PNG file
> 3) notice that PNG in image-mode buffer does NOT automatically revert

More precisely, reverting happens, but after it the image is displayed
as text (at least that's what you said in gnu.emacs.help, and that's
what I see).

Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16515; Package emacs. (Tue, 21 Jan 2014 21:13:01 GMT) Full text and rfc822 format available.

Message #11 received at 16515 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: "Gooch\, Allen" <agooch <at> bioware.com>
Cc: 16515 <at> debbugs.gnu.org
Subject: Re: bug#16515: 24.3;
 Images do not automatically revert on file modification when
 auto-revert mode enabled for image-mode.
Date: Tue, 21 Jan 2014 22:12:47 +0100
Michael Heerdegen <michael_heerdegen <at> web.de> writes:

> > (add-hook 'image-mode-hook (lambda ()
> >                               (auto-revert-mode 1)))
> >  
> > Next perform the following steps:
> > 1) load a PNG file (opens in image-mode buffer)
> > 2) modify PNG file
> > 3) notice that PNG in image-mode buffer does NOT automatically revert
>
> More precisely, reverting happens, but after it the image is displayed
> as text (at least that's what you said in gnu.emacs.help, and that's
> what I see).

When adding

  0)  (auto-image-file-mode +1)

to the recipe, reverting happens as expected.  I must admit that I don't
understand this.  Why does `auto-image-file-mode' help here?  And why
does emacs -Q display a png automatically as image when finding it
although `auto-image-file-mode' is off by default?


Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16515; Package emacs. (Thu, 26 Sep 2019 17:09:02 GMT) Full text and rfc822 format available.

Message #14 received at 16515 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: "Gooch, Allen" <agooch <at> bioware.com>, 16515 <at> debbugs.gnu.org
Subject: Re: bug#16515: 24.3; Images do not automatically revert on file
 modification when auto-revert mode enabled for image-mode.
Date: Thu, 26 Sep 2019 19:08:36 +0200
Michael Heerdegen <michael_heerdegen <at> web.de> writes:

> "Gooch, Allen" <agooch <at> bioware.com> writes:
>
>> (add-hook 'image-mode-hook (lambda ()
>>                               (auto-revert-mode 1)))
>>  
>> Next perform the following steps:
>> 1) load a PNG file (opens in image-mode buffer)
>> 2) modify PNG file
>> 3) notice that PNG in image-mode buffer does NOT automatically revert
>
> More precisely, reverting happens, but after it the image is displayed
> as text (at least that's what you said in gnu.emacs.help, and that's
> what I see).

I tried opening an image, touching it, and I then got

Reverting buffer ‘emacs.png’.

in the echo area, and I don't get the image displayed as text.  So this
seems to work for me in Emacs 27 -- are you still able to reproduce this
bug?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 26 Sep 2019 17:09:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16515; Package emacs. (Fri, 27 Sep 2019 08:40:02 GMT) Full text and rfc822 format available.

Message #19 received at 16515 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: "Gooch, Allen" <agooch <at> bioware.com>, 16515 <at> debbugs.gnu.org
Subject: Re: bug#16515: 24.3; Images do not automatically revert on file
 modification when auto-revert mode enabled for image-mode.
Date: Fri, 27 Sep 2019 10:39:37 +0200
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:


> I tried opening an image, touching it, and I then got
>
> Reverting buffer ‘emacs.png’.
>
> in the echo area, and I don't get the image displayed as text.  So this
> seems to work for me in Emacs 27 -- are you still able to reproduce this
> bug?

I see something new, which is probably also not good.

I opened an image with emacs -Q, turned on auto-revert-mode, edited the
image externally with an image editor, saved there to the original file,
and then emacs asked "[image file name] changed on disk, really edit the
buffer?  ".  Here is an image of the backtrace (an image because I used
SIGUSR2 to get a backtrace, and after that, Emacs is gaga - is
there a better way to get a backtrace for a y-or-n prompt)?

I used v from dired to open the image file if it matters.

[Screenshot_2019-09-27_10-28-13.png (image/png, inline)]
[Message part 3 (text/plain, inline)]

Regards,

Michael.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16515; Package emacs. (Fri, 27 Sep 2019 14:03:02 GMT) Full text and rfc822 format available.

Message #22 received at 16515 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: "Gooch, Allen" <agooch <at> bioware.com>, 16515 <at> debbugs.gnu.org
Subject: Re: bug#16515: 24.3; Images do not automatically revert on file
 modification when auto-revert mode enabled for image-mode.
Date: Fri, 27 Sep 2019 16:02:41 +0200
Michael Heerdegen <michael_heerdegen <at> web.de> writes:

> I opened an image with emacs -Q, turned on auto-revert-mode, edited the
> image externally with an image editor, saved there to the original file,
> and then emacs asked "[image file name] changed on disk, really edit the
> buffer?  ".

I'm unable to reproduce this on the trunk.  I copied a .jpg file to
/tmp, started emacs -Q, `v' in the dired buffer, `M-x auto-revert-mode',
and then I edited the file in gimp.

Emacs said "Revering buffer 'foo.jpg'." and the new version of the image
was displayed.

> Here is an image of the backtrace (an image because I used
> SIGUSR2 to get a backtrace, and after that, Emacs is gaga - is
> there a better way to get a backtrace for a y-or-n prompt)?

(setq debug-on-quit t) usually works unless whatever is calling y-or-n-p
has disabled that.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16515; Package emacs. (Fri, 27 Sep 2019 14:43:01 GMT) Full text and rfc822 format available.

Message #25 received at 16515 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 16515 <at> debbugs.gnu.org
Subject: Re: bug#16515: 24.3; Images do not automatically revert on file
 modification when auto-revert mode enabled for image-mode.
Date: Fri, 27 Sep 2019 16:41:51 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> I'm unable to reproduce this on the trunk.  I copied a .jpg file to
> /tmp, started emacs -Q, `v' in the dired buffer, `M-x auto-revert-mode',
> and then I edited the file in gimp.

Hmm, I did the same, but with two running Emacsen (one -Q and one with
my .emacs loaded, both master - but I guess that doesn't matter), and I
guess they somehow interfered.  Seems a lock is created when reverting
happens because the buffer is modified, and that causes the trouble when
multiple Emacsen hang around.

With only one running session, I can't reproduce either.  So the
original issue seems to be fixed indeed.

Regards,

Michael.




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 27 Sep 2019 14:44:03 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 16515 <at> debbugs.gnu.org and "Gooch, Allen" <agooch <at> bioware.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 27 Sep 2019 14:44:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16515; Package emacs. (Fri, 27 Sep 2019 14:45:01 GMT) Full text and rfc822 format available.

Message #32 received at 16515 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 16515 <at> debbugs.gnu.org
Subject: Re: bug#16515: 24.3; Images do not automatically revert on file
 modification when auto-revert mode enabled for image-mode.
Date: Fri, 27 Sep 2019 16:44:23 +0200
Michael Heerdegen <michael_heerdegen <at> web.de> writes:

> Hmm, I did the same, but with two running Emacsen (one -Q and one with
> my .emacs loaded, both master - but I guess that doesn't matter), and I
> guess they somehow interfered.  Seems a lock is created when reverting
> happens because the buffer is modified, and that causes the trouble when
> multiple Emacsen hang around.

Ah, that makes sense -- Emacs creates a lock on files you have open.

> With only one running session, I can't reproduce either.  So the
> original issue seems to be fixed indeed.

Yup; closing.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 26 Oct 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 110 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.