When using preview-latex, I am getting frequent “Unable to load image” messages 
in the Emacs Messages buffer.  This has started recently, meaning I noticed it 
sometime between “a month or so ago” and “maybe about a year.”

Here’s a simple example:

\documentclass[12pt]{article}
\begin{document}
Inline math:   $X+\gamma$ blah blah $2-\alpha+1$.
\end{document}

When I run preview-buffer (or any other preview command), I get something like:

Type ‘^C ^L’ to display results of compilation.
locating previews...
Type ‘^C ^L’ to display results of compilation.
Unable to load image (image :file 
/Users/braunm/_region_.prv/tmp45041wav/pr1-1.png :type png :ascent 85)
Unable to load image (image :file 
/Users/braunm/_region_.prv/tmp45041wav/pr1-2.png :type png :ascent 75)

But the images appear correctly in the document nonetheless, and are exactly in 
the right files.  The only reason I care about these messages is that 1) they 
are there for a reason and error messages just bother me; and 2) they might be 
related to other problems from a package I am working on.  I’m hoping if I can 
figure out why I’m now getting these messages, it will help with the other 
project.

Other relevant info:  My computer is a Mac Pro running MacOS 11.1 (but the 
problem was there with MacOSX too).  I typically use Aquamacs (based on Emacs 
25), but I can replicate it on self-compiled builds of the “official” Emacs 
27.1 and 28.0.50, as well as the emacsformacosx.com<http://emacsformacosx.com> 
binary. I am using AucTeX 12.3.1, but it happens on Aquamacs with AucTeX 12.2.2 
also. My Ghostscript version is 9.53.3, but I can replicate the messages with 
gs 9.27.  I get the messages when I set preview-image-type to either png, 
dvipng, tiff, or jpeg. I’ve even tried with a nearly empty .emacs file, and the 
messages are still there, even though the images show up in the right places.

So I’ve done what I can to isolate where these error messages are coming from.  
I wish I could be more precise about when I first starting noticing them, but 
they haven’t caused problems until now.  The best I can tell is that emacs is 
generating nil images that show up in ns_load_image in nsimage.m, but not being 
familiar with Obj-C, I’ve gone as far as I can.

Any ideas?

Thanks,


--------------------------
Michael Braun
Associate Professor of Marketing, and
  Corrigan Research Professor
Cox School of Business
Southern Methodist University
Dallas, TX 75275
[email protected]<mailto:[email protected]>







Reply via email to