[OS X Emacs] Re: Re: Can't Make Doc-View Work

John Mark Swafford johnmarksuave at gmail.com
Fri Mar 12 16:30:03 EST 2010


I figured it out! I feel really stupid... But I figured it out.

I had to add

(setq exec-path (append exec-path '("path/to/gs")))

to my .emacs file. I'm not sure why this worked and why my previous .emacs
setup didn't... I'm assuming it's the difference between the exec-path and
the PATH? Thanks for all your help everyone! I should make a web page about
this in case I need to do it again...

On Fri, Mar 12, 2010 at 9:13 PM, John Mark Swafford <johnmarksuave at gmail.com
> wrote:

>
>
> On Fri, Mar 12, 2010 at 7:26 PM, Peter Dyballa <Peter_Dyballa at web.de>wrote:
>
>>
>> Am 12.03.2010 um 00:37 schrieb John Mark Swafford:
>>
>>
>>  ./configure --with-gif=no --with-ns
>>> make
>>> make install
>>> sudo cp -r nextstep/Emacs.app /Applications/Emacs.app
>>>
>>
>> The last step has possibly three faults:
>>
>>  1) the sudo
>>  2) the 'cp -r'
>>  3) the '/Applications/Emacs.app' target
>>
>> Final step 1 is *not* needed. When you're allowed to sudo then you're
>> automatically, I think, member of the group admin and therefore have write
>> privileges in /Applications. I am member and I can easily drag things into
>> /Applications or remove other things from there.
>>
>> Final step 2 looks like a command which might work correctly. I have my
>> doubts, based on heuristics gained somewhen in the last, maybe, ten years.
>> I'd drag Emacs.app to /Applications:
>>
>>        open nextstep
>>        open /Applications
>>        « delete old Emacs.app in Applications »
>>        « drag Emacs.app from nextstep to Applications »
>>
>> Final step 3 is definitely wrong! You can overwrite the old software,
>> however this is the source for a cascade of faults. It's not guaranteed that
>> old files are removed. It's not guaranteed that a file with the same name is
>> moved into another sub-directory as it has happened in the new source, with
>> the effect that now two files of different revision exist in Emacs'
>> load-path.
>>
>> When you install the new version of an application then this "application
>> bundle" has means to first move the old version into the trash can. Then it
>> "installs" itself in /Applications. You have to mimic this on the command
>> line, i.e., after 'make install' a '(sudo) rm -rf /Applications/Emacs.app'
>> has to happen. Or just drag...
>>
>>
>>  When I have a .tex document open, it says [(LaTeX ht Fill)] in the
>>> mode-line.
>>>
>>
>>
>> The 'ht' snippet is definitely incorrect. Then the whole Emacs.app cannot
>> be right.
>>
>>
> Ok, I reinstalled Emacs according to Peter. Now the mode line in my
> main.tex file simply says (LaTeX).
>
> I also installed AUCTeX. I used the following to configure it (via Axel's
> suggestion):
>
> ./configure
> --with-emacs=/Applications/Emacs.app/Contents/MacOS/Emacs --with-lispdir=/Applications/Emacs.app/Contents/Resources/site-lisp --without-texmf-dir
> make
> sudo make install
>
> Like before, I got rid of my customized .emacs file just in case anything
> in it was causing an unexpected problem. My new .emacs looks like this:
>
> (setenv "PATH"
>     (concat
>      "/usr/local/bin" ":"
>      "/usr/local/sbin" ":"
>      "/usr/local" ":"
>      "/bin" ":"
>      "/opt/local/bin" ":"
>      "/opt/local/sbin" ":"
>      "/usr/X11/bin" ":"
>      "/usr/X11R6/bin"
>      ))
>
> (require 'tex-site)
>
> ;; Don't load the startup screen. It's obnoxious
> (setq inhibit-startup-message t)
> (setq inhibit-splash-screen t)
>
> (load "auctex.el" nil t t)
> (load "preview-latex.el" nil t t)
>
> Without the setenv at the top, my Emacs can't find ANYTHING, not latex, not
> dvips, not anything. I added the last parts to make sure Emacs was finding
> AUCTeX and could load it properly. Next, I opened my main.tex file and
> compiled it with LaTeX. This worked fine. When I pressed C-c C-c, Emacs
> tried to open my file in xdvi. I can change this later, so I'm not worried
> about that. However, when I try and use M-x preview-document (this comes
> with the preview-latex.el packaged with AUCTeX, I think) I get this:
>
> error in process sentinel: Searching for program: No such file or
> directory, gs
>
> This is probably my problem as to why DocView isn't working, but it doesn't
> make much sense to me because gs is in the same directory as everything
> else! Is there a way to set the path to gs somewhere else that I'm missing?
>
> Also, I tried simply opening a .dvi and a .pdf file just to see what errors
> I was given. When opening a .dvi I get the following:
>
> No PNG support is available, or some conversion utility for dvi files is
> missing.
> File mode specification error: (wrong-type-argument stringp nil)
>
> When opening a .pdf I get:
>
> No PNG support is available, or some conversion utility for pdf files is
> missing.
> File mode specification error: (wrong-type-argument stringp nil)
>
> This also makes me think Emacs isn't finding my gs, but when I run:
>
> which gs
>
> in an Emacs shell, it shows me the correct path. Has anyone else has issues
> like this setting up their Emacs on OS X to work with DocView properly?
>
>>
>>
>> _____________________________________________________________
>> MacOSX-Emacs mailing list
>> MacOSX-Emacs at email.esm.psu.edu
>> http://email.esm.psu.edu/mailman/listinfo/macosx-emacs
>> List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://email.esm.psu.edu/pipermail/macosx-emacs/attachments/20100312/c6b6b31a/attachment.html>


More information about the MacOSX-Emacs mailing list