From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#21598: 24.5; Auto-revert-mode loads images as text Date: Thu, 01 Oct 2015 22:45:08 +0300 Message-ID: <83h9ma8jaz.fsf@gnu.org> References: <560D4E6F.3020800@yahoo.de> <83mvw28lay.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1443729224 11928 80.91.229.3 (1 Oct 2015 19:53:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 1 Oct 2015 19:53:44 +0000 (UTC) Cc: 21598@debbugs.gnu.org To: rediesmatthias@yahoo.de Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 01 21:53:33 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zhjv0-0002Xg-0E for geb-bug-gnu-emacs@m.gmane.org; Thu, 01 Oct 2015 21:53:30 +0200 Original-Received: from localhost ([::1]:55944 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zhjuz-0000iu-E6 for geb-bug-gnu-emacs@m.gmane.org; Thu, 01 Oct 2015 15:53:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58285) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zhjnr-0006gI-58 for bug-gnu-emacs@gnu.org; Thu, 01 Oct 2015 15:46:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zhjnm-0005AB-Rh for bug-gnu-emacs@gnu.org; Thu, 01 Oct 2015 15:46:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33831) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zhjnm-0005A1-Oo for bug-gnu-emacs@gnu.org; Thu, 01 Oct 2015 15:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Zhjnm-0003OL-IC for bug-gnu-emacs@gnu.org; Thu, 01 Oct 2015 15:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Oct 2015 19:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21598 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 21598-submit@debbugs.gnu.org id=B21598.144372872412989 (code B ref 21598); Thu, 01 Oct 2015 19:46:02 +0000 Original-Received: (at 21598) by debbugs.gnu.org; 1 Oct 2015 19:45:24 +0000 Original-Received: from localhost ([127.0.0.1]:51035 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zhjn9-0003NR-Ht for submit@debbugs.gnu.org; Thu, 01 Oct 2015 15:45:23 -0400 Original-Received: from mtaout27.012.net.il ([80.179.55.183]:60363) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zhjn5-0003NF-C2 for 21598@debbugs.gnu.org; Thu, 01 Oct 2015 15:45:20 -0400 Original-Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0NVK00C003HOTJ00@mtaout27.012.net.il> for 21598@debbugs.gnu.org; Thu, 01 Oct 2015 22:41:29 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NVK008HD4151L60@mtaout27.012.net.il>; Thu, 01 Oct 2015 22:41:29 +0300 (IDT) In-reply-to: <83mvw28lay.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:107181 Archived-At: > Date: Thu, 01 Oct 2015 22:01:57 +0300 > From: Eli Zaretskii > Cc: 21598@debbugs.gnu.org > > > From: Matthias Redies > > 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.