tags:

views:

98

answers:

3

I read about auto-image-file-mode , which I think displays image files as images within emacs. I'd like to use it. This doc says it has been replaced by image-mode.

I can't get either to work.

Any help?

A: 

Using Emacs 23.1 (on Fedora 12) when I visit a *.png file, it shows up as an image in the Emacs buffer. Similarly for *.gif and *.pdf files. The mode was advertised as Image[png], fwiw.

pajato0
Interesting, but that doesn't help me at all.
Cheeso
+1  A: 

It can depend on what version and where you got your windows emacs binary. If you have the windows emacs23 binary from the gnu ftp site then I don't think it is compiled with image support (at least this was the case several months ago). I use the patched windows emacs23 binary from EmacsW32 which does have image support. I also have (auto-image-file-mode) in my .emacs file.

luapyad
+3  A: 

I got it to work, by downloading the packages for PNG and JPG from GnuWin32, and putting the required DLLs into the \emacs\bin directory:

From LibPng: 
  libpng-config
  libpng12-config
  libpng12.dll
  libpng3.dll
  zlib1.dll

From jpeg: 
  jpeg62.dll

Now it works. Here's a screen-shot of editing a SO question, being displayed in emacs.

alt text

You could also drop those DLLs on the OS's PATH, before running runemacs.exe. That works, too.

Cheeso
Works great, though zlib1.dll isn't provided in the png zip file (binaries at least).
Trey Jackson
yeah, weird, it was for me, for v1.2.3.6. I think it's necessary.
Cheeso
Are there any pass-through commands to the image-displays, that would allow us to size the image to fit, etc? I can scroll the image, but hi-res file are tough to view....
Michael Paulukonis
I don't know; it might be worthy of a new question. On the other hand, as not very programming related, it would be in danger of getting closed pretty quickly! (like this one)
Cheeso