emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Graphics files in archives cannot be toggled to display image or cod


From: Peter Dyballa
Subject: Re: Graphics files in archives cannot be toggled to display image or code
Date: Tue, 4 Apr 2006 00:44:16 +0200


Am 01.04.2006 um 15:45 schrieb Richard Stallman:

Can you debug why it fails?
It ought to work.

It works with ZIP archives that open in archive-mode. TAR files open in tar-mode. In image-mode.el we have now:

  140       (let* ((image
  141               (if (and (buffer-file-name)
  142                        (not (buffer-modified-p))
  143                        (not (and (boundp 'archive-superior-buffer)
  144                                  archive-superior-buffer)))
  145                   (progn (clear-image-cache)
  146                          (create-image (buffer-file-name)))
  147                 (create-image
  148                  (string-make-unibyte
  149                   (buffer-substring-no-properties (point-min) 
(point-max)))
  150                  nil t)))

Archive-superior-buffer is set by ZIP archives, so they are treated differently here with clear-image-cache and clear-image. Or TAR files are treated that way -- I don't understand the code, but here's the difference that might explain why image-mode works for ZIP archives and not for TAR files. Well, that's actually your patch ...

One thing this patch achieves is that *Messages* does not contain any more

Cannot find image file `/Users/pete/Quellen/Emacs_CVS/ graphics_test_tar/images.tar!image.xbm' [2 times] Cannot find image file `/Users/pete/Quellen/Emacs_CVS/ graphics_test_tar/images.tar!image.xpm' [2 times]


--
Greetings

  Pete

 Increase the size of your bike by at least *five* inches






reply via email to

[Prev in Thread] Current Thread [Next in Thread]