wp.jochen.hayek.name/blog-en

Emacs Doc View Mode

Ever since I noticed, that in new Emacsen you are able (resp. you should be able) to view e.g. PDFs within Emacs buffers, I wondered why this does not work “on certain platforms”. Today I finally searched for “emacs docview”, found the right document (see above), and solved the issue.

Emacs needs “gs” for converting PDFs to a series of PNGs, but of course it needs to find “gs” on its PATH. “On certain platforms”, $HOME/.profile (or so / etc.) does not get read, so would I manipulate PATH within $HOME/.emacs? No, I don’t like that. An alternative approach:

M-x customize-group RET doc-view RET

And set “Doc View Ghostscript Program” individually. Where is “gs”? Maybe “type -a gs“?!?

Now I enjoy viewing PDFs inside Emacs on even more platforms.

Exit mobile version